Changed smth-desmth in default GEOGRID.TBL files to 1-2-1 to
[WPS.git] / clean
blob1d4e5eb3219a86d9b44e1d0983446a47143a9d95
1 #!/bin/csh -f
3 set DEV_TOP = `pwd`
5 set TOUCH = ORIG
6 if ( ! -e configure.wps ) then
7 touch configure.wps
8 set TOUCH = TOUCH
9 endif
11 set nonomatch
13 set DIRS = ( geogrid ungrib metgrid ungrib ungrib util util util util util )
14 set EXES = ( geogrid ungrib metgrid g1print g2print plotfmt plotgrids mod_levs rd_intermediate avg_tsfc )
16 set i = 1
17 foreach dir ( $DIRS )
18 if ( -d $dir ) then
19 ( cd $dir ; make -i DEV_TOP="${DEV_TOP}" TARGET="$EXES[$i].exe" clean )
20 endif
21 /bin/rm -f $EXES[$i].exe
22 @ i ++
23 end
25 # The nuclear option
27 find . -name \*.exe -exec \rm {} \;
28 find . -name \*.o -exec \rm {} \;
29 find . -name \*.a -exec \rm {} \;
31 #rm gmeta
33 #if ( -e GRIBFILE.AAA ) then
34 # /bin/rm -f GRIBFILE.[A-Z][A-Z][A-Z]
35 #endif
37 #/bin/rm -f FILE:[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]_[0-9][0-9] >& /dev/null
39 #if ( -e Vtable ) then
40 # /bin/rm -f Vtable
41 #endif
43 #foreach core ( em nmm )
44 # foreach io_form ( nc bin grib )
45 # /bin/rm -f geo_${core}.d[0-9][0-9].${io_form} >& /dev/null
46 # /bin/rm -f met_${core}.d[0-9][0-9].*.${io_form} >& /dev/null
47 # end
48 #end
50 #if ( -e geogrid.log ) then
51 # /bin/rm -f geogrid.log
52 #endif
54 #if ( -e metgrid.log ) then
55 # /bin/rm -f metgrid.log
56 #endif
58 if ( "$1" == '-a' ) then
59 /bin/rm -rf ./netcdf_links
60 foreach dir ( $DIRS )
61 if ( -d $dir ) then
62 ( cd $dir ; make -i DEV_TOP="${DEV_TOP}" TARGET="${dir}.exe" superclean >& /dev/null )
63 endif
64 if ( -l ${dir}.exe ) then
65 /bin/rm -f ${dir}.exe
66 endif
67 end
68 if ( -e configure.wps ) then
69 /bin/cp configure.wps configure.wps.backup
70 /bin/rm -f configure.wps
71 endif
72 endif
74 if ( ( $TOUCH == TOUCH ) && ( -e configure.wps ) ) then
75 /bin/rm -f configure.wps
76 endif