Ignore:
Timestamp:
Jan 30, 2017, 5:54:45 PM (8 years ago)
Author:
Laurent Fairhead
Message:

Merged trunk changes r2727:2785 into testing branch

Location:
LMDZ5/branches/testing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/testing

  • LMDZ5/branches/testing/makelmdz

    r2720 r2787  
    3232full=""
    3333
     34arch_defined="FALSE"
     35arch_path="arch"
     36arch_default_path="arch"
     37
    3438# guess a default 'arch'
    3539arch="local" # start with assuming we're on a local machine with local arch file
     40arch_defined="TRUE" # and thus also set arch_defined to true
    3641## try to recognise machine and infer arch from it
    3742machine=`hostname`
     
    127132[-fcm_path path]           : path to the fcm tool (default: tools/fcm/bin)
    128133[-ext_src path]            : path to an additional set of routines to compile with the model
     134[-arch_path path]          : path to architecture files (default: $arch_default_path)
    129135 -arch nom_arch            : target architecture
    130136 exec                      : executable to build
     
    204210
    205211      "-arch")
    206           arch=$2 ; shift ; shift ;;
     212          arch=$2 ; arch_defined="TRUE" ; shift ; shift ;;
     213
     214      "-arch_path")
     215          arch_path=$2 ; arch_path_defined="TRUE"; shift ; shift ;;
    207216
    208217      *)
     
    218227rm -rf .void_dir
    219228mkdir .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
     229
     230if [[ "$arch_defined" == "TRUE" ]]
     231then
     232  rm -f arch.path
     233  rm -f arch.fcm
     234  rm -f arch.env
     235
     236  if test -f $arch_path/arch-${arch}.path
     237  then
     238    ln -s $arch_path/arch-${arch}.path arch.path
     239  elif test -f $arch_default_path/arch-${arch}.path
     240  then
     241    ln -s $arch_default_path/arch-${arch}.path arch.path
     242  fi
     243       
     244  if test -f $arch_path/arch-${arch}.fcm
     245  then
     246    ln -s $arch_path/arch-${arch}.fcm arch.fcm
     247  elif test -f $arch_default_path/arch-${arch}.fcm
     248  then
     249    ln -s $arch_default_path/arch-${arch}.fcm arch.fcm
     250  fi
     251
     252  if test -f $arch_path/arch-${arch}.env
     253  then
     254    ln -s $arch_path/arch-${arch}.env arch.env
     255  elif test -f $arch_default_path/arch-${arch}.env
     256  then
     257    ln -s $arch_default_path/arch-${arch}.env arch.env
     258  else
     259    ln -s .void_file arch.env
     260  fi
     261  # source architecture PATH and ENV files
     262  source arch.env
    224263  source arch.path
    225264else
    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
     265  echo "You must define a target architecture"
     266  exit 1
     267fi
     268
    237269########################################################################
    238270# Definition des clefs CPP, des chemins des includes et modules
Note: See TracChangeset for help on using the changeset viewer.