New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
agrifpp.sh in branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/TOOLS/COMPILE – NEMO

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

branch dev_r2802_LOCEAN10_agrif_lim2: avoid to recompile everything with key_agrif, allow parallel compilation with agrif etc

  • Property svn:executable set to *
File size: 865 bytes
Line 
1#!/bin/bash
2#set -x
3set -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
56MYFILE=`echo $* |awk -F" " '{print $NF}' ` 
57FPP_OPT=` echo $* |awk '{  for (i=1 ; i<NF ; i++ )  { printf " %s",  $i } }'`
58AGRIF_ACTIVATED=$( echo  $FPP_OPT | grep key_agrif )
59
60if [ "$MYFILE" == "agrif2model.F90" -a "${#AGRIF_ACTIVATED}" -gt 0 ]; then
61   cat  $MYFILE
62else
63   cpp $@
64fi
65
Note: See TracBrowser for help on using the repository browser.