186 |
GENMAKE2="$BASH ../../../tools/genmake2" |
GENMAKE2="$BASH ../../../tools/genmake2" |
187 |
( |
( |
188 |
cd $1; |
cd $1; |
|
printf 'genmake ... ' 1>&2 |
|
189 |
command="$GENMAKE2 -ds -m $MAKE --mods=../code" |
command="$GENMAKE2 -ds -m $MAKE --mods=../code" |
190 |
if test "x$OPTFILE" != xNONE ; then |
if test "x$OPTFILE" != xNONE ; then |
191 |
command="$command --optfile=$OPTFILE" |
command="$command --optfile=$OPTFILE" |
194 |
if test "x$IEEE" != x ; then |
if test "x$IEEE" != x ; then |
195 |
command="$command -ieee" |
command="$command -ieee" |
196 |
fi |
fi |
197 |
|
# echo "command: \"$command\"" |
198 |
|
printf 'genmake ... ' 1>&2 |
199 |
$command > make.log 2>&1 |
$command > make.log 2>&1 |
200 |
RETVAL=$? |
RETVAL=$? |
201 |
for i in genmake_state genmake_optfile genmake_local Makefile ; do |
for i in genmake_state genmake_optfile genmake_local Makefile ; do |
639 |
# Is this an MPI run? |
# Is this an MPI run? |
640 |
if test "x$MPI" = xt ; then |
if test "x$MPI" = xt ; then |
641 |
FILES=$MPI_FILES |
FILES=$MPI_FILES |
642 |
|
endings="_mpi" |
643 |
else |
else |
644 |
FILES=$NOMPI_FILES |
FILES=$NOMPI_FILES |
645 |
|
endings="_nompi" |
646 |
fi |
fi |
647 |
|
|
648 |
# Check to see that we have the files |
# Check to see that we have the files |
661 |
# If we have the $FILES and they differ, copy the $FILES to $BUILD_DIR |
# If we have the $FILES and they differ, copy the $FILES to $BUILD_DIR |
662 |
if test "x$have_files" = xt ; then |
if test "x$have_files" = xt ; then |
663 |
for i in $FILES ; do |
for i in $FILES ; do |
664 |
cmp $CODE_DIR/$i $BUILD_DIR/$i > /dev/null 2>&1 |
sstr="s|$endings||" |
665 |
|
name=`echo $i | sed -e $sstr ` |
666 |
|
cmp $CODE_DIR/$i $BUILD_DIR/$name > /dev/null 2>&1 |
667 |
RETVAL=$? |
RETVAL=$? |
668 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
669 |
cp $CODE_DIR/$i $BUILD_DIR/$i |
cp $CODE_DIR/$i $BUILD_DIR/$name |
670 |
fi |
fi |
671 |
done |
done |
672 |
fi |
fi |