summaryrefslogtreecommitdiffstats
path: root/bin/checkapi
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-10-03 16:12:32 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-12-19 21:03:40 (GMT)
commit9e13aab19135c2013a2a2540e106d4c15eb8a63d (patch)
treea35b07de9874f1bfb5db7129e55e138eee27f430 /bin/checkapi
parent946086e12fda3c343ffd0be9199fe76f3e2f3202 (diff)
downloadhdf5-9e13aab19135c2013a2a2540e106d4c15eb8a63d.zip
hdf5-9e13aab19135c2013a2a2540e106d4c15eb8a63d.tar.gz
hdf5-9e13aab19135c2013a2a2540e106d4c15eb8a63d.tar.bz2
Not every system has perl installed in /usr/bin/, so change the shebang
(#!) line to `/usr/bin/env perl` to locate perl on the PATH. Everything after the first pathname in the shebang line is treated as a single argument to the command interpreter (/usr/bin/env "perl -w"), and there is not ordinarily any such program as "perl -w". So if the old shebang line used an option such as `-w`, add a `use warnings;` statement to the script---note that the semantics change slightly. `bin/destdep` uses a trick to pass `-p` to `/usr/bin/env perl`. It couldn't hurt to use the same trick to pass `-w`. With these changes, `sh autogen.sh` runs on NetBSD. It ought to still work on every other system HDF5 supports, too.
Diffstat (limited to 'bin/checkapi')
-rwxr-xr-xbin/checkapi4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/checkapi b/bin/checkapi
index 6882dea..f5dcacc 100755
--- a/bin/checkapi
+++ b/bin/checkapi
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
@@ -13,6 +13,8 @@
#
require 5.003;
+use warnings;
+
# Purpose: insures that API functions aren't called internally.
# Usage: checkapi H5*.c
my $filename = "";