summaryrefslogtreecommitdiffstats
path: root/bin/make_vers
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-05-18 15:52:00 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-05-18 15:52:00 (GMT)
commitca2b4aea445d3f5ffcc647670bc1e0424ec83288 (patch)
treefeae7d7c9ec27c284db4f9fedfb3858e748b2bf6 /bin/make_vers
parent67983bc4313fecf3763f5b337b612357a3ee033b (diff)
downloadhdf5-ca2b4aea445d3f5ffcc647670bc1e0424ec83288.zip
hdf5-ca2b4aea445d3f5ffcc647670bc1e0424ec83288.tar.gz
hdf5-ca2b4aea445d3f5ffcc647670bc1e0424ec83288.tar.bz2
Brought the scripts in bin/ in line with develop.
Diffstat (limited to 'bin/make_vers')
-rwxr-xr-xbin/make_vers37
1 files changed, 27 insertions, 10 deletions
diff --git a/bin/make_vers b/bin/make_vers
index 4de2dbd..d2dca4e 100755
--- a/bin/make_vers
+++ b/bin/make_vers
@@ -1,5 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
require 5.003;
+use warnings;
# Global settings
# (The max_idx parameter is the only thing that needs to be changed when adding
@@ -89,7 +90,8 @@ sub print_checkoptions ($) {
my $curr_idx; # Current API version index
# Print the option checking
- print $fh "\n/* Issue error if contradicting macros have been defined. */\n";
+ print $fh "\n\n/* Issue error if contradicting macros have been defined. */\n";
+ print $fh "/* (Can't use an older (deprecated) API version if deprecated symbols have been disabled) */\n";
# Print the #ifdef
print $fh "#if (";
@@ -118,26 +120,40 @@ sub print_checkoptions ($) {
##############################################################################
# Print "global" API version macro settings
#
-sub print_globalapivers ($) {
+sub print_globalapidefvers ($) {
my $fh = shift; # File handle for output file
my $curr_idx; # Current API version index
# Print the descriptive comment
- print $fh "\n\n/* If a particular \"global\" version of the library's interfaces is chosen,\n";
- print $fh " * set the versions for the API symbols affected.\n";
+ print $fh "\n\n/* If a particular default \"global\" version of the library's interfaces is\n";
+ print $fh " * chosen, set the corresponding version macro for API symbols.\n";
print $fh " *\n";
- print $fh " * Note: If an application has already chosen a particular version for an\n";
- print $fh " * API symbol, the individual API version macro takes priority.\n";
print $fh " */\n";
for $curr_idx ($min_sup_idx .. ($max_idx - 1)) {
# Print API version ifdef
- print $fh "#if defined(H5_USE_1", ($curr_idx * 2), "_API_DEFAULT) && !defined(H5_USE_1", ($curr_idx * 2), "_API)\n";
+ print $fh "\n#if defined(H5_USE_1", ($curr_idx * 2), "_API_DEFAULT) && !defined(H5_USE_1", ($curr_idx * 2), "_API)\n";
# Print API version definition
print $fh " " x $indent, "#define H5_USE_1", ($curr_idx * 2), "_API 1\n";
# Print API version endif
- print $fh "#endif /* H5_USE_1", ($curr_idx * 2), "_API_DEFAULT && !H5_USE_1", ($curr_idx * 2), "_API */\n\n";
+ print $fh "#endif /* H5_USE_1", ($curr_idx * 2), "_API_DEFAULT && !H5_USE_1", ($curr_idx * 2), "_API */\n";
}
+}
+
+##############################################################################
+# Print "global" API symbol version macro settings
+#
+sub print_globalapisymbolvers ($) {
+ my $fh = shift; # File handle for output file
+ my $curr_idx; # Current API version index
+
+ # Print the descriptive comment
+ print $fh "\n\n/* If a particular \"global\" version of the library's interfaces is chosen,\n";
+ print $fh " * set the versions for the API symbols affected.\n";
+ print $fh " *\n";
+ print $fh " * Note: If an application has already chosen a particular version for an\n";
+ print $fh " * API symbol, the individual API version macro takes priority.\n";
+ print $fh " */\n";
# Loop over supported older library APIs and define the appropriate macros
for $curr_idx ($min_sup_idx .. ($max_idx - 1)) {
@@ -443,8 +459,9 @@ sub create_public ($) {
print_copyright(*HEADER);
print_warning(*HEADER);
print_startprotect(*HEADER, $file);
+ print_globalapidefvers(*HEADER);
print_checkoptions(*HEADER);
- print_globalapivers(*HEADER);
+ print_globalapisymbolvers(*HEADER);
print_defaultapivers(*HEADER);
print_endprotect(*HEADER, $file);