-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathclean
executable file
·47 lines (37 loc) · 889 Bytes
/
clean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/csh -f
set DEV_TOP = `pwd`
set TOUCH = ORIG
if ( ! -e configure.oa ) then
touch configure.oa
set TOUCH = TOUCH
endif
set nonomatch
set DIRS = ( src )
set EXES = ( OBSGRID )
set i = 1
foreach dir ( $DIRS )
if ( -d $dir ) then
( cd $dir ; make -i DEV_TOP="${DEV_TOP}" TARGET="$EXES[$i].exe" clean )
endif
/bin/rm -f $EXES[$i].exe
@ i ++
end
# The nuclear option
find . -name \*.exe -exec \rm {} \;
find . -name \*.o -exec \rm {} \;
find . -name \*.a -exec \rm {} \;
if ( "$1" == '-a' ) then
/bin/rm -rf ./netcdf_links
foreach dir ( $DIRS )
if ( -d $dir ) then
( cd $dir ; make -i DEV_TOP="${DEV_TOP}" TARGET="${dir}.exe" clobber >& /dev/null )
endif
end
if ( -e configure.oa ) then
/bin/cp configure.oa configure.oa.backup
/bin/rm -f configure.oa
endif
endif
if ( ( $TOUCH == TOUCH ) && ( -e configure.oa ) ) then
/bin/rm -f configure.oa
endif