diff options
author | David Young <dyoung@hdfgroup.org> | 2019-11-05 21:36:09 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2019-11-05 21:36:09 (GMT) |
commit | 2dd5bbfe167e3e9b6b6ee657a882e24072de4aeb (patch) | |
tree | b4605ad55c3c2b82218a915fc2322d0f75a4f880 /bin | |
parent | afd4b291315e39e3966eadaf8ae9894b30e9504e (diff) | |
parent | 0b721858e46a317c370a24115032d5be41688f67 (diff) | |
download | hdf5-2dd5bbfe167e3e9b6b6ee657a882e24072de4aeb.zip hdf5-2dd5bbfe167e3e9b6b6ee657a882e24072de4aeb.tar.gz hdf5-2dd5bbfe167e3e9b6b6ee657a882e24072de4aeb.tar.bz2 |
Merge pull request #1984 in HDFFV/hdf5 from ~DYOUNG/netbsd:develop to develop
* commit '0b721858e46a317c370a24115032d5be41688f67':
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')
-rwxr-xr-x | bin/checkapi | 4 | ||||
-rwxr-xr-x | bin/checkposix | 3 | ||||
-rwxr-xr-x | bin/debug-ohdr | 2 | ||||
-rwxr-xr-x | bin/dependencies | 4 | ||||
-rwxr-xr-x | bin/distdep | 5 | ||||
-rwxr-xr-x | bin/errors | 3 | ||||
-rwxr-xr-x | bin/iostats | 2 | ||||
-rwxr-xr-x | bin/make_err | 3 | ||||
-rwxr-xr-x | bin/make_overflow | 3 | ||||
-rwxr-xr-x | bin/make_vers | 3 | ||||
-rwxr-xr-x | bin/runbkgprog | 3 | ||||
-rwxr-xr-x | bin/trace | 3 |
12 files changed, 26 insertions, 12 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 = ""; 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. diff --git a/bin/debug-ohdr b/bin/debug-ohdr index 5b0a4b3..1363456 100755 --- a/bin/debug-ohdr +++ b/bin/debug-ohdr @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # # Copyright by The HDF Group. # Copyright by the Board of Trustees of the University of Illinois. diff --git a/bin/dependencies b/bin/dependencies index 82247da..367351a 100755 --- a/bin/dependencies +++ b/bin/dependencies @@ -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. @@ -11,6 +11,8 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # +use warnings; + my $depend_file; my $new_depend_file; my $srcdir; diff --git a/bin/distdep b/bin/distdep index 4643700..cd310e0 100755 --- a/bin/distdep +++ b/bin/distdep @@ -1,4 +1,7 @@ -#!/usr/bin/perl -p +#!/bin/sh +#! -*-perl-*- +eval 'exec perl -p -x -S $0 ${1+"$@"}' + if 0; # # Copyright by The HDF Group. # Copyright by the Board of Trustees of the University of Illinois. @@ -1,5 +1,6 @@ -#!/usr/local/bin/perl -w +#!/usr/bin/env perl require 5.003; +use warnings; use Text::Tabs; # NOTE: THE FORMAT OF HRETURN_ERROR AND HGOTO_ERROR MACROS HAS diff --git a/bin/iostats b/bin/iostats index f054b9c..e389992 100755 --- a/bin/iostats +++ b/bin/iostats @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # # Copyright by The HDF Group. # Copyright by the Board of Trustees of the University of Illinois. diff --git a/bin/make_err b/bin/make_err index 623c1b6..7f38591 100755 --- a/bin/make_err +++ b/bin/make_err @@ -1,6 +1,7 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl require 5.003; $indent=4; +use warnings; # # Copyright by The HDF Group. diff --git a/bin/make_overflow b/bin/make_overflow index ccd640e..cee0126 100755 --- a/bin/make_overflow +++ b/bin/make_overflow @@ -1,6 +1,7 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl require 5.003; use strict; +use warnings; # Global settings diff --git a/bin/make_vers b/bin/make_vers index 1ea1402..c6d2c04 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 diff --git a/bin/runbkgprog b/bin/runbkgprog index 69fa2d0..f04ea89 100755 --- a/bin/runbkgprog +++ b/bin/runbkgprog @@ -1,5 +1,6 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl require 5.003; +use warnings; $indent=4; # @@ -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. @@ -12,6 +12,7 @@ # help@hdfgroup.org. ## require 5.003; +use warnings; $Source = ""; ############################################################################## |