summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2010-06-18 22:47:22 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2010-06-18 22:47:22 (GMT)
commite6d56939f3ac61e4ab27aa0442c801b47580216a (patch)
treeb79fb1a26cab045cb61529bb0e4d873c1020c784 /bin
parent9f208ec4e25257c4cc5877afc375e3f39cc8beff (diff)
downloadhdf5-e6d56939f3ac61e4ab27aa0442c801b47580216a.zip
hdf5-e6d56939f3ac61e4ab27aa0442c801b47580216a.tar.gz
hdf5-e6d56939f3ac61e4ab27aa0442c801b47580216a.tar.bz2
[svn-r19019] Enhancements:
Cleaned up the code a bit by: 1. It used to that -xxx options must be at the beginning such that "buildhdf5 --disable-shared -config" was an error. Now -xxx options can appear anywhere in the command options. 2. Eliminate the need of variables $CONFIG_CXX, $CONFIG_FORTRAN, $CONFIG_PARALLEL by appending their values to $CONFIG_OP directly. 3. Also append $WITH_SZLIB to $CONFIG_OP when it is defined, not later. 4. Call CONFIG directly instead of setting up $CONFIGURE. 5. Removed the last TIMESTAMP since "trap 0" will call QUIT which calls TIMESTAMP already. This eliminated the extra timestamp when it finishes normal. tested: Tested by hand since h5committest does not really test this command.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/buildhdf521
1 files changed, 9 insertions, 12 deletions
diff --git a/bin/buildhdf5 b/bin/buildhdf5
index ac73df0..8ed4696 100755
--- a/bin/buildhdf5
+++ b/bin/buildhdf5
@@ -67,6 +67,7 @@ TIMESTAMP()
QUIT()
{
+ # print the closing time
TIMESTAMP
}
@@ -234,7 +235,7 @@ trap QUIT 0
#
MAKE=${MAKE:-'gmake'}
export MAKE
-CONFIGURE="CONFIG"
+CONFIG_CMD="CONFIG"
CONFIG_OP= # configure options
CONFIG_ONLY=no # default is configure and build
NOEXEC= # default to execute commands
@@ -250,6 +251,7 @@ while [ $# -gt 0 ]; do
;;
-szlib)
LOCATE_SZLIB
+ CONFIG_OP="$CONFIG_OP $WITH_SZLIB"
;;
-help)
USAGE
@@ -263,16 +265,16 @@ while [ $# -gt 0 ]; do
SRCDIRLIST="$1"
;;
-cxx)
- CONFIG_CXX="--enable-cxx"
+ CONFIG_OP="$CONFIG_OP --enable-cxx"
;;
-fortran)
- CONFIG_FORTRAN="--enable-fortran"
+ CONFIG_OP="$CONFIG_OP --enable-fortran"
;;
-pp)
- CONFIG_PARALLEL="--enable-parallel"
+ CONFIG_OP="$CONFIG_OP --enable-parallel"
;;
- *) # Quit parsing
- break
+ *) # pass it as a configure option
+ CONFIG_OP="$CONFIG_OP $1"
;;
esac
shift
@@ -296,14 +298,10 @@ if [ x-$SRCDIR = x-dummy ]; then
exit 1
fi
-# Setup Configure options
-CONFIG_OP="$WITH_SZLIB $CONFIG_FORTRAN $CONFIG_CXX $CONFIG_PARALLEL"
-
# Configure
# no configure if already done.
if [ ! -f config.status ]; then
- CONFIGURE="$CONFIGURE $CONFIG_OP $*"
- STEP "Configure HDF5..." "$CONFIGURE" "#config"
+ STEP "Configure HDF5..." "$CONFIG_CMD $CONFIG_OP" "#config"
else
STEP "Configure Skipped" "echo Configure Skipped" "#config"
fi
@@ -324,4 +322,3 @@ STEP "Testing HDF5 parallel parts..." "$MAKE check-p" "#test-p"
# all done
echo "No Errors encountered"
-TIMESTAMP