Changeset 394
- Timestamp:
- 2006-03-10T18:20:18+01:00 (19 years ago)
- Location:
- trunk/UTIL
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/fait_AA_make
r380 r394 1 1 #!/bin/ksh 2 #set -xv 3 #- 4 echo "This script must be run while in the modipsl/modeles/OPA directory" 2 #set -vx 3 ############################################################ 4 # 5 # Purpose : 6 # This script aims to create create the AA_make file 7 # in the WORK directory. 8 # AA_make contains : 9 # - compilation options speccific to NEMO 10 # - compilation rules 11 # - dependancies 12 # Running the modipsl/util/ins_make command is needed AFTER 13 # fait_AA_make. 14 # 15 # Method : 16 # We use temporary files to perform the following steps : 17 # 1- search all CPP keys in the code 18 # 2- write compilation rules 19 # 3- add compilation options add the beginning of AA_make 20 # 4- search and write dependancies 21 # 5- add some specific rules (links creation in the WORK) 22 # 23 ############################################################ 24 #- 25 echo "This script must be run while in the modipsl/modeles/NEMO directory" 5 26 cd WORK 6 27 pwd 7 #MODEL_LIB=../../../lib/libopa.a 8 #MODEL_LIB=`grep MODEL_LIB AA_make.ldef | sed 's/ //g' | sed 's/MODEL_LIB=//g' ` 9 liste_cle=$(egrep '^# *if[!( &]*def|^# *elif' *.[Fh] *.[Fh]90 | grep key_ | sed 's/||/\ 28 29 #- 30 #- Search CPP keys --- 31 liste_cle=$(egrep '^# *if[!( &]*def|^# *elif' *.[Fh] *.[Fh]90 2> /dev/null | grep key_ | sed 's/||/\ 10 32 /' | sed 's/\&\&/\ 11 /' | sed 's/^.*key_/key_/' | sed 's/ *[) ] *$//' | sort -u ) 12 #- 13 #- 14 #- 3) Ecriture du AA_make 15 #- 16 #- enteteFait_AA_make 17 #- 33 /' | sed 's/^.*key_/key_/' | sed 's/ *[) ] *$//' | sort -u ) 34 35 #- 36 #- Write main compilation rules --- 18 37 cat > tampon <<end 19 # 38 20 39 .SUFFIXES: .f90 .F90 .F 21 # 40 22 41 # Target 23 42 all: diroce \$(EXEC_BIN) 24 43 @cp SRC_FILE_LIST.temp SRC_FILE_LIST 25 44 @echo OPA model is OK 26 # cleaning objects, libraries and executables45 # Cleaning objects, libraries and executables 27 46 clean: 47 ifeq (\$(AGRIF),use) 48 -@(cd OPAFILES; ./efface) 49 endif 28 50 \$(RM) model.o \$(MODDIR)/oce/*.mod \$(MODEL_LIB) \$(SXMODEL_LIB) \$(EXEC_BIN) 29 51 @echo OPA model \(.o .mod libraries and executables are removed\) 30 # dependancies 52 53 # Dependancies 31 54 diroce: 32 55 @if [ ! -d ../../../lib/oce ] ; then mkdir ../../../lib/oce ; fi 33 56 34 \$(EXEC_BIN) : libioipsl key keyverif src_file_list \$(MODEL_LIB) \$(IOIPSL_LIB) model.o 57 \$(EXEC_BIN) : libioipsl key keyverif src_file_list libagrif \$(MODEL_LIB) \$(IOIPSL_LIB) \$(AGRIF_LIB) agrif2model.o model.o 58 ifeq (\$(AGRIF),use) 59 \$(F_L) \$(L_X) -o \$(EXEC_BIN) model.o agrif2model.o \$(SXMODEL_LIB) \$(OASISMPI2_LIB) \$(IOIPSL_LIB) \$(AGRIF_LIB) \$(NCDF_LIB) \$(LIBMPI) \$(LIBMP) 60 else 35 61 \$(F_L) \$(L_X) -o \$(EXEC_BIN) model.o \$(SXMODEL_LIB) \$(OASISMPI2_LIB) \$(IOIPSL_LIB) \$(NCDF_LIB) \$(LIBMPI) \$(LIBMP) 36 62 endif 63 64 # Agrif library and conv 65 libagrif : 66 ifeq (\$(AGRIF),use) 67 @( if [ ! -d OPAFILES ]; then mkdir OPAFILES; fi ) 68 @( if [ ! -d OPAFILES/AGRIF_INC ]; then mkdir OPAFILES/AGRIF_INC ; fi ) 69 @( if [ ! -d OPAFILES/AGRIF_MODELFILES ]; then mkdir OPAFILES/AGRIF_MODELFILES ; fi ) 70 @(cd ../../AGRIF ; \$(M_K) -f Makefile P_P="\$(AGRIF_MPI)" ) 71 @cp -rf ../../AGRIF/agrif_opa.in OPAFILES/. 72 @cp -rf ../../AGRIF/conv OPAFILES/. 73 @cp -rf ../../AGRIF/efface OPAFILES/. 74 endif 75 76 # Agrif interface with NEMO 77 agrif2model.o : 78 ifeq (\$(AGRIF),use) 79 @\$(P_C) \$(P_O) -IOPAFILES/AGRIF_INC \$*.F90 > OPAFILES/\$*.F90 80 @\$(F_C) \\ 81 #-Q- aix -qsuffix=f=F90 \\ 82 #-Q- osxxlf -qsuffix=f=F90 \\ 83 \$(P_P) \$(F_O) \\ 84 #-Q- fjvpp -Z \$*.L \\ 85 #-Q- sxnec -R2 \\ 86 #-Q- sx6nec -R2 \\ 87 #-Q- sxdkrz -R2 \\ 88 #-Q- eshpux -R2 \\ 89 #-Q- aix -qsource \\ 90 OPAFILES/\$*.F90 || { mv \$(PREF).L \$(TMP) ; false ; exit ; } 91 @\$(A_X) \$(SXMODEL_LIB) \$*.o > /dev/null 92 endif 93 94 # IOIPSL library 37 95 libioipsl : 38 96 (cd ../../IOIPSL/src ; \$(M_K) -f Makefile ) 39 97 40 # main program98 # Main program 41 99 model.o : model.f90 42 100 @\$(F_C) \$(F_O) -c model.f90 … … 55 113 @echo 56 114 57 # Rules115 # Default rules 58 116 .DEFAULTS: 59 117 … … 81 139 82 140 # rules for the .F90 files 83 .F90.a : 141 .F90.a : 142 ifeq (\$(AGRIF),use) 143 @\$(P_C) \$(P_O) -IOPAFILES/AGRIF_INC \$*.F90 > OPAFILES/\$*.F90 144 @(cd OPAFILES ; ./conv agrif_opa.in -rm \\ 145 -comdirin ./ -comdirout AGRIF_MODELFILES/. -convfile \$*.F90) 146 -@mv -f OPAFILES/AGRIF_MODELFILES/\$*.F90 OPAFILES/\$*.F90 147 @\$(P_C) \$(P_O) -IOPAFILES/AGRIF_INC OPAFILES/\$*.F90 > OPAFILES/AGRIF_MODELFILES/\$*.F90 148 -@mv -f OPAFILES/AGRIF_MODELFILES/\$*.F90 OPAFILES/\$*.F90 149 @\$(F_C) \$(P_P) \$(F_O) \\ 150 #-Q- fjvpp -Z \$*.L \\ 151 #-Q- sxnec -R2 \\ 152 #-Q- sx6nec -R2 \\ 153 #-Q- sxdkrz -R2 \\ 154 #-Q- eshpux -R2 \\ 155 #-Q- aix -qsource \\ 156 OPAFILES/\$*.F90 || { if [ -f \$(PREF)\$*.L ] ; then mv \$(PREF)\$*.L \$(TMP) ; fi ; false ; exit ; } 157 else 84 158 @\$(F_C) \$(P_P) \$(F_O) \\ 85 159 #-Q- fjvpp -Z \$*.L \\ … … 90 164 #-Q- aix -qsource \\ 91 165 \$*.F90 || { if [ -f \$(PREF)\$*.L ] ; then mv \$(PREF)\$*.L \$(TMP) ; fi ; false ; exit ; } 166 endif 92 167 #-Q- sxnec @\$(A_X) \$(SXMODEL_LIB) \$*.o > /dev/null 93 168 #-Q- sx6nec @\$(A_X) \$(SXMODEL_LIB) \$*.o > /dev/null … … 144 219 #-Q- osxxlf @mv \$(PREF)\$*.lst \$(PREF)\$*.L 145 220 @if [ -f \$(PREF)\$*.L ] ; then mv \$*.L \$(TMP) ; fi 146 # 221 147 222 end 148 223 #- 149 #- dependances 150 #- 224 #- Compilation options --- 151 225 exec 1> AA_make 152 226 MAIN="model" … … 154 228 echo '# some variables' 155 229 echo 'TMP = ../../../tmp' 156 echo '#-Q- sxnec # Compiler options for the ORCA model - std'230 echo '#-Q- sxnec # Compiler options for NEMO (IDRIS SX5-NEC) ' 157 231 echo '#-Q- sxnec F_O = -dw -Wf\"-A idbl4\" -sx5 -ftrace -C vopt -Wf"-init stack=nan" -Wl"-f nan" -Wf"-P nh" -Wf,-pvctl noassume loopcnt=10000 -L transform -I $(MODDIR) -I $(MODDIR)/oce' 158 232 echo '#-Q- sxnec L_X = $(L_O) $(L_C) -ftrace' 159 echo '#-Q- sx6nec # Compiler options for the ORCA model - std'233 echo '#-Q- sx6nec # Compiler options NEMO (CEA SX6-NEC) ' 160 234 echo '#-Q- sx6nec F_O = -size_t64 -dw -Wf\"-A dbl4\" -sx6 -C vopt -Wf"-P nh" -Wf',-pvctl noassume loopcnt=10000 -L transform' -I $(MODDIR) -I $(MODDIR)/oce' 161 235 echo '#-Q- sx6nec F_O = -size_t64 -dw -Wf\"-A dbl4\" -sx6 -ftrace -C vopt -Wf"-init stack=nan" -Wl"-f nan" -Wf"-P nh" -Wf,-pvctl noassume loopcnt=10000 -L transform -I $(MODDIR) -I $(MODDIR)/oce' 162 236 echo '#-Q- sx6nec L_X = $(L_O) $(L_C) -ftrace' 163 echo '#-Q- sxdkrz # Compiler options for the ORCA model for the DKRZ SX6-NEC'237 echo '#-Q- sxdkrz # Compiler options for NEMO (DKRZ SX6-NEC) ' 164 238 echo '#-Q- sxdkrz F_O = -ew -sx6 -ftrace -C vopt -Wf"-init stack=nan" -Wl"-f nan" -Wf"-P nh" -Wf"-pvctl noassume loopcnt=10000" -L transform -I $(MODDIR) -I $(MODDIR)/oce' 165 239 echo '#-Q- sxdkrz L_X = $(L_O) $(L_C) -ftrace' 166 echo '#-Q- eshpux # Compiler options for the ORCA model for the ES'240 echo '#-Q- eshpux # Compiler options for NEMO (Earth Simulator)' 167 241 echo '#-Q- eshpux # for super perfs!' 168 242 echo '#-Q- eshpux # F_O = $(FTRACE) -pi nest=5 line=10000 expin=Fmpplib.F -Wf,-A idbl4 -C hopt -Wf"-P nh" -Wf,-pvctl noassume loopcnt=10000 -L transform -I $(MODDIR) -I $(MODDIR)/oce' … … 170 244 echo '#-Q- eshpux F_O = $(FTRACE) -Wf,-A idbl4 -C vopt -P stack -Wf"-P nh" -Wf,-pvctl noassume loopcnt=10000 -L transform -Wf,-pvctl nomsg -Wf"-O nomsg" -I $(MODDIR) -I $(MODDIR)/oce' 171 245 echo '#-Q- eshpux L_X = $(L_O)' 172 echo '#-Q- linux # Compiler options for the ORCA model(pgf version)'246 echo '#-Q- linux # Compiler options for NEMO (pgf version)' 173 247 echo '#-Q- linux F_O = -Mlist -O3 -byteswapio -r8 -I $(MODDIR) -I$(MODDIR)/oce' 174 248 echo '#-Q- linux L_X = -r8 -O3' 175 echo '#-Q- lxiv8 # Compiler options for the ORCA model (ifort version)' 249 echo '#-Q- lxiv7 # Compiler options for NEMO (ifc version)' 250 echo '#-Q- lxiv7 F_O = -O3 -r8 -I $(MODDIR) -I$(MODDIR)/oce' 251 echo '#-Q- lxiv7 L_X = -r8 -O3' 252 echo '#-Q- lxiv8 # Compiler options for NEMO (ifort version)' 176 253 echo '#-Q- lxiv8 F_O = -O3 -r8 -I $(MODDIR) -I$(MODDIR)/oce' 177 254 echo '#-Q- lxiv8 L_X = -r8 -O3' 178 echo '#-Q- g95 # Compiler options for the ORCA model(g95 version)'255 echo '#-Q- g95 # Compiler options for NEMO (g95 version)' 179 256 echo '#-Q- g95 F_O = -O3 -fno-second-underscore -r8 -funroll-all-loops -I $(MODDIR) -I $(MODDIR)/oce' 180 257 echo '#-Q- g95 L_X = -r8 -O3' 181 echo '#-Q- aix # Compiler options for the ORCA model(aix version)'258 echo '#-Q- aix # Compiler options for NEMO (aix version)' 182 259 echo '#-Q- aix F_O = -O3 -qsave -qrealsize=8 -qsuffix=f=f90 -qsuffix=cpp=F90 -qextname -qsource -q64 -qlargepage -qmaxmem=-1 -I $(MODDIR) -I $(MODDIR)/oce' 183 260 echo '#-Q- aix L_O = $(F_P) -q64 -O3' 184 261 echo '#-Q- aix L_X = $(L_O) $(L_C) ' 185 echo '#-Q- osxxlf # Compiler options for the ORCA model(osxxlf version)'262 echo '#-Q- osxxlf # Compiler options for NEMO (osxxlf version)' 186 263 echo '#-Q- osxxlf F_O = -O3 -qsave -qrealsize=8 -qsuffix=f=f90 -qsuffix=cpp=F90 -qsource -qmaxmem=-1 -I $(MODDIR) -I $(MODDIR)/oce' 187 264 echo '#-Q- osxxlf L_X = -qrealsize=8 -O3' … … 192 269 echo '#-Q- sxdkrz PREF=i.' 193 270 echo '#-Q- eshpux PREF=i.' 271 echo '' 272 echo '# add suffix to P_P' 273 echo 'P_P := $(P_P:%=$(prefix)%)' 274 echo '' 275 echo '# Some tests to define variables related to Agrif compilation' 276 echo '# Please do not change ' 277 echo 'ifneq (,$(findstring key_agrif,$(P_P)))' 278 echo 'AGRIF=use' 279 echo 'else' 280 echo 'AGRIF=notuse' 281 echo 'AGRIF_LIB=' 282 echo 'endif' 283 echo 'ifneq (,$(findstring key_mpp_mpi,$(P_P)))' 284 echo 'AGRIF_MPI=-DAGRIF_MPI' 285 echo 'else' 286 echo 'AGRIF_MPI=' 287 echo 'endif' 288 194 289 echo '' 195 290 # Write the cpp key list with one key by line … … 205 300 echo 'LIB_OBJ = \c' 206 301 # 207 # allons chercher tous les .f du repertoire courant 208 # construction de la liste des objets LIB_OBJ 209 210 for i in `ls *.f` 302 # find all .f in the current directory 303 # build object files list LIB_OBJ 304 # one dependancy by line 305 306 for i in `ls *.f 2> /dev/null` 211 307 do 212 308 bn=`basename $i .f` 213 309 if [ "${bn}" != "${MAIN}" ] 214 310 then 311 if [ "${bn}" != "agrif2model" ] 312 then 215 313 echo "\\" 216 314 echo " \$(MODEL_LIB)($bn.o)\c" 217 315 fi 316 fi 218 317 done 219 318 220 # allons chercher tous les .f90 du repertoire courant221 # construction de la liste des objetsLIB_OBJ319 # find all .f90 in the current directory 320 # build object files list LIB_OBJ 222 321 # one dependancy by line 223 for i in `ls *.f90` 322 323 for i in `ls *.f90 ` 224 324 do 225 325 bn=`basename $i .f90` 226 326 if [ "${bn}" != "${MAIN}" ] 227 327 then 328 if [ "${bn}" != "agrif2model" ] 329 then 228 330 echo "\\" 229 331 echo " \$(MODEL_LIB)($bn.o)\c" 230 332 fi 333 fi 231 334 done 232 335 233 # allons chercher tous les .F90 du repertoire courant 234 # construction de la liste des objets LIB_OBJ 235 236 for i in `ls *.F90` 336 # find all .F90 in the current directory 337 # build object files list LIB_OBJ 338 # one dependancy by line 339 340 for i in `ls *.F90 ` 237 341 do 238 342 bn=`basename $i .F90` 239 343 if [ "${bn}" != "${MAIN}" ] 240 344 then 345 if [ "${bn}" != "agrif2model" ] 346 then 241 347 echo "\\" 242 348 echo " \$(MODEL_LIB)($bn.o)\c" 243 349 fi 350 fi 244 351 done 245 352 246 # allons chercher tous les .F du repertoire courant 247 # construction de la liste des objets LIB_OBJ 248 249 for i in `ls *.F` 353 # find all .F in the current directory 354 # build object files list LIB_OBJ 355 # one dependancy by line 356 357 for i in `ls *.F 2> /dev/null ` 250 358 do 251 359 bn=`basename $i .F` 252 360 if [ "${bn}" != "${MAIN}" ] 253 361 then 362 if [ "${bn}" != "agrif2model" ] 363 then 254 364 echo "\\" 255 365 echo " \$(MODEL_LIB)($bn.o)\c" 256 366 fi 367 fi 257 368 done 258 369 … … 261 372 cat tampon 262 373 rm tampon 263 264 # 265 for fic in `ls *.f90 *.F90 *.F ` 374 #- 375 #- Write all dependancies --- 376 377 for fic in `ls *.f90 *.F90 *.F 2> /dev/null ` 266 378 do 379 if [ "${fic}" != "agrif2model.F90" ] 380 then 267 381 if [ "${fic}" != "${MAIN}.[Ff]" ] 268 382 then … … 277 391 luse2="" 278 392 luse3="" 279 # on cherche les includes type modele de glace LLN393 #- search include files (old ice model form, should it be suppressed ?) 280 394 for inc in `sed -n 's/^[ ]*[iI][nN][cC][lL][uU][dD][eE][ ]*\(['\''"]\)\([^'\''"]*\)\1.*/\2/p' $fic | sort -u` 281 395 do … … 283 397 done 284 398 285 # on cherche les includes (et les includes des includes et ainsi de suite pour 3 niveaux max)399 #- search include files on 3 levels 286 400 for inc in `sed -n 's/^#[ ]*[iI][nN][cC][lL][uU][dD][eE][ ]*\(['\''"]\)\([^'\''"]*\)\1.*/\2/p' $fic | sort -u` 287 401 do … … 291 405 do 292 406 dep="$dep\n$inc2" 293 # on cherche les include dans le fichier deja include (3eme niveau! balaise!)407 #- search include in include (third level !!!) 294 408 for inc3 in `sed -n 's/^#[ ]*[iI][nN][cC][lL][uU][dD][eE][ ]*\(['\''"]\)\([^'\''"]*\)\1.*/\2/p' $inc2 | sort -u` 295 409 do … … 299 413 done 300 414 301 # on cherche les USE dans les include415 #- search USE in include files 302 416 for inc in `sed -n 's/^#[ ]*[iI][nN][cC][lL][uU][dD][eE][ ]*\(['\''"]\)\([^'\''"]*\)\1.*/\2/p' $fic | sort -u` 303 417 do … … 306 420 if [ $fuse0 != "ioipsl" ] 307 421 then 422 if [ $fuse0 != "Agrif_Util" ] 423 then 424 if [ $fuse0 != "Agrif_Types" ] 425 then 308 426 lfuse0=$fuse0.f90 309 427 [ -f $fuse0.F90 ] && lfuse0=$fuse0.F90 310 428 luse0="$luse0\n$lfuse0\n\$(MODEL_LIB)($fuse0.o)" 311 429 fi 430 fi 431 fi 312 432 done 313 433 314 # on cherche aussi les USE dans les include des include on les ajoute aluse0434 #- search USE in files included in included files and add to luse0 315 435 316 436 for inc2 in `sed -n 's/^#[ ]*[iI][nN][cC][lL][uU][dD][eE][ ]*\(['\''"]\)\([^'\''"]*\)\1.*/\2/p' $inc | sort -u` … … 320 440 if [ $fuse0 != "ioipsl" ] 321 441 then 442 if [ $fuse0 != "Agrif_Util" ] 443 then 444 if [ $fuse0 != "Agrif_Types" ] 445 then 322 446 lfuse0=$fuse0.f90 323 447 [ -f $fuse0.F90 ] && lfuse0=$fuse0.F90 324 448 luse0="$luse0\n$lfuse0\n\$(MODEL_LIB)($fuse0.o)" 325 449 fi 450 fi 451 fi 326 452 done 327 453 done 328 454 done 329 455 330 # on cherche les USE (et les USE des USE et ainsi de suite pour 3 niveaux max)456 #- search USE (and USE of USE and so on three levels) 331 457 for fuse1 in `sed -n 's/^[ ]*[uU][sS][eE] [ ]*\([^!,;]*\).*/\1/p' $fic | sort -u` 332 458 do 333 459 if [ $fuse1 != "ioipsl" ] 460 then 461 if [ $fuse1 != "Agrif_Util" ] 462 then 463 if [ $fuse1 != "Agrif_Types" ] 334 464 then 335 465 lfuse1=$fuse1.f90 … … 339 469 do 340 470 if [ $fuse2 != "ioipsl" ] 471 then 472 if [ $fuse2 != "Agrif_Util" ] 473 then 474 if [ $fuse2 != "Agrif_Types" ] 341 475 then 342 476 lfuse2=$fuse2.f90 … … 348 482 if [ $fuse3 != "ioipsl" ] 349 483 then 484 if [ $fuse3 != "Agrif_Util" ] 485 then 486 if [ $fuse3 != "Agrif_Types" ] 487 then 350 488 luse3="$luse3\n$lfuse3\n\$(MODEL_LIB)($fuse3.o)" 489 fi 490 fi 351 491 fi 352 492 done 353 493 fi 494 fi 495 fi 354 496 done 355 497 fi 498 fi 499 fi 356 500 done 357 #- la variable dep contient l'ensemble des dependances mais peut-etre en double ou plus358 #- 501 #- 502 #- dep contains all dependancies 359 503 for depele in `echo $luse3 | sort -u` `echo $luse2 | sort -u` `echo $luse1 | sort -u` `echo $luse0 | sort -u` `echo $dep | sort -u` 360 504 do … … 366 510 367 511 #- 368 #- on ajoute la dependance avec la librairie ioipsl si besoin cad si le source contient use ioipsl 369 grep -i 'use *ioipsl' ${fic} >/dev/null && ( echo "\\" ; echo " ../../../lib/libioipsl.a \c") 370 371 #- on ajoute la dependance avec KEY_CPP si il y a des include cpp 512 #- add dependancies with IOIPSL library (if source files contains IOIPSL) 513 grep -i 'use *ioipsl' ${fic} >/dev/null && ( echo "\\" ; echo " \$(IOIPSL_LIB) \c") 514 515 #- 516 #- add dependancies with IOIPSL library (if source files contains Agrif_*) 517 grep -i 'use Agrif_*' ${fic} >/dev/null && ( echo "\\" ; echo " \($AGRIF_LIB) \c") 518 519 #- 520 #- on ajoute la dependance avecadd dependancies with KEY_CPP (if source file inclides cp keys) 372 521 if [ ${j} != "0" ] 373 522 then … … 375 524 echo " KEY_CPP \c" 376 525 fi 377 #- on finit la dependance avec le fichier lui-meme et on ecrit les regles de creation 526 #- 527 #- end with the file itself 378 528 if [ ${i} != "0" ] 379 529 then … … 382 532 fi 383 533 fi 534 fi 384 535 echo $fic done >/dev/tty 385 536 done 537 #- 538 #- Write some special rules --- 386 539 echo '# key changing control' 387 540 echo "key: " 388 echo " @echo CHANGEMENT de CLES CPP oui/non ?" 389 echo " -@if [ \"\`cat KEY_CPP\`\" != \"\$(P_P)\" ] ; then \\" 390 echo " echo CPP options changed ; echo \"\$(P_P)\" > KEY_CPP ; fi " 391 #- 392 # 393 # regle pour verifier les cles 394 # EK novembre 2000 395 # adaptation : ED + MAF decembre 2000 396 # 397 echo 541 echo " @echo CHANGE of CPP KEYS yes/no ?" 542 echo " -@if [ \"\`cat KEY_CPP\`\" != \"\$(P_P:\$(prefix)%=%)\" ] ; then \\" 543 echo " echo CPP options changed ; echo \"\$(P_P:\$(prefix)%=%)\" > KEY_CPP ; fi " 544 #- 545 echo '# check key values' 398 546 echo "keyverif:" 399 echo ' @echo VERIFICATION DES CLES'400 echo ' @echo CLES UTILISEES: '401 echo ' @for v in ` echo $(P_P ) | sed -e s/-Wp,-D//g` ; \'547 echo ' @echo CHECKING KEY' 548 echo ' @echo KEY USED : ' 549 echo ' @for v in ` echo $(P_P:$(prefix)%=%) ` ; \' 402 550 echo ' do \' 403 551 echo ' echo $$v ;\' … … 413 561 echo ' fi \' 414 562 echo ' done' 415 # Checking if the number of routines have been changed416 563 echo '# Checking the number of routines' 417 564 echo "src_file_list: " 418 565 echo ' @echo CHECKING THE NUMBER AND NAMES OF SOURCE FILES ' 419 echo ' @ \$(RM) `ls | fgrep -v -f .patron` '566 echo ' @$(RM) `ls | fgrep -v -f .patron` ' 420 567 echo ' @check=`grep OPA_SRC .config` ; \' 421 568 echo ' if [ -n "$$check" ] ; then \' … … 439 586 echo ' echo " use LIM_SRC files" ; \' 440 587 echo ' ln -sf ../LIM_SRC/*.[Ffh]90 . ; \' 588 echo ' fi ' 589 echo ' @check=`grep NST_SRC .config` ; \' 590 echo ' if [ -n "$$check" ] ; then \' 591 echo ' echo " use NST_SRC files" ; \' 592 echo ' \$(RM) agrif_opa_interp.F90 ; \' 593 echo ' \$(RM) agrif_opa_sponge.F90 ; \' 594 echo ' \$(RM) agrif_opa_update.F90 ; \' 595 echo ' ln -sf ../NST_SRC/*.[Ffh]90 . ; \' 441 596 echo ' fi ' 442 597 echo ' @check=`grep C1D_SRC .config` ; \' … … 472 627 echo ' echo "========================================== " ; \' 473 628 echo ' ../../util/ins_make ; echo " " ; false ; exit ; }' 474 629 exec > /dev/null 630 -
trunk/UTIL/fait_config
r346 r394 34 34 35 35 LIST="ORCA2_LIM \nGYRE" 36 set -A DIR_ORCA2_LIM OPA_SRC LIM_SRC C1D_SRC 37 set -A DIR_GYRE OPA_SRC LIM_SRC C1D_SRC 36 set -A DIR_ORCA2_LIM OPA_SRC LIM_SRC C1D_SRC NST_SRC 37 set -A DIR_GYRE OPA_SRC LIM_SRC C1D_SRC 38 38 39 39 ################################### … … 67 67 #- Clean links and librairies 68 68 [ -f Makefile ] && gmake clean 69 [ -n "`\ls`" ] && \rm *69 [ -n "`\ls`" ] && \rm -rf * 70 70 71 71 #- Find the number of directories --- … … 110 110 ln -sf ../TOP_SRC/TRP/*.[Ffh]90 . 111 111 112 elif [ "${TAB[i]}" = "NST_SRC" ]; then 113 [ -f agrif_opa_interp.F90 ] && \rm agrif_opa_interp.F90 114 [ -f agrif_opa_sponge.F90 ] && \rm agrif_opa_sponge.F90 115 [ -f agrif_opa_update.F90 ] && \rm agrif_opa_update.F90 116 ln -sf ../NST_SRC/*.[Ffh]90 . 117 112 118 elif [ "${TAB[i]}" = "OFF_SRC" ]; then 113 119 ln -sf ../OFF_SRC/*.[Ffh]90 . … … 120 126 ln -sf ../../../*/${m_n}/scripts/BB_make AA_make ; 121 127 ln -sf ../../../*/${m_n}/scripts/BB_make.ldef AA_make.ldef ; 128 ln -sf ../../../*/${m_n}/scripts/BB_make_Agrif AA_make_Agrif ; 122 129 123 130 else … … 150 157 icdyna.f 151 158 thersf.f 159 OPAFILES 152 160 EOF 153 161 ls -1 | fgrep -v -f .patron >SRC_FILE_LIST ; cp SRC_FILE_LIST SRC_FILE_LIST.temp ; 154 162 155 163 #- Writing KEY_CPP file --- 156 sed -e "s/#-Q- sxnec *//" -e/^P_P/\!d -e "s/P_P = //" AA_make.ldef > KEY_CPP;164 sed -e /^P_P/\!d -e "s/P_P = //" AA_make.ldef > KEY_CPP; 157 165 158 166 #- Save new configuration an d directories names ---
Note: See TracChangeset
for help on using the changeset viewer.