summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2005-01-13 23:31:37 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2005-01-13 23:31:37 (GMT)
commit63d57265108684ce341cec191b45b80aade4abc3 (patch)
treecb4de6b92ff616a2f90d75222d42d115887df222
parentbd2d4163eb167eb8bfbde17643bc61b7569354b9 (diff)
downloadhdf5-63d57265108684ce341cec191b45b80aade4abc3.zip
hdf5-63d57265108684ce341cec191b45b80aade4abc3.tar.gz
hdf5-63d57265108684ce341cec191b45b80aade4abc3.tar.bz2
[svn-r9821] Purpose: Bug fix
Description: H5fc script couldn't generate *.o files; Solution: Fixed (I've borrowed some code from mpif90; also Quincey gave me the fix he was working on) Platforms tested: heping, arabica, copper (parallel) Misc. update:
-rwxr-xr-xfortran/src/h5fc.in62
1 files changed, 31 insertions, 31 deletions
diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in
index 382521d..0d80ae8 100755
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -168,42 +168,47 @@ for arg in $@ ; do
qarg='\"'"$arg"'\"'
allargs="$allargs $qarg"
;;
- *)
- allargs="$allargs $qarg"
-
- if test -s "$arg"; then
- ext=`expr "$arg" : '.*\(\..*\)'`
- if test "x$ext" = "x.c"; then
- do_compile="yes"
- compile_args="$compile_args $arg"
- fname=`basename $arg .c`
- link_objs="$link_objs $fname.o"
- elif test "x$ext" = "x.o"; then
- if test "x$dash_c" = "xyes"; then
+ *) allargs="$allargs $arg"
+ if [ -s "$arg" ] ; then
+ ext=`expr "$arg" : '.*\(\..*\)'`
+ if [ "$ext" = ".f" -o "$ext" = ".F" -o "$ext" = ".f90" -o \
+ "$ext" = ".for" -o "$ext" = ".FOR" -o "$ext" = ".F90" ] ; then
+ do_compile="yes"
+ compile_args="$compile_args $arg"
+ fname=`basename $arg $ext`
+ link_objs="$link_objs $fname.o"
+ elif [ "$ext" = ".o" ] ; then
+ if test "x$dash_c" = "xyes" ; then
+ compile_args="$compile_args $arg"
+ else
+ do_link="yes"
+ link_objs="$link_objs $arg"
+ fi
+ else
+ compile_args="$compile_args $arg"
+ link_args="$link_args $arg"
+ fi
+ else
compile_args="$compile_args $arg"
- else
- do_link="yes"
- link_objs="$link_objs $arg"
- fi
- else
- compile_args="$compile_args $arg"
- link_args="$link_args $arg"
- fi
- else
- compile_args="$compile_args $arg"
- link_args="$link_args $arg"
- fi
- ;;
+ link_args="$link_args $arg"
+ fi
+ ;;
esac
done
+# It's possible that there isn't a modules flag...
+ fmodules=""
+ if test -n "$F9XMODFLAG"; then
+ fmodules="${F9XMODFLAG}${libdir}"
+ fi
+
if test "x$do_compile" = "xyes"; then
if test "x$dash_c" != "xyes"; then
compile_args="-c $compile_args"
fi
- $SHOW $FC $FFLAGS ${F9XSUFFIXFLAG} $compile_args
+ $SHOW $FC $FFLAGS ${F9XSUFFIXFLAG} ${fmodules} $compile_args
status=$?
if test "$status" != "0"; then
@@ -212,11 +217,6 @@ if test "x$do_compile" = "xyes"; then
fi
if test "x$do_link" = "xyes"; then
- # It's possible that there isn't a modules flag...
- fmodules=""
- if test -n "$F9XMODFLAG"; then
- fmodules="${F9XMODFLAG}${libdir}"
- fi
link_args="$link_args ${libdir}/libhdf5_fortran.a ${libdir}/libhdf5.a"