summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2007-04-11 20:00:08 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2007-04-11 20:00:08 (GMT)
commita286af4e0fd4930da8e31d3b5335e6961380c365 (patch)
treebc8a043b0ddf62776e38196878a479a6da708954
parent91a42e81cf3e21e796091843bbb5de8cf3bd7068 (diff)
downloadhdf5-a286af4e0fd4930da8e31d3b5335e6961380c365.zip
hdf5-a286af4e0fd4930da8e31d3b5335e6961380c365.tar.gz
hdf5-a286af4e0fd4930da8e31d3b5335e6961380c365.tar.bz2
[svn-r13645] Purpouse:
Bug fix (851) Description: h5vers calls bin/reconfigure which may fail but h5vers does not check its return value. This will result in discrepency between files such as configure and configure.in. Solution: Fixed it by checking exit code of bin/reconfigure and return error if it fails. Tested: osage and kagiso.
-rwxr-xr-xbin/h5vers12
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/h5vers b/bin/h5vers
index 2c0061c..e68a4de 100755
--- a/bin/h5vers
+++ b/bin/h5vers
@@ -72,7 +72,7 @@ use strict;
# one directory above the H5public.h file is also modified so it looks
# something like: This is hdf5-1.2.3-pre1 currently under development.
# The AC_INIT macro in configure.in will also change in this case to be
-# something like: AC_INIT([HDF5], [hdf5-1.2.3-pre1], [hdfhelp@ncsa.uiuc.edu])
+# something like: AC_INIT([HDF5], [hdf5-1.2.3-pre1], [help@hdfgroup.org])
#
# Whenever the version changes, this script will increment the revision
# field in HDF5's libtool shared library version in config/lt_vers.am,
@@ -126,7 +126,7 @@ EOF
}
# Parse arguments
-my ($verbose, $set, $inc, $file);
+my ($verbose, $set, $inc, $file, $rc);
my (@files) = ("H5public.h", "src/H5public.h", "../src/H5public.h");
while ($_ = shift) {
$_ eq "-s" && do {
@@ -328,9 +328,13 @@ sub gen_configure {
$conf =~ /^(.*?)\/?configure.in$/;
if ($1) {
- system("cd $1 && bin/reconfigure >/dev/null 2>/dev/null && rm -rf autom4te.cache");
+ $rc = system("cd $1 && bin/reconfigure >/dev/null 2>/dev/null && rm -rf autom4te.cache");
} else {
- system("bin/reconfigure >/dev/null 2>/dev/null && rm -rf autom4te.cache");
+ $rc = system("bin/reconfigure >/dev/null 2>/dev/null && rm -rf autom4te.cache");
+ }
+ if ($rc) {
+ printf("bin/reconfigure failed with exit code %d. Aborted.\n", $rc);
+ exit 1;
}
}