Ignore:
Timestamp:
06/28/24 18:24:55 (4 months ago)
Author:
cetlod
Message:

NEMO : Being able to compile NEMO in debug mode without changing arch file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/UNIFORM/v6/NEMO_v6.5/compile_nemo.sh

    r6618 r6890  
    183183echo >> $outfile 
    184184 
    185 cd $nemo_root ; cp $mysrc_path/arch-${fcm_arch}.fcm arch/CNRS/. 
     185# Compilation management 
     186# Nemo debug ? 
     187cp $mysrc_path/arch-${fcm_arch}.fcm   $mysrc_path/arch-nemo.fcm 
     188if [ $optmode == debug ] ; then 
     189    if (! grep -q "^%DEBUG_FCFLAGS"  $mysrc_path/arch-nemo.fcm); then 
     190       echo "ERROR: You must defined '%DEBUG_FCFLAGS' in your arch file if you want to compile Nemo in debug mode using '-d' option" 
     191       exit 1 
     192    fi 
     193    # duplicate the lines starting with %DEBUG_XXX and replace, in the duplicated line, %DEBUG_XXX by %XXX 
     194    sed -i'' -e "/^%DEBUG_/{p;s/^%DEBUG_\([^ ]*\)/%\1/;}" $mysrc_path/arch-nemo.fcm 
     195else 
     196    if (! grep -q "^%PROD_FCFLAGS" $mysrc_path/arch-nemo.fcm ); then 
     197        echo "WARNING: '%PROD_FCFLAGS' not defined in your arch file, makenemo will use '%FCFLAGS' instead" 
     198    fi 
     199    # duplicate the lines starting with %PROD_XXX and replace, in the duplicated line, %PROD_XXX by %XXX 
     200    sed -i'' -e "/^%PROD_/{p;s/^%PROD_\([^ ]*\)/%\1/;}" $mysrc_path/arch-nemo.fcm 
     201fi 
     202cd $nemo_root ; mv $mysrc_path/arch-nemo.fcm   arch/CNRS/arch-${fcm_arch}.fcm 
     203 
    186204 
    187205echo >> $outfile 
Note: See TracChangeset for help on using the changeset viewer.