--- trunk/libf/make.sh 2011/07/01 15:00:48 47 +++ trunk/libf/make.sh 2011/07/19 12:54:20 48 @@ -9,6 +9,7 @@ set -xe +MAKE=make compiler=gfortran ##compiler=nag_tools @@ -18,13 +19,19 @@ # (Do not just use the name of the compiler as a directory name, it # confuses some compilers.) +compiler_macros_dir=../Compilers + test -d $dest_dir +test -d $compiler_macros_dir -if [[ ../Compilers/$compiler.mk -nt $dest_dir/compiler.mk ]] +if [[ ! -f $compiler_macros_dir/$compiler.mk && -f $dest_dir/compiler.mk ]] +then + rm $dest_dir/compiler.mk +elif [[ $compiler_macros_dir/$compiler.mk -nt $dest_dir/compiler.mk ]] then - cp --force ../Compilers/$compiler.mk $dest_dir/compiler.mk + cp --force $compiler_macros_dir/$compiler.mk $dest_dir/compiler.mk chmod a-w $dest_dir/compiler.mk fi -make -C $dest_dir -f $PWD/GNUmakefile -I$PWD $* libf_dir=$PWD +$MAKE -C $dest_dir -f $PWD/GNUmakefile -I$PWD $* libf_dir=$PWD # "-I" option for "nag_rules.mk"