summaryrefslogtreecommitdiffstats
path: root/bin/checkposix
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-12-19 23:27:12 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-12-19 23:27:12 (GMT)
commit3d89b55d61e2e61b665c81f8689564e58653eff3 (patch)
tree737af194b9a88b3dca8a9ee99578b4df8edc3eee /bin/checkposix
parentd87609a188951c2c17eca52279bbac0c51193a7b (diff)
parent471df15556025fd211351ad54183fa196b2fd341 (diff)
downloadhdf5-3d89b55d61e2e61b665c81f8689564e58653eff3.zip
hdf5-3d89b55d61e2e61b665c81f8689564e58653eff3.tar.gz
hdf5-3d89b55d61e2e61b665c81f8689564e58653eff3.tar.bz2
Merge pull request #2160 in HDFFV/hdf5 from ~DYOUNG/netbsd:hdf5_1_12 to hdf5_1_12
* commit '471df15556025fd211351ad54183fa196b2fd341': In portable shell scripts (using #!/bin/sh) we have to use single square brackets, [ ], instead of the bash-ism double square brackets, [[ ]]. Make this script work on hosts where PERL is not installed at /usr/bin/perl. Use HD prefix. Fix HDFFV-10937: use a more reliable (and probably faster) scheme for visiting all elements of a matrix in an arbitrary order. Apparently, + has no special meaning, and neither does \+, in so-called "obsolete" / POSIX "basic" regular expressions. Also, not every version of `sed` out there supports the `-E` option. So delete the -E flag and use the regex `[^/][^/]*` instead of `[^/]+`. Make these scripts relocatable again: derive a relative path for the original installation prefix from the examples prefix. Use that relative path to locate the current installation prefix, always. Fall back to an absolute installation prefix if the relative path cannot be derived. Get the path to prefix right: needs a ../ to back out of subdirectory c/. Make this script relocatable again: derive a relative path for the original installation prefix from the examples prefix. Use that relative path to locate the current installation prefix, always. Fall back to an absolute installation prefix if the relative path cannot be derived. Let us override the examples directory using --with-examplesdir=DIR. This is handy for NetBSD where HDF5 examples are installed by convention in $prefix/share/examples/hdf5/ rather than in ${prefix}/share/hdf5_examples/, which is the HDF5 default. Follow longstanding execv convention for compatibility with NetBSD. Under the examples directories, always find the installed HDF5 executables and scripts using @prefix@ instead of a relative path, because the number of ../ in the relative path will be different on NetBSD than on other systems. Make the HDF5 configure script grok NetBSD. For portability, insulate the HDF5 library from some system macros. 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. For portability, use the POSIX sh(1) string-comparison operator `=` instead of `==`.
Diffstat (limited to 'bin/checkposix')
-rwxr-xr-xbin/checkposix3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/checkposix b/bin/checkposix
index 30128e3..233d15c 100755
--- a/bin/checkposix
+++ b/bin/checkposix
@@ -1,5 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
require 5.003;
+use warnings;
#
# Copyright by The HDF Group.