source:
branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/TOOLS/COMPILE/agrifpp.sh
@
2815
Last change on this file since 2815 was 2815, checked in by rblod, 13 years ago | |
---|---|
|
|
File size: 865 bytes |
Line | |
---|---|
1 | #!/bin/bash |
2 | #set -x |
3 | set -o posix |
4 | #set -u |
5 | #set -e |
6 | #+ |
7 | # |
8 | # ========== |
9 | # agrifpp.sh |
10 | # ========== |
11 | # |
12 | # --------------------------- |
13 | # Preform CPP pre-processing |
14 | # --------------------------- |
15 | # |
16 | # SYNOPSIS |
17 | # ======== |
18 | # |
19 | # :: |
20 | # |
21 | # $ agrifpp.sh |
22 | # |
23 | # |
24 | # DESCRIPTION |
25 | # =========== |
26 | # |
27 | # |
28 | # Look after key agrif, if yes agrif2model is not yet pre-pocessed, otehrwise we use |
29 | # standard cpp. |
30 | # |
31 | # EXAMPLES |
32 | # ======== |
33 | # |
34 | # :: |
35 | # |
36 | # $ ./agrifpp.sh -Dkey |
37 | # |
38 | # |
39 | # TODO |
40 | # ==== |
41 | # |
42 | # option debug |
43 | # |
44 | # |
45 | # EVOLUTIONS |
46 | # ========== |
47 | # |
48 | # $Id: agrifpp.sh 2143 2010-10-04 12:49:55Z rblod $ |
49 | # |
50 | # |
51 | # |
52 | # * creation |
53 | # |
54 | #- |
55 | |
56 | MYFILE=`echo $* |awk -F" " '{print $NF}' ` |
57 | FPP_OPT=` echo $* |awk '{ for (i=1 ; i<NF ; i++ ) { printf " %s", $i } }'` |
58 | AGRIF_ACTIVATED=$( echo $FPP_OPT | grep key_agrif ) |
59 | |
60 | if [ "$MYFILE" == "agrif2model.F90" -a "${#AGRIF_ACTIVATED}" -gt 0 ]; then |
61 | cat $MYFILE |
62 | else |
63 | cpp $@ |
64 | fi |
65 |
Note: See TracBrowser
for help on using the repository browser.