Changeset 984


Ignore:
Timestamp:
11/08/16 16:23:04 (7 years ago)
Author:
ymipsl
Message:

Add --arch_path option for make_xios.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/make_xios

    r660 r984  
    99netcdf_lib="netcdf4_par" 
    1010compil_mode="prod" 
     11arch_path="arch" 
     12arch_default_path="arch" 
     13arch_defined="FALSE" 
     14arch_path_defined="FALSE" 
    1115 
    1216# Traitement de la ligne de commande 
     
    3539         "--dev")   compil_mode="dev"   ; shift ;; 
    3640         "--debug") compil_mode="debug" ; shift ;; 
    37          "--arch")  arch=$2     ; shift ; shift ;; 
     41         "--arch")  arch=$2     ; arch_defined="TRUE"; shift ; shift ;; 
     42         "--arch_path")  arch_path=$2     ; arch_path_defined="TRUE"; shift ; shift ;; 
    3843         "--avail") ls arch/*.fcm | cut -d"-" -f2 | cut -d"." -f1 ; exit ;;  
    3944         "--full")  compil_full="true"  ; shift ;; 
     
    7075mkdir .void_dir 
    7176 
    72 if [[ !(-z $arch) ]] 
    73    then 
    74       rm -f  $install_dir/arch.path 
    75       rm -f  $install_dir/arch.fcm 
    76       rm -f  $install_dir/arch.env 
    77       ln -s  $install_dir/arch/arch-${arch}.path $install_dir/arch.path 
    78       ln -s  $install_dir/arch/arch-${arch}.fcm  $install_dir/arch.fcm 
    79  
    80       if test -f $install_dir/arch/arch-${arch}.env 
    81       then 
    82         ln -s $install_dir/arch/arch-${arch}.env arch.env 
    83       else 
    84         ln -s $install_dir/.void_file arch.env 
    85       fi 
    86  
    87       source $install_dir/arch.env 
    88       source $install_dir/arch.path 
     77if [[ "$arch_defined" == "TRUE" ]] 
     78then 
     79  rm -f arch.path 
     80  rm -f arch.fcm 
     81  rm -f arch.env 
     82 
     83  if test -f $arch_path/arch-${arch}.path 
     84  then 
     85    ln -s $arch_path/arch-${arch}.path arch.path 
     86  elif test -f $arch_default_path/arch-${arch}.path 
     87  then 
     88    ln -s $arch_default_path/arch-${arch}.path arch.path 
     89  fi 
     90         
     91  if test -f $arch_path/arch-${arch}.fcm 
     92  then 
     93    ln -s $arch_path/arch-${arch}.fcm arch.fcm 
     94  elif test -f $arch_default_path/arch-${arch}.fcm 
     95  then 
     96    ln -s $arch_default_path/arch-${arch}.fcm arch.fcm 
     97  fi 
     98 
     99  if test -f $arch_path/arch-${arch}.env 
     100  then 
     101    ln -s $arch_path/arch-${arch}.env arch.env 
     102  elif test -f $arch_default_path/arch-${arch}.env 
     103  then 
     104    ln -s $arch_default_path/arch-${arch}.env arch.env 
    89105  else 
     106    ln -s .void_file arch.env 
     107  fi 
     108  source arch.env 
     109  source arch.path 
     110else 
    90111      echo "Please choose a target achitecture --> list all available architecture using make_xios --avail!" 
    91112      exit 1 
Note: See TracChangeset for help on using the changeset viewer.