summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/h5vers19
1 files changed, 10 insertions, 9 deletions
diff --git a/bin/h5vers b/bin/h5vers
index 34f54dc..1b41d0f 100755
--- a/bin/h5vers
+++ b/bin/h5vers
@@ -363,24 +363,25 @@ sub gen_h5pubconf {
if ($contents[$i] =~ /\#\s*define\s+H5_PACKAGE\s+/) {
$contents[$i] = "\#define H5_PACKAGE \"$namelc\"\n";
} elsif ($contents[$i] =~ /\#\s*define\s+H5_PACKAGE_NAME\s+/) {
- $contents[$i] = "\#define H5_PACKAGE_NAME \"$namelc\"\n";
+ $contents[$i] = "\#define H5_PACKAGE_NAME \"$nameuc\"\n";
} elsif ($contents[$i] =~ /\#\s*define\s+H5_PACKAGE_STRING\s+/) {
- $contents[$i] = sprintf("\#define H5_PACKAGE_STRING \"$nameuc %d.%d.%d\"\n",
- @vers[0,1,2]);
+ $contents[$i] = sprintf("\#define H5_PACKAGE_STRING \"$nameuc %d.%d.%d%s\"\n",
+ @vers[0,1,2],
+ $newver[3] eq "" ? "" : "-".$newver[3]);
} elsif ($contents[$i] =~ /\#\s*define\s+H5_PACKAGE_TARNAME\s+/) {
$contents[$i] = "\#define H5_PACKAGE_TARNAME \"$namelc\"\n";
} elsif ($contents[$i] =~ /\#\s*define\s+H5_PACKAGE_VERSION\s+/) {
- $contents[$i] = sprintf("\#define H5_PACKAGE_VERSION \"%d.%d.%d\"\n",
- @vers[0,1,2]);
+ $contents[$i] = sprintf("\#define H5_PACKAGE_VERSION \"%d.%d.%d%s\"\n",
+ @vers[0,1,2],
+ $newver[3] eq "" ? "" : "-".$newver[3]);
} elsif ($contents[$i] =~ /\#\s*define\s+H5_VERSION\s+/) {
- $contents[$i] = sprintf("\#define H5_VERSION \"%d.%d.%d\"\n",
- @vers[0,1,2]);
+ $contents[$i] = sprintf("\#define H5_VERSION \"%d.%d.%d%s\"\n",
+ @vers[0,1,2],
+ $newver[3] eq "" ? "" : "-".$newver[3]);
}
}
- printf("opening file for writing");
open FILE, ">$pubconf" or die "$pubconf: $!\n";
- print FILE "this is a test";
print FILE @contents;
close FILE;
}