summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2007-04-11 19:59:35 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2007-04-11 19:59:35 (GMT)
commita1a4eba431c43bfcb07dad1943910850027e67cb (patch)
treee3654abdcd4175de3ed62845222f777f078c344a /bin
parentcbdc497413b534d1b825fb1306f78134b3dcc362 (diff)
downloadhdf5-a1a4eba431c43bfcb07dad1943910850027e67cb.zip
hdf5-a1a4eba431c43bfcb07dad1943910850027e67cb.tar.gz
hdf5-a1a4eba431c43bfcb07dad1943910850027e67cb.tar.bz2
[svn-r13644] 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.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/h5vers14
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/h5vers b/bin/h5vers
index c554aba..1b1c6e6 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])
##############################################################################
sub getvers {
@@ -120,7 +120,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 {
@@ -289,7 +289,7 @@ sub gen_configure {
for (my $i = 0; $i < $#contents; ++$i) {
if ($contents[$i] =~ /^AC_INIT/) {
- $contents[$i] = sprintf("AC_INIT([$name], [%d.%d.%d%s], [hdfhelp\@ncsa.uiuc.edu])\n",
+ $contents[$i] = sprintf("AC_INIT([$name], [%d.%d.%d%s], [help\@hdfgroup.org])\n",
@newver[0,1,2],
$newver[3] eq "" ? "" : "-".$newver[3]);
last;
@@ -310,9 +310,13 @@ gen_configure("HDF5 C++", $CXX_CONFIGURE) if $CXX_CONFIGURE;
# Reconfigure once (which will update all three configure files)
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;
}
# Print the new version number