Changeset 2743
- Timestamp:
- Jan 5, 2017, 4:39:47 PM (8 years ago)
- Location:
- LMDZ5/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/makelmdz
r2690 r2743 31 31 strataer=false 32 32 full="" 33 34 arch_defined="FALSE" 35 arch_path="arch" 36 arch_default_path="arch" 33 37 34 38 # guess a default 'arch' … … 127 131 [-fcm_path path] : path to the fcm tool (default: tools/fcm/bin) 128 132 [-ext_src path] : path to an additional set of routines to compile with the model 133 [-arch_path path] : path to architecture files (default: $arch_default_path) 129 134 -arch nom_arch : target architecture 130 135 exec : executable to build … … 204 209 205 210 "-arch") 206 arch=$2 ; shift ; shift ;; 211 arch=$2 ; arch_defined="TRUE" ; shift ; shift ;; 212 213 "-arch_path") 214 arch_path=$2 ; arch_path_defined="TRUE"; shift ; shift ;; 207 215 208 216 *) … … 218 226 rm -rf .void_dir 219 227 mkdir .void_dir 220 rm -f arch.path 221 if [[ -r arch/arch-${arch}.path ]] 222 then 223 ln -s arch/arch-${arch}.path ./arch.path 228 229 if [[ "$arch_defined" == "TRUE" ]] 230 then 231 rm -f arch.path 232 rm -f arch.fcm 233 rm -f arch.env 234 235 if test -f $arch_path/arch-${arch}.path 236 then 237 ln -s $arch_path/arch-${arch}.path arch.path 238 elif test -f $arch_default_path/arch-${arch}.path 239 then 240 ln -s $arch_default_path/arch-${arch}.path arch.path 241 fi 242 243 if test -f $arch_path/arch-${arch}.fcm 244 then 245 ln -s $arch_path/arch-${arch}.fcm arch.fcm 246 elif test -f $arch_default_path/arch-${arch}.fcm 247 then 248 ln -s $arch_default_path/arch-${arch}.fcm arch.fcm 249 fi 250 251 if test -f $arch_path/arch-${arch}.env 252 then 253 ln -s $arch_path/arch-${arch}.env arch.env 254 elif test -f $arch_default_path/arch-${arch}.env 255 then 256 ln -s $arch_default_path/arch-${arch}.env arch.env 257 else 258 ln -s .void_file arch.env 259 fi 260 # source architecture PATH and ENV files 261 source arch.env 224 262 source arch.path 225 263 else 226 echo "Error: missing arch/arch-${arch}.path file !" 227 exit 228 fi 229 rm -f arch.fcm 230 if [[ -r arch/arch-${arch}.fcm ]] 231 then 232 ln -s arch/arch-${arch}.fcm arch.fcm 233 else 234 echo "Error: missing arch/arch-${arch}.fcm file !" 235 exit 236 fi 264 echo "You must define a target architecture" 265 exit 1 266 fi 267 237 268 ######################################################################## 238 269 # Definition des clefs CPP, des chemins des includes et modules -
LMDZ5/trunk/makelmdz_fcm
r2690 r2743 37 37 full='' 38 38 libphy=false 39 40 arch_defined="FALSE" 41 arch_path="arch" 42 arch_default_path="arch" 39 43 40 44 LMDGCM=`/bin/pwd` … … 107 111 [-fcm_path path] : path to the fcm tool (default: tools/fcm/bin) 108 112 [-ext_src path] : path to an additional set of routines to compile with the model 113 [-arch_path path] : path to architecture files (default: $arch_default_path) 109 114 -arch nom_arch : target architecture 110 115 exec : executable to build … … 196 201 197 202 "-arch") 198 arch=$2 ; shift ; shift ;; 203 arch=$2 ; arch_defined="TRUE" ; shift ; shift ;; 204 205 "-arch_path") 206 arch_path=$2 ; arch_path_defined="TRUE"; shift ; shift ;; 199 207 200 208 *) … … 226 234 rm -rf .void_dir 227 235 mkdir .void_dir 228 rm -f arch.path 229 ln -s arch/arch-${arch}.path ./arch.path 230 source arch.path 236 237 if [[ "$arch_defined" == "TRUE" ]] 238 then 239 rm -f arch.path 240 rm -f arch.fcm 241 rm -f arch.env 242 243 if test -f $arch_path/arch-${arch}.path 244 then 245 ln -s $arch_path/arch-${arch}.path arch.path 246 elif test -f $arch_default_path/arch-${arch}.path 247 then 248 ln -s $arch_default_path/arch-${arch}.path arch.path 249 fi 250 251 if test -f $arch_path/arch-${arch}.fcm 252 then 253 ln -s $arch_path/arch-${arch}.fcm arch.fcm 254 elif test -f $arch_default_path/arch-${arch}.fcm 255 then 256 ln -s $arch_default_path/arch-${arch}.fcm arch.fcm 257 fi 258 259 if test -f $arch_path/arch-${arch}.env 260 then 261 ln -s $arch_path/arch-${arch}.env arch.env 262 elif test -f $arch_default_path/arch-${arch}.env 263 then 264 ln -s $arch_default_path/arch-${arch}.env arch.env 265 else 266 ln -s .void_file arch.env 267 fi 268 # source architecture PATH and ENV files 269 source arch.env 270 source arch.path 271 else 272 echo "You must define a target architecture" 273 exit 1 274 fi 231 275 232 276 ########################################################################
Note: See TracChangeset
for help on using the changeset viewer.