-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile
executable file
·45 lines (40 loc) · 990 Bytes
/
compile
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
#!/bin/csh -f
#
# configure must be run first -- configure.upp is output
if ( ! -e configure.upp ) then
echo "ERR :: No configure.upp file => Do './configure' first"
exit ( 1 )
else if ( -z configure.upp ) then
echo "ERR :: Empty configure.upp file => Do './configure' first"
exit ( 2 )
endif
#
# NETCDF environment variable must be set
if ( ( ! $?NETCDF ) && ( -d netcdf_links ) ) then
setenv NETCDF `pwd`/netcdf_links
setenv temp_netcdf 1
else
setenv temp_netcdf 0
endif
#
# Not expecting any arguments
if ( ${#argv} == 0 ) then
echo "**** Compiling UPP and all libs ****"
set MAKE = `awk '($1~/^MAKE/) {print substr($0,index($0,"=")+1) }' configure.upp`
( ${MAKE} -i -f makefile all )
else
echo "*****"
echo " "
echo "Unrecognized compile target $1."
echo " "
echo " Usage:"
echo " compile"
echo " make will be called from this directory
echo " "
echo "*****"
exit(1)
endif
if ( $temp_netcdf == 1 ) then
unsetenv NETCDF
endif
exit(0)