9 |
|
|
10 |
set -xe |
set -xe |
11 |
|
|
12 |
|
MAKE=make |
13 |
compiler=gfortran |
compiler=gfortran |
14 |
##compiler=nag_tools |
##compiler=nag_tools |
15 |
|
|
19 |
# (Do not just use the name of the compiler as a directory name, it |
# (Do not just use the name of the compiler as a directory name, it |
20 |
# confuses some compilers.) |
# confuses some compilers.) |
21 |
|
|
22 |
if [[ ../Compilers/$compiler.mk -nt $dest_dir/compiler.mk ]] |
compiler_macros_dir=../Compilers |
23 |
|
|
24 |
|
test -d $dest_dir |
25 |
|
test -d $compiler_macros_dir |
26 |
|
|
27 |
|
if [[ ! -f $compiler_macros_dir/$compiler.mk && -f $dest_dir/compiler.mk ]] |
28 |
|
then |
29 |
|
rm $dest_dir/compiler.mk |
30 |
|
elif [[ $compiler_macros_dir/$compiler.mk -nt $dest_dir/compiler.mk ]] |
31 |
then |
then |
32 |
cp --force ../Compilers/$compiler.mk $dest_dir/compiler.mk |
cp --force $compiler_macros_dir/$compiler.mk $dest_dir/compiler.mk |
33 |
chmod a-w $dest_dir/compiler.mk |
chmod a-w $dest_dir/compiler.mk |
34 |
fi |
fi |
35 |
|
|
36 |
make -C $dest_dir -f $PWD/GNUmakefile -I$PWD $* libf_dir=$PWD |
$MAKE -C $dest_dir -f $PWD/GNUmakefile -I$PWD $* libf_dir=$PWD |
37 |
# "-I" option for "nag_rules.mk" |
# "-I" option for "nag_rules.mk" |