Changeset 4924
- Timestamp:
- 02/12/20 12:06:14 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
IOIPSL/trunk/makeioipsl_fcm
r4432 r4924 3 3 export PATH=$ROOT/tools/FCM_V1.2/bin:${PATH} 4 4 5 compil_mode_defined="FALSE"6 5 compil_mode="prod" 7 6 … … 14 13 CPP_KEY="CPP_NONE" 15 14 16 while (($# > 0)) 17 do 15 while (($# > 0)) ; do 18 16 case $1 in 19 "-h") cat <<fin 20 Usage : 21 makegcm [options] -m arch exec 22 [-h] : help 23 [-prod / -dev / -debug] : compilation en mode production (default) / developpement / debug . 24 -arch nom_arch : nom de l\'architecture cible 25 fin 17 "-h") cat <<end_help 18 ######################################################################## 19 # Usage of the script makeioipsl_fcm 20 # 21 # makeioipsl_fcm compiles IOIPSL using the Fcm software developed 22 # by the Hadley Centre. Fcm is stored in tools directory. 23 # Platform specific compile options are found in the arch directory. 24 ######################################################################## 25 26 Usage: 27 28 ./makeioipsl_fcm -arch XXX [Options] 29 30 31 Mandatory argument: 32 33 -arch XXX : name of the archicture file containg platform dependent compile options. 34 The files arch/arch-XXX.fcm and arch/arch-XXX.path must exist. If the 35 file arch/arch-XXX.env exist, it'll be sourced before compilation starts. 36 37 Main options: 38 [-h] : show this help 39 [ -full ] : activate full recompiling 40 [ -arch_path XXX ] : directory of the archicture file containg platform dependent compile options. 41 Default is ./arch directory. If the files are not found in the folder given by arch_path, 42 the default ./arch folder will be used. 43 44 Options for optimization, choose only one of the following 45 [ -prod ] : compilation for production (all optimization) 46 [ -dev ] : compilation for development (low optimization and -g) 47 [ -debug ] : compilation for debugging (no optmization and all debug options) 48 49 [ -job x ] : activate parallel compiling on x task, default is 1 task 50 51 52 end_help 26 53 exit;; 27 28 "-prod") 29 compil_mode="prod" ; shift ;; 30 31 "-dev") 32 compil_mode="dev" ; shift ;; 33 34 "-debug") 35 compil_mode="debug" ; shift ;; 36 37 "-arch") 38 arch=$2 ; arch_defined="TRUE"; shift ; shift ;; 39 40 "-arch_path") 41 arch_path=$2 ; arch_path_defined="TRUE"; shift ; shift ;; 42 43 "-job") 44 job=$2 ; shift ; shift;; 45 46 "-full") 47 full_defined="TRUE" ; shift ;; 48 54 "-prod") compil_mode="prod" ; shift ;; 55 "-dev") compil_mode="dev" ; shift ;; 56 "-debug") compil_mode="debug" ; shift ;; 57 "-arch") arch=$2 ; arch_defined="TRUE"; shift ; shift ;; 58 "-arch_path") arch_path=$2 ; arch_path_defined="TRUE"; shift ; shift ;; 59 "-job") job=$2 ; shift ; shift;; 60 "-full") full_defined="TRUE" ; shift ;; 49 61 *) 50 62 code="$1" ; shift ;; … … 57 69 mkdir .void_dir 58 70 59 if [[ "$arch_defined" == "TRUE" ]] 60 then 71 if [[ "$arch_defined" == "TRUE" ]] ; then 61 72 rm -f arch.path 62 73 rm -f arch.fcm 63 74 rm -f arch.env 64 75 65 if test -f $arch_path/arch-${arch}.path 66 then 76 if [ -f $arch_path/arch-${arch}.path ] ; then 67 77 ln -s $arch_path/arch-${arch}.path arch.path 68 elif test -f $arch_default_path/arch-${arch}.path 69 then 78 elif [ -f $arch_default_path/arch-${arch}.path ] ; then 70 79 ln -s $arch_default_path/arch-${arch}.path arch.path 71 80 else … … 74 83 fi 75 84 76 if test -f $arch_path/arch-${arch}.fcm 77 then 85 if [ -f $arch_path/arch-${arch}.fcm ] ; then 78 86 ln -s $arch_path/arch-${arch}.fcm arch.fcm 79 elif test -f $arch_default_path/arch-${arch}.fcm 80 then 87 elif [ -f $arch_default_path/arch-${arch}.fcm ] ; then 81 88 ln -s $arch_default_path/arch-${arch}.fcm arch.fcm 82 89 fi 83 90 84 if test -f $arch_path/arch-${arch}.env 85 then 91 if [ -f $arch_path/arch-${arch}.env ] ; then 86 92 ln -s $arch_path/arch-${arch}.env arch.env 87 elif test -f $arch_default_path/arch-${arch}.env 88 then 93 elif [ -f $arch_default_path/arch-${arch}.env ] ; then 89 94 ln -s $arch_default_path/arch-${arch}.env arch.env 90 95 else … … 94 99 source arch.path 95 100 else 96 echo "Veuillez definir une architecture cible" 101 echo "You must define the architecture files using makeioipsl_fcm -arch XXX" 102 echo "Show help using: ./makeioipsl_fcm -h" 97 103 exit 1 98 104 fi 99 105 LD_FLAGS="%BASE_LD" 100 106 101 if [[ "$compil_mode" == "prod" ]] 102 then 107 if [[ "$compil_mode" == "prod" ]] ; then 103 108 COMPIL_FFLAGS="%PROD_FFLAGS" 104 elif [[ "$compil_mode" == "dev" ]] 105 then 109 elif [[ "$compil_mode" == "dev" ]] ; then 106 110 COMPIL_FFLAGS="%DEV_FFLAGS" 107 elif [[ "$compil_mode" == "debug" ]] 108 then 111 elif [[ "$compil_mode" == "debug" ]] ; then 109 112 COMPIL_FFLAGS="%DEBUG_FFLAGS" 110 113 fi … … 120 123 echo "%LIB $IOIPSL_LIB">> config.fcm 121 124 122 if [[ "$full_defined" == "TRUE" ]] 123 then 125 if [[ "$full_defined" == "TRUE" ]] ; then 124 126 ./build.sh --job $job --full 125 127 else
Note: See TracChangeset
for help on using the changeset viewer.