diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2016-03-08 17:49:38 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2016-03-08 17:49:38 (GMT) |
commit | d380f20a0d4ada972da1fa667e5faa04cf6e2221 (patch) | |
tree | ad20790efc16ff023821337b9b03a71cfba5494f /bin | |
parent | 3fabbf45f05855665da16e699e420a756d024a2c (diff) | |
download | hdf5-d380f20a0d4ada972da1fa667e5faa04cf6e2221.zip hdf5-d380f20a0d4ada972da1fa667e5faa04cf6e2221.tar.gz hdf5-d380f20a0d4ada972da1fa667e5faa04cf6e2221.tar.bz2 |
[svn-r29350] Revert h5check_version change to check LT_VERS_XXXX numbers rather than HDF5 library version numbers.
Svn revisions reverted: 29341, 29326
Branch features/h5check_version was created for further development.
Files changed
test/tcheck_version.c
test/testcheck_version.sh.in
src/H5public.h
src/H5.c
config/lt_vers.am
bin/h5vers
Tested with h5committest.new
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/h5vers | 60 |
1 files changed, 20 insertions, 40 deletions
@@ -105,13 +105,6 @@ sub setvers { $vers[3]?"-":"", $vers[3])/me; } -sub setltvers { - my ($contents, @vers) = @_; - $_[0] =~ s/^(\#\s*define\s+LT_VERS_INTERFACE\s+)\d+/$1$vers[0]/m; - $_[0] =~ s/^(\#\s*define\s+LT_VERS_REVISION\s+)\d+/$1$vers[1]/m; - $_[0] =~ s/^(\#\s*define\s+LT_VERS_AGE\s+)\d+/$1$vers[2]/m; -} - sub usage { my ($prog) = $0 =~ /([^\/]+)$/; print STDERR <<EOF; @@ -246,7 +239,7 @@ if ($set) { $RELEASE = ""; $CONFIGURE = ""; $CPP_DOC_CONFIG = ""; -# $LT_VERS = ""; + $LT_VERS = ""; @newver = @curver; } @@ -263,45 +256,35 @@ if ($newver[0]*1000000 + $newver[1]*1000 + $newver[2] > $version_increased="true"; } -my @newltver; -# Update the libtool shared library version in src/H5public.h -if ($LT_VERS) { - open FILE, $LT_VERS or die "$LT_VERS: $!\n"; - my ($contentsy) = join "", <FILE>; - close FILE; - - local($_) = $contentsy; - - # Don't increment LT_VERS_REVISION, but instead copy LT_VERS_* values - # to H5public.h. - # my ($lt_revision) = /^LT_VERS_REVISION\s*=\s*(\d+)/m; - # my $new_lt_revision = $lt_revision+1; - # ($contentsy) =~ s/^(LT_VERS_REVISION\s*=\s*)\d+/$1$new_lt_revision/m; - - # open FILE, ">$LT_VERS" or die "$LT_VERS: $!\n"; - # print FILE $contentsy; - # close FILE; - - my ($lt_interface) = /^LT_VERS_INTERFACE\s*=\s*(\d+)/m; - my ($lt_revision) = /^LT_VERS_REVISION\s*=\s*(\d+)/m; - my ($lt_age) = /^LT_VERS_AGE\s*=\s*(\d+)/m; - - @newltver = ($lt_interface, $lt_revision, $lt_age); - -} - # Update the version number if it changed. if ($newver[0]!=$curver[0] || $newver[1]!=$curver[1] || $newver[2]!=$curver[2] || $newver[3]ne$curver[3]) { setvers $contents, @newver or die "unable to set version\n"; -} - setltvers $contents, @newltver or die "unable to set lt version\n"; rename $file, "$file~" or die "unable to save backup file\n"; open FILE, ">$file" or die "unable to open $file but backup saved!\n"; print FILE $contents; close FILE; +} + +# Update the libtool shared library version in src/Makefile.am if +# the version number has increased. +if ($LT_VERS && $version_increased) { + open FILE, $LT_VERS or die "$LT_VERS: $!\n"; + my ($contentsy) = join "", <FILE>; + close FILE; + + local($_) = $contentsy; + + my ($lt_revision) = /^LT_VERS_REVISION\s*=\s*(\d+)/m; + my $new_lt_revision = $lt_revision+1; + ($contentsy) =~ s/^(LT_VERS_REVISION\s*=\s*)\d+/$1$new_lt_revision/m; + + open FILE, ">$LT_VERS" or die "$LT_VERS: $!\n"; + print FILE $contentsy; + close FILE; +} # Update the README.txt file if ($README) { @@ -453,9 +436,6 @@ if ($verbose) { $newver[3] eq "" ? "" : "-".$newver[3]); } -# print shared lib version in the format of interface.revision.age -printf("Shared lib version %d.%d.%d\n", @newltver[0,1,2]); - exit 0; # Because the first line of this file looks like a Bourne shell script, we |