Ignore:
Timestamp:
Jan 5, 2017, 4:39:47 PM (7 years ago)
Author:
Ehouarn Millour
Message:

Adapted makelmdz_fcm to be able to source an arch-*.env file, and also added option -arch_path to specify path to directory where arch files can be found.
Likewise adapted makelmdz with these options.
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/makelmdz_fcm

    r2690 r2743  
    3737full=''
    3838libphy=false
     39
     40arch_defined="FALSE"
     41arch_path="arch"
     42arch_default_path="arch"
    3943
    4044LMDGCM=`/bin/pwd`
     
    107111[-fcm_path path]           : path to the fcm tool (default: tools/fcm/bin)
    108112[-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)
    109114 -arch nom_arch            : target architecture
    110115 exec                      : executable to build
     
    196201
    197202      "-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 ;;
    199207
    200208      *)
     
    226234rm -rf .void_dir
    227235mkdir .void_dir
    228 rm -f arch.path
    229 ln -s arch/arch-${arch}.path ./arch.path
    230 source arch.path
     236
     237if [[ "$arch_defined" == "TRUE" ]]
     238then
     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
     271else
     272  echo "You must define a target architecture"
     273  exit 1
     274fi
    231275
    232276########################################################################
Note: See TracChangeset for help on using the changeset viewer.