[hdf5] 02/05: New upstream version 1.10.1+repack
Gilles Filippini
pini at debian.org
Sun Jan 14 19:48:40 UTC 2018
This is an automated email from the git hooks/post-receive script.
pini pushed a commit to branch master
in repository hdf5.
commit f8a4421e43f8fa7cc9db9aba73e9bd35a5bed3e7
Author: Gilles Filippini <pini at debian.org>
Date: Sun Jan 14 15:48:36 2018 +0100
New upstream version 1.10.1+repack
---
.autom4te.cfg | 18 +
.h5chkright.ini | 54 ++
Makefile | 35 --
bin/README | 2 +
bin/bbrelease | 411 ++++++++++++++
bin/checkapi | 65 +++
bin/checkposix | 113 ++++
bin/chkconfigure | 82 +++
bin/chkcopyright | 866 ++++++++++++++++++++++++++++
bin/debug-ohdr | 38 ++
bin/errors | 138 +++++
bin/gcov_script | 51 ++
bin/pkgscrpts/h5rmflags | 165 ++++++
bin/pkgscrpts/makeHDF5BinaryTarfiles.pl | 366 ++++++++++++
bin/pkgscrpts/makeInternalREADME.pl | 215 +++++++
bin/pkgscrpts/makeOuterREADME.pl | 182 ++++++
bin/runtest | 966 ++++++++++++++++++++++++++++++++
bin/snapshot_version | 19 +
bin/switch_maint_mode | 81 +++
bin/timekeeper | 129 +++++
src/.indent.pro | 150 +++++
src/hdf5-lin.lnt | 24 +
src/hdf5-win.lnt | 39 ++
src/hdf5.lnt | 90 +++
24 files changed, 4264 insertions(+), 35 deletions(-)
diff --git a/.autom4te.cfg b/.autom4te.cfg
new file mode 100644
index 0000000..e7c2ec1
--- /dev/null
+++ b/.autom4te.cfg
@@ -0,0 +1,18 @@
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
+
+## ------------------ ##
+## User Preferences. ##
+## ------------------ ##
+
+begin-language: "Autoconf"
+args: --no-cache
+end-language: "Autoconf"
diff --git a/.h5chkright.ini b/.h5chkright.ini
new file mode 100644
index 0000000..1010dce
--- /dev/null
+++ b/.h5chkright.ini
@@ -0,0 +1,54 @@
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
+
+# Initialization files for the Copyright Checker, chkcopyright.
+# Each line is a keyword for action and the rest are values.
+# Keywords:
+# '#' Comments
+# skip Files to be skipped
+# prune Directories to be skipped. Notice this prunes all directories
+# with the same name. E.g.,
+# "prune test" skips test, fortran/test, c++/test, ...
+
+# Skip COPYING since it is the detail Copyright notice.
+skip COPYING
+
+# Sort of strange to have a copyright notice in README
+skip README
+
+# Non-UI copyrighted files in top-level
+skip aclocal.m4
+
+# Non-UI copyrighted files in bin.
+skip config.guess
+skip config.sub
+skip depcomp
+skip install-sh
+skip ltmain.sh
+skip missing
+skip mkinstalldirs
+
+# Generated files in top-level
+skip configure
+
+# Generated files in src.
+skip H5config.h.in
+
+# Generated files in fortran/src.
+skip H5match_types.c
+skip H5test_kind.f90
+
+# Ignore this expected output file in windows/examples.
+skip testExamples_exp_output.txt
+
+# Skip all testfiles/* since if we insert a copyright notice in the expected
+# data files, we would have to spend extra effort to filter them out.
+prune testfiles
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 9edb476..0000000
--- a/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-# Top-level distributed Makefile -*- makefile -*-
-
-# Copyright by The HDF Group.
-# Copyright by the Board of Trustees of the University of Illinois.
-# All rights reserved.
-#
-# This file is part of HDF5. The full HDF5 copyright notice, including
-# terms governing use, modification, and redistribution, is contained in
-# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
-# If you do not have access to either file, you may request a copy from
-# help at hdfgroup.org.
-
-# This Makefile is a stub (copied from Makefile.dist) which will run
-# configure and then invoke the same target in the new Makefile created
-# by configure.
-
-# Uncomment this variable if your make(1) doesn't set it automatically.
-#
-#MAKE=make
-
-
-SHELL=/bin/sh
-
-all lib progs check test _test install uninstall dep depend: _config
- $(MAKE) $@
-
-clean mostlyclean distclean maintainer-clean TAGS: _config
- $(MAKE) $@
-
-_config:
- sh configure
-
-.PHONY: all lib progs test install uninstall dep depend clean mostlyclean \
- distclean maintainer-clean _config
diff --git a/bin/README b/bin/README
new file mode 100644
index 0000000..1c77043
--- /dev/null
+++ b/bin/README
@@ -0,0 +1,2 @@
+The daily tests run copies of some of the scripts in this directory from another repository, notably snapshot and runtest. The copies in this directory should work, but are not used in daily tests, though they should be tested occasionally.
+
diff --git a/bin/bbrelease b/bin/bbrelease
new file mode 100755
index 0000000..395b23c
--- /dev/null
+++ b/bin/bbrelease
@@ -0,0 +1,411 @@
+#!/bin/sh
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
+#
+
+# Make a release of hdf5.
+#
+# Programmer: Robb Matzke
+# Creation date: on or before 1998-01-29.
+#
+# Modifications
+# Robb Matzke, 1999-07-16
+# The SunOS 5.6 sed *must* have slashes as delimiters. I changed things like
+# `sed s+/CVS++' to `sed 's/\/CVS//'
+#
+# Albert Cheng, 1999-10-26
+# Moved the MANIFEST checking to a separate command file so that
+# it can be invoked individually.
+#
+# Albert Cheng, 2004-08-14
+# Added the --private option.
+#
+# James Laird, 2005-09-07
+# Added the md5 method.
+#
+# Larry Knox, 2016-08-30
+# Added the --revision option to create private releases with the
+# code revision hash in the version strings. Currently the version
+# of this script with the --revision option is named bbrelease. It
+# can probably be merged into the original release script in the
+# future.
+# Commands to get the revision hash have now been converted to git
+# to match the source repository change.
+
+# Function definitions
+#
+# Print Usage page
+USAGE()
+{
+cat << EOF
+Usage: $0 -d <dir> [--docver BRANCHNAME] [-h] [--nocheck] [--private] <methods> ...
+ -d DIR The name of the directory where the releas(es) should be
+ placed.
+ --docver BRANCHNAME This is added for 1.8 and beyond to get the correct
+ version of documentation files from the hdf5docs
+ repository. BRANCHNAME for v1.8 should be hdf5_1_8.
+ -h print the help page.
+ --nocheck Ignore errors in MANIFEST file.
+ --private Make a private release with today's date in version information.
+ --revision Make a private release with the code revision number in version information.
+
+This must be run at the top level of the source directory.
+The other command-line options are the names of the programs to use
+for compressing the resulting tar archive (if none are given then
+"tar" is assumed):
+
+ tar -- use tar and don't do any compressing.
+ gzip -- use gzip with "-9" and append ".gz" to the output name.
+ bzip2 -- use bzip2 with "-9" and append ".bz2" to the output name.
+ zip -- convert all text files to DOS style and form a zip file for Windows use.
+ doc -- produce the latest doc tree in addition to the archive.
+
+An md5 checksum is produced for each archive created and stored in the md5 file.
+
+Examples:
+
+ $ bin/release -d /tmp
+ /tmp/hdf5-1.8.13-RELEASE.txt
+ /tmp/hdf5-1.8.13.md5
+ /tmp/hdf5-1.8.13.tar
+
+ $ bin/release -d /tmp gzip
+ /tmp/hdf5-1.8.13-RELEASE.txt
+ /tmp/hdf5-1.8.13.md5
+ /tmp/hdf5-1.8.13.tar.gz
+
+ $ bin/release -d /tmp tar gzip zip
+ /tmp/hdf5-1.8.13-RELEASE.txt
+ /tmp/hdf5-1.8.13.md5
+ /tmp/hdf5-1.8.13.tar
+ /tmp/hdf5-1.8.13.tar.gz
+ /tmp/hdf5-1.8.13.tar.zip
+
+EOF
+
+}
+
+# Function name: tar2zip
+# Convert the release tarball to a Windows zipball.
+#
+# Programmer: Albert Cheng
+# Creation date: 2014-04-23
+#
+# Modifications
+#
+# Steps:
+# 1. untar the tarball in a temporay directory;
+# Note: do this in a temporary directory to avoid changing
+# the original source directory which maybe around.
+# 2. convert all its text files to DOS (LF-CR) style;
+# 3. form a zip file which is usable by Windows users.
+#
+# Parameters:
+# $1 version
+# $2 release tarball
+# $3 output zipball file name
+#
+# Returns 0 if successful; 1 otherwise
+#
+tar2zip()
+{
+ if [ $# -ne 3 ]; then
+ echo "usage: tar2zip <tarfilename> <zipfilename>"
+ return 1
+ fi
+ ztmpdir=/tmp/tmpdir$$
+ mkdir -p $ztmpdir
+ version=$1
+ tarfile=$2
+ zipfile=$3
+
+ # step 1: untar tarball in ztmpdir
+ (cd $ztmpdir; tar xf -) < $tarfile
+ # sanity check
+ if [ ! -d $ztmpdir/$version ]; then
+ echo "untar did not create $ztmpdir/$version source dir"
+ # cleanup
+ rm -rf $ztmpdir
+ return 1
+ fi
+ # step 2: convert text files
+ # There maybe a simpler way to do this.
+ # options used in unix2dos:
+ # -k Keep the date stamp
+ # -q quiet mode
+ # grep redirect output to /dev/null because -q or -s are not portable.
+ find $ztmpdir/$version | \
+ while read inf; do \
+ if file $inf | grep "$inf\: .*text" > /dev/null 2>&1 ; then \
+ unix2dos -q -k $inf; \
+ fi\
+ done
+ # step 3: make zipball
+ # -9 maximum compression
+ # -y Store symbolic links as such in the zip archive
+ # -r recursive
+ # -q quiet
+ (cd $ztmpdir; zip -9 -y -r -q $version.zip $version)
+ mv $ztmpdir/$version.zip $zipfile
+
+ # cleanup
+ rm -rf $ztmpdir
+}
+
+# This command must be run at the top level of the hdf5 source directory.
+# Verify this requirement.
+# Since we are running bbrelease to create an HDF5 source tarfile for buildbot
+# testing with source that is not for release, there is not a file named
+# "configure" but there will be one named "configure.ac". The "configure"
+# file will be created when autogen.sh runs. There probably will always
+# be a bin/release file, but just in case it is removed, we can check for
+# this script, bbrelease, in the bin directory. The bin/release script should
+# continue to check for "configure" because it should be present in release
+# source.
+if [ ! \( -f configure.ac -a -f bin/bbrelease \) ]; then
+ echo "$0 must be run at the top level of the hdf5 source directory"
+ exit 1
+fi
+
+# Defaults
+DEST=releases
+VERS=`perl bin/h5vers`
+VERS_OLD=
+test "$VERS" || exit 1
+verbose=yes
+check=yes
+release_date=`date +%F`
+today=`date +%Y%m%d`
+pmode='no'
+revmode='no'
+tmpdir="../#release_tmp.$$" # tmp work directory
+DOC_URL=https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5doc.git
+CPPLUS_RM_NAME=cpplus_RM
+
+# Restore previous Version information
+RESTORE_VERSION()
+{
+ if [ X-${VERS_OLD} != X- ]; then
+ echo restoring version information back to $VERS_OLD
+ rm -f config/lt_vers.am
+ cp $tmpdir/lt_vers.am config/lt_vers.am
+ bin/h5vers -s $VERS_OLD
+ VERS_OLD=
+ fi
+}
+
+
+# Command-line arguments
+while [ -n "$1" ]; do
+ arg=$1
+ shift
+ case "$arg" in
+ -d)
+ DEST=$1
+ shift
+ ;;
+ --nocheck)
+ check=no
+ ;;
+ -h)
+ USAGE
+ exit 0
+ ;;
+ --private)
+ pmode=yes
+ ;;
+ --revision)
+ revmode=yes
+ ;;
+ --docver)
+ DOCVERSION=$1
+ shift
+ ;;
+ -*)
+ echo "Unknown switch: $arg" 1>&2
+ USAGE
+ exit 1
+ ;;
+ *)
+ methods="$methods $arg"
+ ;;
+ esac
+done
+
+# Default method is tar
+if [ "X$methods" = "X" ]; then
+ methods="tar"
+fi
+
+# Create the temporay work directory.
+if mkdir $tmpdir; then
+ echo "temporary work directory for release. "\
+ "Can be deleted after release completes." > $tmpdir/README
+else
+ echo "Failed to mkdir tmpdir($tmpdir)"
+ exit 1
+fi
+
+# setup restoration in case of abort.
+trap RESTORE_VERSION 0
+
+if [ X$pmode = Xyes ]; then
+ VERS_OLD=$VERS
+ # Copy old version of config/lt_vers.am, since it's hard to
+ # "undo" changes to it.
+ cp config/lt_vers.am $tmpdir
+ # Set version information to m.n.r-of$today.
+ # (h5vers does not correctly handle just m.n.r-$today.)
+ VERS=`echo $VERS | sed -e s/-.*//`-of$today
+ echo Private release of $VERS
+ bin/h5vers -s $VERS
+fi
+
+if [ X$revmode = Xyes ]; then
+ VERS_OLD=$VERS
+ echo "Save old version $VERS_OLD for restoration later."
+ # Copy old version of config/lt_vers.am, since it's hard to
+ # "undo" changes to it.
+ cp config/lt_vers.am $tmpdir
+ branch=`git branch | grep '*' | awk '{print $NF}'`
+ revision=`git rev-parse --short HEAD`
+# Set version information to m.n.r-r$revision.
+ # (h5vers does not correctly handle just m.n.r-$today.)
+ VERS=`echo $VERS | sed -e s/-.*//`-$revision
+ echo Private release of $VERS
+ bin/h5vers -s $VERS
+ HDF5_VERS=hdf5-$branch-$revision
+ # use a generic directory name for revision releases
+ HDF5_IN_VERS=hdfsrc
+else
+ # Store hdf5-$VERS ("hdf5-1.7.51", e.g.) to a variable to avoid typos
+ HDF5_VERS=hdf5-$VERS
+ # directory name matches tar file name for non-revision releases
+ HDF5_IN_VERS=$HDF5_VERS
+fi
+
+test "$verbose" && echo "Releasing $HDF5_VERS to $DEST" 1>&2
+if [ ! -d $DEST ]; then
+ echo " Destination directory $DEST does not exist" 1>&2
+ exit 1
+fi
+
+# Check the validity of the MANIFEST file.
+bin/chkmanifest || fail=yes
+if [ "X$fail" = "Xyes" ]; then
+ if [ $check = yes ]; then
+ exit 1
+ else
+ echo "Continuing anyway..."
+ fi
+fi
+
+# Create a manifest that contains only files for distribution.
+MANIFEST=$tmpdir/H5_MANIFEST
+grep '^\.' MANIFEST | grep -v _DO_NOT_DISTRIBUTE_ >$MANIFEST
+
+# Prepare the source tree for a release.
+#ln -s `pwd` $tmpdir/$HDF5_VERS || exit 1
+ln -s `pwd` $tmpdir/$HDF5_IN_VERS || exit 1
+# Save a backup copy of Makefile if exists.
+test -f Makefile && mv Makefile $tmpdir/Makefile.x
+cp -p Makefile.dist Makefile
+
+# Update README.txt and release_docs/RELEASE.txt with release information in
+# line 1.
+for f in README.txt release_docs/RELEASE.txt; do
+ echo "HDF5 version $VERS released on $release_date" >$f.x
+ sed -e 1d $f >>$f.x
+ mv $f.x $f
+ # Make sure new files are of the right access mode
+ chmod 644 $f
+done
+
+# trunk is different than branches.
+if [ "${DOCVERSION}" ]; then
+ DOC_URL=https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5doc.git -b ${DOCVERSION}
+fi
+
+# Create the tar file
+test "$verbose" && echo " Running tar..." 1>&2
+( \
+ cd $tmpdir; \
+ tar cf $HDF5_VERS.tar $HDF5_IN_VERS/Makefile \
+ `sed 's/^\.\//'$HDF5_IN_VERS'\//' $MANIFEST` || exit 1 \
+)
+
+# Compress
+MD5file=$HDF5_VERS.md5
+cp /dev/null $DEST/$MD5file
+for comp in $methods; do
+ case $comp in
+ tar)
+ cp -p $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.tar
+ (cd $DEST; md5sum $HDF5_VERS.tar >> $MD5file)
+ ;;
+ gzip)
+ test "$verbose" && echo " Running gzip..." 1>&2
+ gzip -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.gz
+ (cd $DEST; md5sum $HDF5_VERS.tar.gz >> $MD5file)
+ ;;
+ bzip2)
+ test "$verbose" && echo " Running bzip2..." 1>&2
+ bzip2 -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.bz2
+ (cd $DEST; md5sum $HDF5_VERS.tar.bz2 >> $MD5file)
+ ;;
+ zip)
+ test "$verbose" && echo " Creating zip ball..." 1>&2
+ tar2zip $HDF5_IN_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2
+ (cd $DEST; md5sum $HDF5_VERS.zip >> $MD5file)
+ ;;
+ doc)
+ if [ "${DOCVERSION}" = "" ]; then
+ DOCVERSION=master
+ fi
+ test "$verbose" && echo " Creating docs..." 1>&2
+ # Check out docs from git repo
+ (cd $tmpdir; git clone $DOC_URL > /dev/null) || exit 1
+ # Create doxygen C++ RM
+ (cd c++/src && doxygen cpp_doc_config > /dev/null ) || exit 1
+ # Replace version of C++ RM with just-created version
+ rm -rf $tmpdir/${DOCVERSION}/html/$CPPLUS_RM_NAME
+ mv c++/src/$CPPLUS_RM_NAME $tmpdir/${DOCVERSION}/html/$CPPLUS_RM_NAME
+ # Compress the docs and move them to the release area
+ mv $tmpdir/$DOCVERSION $tmpdir/${HDF5_VERS}_docs
+ (cd $tmpdir && tar cf ${HDF5_VERS}_docs.tar ${HDF5_VERS}_docs)
+ mv $tmpdir/${HDF5_VERS}_docs.tar $DEST
+ ;;
+ *)
+ echo "***Error*** Unknown method $comp"
+ exit 1
+ ;;
+ esac
+done
+
+# Copy the RELEASE.txt to the release area.
+cp release_docs/RELEASE.txt $DEST/$HDF5_VERS-RELEASE.txt
+
+# Remove distributed Makefile and restore previous Makefile if existed.
+rm -f Makefile
+test -f $tmpdir/Makefile.x && mv $tmpdir/Makefile.x Makefile
+
+# Restore OLD version information, then no need for trap.
+if [ X$pmode = Xyes ] || [ X$revmode = Xyes ]; then
+ echo "Restore the original version $VERS_OLD"
+ RESTORE_VERSION
+ trap 0
+fi
+
+# Remove temporary things
+rm -rf $tmpdir
+
+exit 0
diff --git a/bin/checkapi b/bin/checkapi
new file mode 100755
index 0000000..6882dea
--- /dev/null
+++ b/bin/checkapi
@@ -0,0 +1,65 @@
+#!/usr/bin/perl -w
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
+#
+require 5.003;
+
+# Purpose: insures that API functions aren't called internally.
+# Usage: checkapi H5*.c
+my $filename = "";
+my $lastname = "";
+
+if(<>) {
+ while (<>) {
+ if($ARGV =~ /\//) {
+ ($filename) = ($ARGV =~ /^.*\/([A-Za-z0-9_]*)\.c$/);
+ } else {
+ ($filename) = ($ARGV =~ /([A-Za-z0-9_]*)\.c$/);
+ }
+
+ if($filename =~ /H5FDmulti|H5FDstdio/) {
+ if($filename ne $lastname) {
+ print "$ARGV is exempt from checking\n";
+ $lastname = $filename;
+ }
+ } else {
+ # Get rid of comments by removing the inside part.
+ s|/\*.*?\*/||g;
+ if ($in_comment) {
+ if (/\*\//) {
+ s|.*?\*/||;
+ $in_comment = 0;
+ } else {
+ $_="\n";
+ }
+ } elsif (m|/\*|) {
+ s|/\*.*||;
+ $in_comment = 1;
+ }
+
+ # Remove character strings
+ s/\\.//g; # remove escaped characters
+ s/\".*?\"//g; # remove string constants
+
+ # Disregard the following hits
+ next if /^H5/;
+ next if /^\#/;
+ next if /FUNC_ENTER(_NOINIT)*/;
+
+ next unless /(H5[A-Z]{1,2}[a-z]\w*)/;
+ print "$ARGV:$.: $1\n";
+ }
+ } continue {
+ close ARGV if eof; # reset line number
+ }
+}
+
diff --git a/bin/checkposix b/bin/checkposix
new file mode 100755
index 0000000..7ab741c
--- /dev/null
+++ b/bin/checkposix
@@ -0,0 +1,113 @@
+#!/usr/bin/perl -w
+require 5.003;
+
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
+#
+# Robb Matzke, matzke at llnl.gov
+# 30 Aug 1997
+#
+# Purpose: Given the names of C source files this script will print the
+# file name, line number, and function name of any function that
+# doesn't begin with the letter `h' or `H' as stipulated by the
+# HDF5 programming style guide.
+#
+# Emacs users can run this script as the compile command and
+# use `next-error' (usually bound to M-`) to find each name
+# violation.
+
+if(<>) {
+ if($ARGV =~ /\//) {
+ ($filename) = ($ARGV =~ /^.*\/([A-Za-z0-9_]*)\.c$/);
+ } else {
+ ($filename) = ($ARGV =~ /([A-Za-z0-9_]*)\.c$/);
+ }
+
+ if($filename =~ /H5FDmulti|H5FDstdio/) {
+ print "$ARGV is exempt from using Standard library macro wrappers\n";
+ } else {
+ while (<>) {
+
+ # Get rid of comments by removing the inside part.
+ s|/\*.*?\*/||g;
+ if ($in_comment) {
+ if (/\*\//) {
+ s|.*?\*/||;
+ $in_comment = 0;
+ } else {
+ $_="\n";
+ }
+ } elsif (m|/\*|) {
+ s|/\*.*||;
+ $in_comment = 1;
+ }
+
+ # Get rid of string constants if they begin and end on this line.
+ s/([\'\"])([^\1]|\\\1)*?\1/$1$1/g;
+
+ # Get rid of preprocessor directives
+ s/^\#.*//;
+
+ # Skip callbacks invoked as methods in a struct
+ next if $_ =~ /\b(\)?->|\.)\(?([a-z_A-Z]\w*)\s*\(/;
+
+ # Now find all function calls on this line which don't start with 'H'
+ while (($name)=/\b([a-z_A-GI-Z]\w*)\s*\(/) {
+ $_ = $';
+
+ # Ignore C statements that look sort of like function
+ # calls.
+ next if $name =~ /^(if|for|offsetof|return|sizeof|switch|while|void)$/;
+
+ # Ignore things that get misdetected because of the simplified
+ # parsing that takes place here.
+ next if $name =~ /^(int|herr_t|_term_interface)$/;
+
+ # These are really HDF5 functions/macros even though they don't
+ # start with `h' or `H'.
+ next if $name =~ /^FUNC_(ENTER|LEAVE)(_(NO)?API|_PACKAGE|_STATIC)?(_NOFS|_NOCLEAR|_NOINIT)?(_NOFUNC|_TAG)?$/;
+ next if $name =~ /^(BEGIN|END)_FUNC$/;
+ next if $name =~ /^U?INT(8|16|32|64)(ENCODE|DECODE)(_VAR)?$/;
+ next if $name =~ /^CI_(PRINT_STATS|INC_SRC|INC_DST)$/;
+ next if $name =~ /^(ABS|ADDR_OVERFLOW|ALL_MEMBERS|BOUND|CONSTR|DETECT_[I|F|M]|DOWN)$/;
+ next if $name =~ /^(MIN3?|MAX3?|NELMTS|POWER_OF_TWO|REGION_OVERFLOW)$/;
+ next if $name =~ /^(UNIQUE_MEMBERS)$/;
+ next if $name =~ /^addr_defined$/;
+
+ # These functions/macros are exempt.
+ next if $name =~ /^(main|[fs]?printf|va_(start|arg|end))$/;
+
+ # These are Windows system calls. Ignore them.
+ next if $name =~ /^(_get_osfhandle|GetFileInformationByHandle|SetFilePointer|GetLastError|SetEndOfFile)$/;
+ next if $name =~ /^(FindNextFile|FindClose|_tzset|Wgettimeofday|GetSystemTimeAsFileTime|Wgetlogin|GetUserName)$/;
+
+ # These are MPI function calls. Ignore them.
+ next if $name =~ /^(MPI_|MPE_)/;
+
+ # These are POSIX threads function calls. Ignore them.
+ next if $name =~ /^pthread_/;
+
+ # These are Windows threads function calls. Ignore them.
+ next if $name =~ /^(_beginthread|(Initialize|Enter|Leave)CriticalSection|TlsAlloc)$/;
+
+ # These are zlib & szlib function calls. Ignore them.
+ next if $name =~ /^(inflate|SZ_)/;
+ next if $name =~ /^compress2$/;
+
+ print "$ARGV:$.: $name\n";
+ }
+
+ } continue {
+ close ARGV if eof; # reset line number
+ }
+ }
+}
diff --git a/bin/chkconfigure b/bin/chkconfigure
new file mode 100755
index 0000000..d03f421
--- /dev/null
+++ b/bin/chkconfigure
@@ -0,0 +1,82 @@
+#!/bin/sh
+##
+## Copyright by the Board of Trustees of the University of Illinois.
+## All rights reserved.
+##
+## This file is part of HDF5. The full HDF5 copyright notice, including
+## terms governing use, modification, and redistribution, is contained in
+## the COPYING file, which can be found at the root of the source code
+## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+## If you do not have access to either file, you may request a copy from
+## help at hdfgroup.org.
+##
+# Check that all the configure files are properly generated.
+#
+# Programmer: Albert Cheng
+# Created Date: 2004/12/07
+
+#
+# Configure: should be generated by autoconf version 2.69.
+# autoconf: should be of version 2.69.
+
+# variable initialization
+nerrors=0
+AUTOCONFVERSION=2.69
+AUTOCONFVERSIONLEAD='Generated by GNU Autoconf'
+CONFIGUREFILES="configure"
+
+
+# Function definitions
+#
+# PRINTMSG
+# Print a one line message left justified in a field of 70 characters
+# without newline. More output for this line later.
+#
+PRINTMSG() {
+ SPACES=" "
+ echo "$* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+# print result passed.
+PASSED() {
+ echo " PASSED"
+}
+
+# print result failed.
+FAILED() {
+ echo "*FAILED*"
+}
+
+
+# Main body
+
+# Check configure files
+# The autoconf version should be among the first 5 lines.
+echo "Check autoconf version. Should be version $AUTOCONFVERSION"
+for xf in $CONFIGUREFILES; do
+ PRINTMSG $xf
+ if [ ! -f $xf ]; then
+ FAILED
+ echo File not found
+ nerrors=`expr $nerrors + 1`
+ continue
+ fi
+ autoconf_version=`head -5 $xf | grep "$AUTOCONFVERSIONLEAD"`
+ echo $autoconf_version | grep "$AUTOCONFVERSIONLEAD $AUTOCONFVERSION" > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ PASSED
+ else
+ FAILED
+ echo "Expected: $AUTOCONFVERSIONLEAD $AUTOCONFVERSION"
+ echo "Got: $autoconf_version"
+ nerrors=`expr $nerrors + 1`
+ fi
+done
+
+
+# Summary
+echo $0 found $nerrors errors
+if [ $nerrors != 0 ]; then
+ exit 1
+fi
+exit 0
diff --git a/bin/chkcopyright b/bin/chkcopyright
new file mode 100755
index 0000000..d67e030
--- /dev/null
+++ b/bin/chkcopyright
@@ -0,0 +1,866 @@
+#! /bin/sh
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
+#
+
+# Check Copyright notice.
+# Check that all the files have the proper copyright notice.
+# It goes down directories recursively.
+#
+# Programmer: Albert Cheng
+# Created Data: 2003/07/22
+# Modification:
+# Rewrote most of it. Albert Cheng, 2005/10/10.
+
+# Setup
+#
+PROGNAME=$0
+DIFF="diff"
+INITFILE=.h5chkright.ini
+EXCEPTIONS=/tmp/h5chkright.except.$$
+tmpfile=/tmp/h5chkright_tmp.$$
+EXCEPTIONDIRS="-name .git" # at least skip .git directories.
+EXTRACTEDFILE=/tmp/h5chkright.extracted.$$
+VERBOSE= # default no
+FIXIT= # default no
+DIRS=. # default current directory
+NFAILEDFILES=0 # Number of failed files found.
+NPASSEDFILES=0 # Number of passed files found.
+NFIXEDFILES=0 # Number of files fixed.
+NFIXFAILEDFILES=0 # Number of files fix failed.
+NUMBEGINLINES=60 # Copyright notice should be located within the
+ # this number of lines at the beginning of the file.
+UICOPYRIGHTSTR="Copyright by the Board of Trustees of the University of Illinois"
+THGCOPYRIGHTSTR="Copyright by The HDF Group."
+
+PASSEDLOG=/tmp/h5chkright_passed.$$
+SKIPPEDLOG=/tmp/h5chkright_skipped.$$
+FAILEDLOG=/tmp/h5chkright_failed.$$
+FIXEDLOG=/tmp/h5chkright_fixed.$$
+FIXFAILEDLOG=/tmp/h5chkright_fixfailed.$$
+
+C_COPYRIGHT=/tmp/h5chkright_C.$$ # C style copyright
+FTN_COPYRIGHT=/tmp/h5chkright_FTN.$$ # Fortran style copyright
+HTM_COPYRIGHT=/tmp/h5chkright_HTM.$$ # HTML style copyright
+SH_COPYRIGHT=/tmp/h5chkright_SH.$$ # SHELL style copyright
+SH_COPYRIGHT2=/tmp/h5chkright_SH2.$$ # SHELL style copyright, 2nd style.
+WINBAT_COPYRIGHT=/tmp/h5chkright_WINBAT.$$ # Windows Batch file Copyright notice
+CONFIGURE_AC_COPYRIGHT=/tmp/h5chkright_CONFIGURE_AC.$$ # configure.ac file Copyright notice
+
+tmpfixfile=/tmp/h5chkright_fix.$$ # Temporary fixed copy of file
+
+
+# Caution message of the fix feature.
+FIXCAUTIONMSG()
+{
+ cat <<EOF
+**CAUTION**
+The fix is a best attempt. Check the changes before committing them.
+EOF
+}
+
+
+# Help page
+#
+USAGE()
+{
+ cat <<EOF
+Usage: $PROGNAME [-h | -help] [-fname name-patter] [-v | -v9] [dir1 dir2 ...]
+ Check copyright notices of files in [dir1 dir2 ...}.
+ Default is to check files in current directory.
+ -h | -help
+ show this page.
+ -fname name-pattern
+ limit to files of name-pattern
+ -v
+ verbose mode
+ -v9
+ highly verbose
+ -fix
+ fix failed files if possible.
+EOF
+ FIXCAUTIONMSG
+}
+
+
+# Print Debug output
+#
+PRINTDEBUG()
+{
+ if [ -n "$VERBOSE" ]; then
+ echo $*
+ else
+ : # noop
+ fi
+}
+
+
+# Generate various styles of Copyright notices
+#
+BUILDCOPYRIGHT()
+{
+ # C and C++ source Copyright notice
+ cat > ${C_COPYRIGHT} << \EOF
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help at hdfgroup.org. *
+EOF
+
+ # Fortran9X source Copyright notice
+ cat > ${FTN_COPYRIGHT} << \EOF
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help at hdfgroup.org. *
+EOF
+
+ # HTML file Copyright notice
+ cat > ${HTM_COPYRIGHT} << \EOF
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help at hdfgroup.org. *
+EOF
+
+ # Shell style Copyright notice
+ cat > ${SH_COPYRIGHT} << \EOF
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the files COPYING and Copyright.html. COPYING can be found at the root
+# of the source code distribution tree; Copyright.html can be found at the
+# root level of an installed copy of the electronic HDF5 document set and
+# is linked from the top-level documents page. It can also be found at
+# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
+# access to either file, you may request a copy from help at hdfgroup.org.
+EOF
+
+ # Shell style Copyright notice (2nd type)
+ cat > ${SH_COPYRIGHT2} << \EOF
+## Copyright by The HDF Group.
+## Copyright by the Board of Trustees of the University of Illinois.
+## All rights reserved.
+##
+## This file is part of HDF5. The full HDF5 copyright notice, including
+## terms governing use, modification, and redistribution, is contained in
+## the files COPYING and Copyright.html. COPYING can be found at the root
+## of the source code distribution tree; Copyright.html can be found at the
+## root level of an installed copy of the electronic HDF5 document set and
+## is linked from the top-level documents page. It can also be found at
+## http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
+## access to either file, you may request a copy from help at hdfgroup.org.
+EOF
+
+ # Windows Batch file Copyright notice
+ cat > ${WINBAT_COPYRIGHT} << \EOF
+ at REM Copyright by The HDF Group.
+ at REM Copyright by the Board of Trustees of the University of Illinois.
+ at REM All rights reserved.
+ at REM
+ at REM This file is part of HDF5. The full HDF5 copyright notice, including
+ at REM terms governing use, modification, and redistribution, is contained in
+ at REM the files COPYING and Copyright.html. COPYING can be found at the root
+ at REM of the source code distribution tree; Copyright.html can be found at the
+ at REM root level of an installed copy of the electronic HDF5 document set and
+ at REM is linked from the top-level documents page. It can also be found at
+ at REM http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
+ at REM access to either file, you may request a copy from help at hdfgroup.org.
+EOF
+
+ # configure.ac file Copyright notice
+ cat > ${CONFIGURE_AC_COPYRIGHT} << \EOF
+dnl Copyright by The HDF Group.
+dnl Copyright by the Board of Trustees of the University of Illinois.
+dnl All rights reserved.
+dnl
+dnl This file is part of HDF5. The full HDF5 copyright notice, including
+dnl terms governing use, modification, and redistribution, is contained in
+dnl the files COPYING and Copyright.html. COPYING can be found at the root
+dnl of the source code distribution tree; Copyright.html can be found at the
+dnl root level of an installed copy of the electronic HDF5 document set and
+dnl is linked from the top-level documents page. It can also be found at
+dnl http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
+dnl access to either file, you may request a copy from help at hdfgroup.org.
+EOF
+
+}
+
+# Initialization
+#
+# Initialize file format:
+# Each line is a keyword for action and the rest are values.
+# Keywords:
+# '#' Comments
+# skip Files to be skipped
+# prune Directories to be skipped. Notice this prunes all directories
+# with the same name. E.g.,
+# "prune test" skips test, fortran/test, c++/test, ...
+# (See -name option in the find command.)
+# prunepath Directory or file to be skipped. Notice this is different from
+# prunes since it matches the exact pathname. E.g.,
+# "prunepath ./tools/testfiles" skips the directory/file matching
+# exactly that path but NOT tools/h5dump/testfiles nor
+# tools/h5dump/testfiles.
+# (See -path option in the find command.)
+#
+INITIALIZATION()
+{
+ # clean up log files
+ rm -f $PASSEDLOG $SKIPPEDLOG $FAILEDLOG $FIXEDLOG $FIXFAILEDLOG
+
+ # Generate various styles of copyright notice.
+ BUILDCOPYRIGHT
+
+ echo Initialization...
+ # setup exceptions.
+ cp /dev/null $EXCEPTIONS
+
+ # Process Initial setting file if exists
+ if [ -r $INITFILE ]; then
+ while read key value; do
+ case "$key" in
+ \#* | '') # Comment or blank line, skip it
+ continue
+ ;;
+ skip)
+ echo $key $value
+ echo $value >> $EXCEPTIONS
+ ;;
+ prune)
+ echo $key $value
+ EXCEPTIONDIRS="$EXCEPTIONDIRS -o -name $value"
+ ;;
+ prunepath)
+ echo $key $value
+ EXCEPTIONDIRS="$EXCEPTIONDIRS -o -path $value"
+ ;;
+ *)
+ echo unknown setting input in file $INITFILE
+ echo $key $value
+ ;;
+ esac
+ done < $INITFILE
+ fi
+
+ # Change EXCEPTIONDIRS to be compatible with find command.
+ EXCEPTIONDIRS="( $EXCEPTIONDIRS ) -prune -o"
+ echo Initialization done
+}
+
+
+# Parse Options
+#
+PARSE_OPTION()
+{
+ while test $# -gt 0 ; do
+ case "$1" in
+ -h | -help )
+ USAGE
+ exit 0
+ ;;
+ -fname )
+ shift
+ FNAME="$1"
+ ;;
+ -fix )
+ FIXIT=yes
+ ;;
+ -v* )
+ VERBOSE=yes
+ if test X$1 = X-v9; then
+ set -x
+ fi
+ ;;
+ -* )
+ echo "***Unknown option ($1)"
+ USAGE
+ exit 1
+ ;;
+ * )
+ DIRS=$*
+ break
+ ;;
+ esac
+ shift
+ done
+}
+
+
+# Rinse the file by,
+# removing all \r which is often present in Windows files;
+# replace tabs with equivalent spaces;
+# removing all trailing spaces.
+# $1 is the file to be rinsed.
+RINSE()
+{
+ rf=$1
+ cp $rf $tmpfile
+ dos2unix < $tmpfile | expand | sed -e 's/ *$//' > $rf
+}
+
+# Locate a line in the file and print the line number.
+# Print 0 if not found; -1 if error.
+# $1 The line.
+# $2 The file.
+#
+FindLineInFile()
+{
+ if [ $# -ne 2 ]; then
+ # expect two arguments
+ echo -1
+ return
+ fi
+ xline=$1
+ xf=$2
+ xpos=`grep -n "${xline}" $xf`
+ if [ "$?" -ne 0 ] ; then
+ # Not found, return 0
+ xpos=0
+ else
+ xpos=`echo $xpos | cut -f1 -d:`
+ fi
+ echo $xpos
+}
+
+
+# Match Copyright notice.
+# $1 file which contains the expected copyright notice.
+# $2 file in which to look for the copyright notice.
+# Copyright notice must be found within the beginning $NUMBEGINLINES of lines.
+# Hunt for the particular string $UICOPYRIGHTSTR which signifies the beginning
+# of the copyright notice.
+#
+MATCH_COPYRIGHT()
+{
+ if [ $# -ne 2 ]; then
+ # expect two arguments
+ echo FAILED
+ return
+ fi
+ COPYRIGHTFILE=$1
+ f=$2
+ nlines=`wc -l ${COPYRIGHTFILE} | cut -f1 -d' '`
+ # Find a line that contains the copyright string and its line number in
+ # the file.
+ begin=`FindLineInFile "${UICOPYRIGHTSTR}" $f`
+ if [ "$begin" -le 0 ] ; then
+ # Not found, generate an empty dummy file
+ cp /dev/null ${EXTRACTEDFILE}
+ false
+ else
+ if [ $begin -gt 1 ]; then
+ begin=`expr $begin - 1`
+ fi
+ end=`expr $begin + $nlines - 1`
+ sed -n -e "${begin},${end}p" < $f > ${EXTRACTEDFILE}
+ RINSE ${EXTRACTEDFILE}
+ $DIFF ${EXTRACTEDFILE} ${COPYRIGHTFILE} >/dev/null 2>&1
+ fi
+ if test $? -eq 0; then
+ echo PASSED
+ else
+ echo FAILED
+ fi
+}
+
+# Fix Copyright notice.
+# $1 file which contains the expected copyright notice.
+# $2 file in which to look for the copyright notice.
+# Copyright notice must be found within the beginning $NUMBEGINLINES of lines.
+# Hunt for the particular string $UICOPYRIGHTSTR which signifies the beginning
+# of the copyright notice.
+#
+FIX_COPYRIGHT()
+{
+ if [ $# -ne 2 ]; then
+ # expect two arguments
+ echo FAILED
+ return
+ fi
+ COPYRIGHTFILE=$1
+ f=$2
+ nlines=`wc -l ${COPYRIGHTFILE} | cut -f1 -d' '`
+ # If the file has UICOPYRIGHTSTR but not THGCOPYRIGHTSTR, then replace the lines
+ # starting at UICOPYRIGHTSTR and down.
+ # If the file has THGCOPYRIGHTSTR, then replace the lines starting at the
+ # THGCOPYRIGHTSTR and down.
+ # If neither found, abort it.
+
+ # Find a line that contains the THG copyright string and its line number in
+ # the file.
+ insertbegin=`FindLineInFile "${THGCOPYRIGHTSTR}" $f`
+ if [ $insertbegin -gt 0 ]; then
+ insertend=`expr $insertbegin + $nlines` # no need to -1. See below.
+ else
+ insertbegin=`FindLineInFile "${UICOPYRIGHTSTR}" $f`
+ if [ $insertbegin -gt 0 ]; then
+ insertend=`expr $insertbegin + $nlines - 1` # no need to -2. See below.
+ else
+ FIXFAILED
+ return
+ fi
+ fi
+
+ # Copy line 1 up to insertbegin from original file
+ xbegin=`expr $insertbegin - 1`
+ if [ $xbegin -gt 0 ]; then
+ sed -n -e "1,${xbegin}p" $f > $tmpfixfile
+ else
+ cp /dev/null $tmpfixfile # make it empty.
+ fi
+
+ # now the correct copyright file
+ cat $COPYRIGHTFILE >> $tmpfixfile
+
+ # the rest of the original file
+ sed -n -e "${insertend},"'$p' $f >> $tmpfixfile
+
+ # copy them all back to the original file
+ cp $tmpfixfile $f
+ FIXED
+ rm -f $tmpfixfile
+}
+
+# Check C and C++ source files
+#
+C_SOURCE()
+{
+ f=$1
+ case `MATCH_COPYRIGHT $C_COPYRIGHT $f` in
+ PASSED)
+ PASSED $f
+ return
+ ;;
+ FAILED)
+ # show the difference
+ FAILED $f
+ $DIFF ${EXTRACTEDFILE} ${C_COPYRIGHT}
+ if [ -n "$FIXIT" ]; then
+ FIX_COPYRIGHT $C_COPYRIGHT $f
+ fi
+ ;;
+ esac
+}
+
+
+# Check Fortran90 source files
+#
+FORTRAN_SOURCE()
+{
+ f=$1
+ case `MATCH_COPYRIGHT $FTN_COPYRIGHT $f` in
+ PASSED)
+ PASSED $f
+ return
+ ;;
+ FAILED)
+ # show the difference
+ FAILED $f
+ $DIFF ${EXTRACTEDFILE} ${FTN_COPYRIGHT}
+ if [ -n "$FIXIT" ]; then
+ FIX_COPYRIGHT $FTN_COPYRIGHT $f
+ fi
+ ;;
+ esac
+}
+
+
+# Check HTML Files
+#
+HTML_FILE()
+{
+ f=$1
+ case `MATCH_COPYRIGHT $HTM_COPYRIGHT $f` in
+ PASSED)
+ PASSED $f
+ return
+ ;;
+ FAILED)
+ # show the difference
+ FAILED $f
+ $DIFF ${EXTRACTEDFILE} ${HTM_COPYRIGHT}
+ if [ -n "$FIXIT" ]; then
+ FIX_COPYRIGHT $HTM_COPYRIGHT $f
+ fi
+ ;;
+ esac
+}
+
+
+# Check Shell script files which use the style of copyright notice of leading #'s.
+#
+SHELL_FILE()
+{
+ f=$1
+ case `MATCH_COPYRIGHT $SH_COPYRIGHT $f` in
+ PASSED)
+ PASSED $f
+ return
+ ;;
+ FAILED)
+ # show the difference
+ FAILED $f
+ $DIFF ${EXTRACTEDFILE} ${SH_COPYRIGHT}
+ if [ -n "$FIXIT" ]; then
+ FIX_COPYRIGHT $SH_COPYRIGHT $f
+ fi
+ ;;
+ esac
+}
+
+
+# Check files that use #'s as comments such as Makefile.
+# The Copyright body of text happen to be the same as used by Shell script
+# files.
+#
+MAKE_FILE()
+{
+ f=$1
+ case `MATCH_COPYRIGHT $SH_COPYRIGHT $f` in
+ PASSED)
+ PASSED $f
+ return
+ ;;
+ FAILED)
+ # show the difference
+ FAILED $f
+ $DIFF ${EXTRACTEDFILE} ${SH_COPYRIGHT}
+ if [ -n "$FIXIT" ]; then
+ FIX_COPYRIGHT $SH_COPYRIGHT $f
+ fi
+ ;;
+ esac
+}
+
+
+# Check Windows Batch files
+#
+BATCH_FILE()
+{
+ f=$1
+ case `MATCH_COPYRIGHT $WINBAT_COPYRIGHT $f` in
+ PASSED)
+ PASSED $f
+ return
+ ;;
+ FAILED)
+ # show the difference
+ FAILED $f
+ $DIFF ${EXTRACTEDFILE} ${WINBAT_COPYRIGHT}
+ if [ -n "$FIXIT" ]; then
+ FIX_COPYRIGHT $WINBAT_COPYRIGHT $f
+ fi
+ ;;
+ esac
+}
+
+
+# Check Configure.in type files
+#
+CONFIGURE_AC_FILE()
+{
+ f=$1
+ case `MATCH_COPYRIGHT $CONFIGURE_AC_COPYRIGHT $f` in
+ PASSED)
+ PASSED $f
+ return
+ ;;
+ FAILED)
+ # show the difference
+ FAILED $f
+ $DIFF ${EXTRACTEDFILE} ${CONFIGURE_AC_COPYRIGHT}
+ if [ -n "$FIXIT" ]; then
+ FIX_COPYRIGHT $CONFIGURE_AC_COPYRIGHT $f
+ fi
+ ;;
+ esac
+}
+
+
+# Guess the type of file.
+# Inspect the first 5 lines to guess what type of file it is.
+#
+GUESS_File_Type()
+{
+ if [ $# -ne 1 ]; then
+ echo "wrong number of arguments($#)"
+ return
+ fi
+ f=$1
+ # Now guess the file type.
+ head -5 < $f > $tmpfile
+ if head -1 < $tmpfile | grep '^#!' > /dev/null; then
+ # First line is "#!". It is likely a shell script or similar type.
+ echo SHELL_FILE
+ elif grep '\/\*' < $tmpfile > /dev/null; then
+ # Found some lines containing '/*'. It may be a C/C++ style file.
+ echo C_SOURCE
+ elif grep '^!' < $tmpfile > /dev/null; then
+ # Some lines start with a "!". It may be a Fortran 9X style file.
+ echo FORTRAN_SOURCE
+ elif grep '^#' < $tmpfile > /dev/null; then
+ # Some lines start with a "#". It may be a shell like type.
+ # Put this after C_SOURCE which may have #define and such lines.
+ echo SHELL_FILE
+ elif grep '^dnl' < $tmpfile > /dev/null; then
+ # Some lines start with a "dnl". It may be a configure.ac type file.
+ echo CONFIGURE_AC_FILE
+ elif grep -i '^<html>' < $tmpfile > /dev/null || \
+ grep '^<!--' < $tmpfile > /dev/null ; then
+ # Some lines start with a "<html>" or having an html comment tag.
+ # It may be an HTML file.
+ echo HTML_FILE
+ else
+ # Unknown type.
+ echo UNKNOWN_TYPE
+ fi
+}
+
+
+# Check Unknown type file.
+# First check if there is something that resemble a copyright notice in
+# the first "page". If so, then inspect the first 5 lines to guess what
+# type of file it is. Then try verify Copyright notice according to
+# guessed type.
+#
+UNKNOWN_FILE()
+{
+ f=$1
+ if head -$NUMBEGINLINES < $f | grep "${COPYRIGHTSTR}" > /dev/null; then
+ xftype=`GUESS_File_Type $f`
+ PRINTDEBUG f=$f xftype=$xftype > /dev/tty
+ case $xftype in
+ SHELL_FILE) SHELL_FILE $f;;
+ C_SOURCE) C_SOURCE $f;;
+ FORTRAN_SOURCE) FORTRAN_SOURCE $f;;
+ SHELL_FILE) SHELL_FILE $f;;
+ HTML_FILE) HTML_FILE $f;;
+ UNKNOWN_TYPE) UNKNOWN_TYPE $f;;
+ esac
+ else
+ # Unknown type.
+ UNKNOWN_TYPE $f
+ fi
+}
+
+
+# Passed checking.
+# $1 file that has passed.
+#
+PASSED()
+{
+ if test X-$VERBOSE = X-yes; then
+ echo " PASSED"
+ fi
+ echo $1 >> $PASSEDLOG
+}
+
+
+# Unknown file type. Considered a fail.
+# $1 name of unknown file.
+#
+UNKNOWN_TYPE()
+{
+ echo "UNKNOWN type: $1" | tee -a $FAILEDLOG
+}
+
+
+# Skip checking.
+# $1 file that is skipped.
+#
+SKIP()
+{
+ if test X-$VERBOSE = X-yes; then
+ echo " SKIPPED"
+ fi
+ echo $1 >> $SKIPPEDLOG
+}
+
+
+# Failed checking.
+# $1 file that has failed.
+#
+FAILED()
+{
+ echo "FAILED: $1"
+ echo $1 >> $FAILEDLOG
+}
+
+
+# Copyright fixed.
+# $1 file that has been fixed.
+#
+FIXED()
+{
+ if test X-$VERBOSE = X-yes; then
+ echo " FIXED"
+ fi
+ echo $1 >> $FIXEDLOG
+}
+
+
+# Copyright fix failed.
+# $1 file that has failed.
+#
+FIXFAILED()
+{
+ echo "FIX FAILED: $1"
+ echo $1 >> $FIXFAILEDLOG
+}
+
+
+#
+# Main body
+
+PARSE_OPTION "$@"
+INITIALIZATION
+
+# use find to list all those file names and process them
+# one by one.
+if test -z "$FNAME" ; then
+ find $DIRS $EXCEPTIONDIRS -type f -print
+else
+ find $DIRS -type f -name "${FNAME}" -print
+fi |
+while read file; do
+ if test X-$VERBOSE = X-yes; then
+ echo checking ${file}...
+ fi
+ if echo $file | egrep -f $EXCEPTIONS > /dev/null; then
+ SKIP ${file}
+ else
+ case ${file} in
+ *.c | *.h | *.cpp )
+ C_SOURCE ${file}
+ ;;
+ *.f90 )
+ FORTRAN_SOURCE ${file}
+ ;;
+ *.htm | *.html )
+ HTML_FILE ${file}
+ ;;
+ *.sh | *.sh.in )
+ SHELL_FILE ${file}
+ ;;
+ *.pl )
+ # Perl script files are similar to Shell files
+ SHELL_FILE ${file}
+ ;;
+ *Makefile | *Makefile.in | *Makefile.am | Makefile.dist )
+ MAKE_FILE ${file}
+ ;;
+ configure.ac )
+ CONFIGURE_AC_FILE ${file}
+ ;;
+ *.bat | *.BAT )
+ # Windows Batch files
+ BATCH_FILE ${file}
+ ;;
+ *.h5 | *.hdf5 )
+ # Ignore HDF5 data files
+ continue
+ ;;
+ *.jpg | *.obj | *.gif | *.png | *.pdf | \
+ *.JPG | *.OBJ | *.GIF | *.PNG | *.PDF )
+ # Ignore binary data files
+ continue
+ ;;
+ *.zip | *.dsp | *.dsw | *.js | *.sln )
+ # Ignore Windows binary or special files.
+ # .dsp & .dsw are Visual Studio project files.
+ # .sln are .NET solution files.
+ # .js are Microsoft Java Script files.
+ continue
+ ;;
+ *CVS/* )
+ # Ignore CVS control files.
+ continue
+ ;;
+ *.txt | *.TXT )
+ # Ignore text files.
+ continue
+ ;;
+ *)
+ UNKNOWN_FILE $file
+ ;;
+ esac
+ fi
+done
+
+# check results
+if [ -f $PASSEDLOG ]; then
+ NPASSEDFILES=`wc -l < $PASSEDLOG`
+fi
+if [ -f $FAILEDLOG ]; then
+ NFAILEDFILES=`wc -l < $FAILEDLOG`
+fi
+if [ -f $FIXEDLOG ]; then
+ NFIXEDFILES=`wc -l < $FIXEDLOG`
+fi
+if [ -f $FIXFAILEDLOG ]; then
+ NFIXFAILEDFILES=`wc -l < $FIXFAILEDLOG`
+fi
+
+# Cleanup
+rm -f $C_COPYRIGHT $FTN_COPYRIGHT $HTM_COPYRIGHT $SH_COPYRIGHT $SH_COPYRIGHT2
+rm -f $EXCEPTIONS $EXTRACTEDFILE
+rm -f $PASSEDLOG $SKIPPEDLOG $FAILEDLOG $FIXEDLOG $FIXFAILEDLOG
+
+# Report Results
+# Results are not total accurate--e.g., Skipped are not counted, thus not
+# reported.
+#
+echo "*******************"
+echo " REPORT"
+echo "*******************"
+echo Number of passed files = $NPASSEDFILES
+echo Number of failed files = $NFAILEDFILES
+echo Number of fixed files = $NFIXEDFILES
+echo Number of fix failed files = $NFIXFAILEDFILES
+if [ $NFIXEDFILES -gt 0 ]; then
+ FIXCAUTIONMSG
+fi
+
+if [ $NFAILEDFILES -gt 0 ]; then
+ exitcode=1
+else
+ exitcode=0
+fi
+exit $exitcode
diff --git a/bin/debug-ohdr b/bin/debug-ohdr
new file mode 100755
index 0000000..5b0a4b3
--- /dev/null
+++ b/bin/debug-ohdr
@@ -0,0 +1,38 @@
+#!/usr/bin/perl
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
+#
+require 5.003;
+
+# Looks for lines emitted by H5O_open() and H5O_close() and tries to
+# determine which objects were not properly closed.
+
+while (<>) {
+ next unless /^([<>])(0x[\da-f]+|\d+)$/;
+ my ($op, $addr) = ($1, $2);
+
+ if ($op eq ">") {
+ # Open object
+ $obj{$addr} += 1;
+ } else {
+ # Close object
+ die unless $obj{$addr}>0;
+ $obj{$addr} -= 1;
+ delete $obj{$addr} unless $obj{$addr};
+ }
+}
+
+for (sort keys %obj) {
+ printf "%3d %s\n", $obj{$_}, $_;
+}
+
+exit 0;
diff --git a/bin/errors b/bin/errors
new file mode 100755
index 0000000..3c99fdc
--- /dev/null
+++ b/bin/errors
@@ -0,0 +1,138 @@
+#!/usr/local/bin/perl -w
+require 5.003;
+use Text::Tabs;
+
+# NOTE: THE FORMAT OF HRETURN_ERROR AND HGOTO_ERROR MACROS HAS
+# CHANGED. THIS SCRIPT NO LONGER WORKS! --rpm
+
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
+#
+# Robb Matzke, matzke at llnl.gov
+# 30 Aug 1997
+#
+# Purpose: This script will read standard input which should be a
+# function prologue followed by a C function and will emit
+# on standard output the same source code with the function
+# prologue containing documentation for the various errors
+# that occur in the function.
+#
+# Errors are raised by calling HGOTO_ERROR() or
+# HRETURN_ERROR(). The reason for the error message is a
+# comment which appears immediately after the error macro
+# call and is contained entirely on one line:
+#
+# HRETURN_ERROR (...); /*entry not found*/
+#
+# If such a comment doesn't exist, then the previous comment
+# is used, subject to the constraint that raising an error
+# clears the previous comment.
+#
+# /* Entry not found */
+# HGOTO_ERROR (...);
+#
+# Emacs users can use this script interactively with the
+# c-mark-function and shell-command-on-region functions which
+# are normally bound to M-C-h and M-|.
+
+
+# Split STDIN into the prolog and the function body. Preserve leading
+# white space.
+$_ = join "", <STDIN>;
+my ($head, $prolog, $body) = (/^(\s*)(\/\*(.*?)\*\/)?(.*)/s)[0,2,3];
+$prolog = "" unless $prolog;
+
+# Find each error and the comment that goes with it.
+for ($_=$body,$comment=""; /\/\*|H(RETURN|GOTO)_ERROR/s;) {
+ $_ = $&.$';
+
+ if (/^H(RETURN|GOTO)_ERROR\s*\(\s*H5E_(\w+)\s*,\s*H5E_(\w+)\s*,/s) {
+ ($major, $minor, $_) = ($2, $3, $');
+ $comment=$1 if /^.*?\)\s*;\s*\/\*\s*(.*?)\s*\*\//;
+ $comment =~ s/^\s*\*+\s*/ /mg; # leading asterisks.
+ $comment =~ s/^\s+//s; # leading white space.
+ $comment =~ s/\s+$//s; # trailing white space.
+ $comment =~ s/(\w)$/$1./s; # punctuation.
+ $comment ||= "***NO COMMENT***";
+ $errors{"$major\000$minor\000\u$comment"} = 1;
+ $comment = "";
+
+ } else {
+ ($comment) = /^\/\*\s*(.*?)\s*\*\//s;
+ $_ = $';
+ }
+}
+
+
+# Format an error so it isn't too wide.
+sub fmt_error ($) {
+ local ($_) = @_;
+
+ my ($prefix,$space,$err) = /^((.*?)([A-Z_0-9]+\s+[A-Z_0-9]+\s+))/;
+ $_ = $';
+ tr/\n / /s;
+ my $w = 70 - length expand $prefix;
+ s/(.{$w}\S+)\s+(\S)/$1."\n".$space.' 'x(length $err).$2/eg;
+ return $prefix . $_."\n";
+}
+
+
+
+# Sort the errors by major, then minor, then comment. Duplicate
+# triplets have already been removed.
+sub by_triplet {
+ my ($a_maj, $a_min, $a_com) = split /\000/, $a;
+ my ($b_maj, $b_min, $b_com) = split /\000/, $b;
+ $a_maj cmp $b_maj || $a_min cmp $b_min || $a_com cmp $b_com;
+}
+ at errors = map {sprintf "%-9s %-13s %s\n", split /\000/}
+ sort by_triplet keys %errors;
+
+
+
+# Add the list of errors to the prologue depending on the type of
+# prolog.
+if (($front, $back) = $prolog=~/^(.*?Errors:\s*?(?=\n)).*?\n\s*\*\s*\n(.*)/s) {
+ #| * Errors: |#
+ #| * __list_of_error_messages__ (zero or more lines) |#
+ #| * |#
+ print $head, "/*", $front, "\n";
+ map {print fmt_error " *\t\t".$_} @errors;
+ print " *\n", $back, "*/", $body;
+
+} elsif (($front,$back) = $prolog =~
+ /(.*?\n\s*ERRORS:?\s*?(?=\n)).*?\n\s*\n(.*)/s) {
+ #| ERRORS |#
+ #| __list_of_error_messages__ (zero or more lines) |#
+ #| |#
+ print $head, "/*", $front, "\n";
+ map {print fmt_error " ".$_} @errors;
+ print "\n", $back, "*/", $body;
+
+} elsif ($prolog eq "") {
+ # No prolog present.
+ print $head;
+ print "
\n/*", "-"x73, "\n * Function:\t\n *\n * Purpose:\t\n *\n";
+ print " * Errors:\n";
+ map {print fmt_error " *\t\t".$_} @errors;
+ print " *\n * Return:\tSuccess:\t\n *\n *\t\tFailure:\t\n *\n";
+ print " * Programmer:\t\n *\n * Modifications:\n *\n *", '-'x73, "\n";
+ print " */\n", $body;
+
+} else {
+ # Prolog format not recognized.
+ print $head, "/*", $prolog, "*/\n\n";
+ print "/*\n * Errors returned by this function...\n";
+ map {print fmt_error " *\t".$_} @errors;
+ print " */\n", $body;
+}
+
+
diff --git a/bin/gcov_script b/bin/gcov_script
new file mode 100755
index 0000000..9a6512d
--- /dev/null
+++ b/bin/gcov_script
@@ -0,0 +1,51 @@
+#! /bin/sh
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
+
+# A script to generate coverage files for HDF5 using gcov.
+# Configures, builds, and runs tests in-place; the output files will be placed
+# in a directory called gcov_logs.
+# Must be invoked from the root hdf5 directory.
+# This script has been tested on kagiso.
+
+CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs"
+export CFLAGS
+LDFLAGS="$LDFLAGS -lgcov"
+export LDFLAGS
+CC=gcc
+export CC
+./configure
+make
+make check
+mkdir gcov_logs
+cd src
+for j in *.h *.c
+ do
+ ln -s ../$j .libs/$j
+ done
+cd .libs
+for j in *.gcda
+ do
+ gcov -b $j >> gcov.log 2>&1
+ done
+for j in *.gcov
+ do
+ mv $j ../../gcov_logs
+ done
+mv gcov.log ../../gcov_logs
+for j in *.c *.h
+ do
+ rm $j
+ done
+cd ../..
+
+
diff --git a/bin/pkgscrpts/h5rmflags b/bin/pkgscrpts/h5rmflags
new file mode 100755
index 0000000..099956c
--- /dev/null
+++ b/bin/pkgscrpts/h5rmflags
@@ -0,0 +1,165 @@
+#! /bin/sh
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
+#
+
+## Remove paths to libraries used to build HDF5 when packaging HDF5
+## binaries.
+## For help page, use "h5rmflags -help"
+
+# Constants definitions
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+# Function definitions
+
+# show help page
+usage() {
+ # A wonderfully informative "usage" message.
+ echo "usage: $prog_name [OPTIONS]"
+ echo " OPTIONS:"
+ echo " -help|help This help message"
+ echo " -echo Show all the shell commands executed"
+ echo " -force No prompt, just do it"
+ echo " -prefix=DIR New directory to find HDF5 lib/ and include/"
+ echo " subdirectories [default: current directory]"
+ echo " -tool=TOOL Tool to update. TOOL must be in the current"
+ echo " directory and writable. [default: $h5tools]"
+ echo " -show Show the commands without executing them"
+ echo " "
+ exit $EXIT_FAILURE
+}
+
+# display variable values
+dump_vars(){
+ echo "====Showing all variable values====="
+ echo prefix=$prefix
+ echo h5tools=$h5tools
+ echo "====End Showing====="
+}
+
+# show actions to be taken
+show_action()
+{
+ echo "Update the following tools because they are now installed at a new directory"
+ for t in $foundtools; do
+ echo "${t}:"
+ echo " current setting=`sed -e '/^prefix=/s/prefix=//p' -e d $t`"
+ echo " new setting="\""$prefix"\"
+ done
+}
+
+
+# Report Error message
+ERROR()
+{
+ echo "***ERROR***"
+ echo "$1"
+}
+
+# Main
+#
+# Initialization
+h5tools="h5cc h5pcc h5fc h5pfc h5c++" # possible hdf5 tools
+foundtools= # tools found and will be modified
+fmode= # force mode, default is off
+prefix=`(cd ..;pwd)`
+
+# Parse options
+for arg in $@ ; do
+ case "$arg" in
+ -prefix=*)
+ prefix="`expr "$arg" : '-prefix=\(.*\)'`"
+ ;;
+ -echo)
+ set -x
+ ;;
+ -show)
+ SHOW="echo"
+ ;;
+ -tool=*)
+ h5tools="`expr "$arg" : '-tool=\(.*\)'`"
+ ;;
+ -help|help)
+ usage
+ ;;
+ -force)
+ fmode=yes
+ ;;
+ *)
+ ERROR "Unknown Option($arg)"
+ usage
+ exit $EXIT_FAILURE
+ ;;
+ esac
+done
+
+# Sanity checks
+#if [ ! -d $prefix ]; then
+# ERROR "prefix($prefix) is not an existing directory"
+# exit $EXIT_FAILURE
+#fi
+
+for x in $h5tools; do
+ if [ -f $x ]; then
+ foundtools="$foundtools $x"
+ if [ ! -w $x ]; then
+ ERROR "h5tool($x) is not writable"
+ exit $EXIT_FAILURE
+ fi
+ fi
+done
+
+if [ -z "$foundtools" ]; then
+ ERROR "found no tools to modify"
+ exit $EXIT_FAILURE
+fi
+
+# Show actions to be taken and get consent
+show_action
+
+
+# Update them
+if [ "$SHOW" = "echo" ]; then
+ echo "===Update commands are:===="
+# cat $CMDFILE
+ echo "===End Update commands====="
+fi
+
+for t in $foundtools; do
+ echo Update $t ...
+# COMMAND="ed - $t"
+# if [ "$SHOW" = "echo" ]; then
+# echo $COMMAND
+# else
+# $COMMAND < $CMDFILE
+ ed - $t << end
+ g/^H5BLD_CPPFLAGS/s/-I\/.*include //g
+ g/^H5BLD_LDFLAGS/s/-L\/.*lib //g
+ g/^H5BLD_LDFLAGS/s/-L\/.*lib64 //g
+ .
+ w
+end
+# fi
+done
+
+
+# Cleanup
+#rm -f $CMDFILE
+exit $EXIT_SUCCESS
+
+# Some possible future features to add
+# CCBASE - Name of the alternative C compiler
+# CLINKERBASE - Name of the alternative linker
+# LDFLAGS - Path to different libraries your application will link with
+# (this path should include the path to the zlib library)
+# LIBS - Libraries your application will link with
diff --git a/bin/pkgscrpts/makeHDF5BinaryTarfiles.pl b/bin/pkgscrpts/makeHDF5BinaryTarfiles.pl
new file mode 100755
index 0000000..f4a9ebd
--- /dev/null
+++ b/bin/pkgscrpts/makeHDF5BinaryTarfiles.pl
@@ -0,0 +1,366 @@
+#!/usr/bin/perl
+# makeTarFiles.pl
+
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
+#
+#
+#
+use warnings;
+use strict;
+use Cwd;
+use File::Basename;
+
+
+my %destsubdir = ('emu' => 'sunos-5.11-sparc-32-sunc512',
+ 'emu64' => 'sunos-5.11-sparc-64-sunc512',
+ 'ostrich' => 'linux-el6-ppc64-gcc447',
+ 'ostrichxl' => 'linux-el6-ppc64-xl13.1',
+ 'platypus' => 'linux-centos6-x86_64-gcc447',
+ 'platypus32' => 'linux-centos6-x86_64-32-gcc447',
+ 'moohan' => 'linux-centos7-x86_64-gcc485',
+ 'moohan32' => 'linux-centos7-x86_64-32-gcc485',
+ 'kite' => 'osx-10.8-x86_64-clang5.1',
+ 'quail' => 'osx-10.9-x86_64-clang6.0',
+ 'osx1010test' => 'osx-10.10-x86_64-clang6.0');
+
+my %szipdir = ('emu' => '/mnt/hdf/packages/szip/shared/encoder/SunOS-5.10',
+ 'emu-static' => '/mnt/hdf/packages/szip/static/encoder/SunOS-5.10',
+ 'emu64' => '/mnt/hdf/packages/szip-PIC/shared/encoder/SunOS-5.11-64',
+ 'emu64-static' => '/mnt/hdf/packages/szip-PIC/shared/encoder/SunOS-5.11-64',
+ 'kite' => '/mnt/hdf/packages/szip/shared/encoder/MacOS-10.8',
+ 'kite-static' => '/mnt/hdf/packages/szip-PIC/static/encoder/MacOS-10.8',
+ 'ostrich32' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-ppc64-gcc',
+ 'ostrich32-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-ibmppc64-gcc-32',
+ 'ostrich' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-ppc64-gcc-64',
+ 'ostrich-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-ibmppc64-gcc',
+ 'ostrichxl' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-ppc64-gcc-64',
+ 'ostrichxl-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-ibmppc64-gcc',
+ 'osx1010test' => '/mnt/hdf/packages/szip/shared/encoder/MacOS-10.8',
+ 'osx1010test-static' => '/mnt/hdf/packages/szip-PIC/static/encoder/MacOS-10.8',
+ 'moohan' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc',
+ 'moohan-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-x86_64-gcc',
+ 'moohan32' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc-m32',
+ 'moohan32-static' => '/mnt/hdf/packages/szip-PIC/static/encoder/Linux2.6-x86_64-gcc-m32',
+ 'platypus32' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc-m32',
+ 'platypus32-static' => '/mnt/hdf/packages/szip-PIC/static/encoder/Linux2.6-x86_64-gcc-m32',
+ 'platypus' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc',
+ 'platypus-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-x86_64-gcc',
+ 'quail' => '/mnt/hdf/packages/szip/shared/encoder/MacOS-10.8',
+ 'quail-static' => '/mnt/hdf/packages/szip-PIC/static/encoder/MacOS-10.8');
+
+my %zlibdir = ('emu' => '/mnt/hdf/packages/zlib-125/shared/SunOS-5.10',
+ 'emu-static' => '/mnt/hdf/packages/zlib-125/static/SunOS-5.10',
+ 'emu64' => '/mnt/hdf/packages/zlib-123-PIC/SunOS-5.11-64',
+ 'emu64-static' => '/mnt/hdf/packages/zlib-123-PIC/SunOS-5.11-64',
+ 'kite' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64',
+ 'kite-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64',
+ 'ostrich32' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc',
+ 'ostrich32-static' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc',
+ 'ostrich' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64',
+ 'ostrich-static' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64',
+ 'ostrichxl' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64',
+ 'ostrichxl-static' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64',
+ 'osx1010test' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64',
+ 'osx1010test-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64',
+ 'moohan' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-x86_64-gcc',
+ 'moohan-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-x86_64-gcc',
+ 'moohan32' => '/mnt/hdf/packages/zlib-128/Linux2.6-x86_64-gcc-m32',
+ 'moohan32-static' => '/mnt/hdf/packages/zlib-128/Linux2.6-x86_64-gcc-m32',
+ 'platypus32' => '/mnt/hdf/packages/zlib-128/Linux2.6-x86_64-gcc-m32',
+ 'platypus32-static' => '/mnt/hdf/packages/zlib-128/Linux2.6-x86_64-gcc-m32',
+ 'platypus' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-x86_64-gcc',
+ 'platypus-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-x86_64-gcc',
+ 'quail' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64',
+ 'quail-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64');
+
+my $indirectory = ".";
+$indirectory = shift;
+
+my $outdirectory = ".";
+$outdirectory = shift;
+
+my $key = ".";
+#$key = shift;
+
+my $scriptdirname = dirname(__FILE__);
+
+unless (-d $outdirectory) {
+ print "$outdirectory not found. Create it or choose another one and try again.\n";
+ exit 1;
+}
+
+print "Subdirectories of $indirectory will be tarred and stored in $outdirectory.\n";
+
+
+my $tarfilename;
+my $tardirname;
+my $output;
+my $cmd;
+
+# I'm currently copying system zlibs for at least solaris and FreeBSD machines. Since this script runs on jam it may require scp to get the libs.
+
+#For future reference
+# command for getting szlib files and links for shared binaries:
+# tar cvf - -C <szipDir>/lib . | tar xvf - -C <libdir> .
+# libz.so.1.2.3 and the static files should just be copied because they're in directories
+# with other files. Then create the libz.so.1 and libz.so symbolic links.
+sub addzandszlibs {
+ my $dir = shift;
+ my $indirectory = shift;
+ my $currentdir = getcwd();
+
+ if (-d "$indirectory/$dir" ) {
+ my $szdir = $szipdir{$dir};
+ my $zldir = $zlibdir{$dir};
+ if ($dir =~ /static/ || $dir =~ /ostrich/) {
+ $cmd = "cp $szdir/lib/libsz.a $indirectory/$dir/lib";
+ $output = `$cmd`;
+ print $output;
+ $cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib";
+ $output = `$cmd`;
+ print $output;
+ } elsif ($dir eq "freedom" || $dir eq "loyalty") {
+ $cmd = "cp $szdir/lib/libsz.so.2 $indirectory/$dir/lib";
+ $output = `$cmd`;
+ print $output;
+ $cmd = "cp $zldir/lib/libz.so.5 $indirectory/$dir/lib";
+ $output = `$cmd`;
+ print $output;
+
+ chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!";
+ $cmd = "ln -s libsz.so.2 libsz.so";
+ $output = `$cmd`;
+ print $output;
+
+ $cmd = "ln -s libz.so.5 libz.so";
+ $output = `$cmd`;
+ print $output;
+
+ chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
+ } elsif ($dir eq "quail" || $dir eq "kite" || $dir eq "osx1010test") {
+ #we've been using the static libraries for the macs - built with -fPIC
+# $cmd = "cp $szdir/lib/libsz.a $indirectory/$dir/lib";
+# $output = `$cmd`;
+# print $output;
+# $cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib";
+# $output = `$cmd`;
+# print $output;
+ $cmd = "cp $szdir/lib/libsz.2.0.0.dylib $indirectory/$dir/lib";
+ $output = `$cmd`;
+ print $output;
+ $cmd = "cp $zldir/lib/libz.1.2.5.dylib $indirectory/$dir/lib";
+ $output = `$cmd`;
+ print $output;
+
+ chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!";
+ $cmd = "ln -s libsz.2.0.0.dylib libsz.2.dylib";
+ $output = `$cmd`;
+ print $output;
+
+ $cmd = "ln -s libsz.2.0.0.dylib libsz.dylib";
+ $output = `$cmd`;
+ print $output;
+
+ $cmd = "ln -s libz.1.2.5.dylib libz.1.dylib";
+ $output = `$cmd`;
+ print $output;
+
+ $cmd = "ln -s libz.1.2.5.dylib libz.dylib";
+ $output = `$cmd`;
+ print $output;
+
+ chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
+
+ } elsif ($dir eq "emu64") {
+ $cmd = "cp $szdir/lib/libsz.so.2.0.0 $indirectory/$dir/lib";
+ $output = `$cmd`;
+ print $output;
+ $cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib";
+ $output = `$cmd`;
+ print $output;
+
+ chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!";
+ $cmd = "ln -s libsz.so.2.0.0 libsz.so.2";
+ $output = `$cmd`;
+ print $output;
+
+ $cmd = "ln -s libsz.so.2.0.0 libsz.so";
+ $output = `$cmd`;
+ print $output;
+
+ chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
+
+ } elsif ($dir eq "platypus32" || $dir eq "moohan32") {
+ $cmd = "cp $szdir/lib/libsz.so.2.0.0 $indirectory/$dir/lib";
+ $output = `$cmd`;
+ print $output;
+
+ # $cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib";
+ # $output = `$cmd`;
+ # print $output;
+
+ chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!";
+ $cmd = "ln -s libsz.so.2.0.0 libsz.so.2";
+ $output = `$cmd`;
+ print $output;
+
+ $cmd = "ln -s libsz.so.2.0.0 libsz.so";
+ $output = `$cmd`;
+ print $output;
+
+ # $cmd = "ln -s libz.so.1.2.8 libz.so.1";
+ # $output = `$cmd`;
+ # print $output;
+
+ # $cmd = "ln -s libz.so.1.2.8 libz.so";
+ # $output = `$cmd`;
+ # print $output;
+
+ chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
+
+ } else {
+ $cmd = "cp $szdir/lib/libsz.so.2.0.0 $indirectory/$dir/lib";
+ $output = `$cmd`;
+ print $output;
+
+ $cmd = "cp $zldir/lib/libz.so.1.2.5 $indirectory/$dir/lib";
+ $output = `$cmd`;
+ print $output;
+
+ chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!";
+ $cmd = "ln -s libsz.so.2.0.0 libsz.so.2";
+ $output = `$cmd`;
+ print $output;
+
+ $cmd = "ln -s libsz.so.2.0.0 libsz.so";
+ $output = `$cmd`;
+ print $output;
+
+ $cmd = "ln -s libz.so.1.2.5 libz.so.1";
+ $output = `$cmd`;
+ print $output;
+
+ $cmd = "ln -s libz.so.1.2.5 libz.so";
+ $output = `$cmd`;
+ print $output;
+
+ chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
+ }
+ }
+}
+
+sub makeTarFile {
+ my $directoryname = shift;
+ my $origdirname = shift;
+ my $tarfilename = shift;
+ my $tardirname = shift;
+ $cmd = "mv $indirectory/$origdirname $indirectory/$tardirname";
+ $output = `$cmd`;
+ print $output;
+ if (-d $indirectory."/".$tardirname."/doc/hdf5/examples") {
+ $cmd = "mv $indirectory/$tardirname/doc/hdf5/examples $indirectory/$tardirname/examples";
+ $output = `$cmd`;
+ print $output;
+ $cmd = "rm -rf $indirectory/$tardirname/doc";
+ $output = `$cmd`;
+ print $output;
+ }
+ $cmd = "tar zcvf $outdirectory/$directoryname/$tarfilename -C $indirectory $tardirname";
+ print "Need to run $cmd.\n";
+ $output = `$cmd`;
+ sleep 10;
+ print "Create $tarfilename: $output\n";
+ $cmd = "mv $indirectory/$tardirname $indirectory/$origdirname";
+ $output = `$cmd`;
+ print $output;
+}
+
+foreach $key (keys %destsubdir) {
+ print "Process ".$key."\n\n";
+ #skip unless there's a directory by the name of $key or $key-static
+ next unless -d $indirectory.'/'.$key || -d $indirectory.'/'.$key."-static";
+ my $version;
+ # This assumes a static directory. Probably the others should be checked if this
+ # doesn't exist.
+ $cmd = "grep \"HDF5 Version\" $indirectory/$key/lib/libhdf5.settings";
+ $_ = `$cmd`;
+ print $_, "\n";
+ s/HDF5 Version://;
+ s/^\s+//;
+ chomp;
+ $version = $_;
+ #my $directoryname = substr $destsubdir{$key}, 0, rindex($destsubdir{$key}, '-');
+ my $directoryname = $destsubdir{$key};
+ mkdir $outdirectory."/".$directoryname, 0755 unless -d $outdirectory."/".$directoryname;
+ my $staticdir = $key."-static";
+ print $indirectory."/$key tarfile will be put in " . $outdirectory."/".$directoryname."\n";
+ if (-e $outdirectory."/".$destsubdir{$key}."/README") {
+ print $outdirectory."/".$destsubdir{$key}."/README" . " has already been created.\n";
+ }
+ else {
+ print "Make the Outer README file: ";
+ $cmd = "perl ./makeOuterREADME.pl $indirectory/$key $outdirectory $directoryname";
+ print $cmd, "\n";
+ my $output = `$cmd`;
+ print $output;
+ }
+ my $file = "";
+ my @dirnames = "";
+ opendir(DIR, $indirectory) or die "can't open .: $!";
+ while (defined($file = readdir(DIR))) {
+ next unless ($file eq $key || $file eq "$key-static") && -d $indirectory."/".$file;
+ push @dirnames, $file;
+ }
+ foreach my $dir (@dirnames) {
+ next if $dir eq "";
+ print "Make the Inner README files.\n";
+ $cmd = "perl ./makeInternalREADME.pl $indirectory/$dir";
+ print $cmd, "\n";
+ $output = `$cmd`;
+ print $output;
+ print "Add the zlib and szip files for $dir.\n";
+ &addzandszlibs($dir, $indirectory);
+ my $currentdir = getcwd();
+
+ print "Remove all lib*.la files from $dir/lib*.\n";
+ $cmd = "rm $indirectory/$dir/lib*/lib*.la";
+ print $cmd, "\n";
+ $output = `$cmd`;
+ print $output;
+
+ chdir "$indirectory/$dir/bin" or die "Couldn't change directory to $indirectory/$dir/bin, $!";
+
+ $cmd = "$scriptdirname/h5rmflags -force";
+ $output = `$cmd`;
+ print $output;
+ chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
+ print "Tar up the files into the output directory.\n";
+ if (-d $indirectory."/".$dir) {
+ if ($dir =~ /static/) {
+ $tarfilename = "hdf5-$version-$destsubdir{$key}-static.tar.gz";
+ $tardirname = "hdf5-$version-$destsubdir{$key}-static";
+ } else {
+ $tarfilename = "hdf5-$version-$destsubdir{$key}-shared.tar.gz";
+ $tardirname = "hdf5-$version-$destsubdir{$key}-shared";
+ }
+ &makeTarFile($directoryname, $dir, $tarfilename, $tardirname);
+ }
+ }
+ # If this copy is done after h5rmflags is run on all the directories the compile scripts
+ # in the utilities directory will already have the paths removed.
+ if (-d $indirectory."/".$staticdir) {
+ $cmd = "cp -prv $indirectory/$staticdir/bin $outdirectory/$directoryname/utilities";
+ $output = `$cmd`;
+ print $output;
+ }
+}
+
diff --git a/bin/pkgscrpts/makeInternalREADME.pl b/bin/pkgscrpts/makeInternalREADME.pl
new file mode 100755
index 0000000..355036f
--- /dev/null
+++ b/bin/pkgscrpts/makeInternalREADME.pl
@@ -0,0 +1,215 @@
+#!/usr/bin/perl
+# makeInternalREADME.pl
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF4. The full HDF4 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the files COPYING and Copyright.html. COPYING can be found at the root
+# of the source code distribution tree; Copyright.html can be found at the
+# root level of an installed copy of the electronic HDF4 document set and
+# is linked from the top-level documents page. It can also be found at
+# http://hdfgroup.org/HDF4/doc/Copyright.html. If you do not have
+# access to either file, you may request a copy from help at hdfgroup.org.
+#
+
+use warnings;
+use strict;
+
+my $section2="For information on compilers and settings used to build these HDF5
+libraries, please refer to:
+
+ ./lib/libhdf5.settings
+
+The contents of this directory are:
+
+ COPYING - Copyright notice
+ README - This file
+ RELEASE.txt - Detailed information regarding this release
+ bin/ - Directory containing HDF5 pre-compiled utilities
+ include/ - Directory containing HDF5 include files
+ lib/ - Directory containing HDF5 libraries and settings
+ share/ - Directory containing example code in C, C++, and
+ Fortran using HDF5 and HDF5 HL library APIs. The
+ shell scripts provided with these examples will
+ compile and run them, and will also test the
+ h5cc, h5c++, and h5fc compile scripts found
+ in the installed bin directory.
+
+These binaries were built with the ZLIB and SZIP (version 2.1, Encoder
+ENABLED) external libraries which are included in the lib directory for
+convenience.
+
+We also provide the ZLIB and SZIP source code on our ftp server at:
+
+ ftp://ftp.hdfgroup.org/lib-external/
+
+The official ZLIB and SZIP pages are at:
+
+ ZLIB: http://www.zlib.net/
+ SZIP: http://hdfgroup.org/doc_resource/SZIP/
+
+";
+
+my $section3 = "If using the shared libraries, you must add the HDF5 library path
+to the LD_LIBRARY_PATH variable.
+";
+
+my $section4 = "We provide scripts for compiling applications with the HDF5 libraries:
+
+ bin/h5cc - for C
+ bin/h5fc - for F90 (if Fortran 90 library is included with the binaries)
+ bin/h5c++ - for C++ (if C++ library is included with the binaries)
+
+After you have installed the binaries to their final destination, you can use
+these scripts (h5cc, h5fc, h5c++) to compile. However, you must first run
+./h5redeploy in the bin directory to change site specific paths in the scripts.
+
+You may also need to change other variables in the scripts, depending
+on how things are set up on your system. Here are some of the variables
+to check:
+
+ prefix - Path to the HDF5 top level installation directory
+ CCBASE - Name of the C compiler
+ CLINKERBASE - Name of the linker
+ LIBS - Libraries your application will link with
+
+For further details refer to the INSTALL files in
+ ftp://ftp.hdfgroup.org/HDF5/current/src/unpacked/release_docs/
+or in the ./release_docs/ directory of the HDF5 source code, which can be found
+on the HDF Group ftp server at ftp://ftp.hdfgroup.org/HDF5/current/src/.
+
+Please send questions, comments, and suggestions to the appropriate
+contact address from http://www.hdfgroup.org/about/contact.html
+
+
+";
+
+my $indirectory = ".";
+$indirectory = shift;
+my $linktype = "shared";
+if ($indirectory =~ /static/) {
+ $linktype = "static";
+}
+my $modestring="";
+if ($indirectory =~ /32/) {
+ $modestring = "in 32 bit mode ";
+}
+
+my $version;
+
+my $outfile = "$indirectory/README";
+open OUTFILE, ">$outfile" or die "$!Couldn't open $outfile - check permissions for $indirectory\n";
+my $hostname;
+my $cmd = "grep \"HDF5 Version\" $indirectory/lib/libhdf5.settings";
+$_ = `$cmd`;
+#print OUTFILE $_, "\n";
+s/HDF5 Version://;
+s/^\s+//;
+chomp;
+$version = $_;
+#print OUTFILE $_, "\n";
+
+my $versionstring= "This directory contains the $linktype binary distribution of HDF5-".$version;
+
+$cmd = "grep \"Uname information:\" $indirectory/lib/libhdf5.settings";
+$_ = `$cmd`;
+s/Uname information://;
+s/^\s+//;
+#print OUTFILE $_;
+chomp;
+#s/(^\w+)(\s)(\S+)/$1/;
+#s/(^.*)(-)(.*)(200[7-8])(.*)(\s)(\S+)/$1 $5/;
+#my $platformstring = "\nthat was compiled on:" . $_ . " ";
+my $platformstring = "";
+my $hostnamestring = $_;
+my @hostnamestring = split / /, $hostnamestring;
+#print OUTFILE "Size of hostnamestring is ", scalar @hostnamestring, "\n";
+#print OUTFILE $hostnamestring[0] . "\t" . $hostnamestring[2]."\t".$hostnamestring[19]."\n";
+$hostname = $hostnamestring[1];
+#my $size = scalar @hostnamestring;
+if ($hostname =~ /loyalty/) {
+ $platformstring = "\nthat was compiled " . $modestring . "on: " . $hostnamestring[0]." " . $hostnamestring[2]." " . $hostnamestring[-1] . " ";
+}
+elsif ($hostname =~ /freedom/) {
+ $platformstring = "\nthat was compiled " . $modestring . "on: " . $hostnamestring[0]." " . $hostnamestring[2]." " . $hostnamestring[-1] . " ";
+} elsif ($hostname =~ /emu/) {
+ $platformstring = "\nthat was compiled " . $modestring . "on: " . $hostnamestring[0]." " . $hostnamestring[2] . " " . $hostnamestring[-2] . " ";
+} elsif ($hostname =~ /fred/) {
+ $platformstring = "\nthat was compiled " . $modestring . "on: " . $hostnamestring[0]." " . $hostnamestring[2] . " " . $hostnamestring[-1] . " ";
+} else {
+ $_ = $hostnamestring[2];
+ my $pos = index $_, '-';
+ my $os = substr $_, 0, $pos;
+ $platformstring = "\nthat was compiled " . $modestring . "on: " . $hostnamestring[0] . " " . $os . " " . $hostnamestring[-2] . " ";
+}
+
+
+my $mappingstring = "";
+#no mappingstring for 1.6. Put it back for 1.8.
+#$cmd = "grep \"Default API Mapping:\" $indirectory/lib/libhdf5.settings";
+#$_ = `$cmd`;
+#s/Default API Mapping://;
+#s/^\s+//;
+#chomp;
+#if (/v\d+/) {
+# s/v//;
+# s/(\d)(\d)/$1\.$2/g;
+# $mappingstring = "using the default\nAPI mapping for VERSION ".$_.".";
+#
+#}
+print OUTFILE $versionstring;
+print OUTFILE $platformstring."\n\n";
+#print OUTFILE $mappingstring;
+
+#if ($hostname eq "loyalty.hdfgroup.uiuc.edu" || $hostname eq "freedom.hdfgroup.uiuc.edu") {
+# print OUTFILE " It includes the C APIs,\nbuilt using the following ";
+# print OUTFILE "compilers:\n\n";
+#}
+#else {
+if ($linktype eq "shared" && !($hostname =~ /32/)) {
+ print OUTFILE "\n\nIt includes the C, C++, F90 and Java APIs, built using the following\n";
+} else {
+ print OUTFILE "\n\nIt includes the C, C++, and F90 APIs, built using the following\n";
+}
+print OUTFILE "compilers:\n\n";
+#}
+
+# Only the gcc compiler version is in libhdf5.settings, so for now I looked
+# up the versions and hardcoded them here. We will put them in libhdf5.settings
+# for the next release.
+if ($indirectory =~ /gnu484/) {
+ print OUTFILE "\tgcc, g++, and gfortran 4.8.4\n\n";
+} elsif ($hostname =~ /jam/ || $hostname =~ /koala/) {
+ print OUTFILE "\tgcc, g++, and gfortran 4.1.2\n\n";
+} elsif ($hostname =~ /platypus/) {
+ print OUTFILE "\tgcc, g++, and gfortran 4.4.7\n\n";
+ if ($linktype eq "shared" && !($hostname =~ /32/)) {
+ print OUTFILE "\tjava 1.8.0_51\n\n";
+ }
+} elsif ($hostname =~ /moohan/) {
+ print OUTFILE "\tgcc, g++, and gfortran 4.8.5\n\n";
+ if ($linktype eq "shared" && !($hostname =~ /32/)) {
+ print OUTFILE "\tjava 1.8.0_51\n\n";
+ }
+} elsif ($hostname =~ /emu/) {
+ print OUTFILE "\tSun C and C++ 5.12, Sun Fortran 95 8.6\n\n";
+} elsif ($hostname =~ /loyalty/ || $hostname =~ /freedom/) {
+ print OUTFILE "\tgcc, g++, and gfortran 4.6.1\n\n";
+} elsif ($hostname =~ /duck/) {
+ print OUTFILE "\tApple clang/clang++ 3.0 from Xcode 4.6.1 and gfortran 4.8.2\n\n";
+} elsif ($hostname =~ /kite/) {
+ print OUTFILE "\tApple clang/clang++ 5.1 from Xcode 5.0.2 and gfortran 4.8.2\n\n";
+} elsif ($hostname =~ /quail/) {
+ print OUTFILE "\tgcc, g++ 5.1 from Xcode 5.1 and gfortran 4.8.2\n\n";
+} elsif ($hostname =~ /osx1010test/) {
+ print OUTFILE "\tgcc, g++ 5.1 from Xcode 5.1 and gfortran 4.8.2\n\n";
+}
+
+print OUTFILE $section2;
+
+print OUTFILE $section3;
+
+print OUTFILE $section4;
+
diff --git a/bin/pkgscrpts/makeOuterREADME.pl b/bin/pkgscrpts/makeOuterREADME.pl
new file mode 100755
index 0000000..602ad28
--- /dev/null
+++ b/bin/pkgscrpts/makeOuterREADME.pl
@@ -0,0 +1,182 @@
+#!/usr/bin/perl
+# makeOuterREADME.pl
+
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF4. The full HDF4 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the files COPYING and Copyright.html. COPYING can be found at the root
+# of the source code distribution tree; Copyright.html can be found at the
+# root level of an installed copy of the electronic HDF4 document set and
+# is linked from the top-level documents page. It can also be found at
+# http://hdfgroup.org/HDF4/doc/Copyright.html. If you do not have
+# access to either file, you may request a copy from help at hdfgroup.org.
+#
+
+use warnings;
+use strict;
+
+my $indirectory = ".";
+$indirectory = shift;
+
+my $outdirectory = ".";
+$outdirectory = shift;
+
+my $outsubdir = shift;
+
+my $version;
+
+my $outfile = "$outdirectory/$outsubdir/README";
+open OUTFILE, ">$outfile";
+my $hostname="";
+my $cmd = "grep \"HDF5 Version\" $indirectory-static/lib/libhdf5.settings";
+$_ = `$cmd`;
+print OUTFILE $_, "\n";
+s/HDF5 Version://;
+s/^\s+//;
+chomp;
+$version = $_;
+#print OUTFILE $_, "\n";
+my $versionstring= "This directory contains the precompiled HDF5 $version binary distribution\n(include files, libraries, utilities) for";
+
+$cmd = "grep \"Uname information:\" $indirectory-static/lib/libhdf5.settings";
+$_ = `$cmd`;
+s/Uname information://;
+s/^\s+//;
+chomp;
+print "String to work with is $_\n";
+my $platformstring = "";
+my $hostnamestring = $_;
+my @hostnamestring = split / /, $hostnamestring;
+$platformstring = "$hostnamestring[0] ";
+if ($indirectory =~ /jam/ || $indirectory =~ /koala/) {
+ $hostnamestring = $hostnamestring[2];
+ my $pos = index $hostnamestring, "-";
+ if ($pos > 0) {
+ $platformstring .= substr $hostnamestring, 0, $pos;
+ } else {
+ $platformstring .= $hostnamestring[2];
+ }
+ $platformstring .= " ".$hostnamestring[-3];
+} elsif ($indirectory =~ /linew/) {
+ $platformstring .= "$hostnamestring[2] $hostnamestring[-2]";
+} else {
+ $platformstring .= "$hostnamestring[2] $hostnamestring[-1]";
+}
+
+print OUTFILE $versionstring." ".$platformstring.":\n\n";
+my $line1;
+my $line3;
+my $line5;
+my $compilerstring="";
+my $compilerstring1="";
+my $compilerstring2="";
+
+
+print $indirectory, "\n";
+
+if ($indirectory =~ /ostrich/) {
+# $line1 = " hdf5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
+ $line3 = " hdf5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using";
+ $line5 = " hdf5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using";
+ $compilerstring = " gcc, g++, and gfortran 4.4.7)";
+}
+elsif ($indirectory =~ /platypus/) {
+# $line1 = " hdf5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
+ $line3 = " hdf5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using";
+ $compilerstring1 = " gcc, g++, and gfortran 4.4.7)\n";
+ if ($indirectory =~ /32/) {
+ $line5 = " hdf5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 and Java APIs (using";
+ $compilerstring2 = " gcc, g++, and gfortran 4.4.7)\n";
+ } else {
+ $line5 = " hdf5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 and Java APIs (using";
+ $compilerstring2 = " gcc, g++, and gfortran 4.4.7 and java 1.8.0_51)\n";
+ }
+}
+elsif ($indirectory =~ /moohan/) {
+# $line1 = " hdf5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
+ $line3 = " hdf5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using";
+ $compilerstring1 = " gcc, g++, and gfortran 4.8.5)\n";
+ if ($indirectory =~ /32/) {
+ $line5 = " hdf5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 and Java APIs (using";
+ $compilerstring2 = " gcc, g++, and gfortran 4.4.7)\n";
+ } else {
+ $line5 = " hdf5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 and Java APIs (using";
+ $compilerstring2 = " gcc, g++, and gfortran 4.8.5 and java 1.8.0_51)\n";
+ }
+}
+elsif ($indirectory =~ /emu/) {
+# $line1 = " hdf5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
+ $line3 = " hdf5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using";
+ $line5 = " hdf5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using";
+ $compilerstring = " Sun C and C++ 5.12, Sun Fortran 95 8.6)\n";
+}
+elsif ($indirectory =~ /kite/) {
+ $line3 = " hfd5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using";
+ $line5 = " hfd5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using";
+ $compilerstring = " Apple clang/clang++ 5.1 from Xcode 5.0.2,
+ gfortran 4.8.2)\n";
+}
+elsif ($indirectory =~ /quail/) {
+ $line3 = " hfd5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using";
+ $line5 = " hfd5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using";
+ $compilerstring = " Apple clang/clang++ 6.0 from Xcode 5.1,
+ gfortran 4.9.2)\n";
+}
+elsif ($indirectory =~ /osx1010test/) {
+ $line3 = " hdf5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using";
+ $line5 = " hdf5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using";
+ $compilerstring = " Apple clang/clang++ 6.1 from Xcode 6.1,
+ gfortran 4.9.2)\n";
+}
+elsif ($indirectory =~ /osx1011test/) {
+ $line3 = " hdf5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using";
+ $line5 = " hdf5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using";
+ $compilerstring = " Apple clang/clang++ 7.0.2 from Xcode 7.0,
+ gfortran 5.2.0)\n";
+}
+
+ print OUTFILE $line3;
+ print OUTFILE $compilerstring1."\n";
+if ($line5 ne "") {
+ print OUTFILE $line5;
+ print OUTFILE $compilerstring2."\n";
+}
+#elsif ($indirectory =~ /-16API/) {
+# print OUTFILE $line1;
+# print OUTFILE $compilerstring;
+# print OUTFILE " USES THE VERSION 1.6 DEFAULT API\n";
+# print OUTFILE " MAPPING.\n\n";
+#}
+
+print OUTFILE " utilities/ - Directory containing the compiled HDF5 utilities.\n";
+print OUTFILE " These utilities are STATICALLY linked and will run as is.\n\n";
+#print OUTFILE " The tools can be downloaded separately, or ALL in one\n";
+#print OUTFILE " compressed file (5-$version-$outsubdir-static-util.tar.gz).\n\n";
+print OUTFILE "\n";
+print OUTFILE "To obtain the HDF5 distribution, 'unzip' and 'untar' the distribution\n";
+print OUTFILE "file:\n\n";
+print OUTFILE " gzip -cd <gz file from above> | tar xvf -\n";
+
+
+#$cmd = "grep \"Configured by:\" $indirectory/$key-static/lib/libhdf5.settings";
+#$_ = `$cmd`;
+#s/Configured by://;
+#s/^\s+//;
+#print OUTFILE $_;
+#chomp;
+#my $hostnamestring = $_;
+#s/(^\w+)(\s)(\S+)/$1/;
+#s/(^.*)(-)(.*)(200[7-8])(.*)(\s)(\S+)/$1 $5/;
+#my $platformstring = $_ . ":\n\n";
+#my @hostnamestring = split /@/, $hostnamestring;
+#print "Size of hostnamestring is ", scalar @hostnamestring, "\n";
+#print $hostnamestring[0] . "\t" . $hostnamestring[2]."\t".$hostnamestring[19]."\n";
+#my $platformstring = $hostnamestring[1].":\n\n";
+#$hostnamestring = $hostnamestring[1];
+#my $pos = index $hostnamestring, ".";
+#if ($pos > 0) {
+# @hostnamestring = split /\./, $hostnamestring;
+# $platformstring = $hostnamestring[0].":\n\n";
+#}
diff --git a/bin/runtest b/bin/runtest
new file mode 100755
index 0000000..2611f09
--- /dev/null
+++ b/bin/runtest
@@ -0,0 +1,966 @@
+#! /bin/sh
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
+#
+
+# run the hdf5/bin/snapshot
+# Usage:
+# runtest run the test for the local host
+# runtest <hostname> run the test for <hostname>
+# runtest -all run the test for all predefined hosts
+#
+# Assumptions in knowing where to find the right scripts to execute.
+# 1. assume we are at the top level of the hdf5 source. So, bin/* are
+# where the script files are.
+# 2. after the cvs update is completed, we can go to the snapshot area
+# hdf5 source tree and use the bin/* there.
+# 3. Cannot use the snapshot area scripts from the beginning because
+# for one, the current directory is renamed as previous right after
+# a snapshot release; and for another, some scripts may be changed
+# by the cvs update while it is being used.
+
+# local setup
+DEBUGMODE=""
+test -n "$DEBUGMODE" && echo "******** DEBUGMODE is $DEBUGMODE ************"
+WHEREAMI='pwd'
+CMD=
+
+# the name of this program
+PROGNAME="bin/runtest $DEBUGMODE"
+
+# Setup
+HOSTNAME=`hostname | cut -f1 -d.` # no domain part
+TODAY=`date +%m%d%a`
+WEEKDAY=`date +%a`
+H5VER= # default to current CVS version
+H5VERSION= # default to current CVS version
+n_test=0 # Number of tests ran
+n_pass=0 # Number of tests passed
+n_fail=0 # Number of tests failed
+n_skip=0 # Number of tests skipped
+
+# Default to do checkout (only once) and test, no release.
+# Will run test only if there is significant differences from previous version.
+# If srcdir is not used, don't launched multiple tests
+SNAPSHOT="${DEBUGMODE:+echo }bin/snapshot"
+SRCDIR="srcdir"
+# Default standard Snaptest commands
+SNAPCMD="$SRCDIR test clean"
+# Default Standard snaptest command options
+STANDARD_OPT=""
+ENABLE_PARALLEL="--enable-parallel"
+CONFIGNAME=$HOSTNAME # Name used in the SNAPTESTCFG file
+
+# test host default as local host.
+TESTHOST=""
+
+#################################
+# Function definitions
+#################################
+
+# Print messages to stdout
+# Use this to show output heading to stdout
+PRINT()
+{
+ echo "$*"
+}
+
+# Show seconds since midnight.
+# This is used to calculate seconds elapsed
+SecOfDay()
+{
+ set `date '+%H %M %S'`
+ t_sec=`expr $1 \* 3600 + $2 \* 60 + $3`
+ echo $t_sec
+}
+
+# Calculated the elapsed time (in seconds) between the first
+# and second time. If second time is smaller than the first,
+# we assume the clock has passed midnight and calculate appropriately.
+ElapsedTime()
+{
+ if [ $2 -lt $1 ]; then
+ t_sec=`expr 3600 \* 24 - $1 + $2`
+ else
+ t_sec=`expr $2 - $1`
+ fi
+ echo `expr $t_sec / 60`m `expr $t_sec % 60`s
+}
+
+# Report errors
+# $1--an error message to be printed
+REPORT_ERR()
+{
+ ERRMSG=$1
+ # print it with a banner shifted right a bit
+ PRINT " *************************************"
+ PRINT " `date`"
+ PRINT " $ERRMSG"
+ PRINT " *************************************"
+ # report it in the FAILED-LOG file too
+ PRINT "$ERRMSG" >> $FAILEDLOG
+}
+
+#
+# Report results of the last test done
+REPORT_RESULT()
+{
+ if [ $retcode -eq 0 ]; then
+ if [ $skiptest = yes ]; then
+ n_skip=`expr $n_skip + 1`
+ PRINT "SKIPPED ${HOSTNAME}: $TEST_TYPE" | tee -a $SKIPPEDLOG
+ else
+ n_pass=`expr $n_pass + 1`
+ PRINT "PASSED ${HOSTNAME}: $TEST_TYPE" | tee -a $PASSEDLOG
+ fi
+ else
+ # test failed.
+ n_fail=`expr $n_fail + 1`
+ REPORT_ERR "****FAILED ${HOSTNAME}: $TEST_TYPE****"
+ fi
+}
+
+# Print a blank line
+PRINT_BLANK()
+{
+ PRINT
+}
+
+# Print test trailer
+PRINT_TEST_TRAILER()
+{
+ PRINT "*** finished $TEST_TYPE tests for $HOSTNAME ***"
+ date; EndTime=`SecOfDay`
+ PRINT Total time = `ElapsedTime $StartTime $EndTime`
+ PRINT_BLANK
+}
+
+# Print trailer summary
+PRINT_TRAILER()
+{
+ PRINT "*** finished tests in $HOSTNAME ***"
+ date; TotalEndTime=`SecOfDay`
+ PRINT "${HOSTNAME}: Ran $n_test($n_pass/$n_fail/$n_skip) $runtest_type, Grand total test time = " \
+ "`ElapsedTime $TotalStartTime $TotalEndTime`" | tee -a $TIMELOG
+ PRINT_BLANK
+}
+
+# Figure out which remote command to use to reach a host.
+# Try ssh first, then rsh since fewer machines support rsh exec.
+# $1--hostname to reach.
+CHECK_RSH()
+{
+ # Figure out how to use ping command in this host.
+ # Some hosts use "ping host count", some use "ping -c count host".
+ # Test "ping -c 3 -w 5" since it has timeout feature.
+ # Test "ping -c ..." style before "ping host 3" because some machines
+ # that recognize -c treat 'ping localhost 3' as to ping host '3'.
+ if [ -z "$PING" ]; then
+ if ping -c 3 -w 5 localhost >/dev/null 2>&1; then
+ PING='ping -c 3 -w 5'
+ PINGCOUNT=
+ elif ping -c 3 localhost >/dev/null 2>&1; then
+ PING='ping -c 3'
+ PINGCOUNT=
+ elif ping localhost 3 >/dev/null 2>&1; then
+ PING=ping
+ PINGCOUNT=3
+ else # don't know how to use ping.
+ PING=no_ping
+ PINGCOUNT=
+ fi
+ fi
+ #
+ host=$1
+ # Try remote command with host if it responds to ping.
+ # Still try it if we don't know how to do ping.
+ if [ no_ping = "$PING" ] || $PING $host $PINGCOUNT >/dev/null 2>&1; then
+ if ssh $host -n hostname >/dev/null 2>&1; then
+ RSH=ssh
+ elif rsh $host -n hostname >/dev/null 2>&1; then
+ RSH=rsh
+ else
+ PRINT cannot remote command with $host
+ RSH="NoRemoteCommand"
+ fi
+ else
+ RSH="NotReachable"
+ fi
+}
+
+
+# Wait for a file for at most number of minutes
+# $1--the file
+# $2--number of minutes
+# WAIT_STATUS set to:
+# -1 if errors encountered
+# 0 if file found within time limit
+# 1 if file not found within time limit
+WAITFOR()
+{
+ wait_file=$1
+ nminutes=$2
+ if [ -z "$wait_file" -o ! "$nminutes" -ge 0 ]
+ then
+ PRINT "errors in argument of WAITFOR(): wait_file($1) or nminutes($2)"
+ WAIT_STATUS=-1
+ return
+ fi
+ while [ ! -f $wait_file ]; do
+ if [ $nminutes -gt 0 ]; then
+ PRINT "Wait For $wait_file to appear"
+ sleep 60 #sleep 1 minute
+ else
+ WAIT_STATUS=1
+ return
+ fi
+ nminutes=`expr $nminutes - 1`
+ done
+ WAIT_STATUS=0
+ return
+}
+
+
+# Wait till a file disappears for at most number of minutes.
+# Useful to wait till a lock is removed by another process.
+# $1--the file
+# $2--number of minutes
+# WAIT_STATUS set to:
+# -1 if errors encountered
+# 0 if file disappears within time limit
+# 1 if file has not disappeared within time limit
+WAITTILL()
+{
+ wait_file=$1
+ nminutes=$2
+ if [ -z "$wait_file" -o ! "$nminutes" -ge 0 ]
+ then
+ PRINT "errors in argument of WAITTILL(): wait_file($1) or nminutes($2)"
+ WAIT_STATUS=-1
+ return
+ fi
+ while [ -f $wait_file ]; do
+ if [ $nminutes -gt 0 ]; then
+ PRINT "Wait till $wait_file has disappeared"
+ sleep 60 #sleep 1 minute
+ else
+ WAIT_STATUS=1
+ return
+ fi
+ nminutes=`expr $nminutes - 1`
+ done
+ WAIT_STATUS=0
+ return
+}
+
+
+# Run one snapshot test
+# $*--Types of test being run
+RUNSNAPTEST()
+{
+ SNAPCMD_OPT="$STANDARD_OPT" # snapshot test option
+ SRCDIRNAME=${HOSTNAME}
+ # restore CC, PATH in case they were changed in the last test.
+ CC="$CC_SAVED"
+ PATH=$PATH_SAVED
+ export PATH # DEC OSF1 needs to export PATH explicitly
+ TEST_TYPE=$*
+ retcode=0
+ skiptest=no
+ date
+ PRINT "*** starting $TEST_TYPE tests in $HOSTNAME ***"
+ PRINT "Uname -a: `uname -a`"
+
+ # Parse the test type and set options accordingly.
+ # See comments of SNAPTEST_CONFIG_PARSE().
+ while [ $# -gt 0 ]; do
+ case $1 in
+ -n32) # want -n32 option
+ SRCDIRNAME=${SRCDIRNAME}-n32
+ CC="cc -n32"
+ export CC
+ ;;
+ -64) # want -64 option
+ SRCDIRNAME=${SRCDIRNAME}-64
+ CC="cc -64"
+ export CC
+ ;;
+ parallel) # want parallel test
+ SNAPCMD_OPT="$SNAPCMD_OPT $ENABLE_PARALLEL"
+ SRCDIRNAME=${SRCDIRNAME}-pp
+ ;;
+ standard) # standard test
+ ;;
+ --*)
+ # option for configure
+ SNAPCMD_OPT="$SNAPCMD_OPT $1"
+ ;;
+ op-configure)
+ # option for configure
+ SNAPCMD_OPT="$SNAPCMD_OPT $1 $2"
+ shift
+ ;;
+ op-snapshot)
+ # option for snapshot
+ shift
+ SNAPCMD_OPT="$SNAPCMD_OPT $1"
+ ;;
+ setenv)
+ # pass them along to snapshot set environment variable
+ shift
+ SNAPCMD_OPT="$SNAPCMD_OPT setenv $1 $2"
+ shift
+ ;;
+ setenvN)
+ # set environment variable with $1 values
+ # e.g., setenvN 3 x a b c is same as setenv x="a b c".
+ # pass them along to snapshot set environment variable
+ shift
+ envN=$1
+ shift
+ envname=$1
+ SNAPCMD_OPT="$SNAPCMD_OPT setenvN $envN $envname"
+ envalue=
+ while test $envN -gt 0; do
+ shift
+ envalue="$envalue $1"
+ envN=`expr $envN - 1`
+ done
+ SNAPCMD_OPT="$SNAPCMD_OPT $envalue"
+ ;;
+ skip)
+ # skip this test
+ skiptest=yes
+ ;;
+ srcdirname)
+ # Use this before using parallel and -n32 since this overrides
+ # the others.
+ shift
+ SRCDIRNAME=$1
+ ;;
+ deploy)
+ # deploy the built binary.
+ shift
+ SNAPCMD_OPT="$SNAPCMD_OPT deploy $1"
+ ;;
+ deploydir)
+ # default directory for deployment.
+ shift
+ SNAPCMD_OPT="$SNAPCMD_OPT deploydir $1"
+ ;;
+ *) # unknown test
+ PRINT "$0: unknown type of test ($1)"
+ retcode=1
+ ;;
+ esac
+ shift
+ done
+
+ if [ $retcode -ne 0 -o $skiptest = yes ]; then
+ errcode=$retcode
+ return $retcode
+ fi
+
+ # Track down the zlib software
+ ans=`$SNAPYARD/current/bin/locate_sw zlib`
+ if [ $? = 0 ]; then
+ Z_INC=`echo $ans | cut -f1 -d,`
+ Z_LIB=`echo $ans | cut -f2 -d,`
+ SNAPCMD_OPT="$SNAPCMD_OPT zlib $Z_INC,$Z_LIB"
+ else
+ # cannot locate zlib software.
+ # continue the test, maybe configure can find it.
+ :
+ fi
+
+ if [ -n "${SRCDIRNAME}" ]; then
+ SNAPCMD_OPT="$SNAPCMD_OPT srcdirname ${SRCDIRNAME}"
+ fi
+
+ # Setup log file name to save test output
+ THIS_MINUTE=`date +%H%M`
+ LOGFILE=${LOGBASENAME}/${SRCDIRNAME}_${TODAY}_${THIS_MINUTE}
+ PRINT "Running snapshot with output saved in"
+ PRINT " $LOGFILE"
+ (date; PRINT Hostname=$HOSTNAME) >> $LOGFILE
+
+ (
+ cd $SNAPYARD/current
+ $SNAPSHOT $SNAPCMD $SNAPCMD_OPT
+ ) >> $LOGFILE 2>&1
+ retcode=$?
+ [ $retcode -ne 0 ] && errcode=$retcode
+
+ date >> $LOGFILE
+ if [ $retcode -ne 0 ]; then
+ # Dump the first 10 lines and the last 30 lines of the LOGFILE.
+ ( ntail=30
+ echo =========================
+ echo "Dumping logfile of ${HOSTNAME}: $TEST_TYPE"
+ echo "Last $ntail lines of $LOGFILE"
+ echo =========================
+ tail -$ntail $LOGFILE
+ echo =========================
+ echo Dumping done
+ echo =========================
+ echo ""
+ ) >> $FAILEDDETAIL
+ fi
+}
+
+TIMELIMIT_PARSE()
+{
+ # Function returns timeparam for timekeeper via standard out -
+ # any debug statements should be 'echo "Debug string" >&2' or timekeeper
+ # will declare timeparam to be non-numeric and ignore it.
+ while read x y ; do
+ # Scan for entry for this weekday.
+ xd=`echo $x | cut -f1 -d/`
+ if [ "$xd" = ${WEEKDAY} ]; then
+ # strip away the weekday/ part.
+ timeparam=`echo $x | cut -f2 -d/`
+ break
+ fi
+ case "$x" in
+ '' | '#'*)
+ # blank or comment lines. Continue.
+ ;;
+ ???/*)
+ # Ignore any entry not of this weekday.
+ ;;
+ *)
+ timeparam="$x"
+ ;;
+ esac
+ done
+ echo $timeparam
+ return
+}
+
+# configuration parsing.
+# Taking configuration from input.
+# This should be invoke with configure file as stdin.
+# Syntax of the configure file:
+# All lines started with the # are comment lines and are ignored.
+# Blank lines are ignored too.
+# Each config line starts with a "Scope" followed by test types.
+#
+# Scope can be:
+# standard ... # what the standard test types are.
+# <host>: <test> Do <test> for <host>
+# all: <test> Do <test> for all hosts.
+# <weekday>/... Use this scope if the <weekday> matches.
+# <weekday> can be {Mon,Tue,Wed,Thu,Fri,Sat,Sun}
+# If no <host>: input for a <host>, the standard test is used.
+#
+# Test types:
+# standard tests defined in standard scope.
+# -n32 -n32 mode. Apply to 64/32 bit OS such as IRIX64.
+# parallel parallel mode.
+# op-configure <option> configure option
+# op-snapshot <option> snapshot option
+# --* configure option
+# setenv <name> <value> set environment variable <name> to <value>
+# Pass along to snapshot
+# setenvN <N> <name> <value> ...
+# set environment variable with <N> values
+# e.g., setenvN 3 x a b c is same as setenv x="a b c".
+# Pass along to snapshot.
+# skip skip this test
+# srcdirname <name> use <name> as the build-directory.
+# deploy <name> deploy the built binary at directory <name>.
+# deploydir <name> use <name> as the default directory for deployment.
+SNAPTEST_CONFIG_PARSE()
+{
+ while read x y ; do
+ # Scan for entry for this weekday.
+ xd=`echo $x | cut -f1 -d/`
+ if [ "$xd" = ${WEEKDAY} ]; then
+ # strip away the weekday/ part.
+ x=`echo $x | cut -f2 -d/`
+ fi
+ case "$x" in
+ '' | '#'*)
+ # blank or comment lines. Continue.
+ ;;
+ ???/*)
+ # Ignore any entry not of this weekday.
+ ;;
+ standard)
+ #standard configuration
+ STANDARD_OPT="$y"
+ ;;
+ all: | ${CONFIGNAME}:)
+ # types of test for all hosts or this host
+ if [ -n "$TEST_TYPES" ]; then
+ TEST_TYPES="$TEST_TYPES ; $y"
+ else
+ TEST_TYPES="$y"
+ fi
+ ;;
+ *:) # ignore types of test for other hosts
+ ;;
+ *) # unknown configuration option
+ PRINT $x $y
+ PRINT "***Unknown configuration option. Ignored.***"
+ ;;
+ esac
+ done
+}
+
+# Snap Test configuration parsing.
+# If TEST_TYPES is not set, set it to do the "standard" test.
+SNAPTEST_CONFIG()
+{
+ TEST_TYPES=
+ STANDARD_OPT=
+ if [ -f $SNAPTESTCFG ]; then
+ SNAPTEST_CONFIG_PARSE < $SNAPTESTCFG
+ fi
+ TEST_TYPES=${TEST_TYPES:-'standard'}
+}
+
+
+# Show usage page
+USAGE()
+{
+cat <<EOF
+Usage: runtest [-h] [-debug] [-r<version>] [-all] [-nocvs] [-nodiff] [<host> ...]
+ -h
+ print this help page
+ -debug
+ turn on debug mode
+ -r<version>
+ do runtest for <version>
+ -all
+ launch tests for all pre-defined testing hosts
+ -nocvs
+ do not do cvs commands
+ -nodiff
+ do not do diff commands
+ -setup
+ setup the directory structure for snapshot test
+ -configname <name>
+ use <name> as hostname in the parsing of the snaptest configure file
+ <host>
+ launch tests for <host>
+
+-all and <host> are contradictory and whichever is specified last, is
+the one to take effect. If neither are given, do the test for the
+local host.
+EOF
+}
+
+
+# Verify if directory ($1) exists. If not, create it.
+CHECK_DIR()
+{
+ dir=$1
+ if test ! -e $1; then
+ echo mkdir $1
+ mkdir $1
+ errcode=$?
+ elif test ! -d $1; then
+ echo $1 is not a directory
+ errcode=1
+ fi
+}
+
+
+#################################
+# Main
+#################################
+#################################
+# Set up global variables
+#################################
+retcode=0 # error code of individula task
+errcode=0 # error code of the whole test
+skiptest=no # if test is skipped
+CC_SAVED="$CC" # CC & PATH maybe changed within a test.
+PATH_SAVED=$PATH # These save the original values.
+timelimit=300 # default time limit (minutes) for the timekeeper
+
+#################################
+# Parse options
+#################################
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -h) # help--show usage
+ USAGE
+ exit 0
+ ;;
+ -debug*)
+ # set debug mode
+ DEBUGMODE="$1"
+ SNAPSHOT="echo bin/snapshot"
+ PROGNAME="$PROGNAME $DEBUGMODE"
+ PRINT "******** DEBUGMODE is $DEBUGMODE ************"
+ ;;
+ -r*)
+ # version string
+ H5VER="$1"
+ ;;
+ -all)
+ # Test all hosts.
+ TESTHOST=-all
+ ;;
+ -nocvs)
+ # do not do cvs commands.
+ NOCVS=nocvs
+ ;;
+ -nodiff)
+ # do not do diff commands.
+ NODIFF=nodiff
+ ;;
+ -configname)
+ # use <name> as hostname in the parsing of the snaptest configure file.
+ shift
+ CONFIGNAME=$1
+ ;;
+ -setup)
+ # setup the directory structure for snapshot test.
+ CMD=setup
+ ;;
+ -*) # Unknow option
+ PRINT "Unknown option ($1)"
+ USAGE
+ exit 1
+ ;;
+ *)
+ TESTHOST=$*
+ break
+ ;;
+ esac
+ shift
+done
+
+# setup H5VER if not set yet
+if [ -z "$H5VER" -a -f bin/snapshot_version ]
+then
+ . bin/snapshot_version
+fi
+
+if [ -n "$H5VER" ]
+then
+ H5VERSION=hdf5_`echo $H5VER | sed -e s/-r// -e s/\\\./_/g`
+ PROGNAME="$PROGNAME $H5VER"
+else
+ H5VERSION=hdf5
+fi
+
+#################################
+# Setup snapshot test directories
+#################################
+BASEDIR=${HOME}/snapshots-${H5VERSION}
+# initial processing of setup option if requested
+if test x-$CMD = x-setup; then
+ CHECK_DIR $BASEDIR
+ test $errcode -ne 0 && exit 1
+elif [ ! -d ${BASEDIR} ]; then
+ echo "BASEDIR ($BASEDIR) does not exist"
+ exit 1
+fi
+# Show the real physical path rather than the symbolic path
+SNAPYARD=`cd $BASEDIR && /bin/pwd`
+# Log file basename
+LOGDIR=${SNAPYARD}/log
+LOGBASENAME=${LOGDIR}
+PASSEDLOG=${LOGDIR}/PASSED_LOG_${TODAY}
+FAILEDLOG=${LOGDIR}/FAILED_LOG_${TODAY}
+FAILEDDETAIL=${LOGDIR}/FAILED_DETAIL_${TODAY}
+SKIPPEDLOG=${LOGDIR}/SKIPPED_LOG_${TODAY}
+TIMELOG=${LOGDIR}/TIME_LOG_${TODAY}
+TIMEKEEPERLOG=${LOGDIR}/TIMEKEEPER_LOG_${TODAY}
+CVSLOG=${LOGDIR}/CVS_LOG_${TODAY}
+CVSLOG_LOCK=${LOGDIR}/CVS_LOG_LOCK_${TODAY}
+DIFFLOG=${LOGDIR}/DIFF_LOG_${TODAY}
+COPYRIGHT_ERR=${LOGDIR}/COPYRIGHT_ERR_${TODAY}
+# Snap Test hosts and Configuration files
+ALLHOSTSFILE=${SNAPYARD}/allhostfile
+SNAPTESTCFG=${SNAPYARD}/snaptest.cfg
+TIMELIMIT=${SNAPYARD}/timelimit
+TMPFILE="${LOGDIR}/#runtest.${TODAY}.$$"
+
+# more processing of setup option if requested
+if test x-$CMD = x-setup; then
+ CHECK_DIR $LOGDIR
+ test $errcode -ne 0 && exit 1
+ CHECK_DIR $LOGDIR/OLD
+ test $errcode -ne 0 && exit 1
+ CHECK_DIR $SNAPYARD/TestDir
+ test $errcode -ne 0 && exit 1
+ # create empty test hosts or configure files if non-existing
+ for f in $ALLHOSTSFILE $SNAPTESTCFG; do
+ if test ! -f $f; then
+ echo Creating $f
+ touch $f
+ fi
+ done
+ # create or update the current source.
+ echo update current source
+ $SNAPSHOT checkout
+ # setup completed. Exit.
+ exit 0
+fi
+
+#################################
+# Show some host status numbers
+#################################
+# df sometimes hangs due to file system problems. Invoke it as background
+# process and give it 10 seconds to finish. If it hangs, just continue.
+uptime
+df &
+sleep 10
+
+#################################
+# Setup test host(s)
+#################################
+if [ "$TESTHOST" = -all ]; then
+ if [ -f $ALLHOSTSFILE ]; then
+ TESTHOST=`sed -e '/^#/d;/^ *$/d' $ALLHOSTSFILE`
+ else
+ PRINT "could not access the all-hosts-file ($ALLHOSTSFILE)"
+ USAGE
+ exit 1
+ fi
+fi
+
+
+#################################
+# Setup to print a trailer summary when exiting not via
+# the normal end of the script.
+#################################
+trap PRINT_TRAILER 0
+
+#
+TotalStartTime=`SecOfDay`
+
+# Process the configuration
+SNAPTEST_CONFIG
+PRINT STANDARD_OPT=$STANDARD_OPT
+PRINT TEST_TYPES=$TEST_TYPES
+PRINT_BLANK
+
+# Do a checkout if one has not been done today.
+# Then check MANIFEST file and copyrights noitces.
+if [ -z "$NOCVS" ]; then
+ PRINT "Running CVS checkout with output saved in"
+ PRINT " $CVSLOG"
+ # Set CVS lock first
+ touch $CVSLOG_LOCK
+ ($SNAPSHOT checkout ) >> $CVSLOG 2>&1
+ # Save error code and remove the lock
+ errcode=$?
+ rm -f $CVSLOG_LOCK
+ if [ $errcode -ne 0 ]; then
+ # test failed.
+ REPORT_ERR "****FAILED ${HOSTNAME}: CVS checkout****"
+ exit $errcode
+ fi
+ # ===================
+ # Check MANIFEST file
+ # ===================
+ PRINT Checking MAINFEST file ...
+ (cd $SNAPYARD/current; bin/chkmanifest) > $TMPFILE 2>&1
+ errcode=$?
+ if [ $errcode -eq 0 ]; then
+ # test passed.
+ cat $TMPFILE
+ else
+ # test failed.
+ REPORT_ERR "****FAILED ${HOSTNAME}: MANIFEST check****"
+ ( echo =========================
+ echo "MANIFEST checking failed output"
+ echo =========================
+ cat $TMPFILE
+ echo =========================
+ echo "MANIFEST checking failed output done"
+ echo =========================
+ echo ""
+ ) >> $FAILEDDETAIL
+ fi
+ rm $TMPFILE
+ PRINT_BLANK
+ # No copyright checking until what need copyright is decided. 2006/4/7.
+ if false; then
+ # ======================
+ # Check Copyright notice
+ # ======================
+ PRINT Checking Copyrights notices ...
+ if (cd $SNAPYARD/current; bin/chkcopyright) > $TMPFILE 2>&1 ; then
+ echo Passed.
+ else
+ # Save the output and report some of it.
+ # Do not report it as failed for runtest yet.
+ # Send a separate report mail via hardcoding.
+ # Need fixes/cleanup later.
+ echo "Failed. See detail in another report mail"
+ cp $TMPFILE $COPYRIGHT_ERR
+ nheadlines=300
+ ntaillines=5 # Number of lines in report summary.
+ (
+ echo =========================
+ echo "Copyright checking failed. Showing first $nheadlines lines of output."
+ echo "Complete output is in file $COPYRIGHT_ERR"
+ echo =========================
+ nreportlines=`wc -l < $COPYRIGHT_ERR`
+ if [ $nreportlines -le `expr $nheadlines + $ntaillines` ]; then
+ # Just print the whole file.
+ cat $COPYRIGHT_ERR
+ else
+ # Show the first $nheadlines plus report summary
+ head -$nheadlines $COPYRIGHT_ERR
+ echo ...
+ tail -$ntaillines $COPYRIGHT_ERR
+ fi
+ ) | Mail -s "${H5VERSION} Copyrights check Failed" hdf5lib
+ fi
+ rm $TMPFILE
+ PRINT_BLANK
+ fi
+else
+ # make sure the cvs update, if done by another host, has completed.
+ # First wait for the presence of $CVSLOG which signals some host
+ # has started the cvs update. Then wait for the absense of $CVSLOG_LOCK
+ # which signals the host has completed the cvs update.
+ WAITFOR $CVSLOG 90
+ if [ $WAIT_STATUS -ne 0 ]; then
+ errcode=$WAIT_STATUS
+ REPORT_ERR "****FAILED ${HOSTNAME}: Time expired waiting CVS update to start****"
+ exit $errcode
+ fi
+ WAITTILL $CVSLOG_LOCK 10
+ if [ $WAIT_STATUS -ne 0 ]; then
+ errcode=$WAIT_STATUS
+ REPORT_ERR "****FAILED ${HOSTNAME}: Time expired waiting CVS update to finish****"
+ exit $errcode
+ fi
+fi
+
+# run a snapshot diff to see if any significant differences between
+# the current and previous versions
+if [ -z "$NODIFF" ]; then
+ $SNAPSHOT diff >> $DIFFLOG 2>&1
+ errcode=$?
+ # check the errcode only if NOT in DEBUG MODE
+ if [ -z "$DEBUGMODE" -a $errcode -eq 0 ]; then
+ # no need to run test
+ PRINT "NO TEST: no significant differences between current and previous versions" |
+ tee -a $PASSEDLOG
+ exit 0
+ fi
+fi
+
+# we can use the version of script in SNAPYARD/current now.
+# Don't do the diff or cvs update any more.
+PROGNAME="$SNAPYARD/current/$PROGNAME -nodiff -nocvs"
+
+# Decide to do test for the local host or for remote hosts
+if [ -n "$TESTHOST" -a $HOSTNAME != "$TESTHOST" ]; then
+ date
+ PRINT "*** launching tests from $HOSTNAME ***"
+ PRINT_BLANK
+ TEST_TYPE="launching"
+ cd ${SNAPYARD}/log
+ # Fork off timekeeper if concurrent tests will be used.
+ if [ -n "$SRCDIR" ]; then
+ timelimit=`TIMELIMIT_PARSE < $TIMELIMIT`
+ ($SNAPYARD/current/bin/timekeeper $timelimit > $TIMEKEEPERLOG 2>&1 &)
+ PRINT " Fork off timekeeper $timelimit"
+ fi
+ runtest_type="hosts"
+ for h in $TESTHOST; do
+ # Must do CONFIGNAME before $h got changed by the second cut.
+ # cut returns the whole string if there is no / in the string
+ # at all. But that works okay for the CONFIGNAME too.
+ CONFIGNAME=`echo $h | cut -f2 -d/`
+ h=`echo $h | cut -f1 -d/`
+ n_test=`expr $n_test + 1`
+ TMP_OUTPUT="#${h}_${CONFIGNAME}.out"
+ (PRINT "=============="
+ PRINT "Testing $h"
+ PRINT "==============") > $TMP_OUTPUT
+ CHECK_RSH $h
+ # run the remote shell command with output to $TMP_OUTPUT
+ case "$RSH" in
+ rsh|ssh)
+ CMD="$RSH $h -n $PROGNAME -configname $CONFIGNAME"
+ PRINT $CMD
+
+ # launch concurrent tests only if srcdir is used
+ if [ -n "$SRCDIR" ]; then
+ $CMD || REPORT_ERR "****FAILED ${h}: Abnormal exit from runtest****" && PRINT_BLANK &
+ echo $! > PID.${h}_${CONFIGNAME}
+ else
+ $CMD || REPORT_ERR "****FAILED ${h}: Abnormal exit from runtest****" && PRINT_BLANK
+ fi
+ ;;
+ NoRemoteCommand)
+ PRINT $h does not accept Remote Command "(`date`)"
+ ;;
+ NotReachable)
+ PRINT $h is not reachable "(`date`)"
+ ;;
+ *)
+ PRINT "CHECK_RSH for $h returned unknow result ($RSH)"
+ ;;
+ esac >> $TMP_OUTPUT 2>&1
+ done
+ # wait for all launched tests to finish, then cat them back out.
+ wait
+ # Pause a moment in case the timekeeper is terminating processes.
+ wait 30
+ for h in $TESTHOST; do
+ CONFIGNAME=`echo $h | cut -f2 -d/`
+ h=`echo $h | cut -f1 -d/`
+ TMP_OUTPUT="#${h}_${CONFIGNAME}.out"
+ cat $TMP_OUTPUT
+ # Verify test script did complete by checking the last lines
+ (tail -5 $TMP_OUTPUT | grep -s 'Grand total' > /dev/null 2>&1) ||
+ (REPORT_ERR "****FAILED ${h}: snaptest did not complete****" &&
+ PRINT_BLANK)
+ rm -f $TMP_OUTPUT PID.${h}_${CONFIGNAME}
+ done
+ exit 0
+fi
+
+# run the test(s)
+# Note that first field is cut without -s but all subsequent cut
+# must use -s. If -s is not used at all, a $TEST_TYPES that has
+# no ';' (only 1 test), will pass through intact in all cut. That
+# results in infinite looping.
+# If -s is used with the first field, it will suppress completely
+# a $TYPE_TYPES that has no ';' (only 1 tst ). That results in no
+# test at all.
+# Note that n_test must start as 1.
+#
+n_test=1
+runtest_type="tests"
+TEST="`echo $TEST_TYPES | cut -f$n_test -d';'`"
+while [ -n "$TEST" ]; do
+ StartTime=`SecOfDay`
+ RUNSNAPTEST $TEST
+ REPORT_RESULT
+ PRINT_TEST_TRAILER
+
+ n_test=`expr $n_test + 1`
+ TEST="`echo $TEST_TYPES | cut -f$n_test -s -d';'`"
+done
+# dec n_test to show the actual number of tests ran.
+n_test=`expr $n_test - 1`
+
+PRINT_TRAILER
+
+# disable trailer summary printing since all trailers have been
+# printed and we are exiting normally.
+trap 0
+exit $errcode
diff --git a/bin/snapshot_version b/bin/snapshot_version
new file mode 100644
index 0000000..8aad05d
--- /dev/null
+++ b/bin/snapshot_version
@@ -0,0 +1,19 @@
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
+#
+
+# default version for snapshot test
+# H5VERSION matches with a source version symbolic name. Will test use the
+# latest revision of that branch. If set to "hdf5", it uses the main
+# version.
+# H5VER tells runtest which version to run
+H5VERSION=hdf5
diff --git a/bin/switch_maint_mode b/bin/switch_maint_mode
new file mode 100755
index 0000000..fb1568b
--- /dev/null
+++ b/bin/switch_maint_mode
@@ -0,0 +1,81 @@
+#!/bin/sh
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
+#
+# Switch AM_MAINTAINER_MODE value in configure.ac
+# Usage: See USAGE()
+# Programmer: Dana Robinson
+# Creation date: January 2016
+
+USAGE()
+{
+cat <<EOF
+
+switch_maint_mode reverses the status of AM_MAINTAINER_MODE in
+configure.ac from enable to disable or vice-versa. When enabled,
+this feature forces the autotools to run when the input files are
+older than the output files. This is the default for development
+branches. When disabled, the autotools will NOT be re-run regardless
+of their timestamps or any modifications. This is the default for
+tarballs and release branches since it avoids having end-users
+requiring the autotools.
+
+Command Syntax
+==============
+switch_maint_mode [-help] [-enable|disable] <path-to-configure.ac>
+
+EOF
+}
+
+MODE="notset"
+CONFIG_AC_PATH=
+
+# Display help/usage if any options were passed in
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -enable)
+ MODE="enable"
+ ;;
+ -disable)
+ MODE="disable"
+ ;;
+ -help)
+ USAGE
+ exit 0
+ ;;
+ *)
+ CONFIG_AC_PATH="$1"
+ ;;
+ esac
+ shift
+done
+
+# Did we get a file path?
+if test -z $CONFIG_AC_PATH ; then
+ USAGE
+ exit 1
+fi
+
+# Did we get a mode?
+if test -z $MODE ; then
+ USAGE
+ exit 1
+fi
+
+# Run perl over configure.ac
+if test "X-$MODE" = "X-enable" ; then
+ perl -pi -e 's/^(AM_MAINTAINER_MODE\(\[)([a-z]+)(\]\))/$1enable$3/g' $CONFIG_AC_PATH
+fi
+if test "X-$MODE" = "X-disable" ; then
+ perl -pi -e 's/^(AM_MAINTAINER_MODE\(\[)([a-z]+)(\]\))/$1disable$3/g' $CONFIG_AC_PATH
+fi
+
diff --git a/bin/timekeeper b/bin/timekeeper
new file mode 100755
index 0000000..14adf2c
--- /dev/null
+++ b/bin/timekeeper
@@ -0,0 +1,129 @@
+#!/bin/sh
+##
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
+##
+# As a time keeper of the remote daily test process launched by runtest.
+# It sleeps for a certain time and then wakes up to hangup those processes
+# that are still around, assuming they have run too long.
+#
+# Programmer: Albert Cheng
+# Created Date: 2004/12/23
+
+# variable initialization
+waitminutes=300 # default to 5 hours == 300 minutes
+debugtimelimit=
+debugflag= # no debug
+
+# Function definitions
+#
+# PRINTMSG
+# Print a one line message left justified in a field of 70 characters
+# without newline. More output for this line later.
+#
+PRINTMSG() {
+ SPACES=" "
+ echo "$* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+
+USAGE()
+{
+ echo "Usage: %0 [-h] [-debug] [<time-limit>]"
+ echo " Run timekeeper with <time-limit> minutes, default is $waitminutes."
+ echo " If <time-limit> is in the form of HH:MM, it means wait till then."
+ echo " -h print this help page"
+ echo " -debug run debug mode"
+}
+
+
+ParseOption()
+{
+ if [ $# -gt 0 -a "$1" = -h ]; then
+ shift
+ USAGE
+ exit 0
+ fi
+ if [ $# -gt 0 -a "$1" = -debug ]; then
+ shift
+ debugflag=yes
+ waitminutes=1 # use shorter time for debug
+ fi
+ if [ $# -gt 0 ]; then
+ targettime=$1
+ shift
+
+ # find out it is minutes to wait or HH:MM to wake up
+ case $targettime in
+ *:*) # HH:MM
+ currenttime=`date +%H:%M`
+ currenthour=`echo $currenttime | cut -f1 -d:`
+ currentminute=`echo $currenttime | cut -f2 -d:`
+ targethour=`echo $targettime | cut -f1 -d:`
+ targetminute=`echo $targettime | cut -f2 -d:`
+ waitminutes=`expr \( $targethour - $currenthour \) \* 60 + $targetminute - $currentminute`
+ if test $waitminutes -le 0; then
+ # target time is in tomorrow, add 1 day of minutes
+ waitminutes=`expr 24 \* 60 + $waitminutes`
+ fi
+ ;;
+ *)
+ waitminutes=$targettime
+ ;;
+ esac
+ fi
+}
+
+
+# Main body
+echo "Timekeeper started at `date`"
+ParseOption $*
+waitperiod=`expr $waitminutes \* 60` # convert to seconds
+
+if [ -z "$debugflag" ]; then
+ # normal time keeping mode
+ # sleep first
+ echo Timekeeper sleeping for $waitperiod seconds
+ sleep $waitperiod
+ # Look for any processes still around
+ echo "Timekeeper woke up at `date`, looking for processes to terminate..."
+ for x in PID.* ; do
+ if [ -f $x ]; then
+ pid=`cat $x`
+ # check if process is still around
+ if test X$pid \!= X && ps -p $pid > /dev/null; then
+ echo "terminating process $x ($pid)"
+ kill -HUP $pid
+ echo "Remote shell command ended. But some processes might still be"
+ echo "running in the remote machine. Login there to verify."
+ fi
+ fi
+ done
+else
+ # Debug mode. Launch two rsh process, one ends before, the other after
+ # waitperiod. Must launch timekeeper from a subshell, else the debug
+ # will wait for it too.
+ myhostname=`hostname`
+ ( $0 $waitminutes &)
+ debugtimelimit=`expr $waitperiod - 10`
+ echo rsh $myhostname sleep $debugtimelimit
+ rsh $myhostname sleep $debugtimelimit &
+ echo $! > PID.before
+ debugtimelimit=`expr $waitperiod + 10`
+ echo rsh $myhostname sleep $debugtimelimit
+ rsh $myhostname sleep $debugtimelimit &
+ echo $! > PID.after
+
+ wait
+ rm PID.before PID.after
+fi
+
+echo "Timekeeper ended at `date`"
diff --git a/src/.indent.pro b/src/.indent.pro
new file mode 100644
index 0000000..e0fda85
--- /dev/null
+++ b/src/.indent.pro
@@ -0,0 +1,150 @@
+-bad /* Blank line after declarations */
+-bap /* Blank line after procedure */
+-bbb /* No blank line before boxed comments */
+-bbo /* Try to break long lines at boolean operators && and || */
+-nbc /* Don't force newlines after commas in declarations */
+-br /* Put braces on the same line as the statement (not -bl) */
+-brs /* Put braces on the same line as the struct declaration (not -bls) */
+-nbs /* Don't put a space between a sizeof operator and it's object */
+-c33 /* Start comments after code in column 33 */
+-cbi0 /* Indent braces below a case statement 0 spaces to right of case statement */
+-cd33 /* Start comments after declarations in column 33 */
+-ncdb /* Don't put comment delimiters on their own lines */
+-cdw /* "Cuddle" while statements onto the same line as the closing do statement's brace */
+-nce /* Don't "Cuddle" else statements onto the same line as the closing if statement's brace */
+-ci8 /* Align continued code 8 spaces from initial indention */
+-cli4 /* Indent case statements 4 spaces to right of switch statement */
+-cp0 /* Start comments after pre-processor directives immediately after the directive */
+-ncs /* Don't put a space between a cast operator and it's object */
+-d0 /* Align comments on their own line with the surrounding code */
+-nbfda /* Don't force newlines after commas in function argument declarations */
+-di24 /* Align identifiers in declarations in column 24 */
+-nfc1 /* Don't format comments in the first column */
+-nfca /* Don't format comments on their own line */
+-hnl /* Honor existing new-lines in long boolean statements */
+-i4 /* Indent space spaces */
+-ip8 /* Don't add any extra indention for nested parentheses */
+-l78 /* Try to break long lines in column 78 */
+-lc78 /* Try to break long comment lines in column 78 */
+-nlp /* Don't align lines continued onto further lines with the opening parentheses */
+-lps /* Leave spaces in preprocessor directives alone */
+-npcs /* Don't put a space between the procedure name and it's parameters */
+-npcs /* Don't put a space between the procedure name and it's parameters */
+-pi4 /* Extra indentation per open parentheses */
+-pmt /* Preserve modification times on modified files */
+-nprs /* Don't add spaces around parentheses */
+-psl /* Force the return type of a procedure to be on it's own line */
+-nsaf /* Don't put a space between a for statement and it's initial parentheses */
+-nsai /* Don't put a space between an if statement and it's initial parentheses */
+-nsaw /* Don't put a space between a while statement and it's initial parentheses */
+-sbi0 /* Indent braces after a struct, union or enum 0 spaces */
+-sc /* Put stars at the beginning of multi-line comments */
+-nsob /* Don't swallow optional blank lines */
+-ss /* Put a space before the semicolon if its the only statement in a for or while loop */
+-ts8 /* Hard tab characters are 8 spaces */
+/* The rest are typedefs used by the library, feel free to add missing ones, */
+/* but try to keep them alphabetized */
+-T H5AC_class_t
+-T H5AC_prot_t
+-T H5AC_slot_t
+-T H5AC_subid_t
+-T H5AC_t
+-T H5A_t
+-T H5Asearch_func_t
+-T H5B_class_t
+-T H5B_ins_t
+-T H5B_key_t
+-T H5B_subid_t
+-T H5B_t
+-T H5C_class_t
+-T H5C_t
+-T H5D_create_t
+-T H5D_layout_t
+-T H5D_t
+-T H5E_error_t
+-T H5E_major_mesg_t
+-T H5E_major_t
+-T H5E_minor_mesg_t
+-T H5E_minor_t
+-T H5E_t
+-T H5F_create_t
+-T H5F_file_t
+-T H5F_isop_t
+-T H5F_istore_key_t
+-T H5F_istore_ud1_t
+-T H5F_low_class_t
+-T H5F_low_t
+-T H5F_search_t
+-T H5F_t
+-T H5Fget_create_t
+-T H5G_bt_ud1_t
+-T H5G_bt_ud2_t
+-T H5G_cache_t
+-T H5G_cwgstk_t
+-T H5G_entry_t
+-T H5G_node_key_t
+-T H5G_node_t
+-T H5G_t
+-T H5G_type_t
+-T H5H_free_t
+-T H5H_t
+-T H5H_type_t
+-T H5M_find_t
+-T H5O_chunk_t
+-T H5O_class_t
+-T H5O_cont_t
+-T H5O_efl_t
+-T H5O_layout_t
+-T H5O_mesg_t
+-T H5O_name_t
+-T H5O_stab_t
+-T H5O_t
+-T H5P_class_t
+-T H5P_simple_t
+-T H5P_t
+-T H5T_class_t
+-T H5T_conv_t
+-T H5T_cset_t
+-T H5T_member_t
+-T H5T_norm_t
+-T H5T_order_t
+-T H5T_pad_t
+-T H5T_path_t
+-T H5T_sign_t
+-T H5T_soft_t
+-T H5T_str_t
+-T H5T_t
+-T H5Tget_member_t
+-T H5_exit_t
+-T H5_init_t
+-T H5_t
+-T H5_term_t
+-T access_t
+-T atom_group_t
+-T atom_info_t
+-T cache_t
+-T child_t
+-T chunk_t
+-T create_t
+-T data_t
+-T detected_t
+-T group_t
+-T haddr_t
+-T hbool_t
+-T heap_t
+-T herr_t
+-T hid_t
+-T hobjtype_t
+-T hsize_t
+-T hssize_t
+-T ino_t
+-T mem_t
+-T memb_t
+-T mesg_t
+-T message_t
+-T meta_func_t
+-T new_t
+-T off_t
+-T size_t
+-T ssize_t
+-T time_t
diff --git a/src/hdf5-lin.lnt b/src/hdf5-lin.lnt
new file mode 100644
index 0000000..da20937
--- /dev/null
+++ b/src/hdf5-lin.lnt
@@ -0,0 +1,24 @@
+// Define the __func__ macro so we don't get warnings about using it.
+-d__func__="NoFunctionName"
+
+// Needed for gcc assert() macro
+-function(exit,__assert_fail)
+
+// Needed to allow 'long long' with gcc
++fll
+
+// Suppress message about "Constant value boolean" in assert macros
+-emacro(506,assert)
+
+// Turn off warnings about not using the return value from these functions:
+-emacro(534,HDfflush,HDgetrusage,HDgettimeofday,HDputc)
+
+// Turn off warnings about converting an enum to an int
+-emacro(641,H5_INC_ENUM,H5_DEC_ENUM)
+
+// Suppress message about "Expression with side effects passed to repeated parameter 1 in macro 'assert'"
+-esym(666,assert)
+
+// Include shared lint options file
+hdf5.lnt
+
diff --git a/src/hdf5-win.lnt b/src/hdf5-win.lnt
new file mode 100644
index 0000000..350b603
--- /dev/null
+++ b/src/hdf5-win.lnt
@@ -0,0 +1,39 @@
+// Define the __FUNCTION__ so we don't get warnings about using it.
+-d__FUNCTION__="NoFunctionName"
+
+// Turn off warnings about "Ignoring return value of function" for
+// H5open() in public error macros
+-emacro(534, H5Epush_ret, H5Epush_goto)
+
+// Suppress message about "Suspicious cast" in FUNC_ENTER* macros
+-emacro(611,FUNC_ENTER_API,FUNC_ENTER_NOAPI)
+
+// Suppress message about "Boolean within 'if' always evaluates false" in FUNC_ENTER* macros
+-emacro(774,FUNC_ENTER_API,FUNC_ENTER_NOAPI)
+
+// Suppress message about "Static variable found within inline function" in FUNC_ENTER* macros
+-emacro(1534,FUNC_ENTER_NOINIT)
+
+// Suppress message about "Shift right of signed quantity" in H5I_GRP macro
+-emacro(702,H5I_GRP)
+
+// Suppress message about "Constant expression evaluates to 0 in expression" in H5FL_ARR* macros
+-emacro(778,H5FL_ARR_DEFINE_COMMON)
+
+// Suppress message about "Union initialization" in H5FL_ARR* macros
+-emacro(708,H5FL_ARR_DEFINE_COMMON)
+
+// Suppress message about "enum constant not used within defaulted switch"
+-e788
+
+// Indicate functions that are like printf()
+-printf(2,HDfprintf)
+
+// Tell lint about additional printf() format codes that HDfprintf understands
+-printf_code(a,haddr_t)
+-printf_code(Hu,hsize_t)
+-printf_code(Hd,hssize_t)
+-printf_code(Zu,size_t)
+-printf_code(Zd,ssize_t)
+
+
diff --git a/src/hdf5.lnt b/src/hdf5.lnt
new file mode 100644
index 0000000..642698a
--- /dev/null
+++ b/src/hdf5.lnt
@@ -0,0 +1,90 @@
+// Lint options shared by both PC-Lint for Windows and Flexelint for Linux
+
+// Turn off warnings about not using the inlined H5V* functions:
+-esym(528, H5VM_vector_reduce_product, H5VM_vector_inc)
+-esym(528, H5VM_vector_cmp, H5VM_vector_cmp_s, H5VM_vector_cmp_u)
+-esym(528, H5VM_vector_zerop_s, H5VM_vector_zerop_u)
+
+// Suppress message about using 'goto' in a few functions
+-efunc(801,H5_term_library,H5_trace)
+
+// Suppress message about "boolean test of a paranthesized assignment"
+-efunc(820,H5_term_library)
+
+// Suppress message about "Constant value boolean" in FUNC_ENTER* macros
+-emacro(506,FUNC_ENTER_API,FUNC_ENTER_API_NOCLEAR, FUNC_ENTER_NOAPI)
+
+// Suppress message about "Constant value boolean" in TRUE macros
+-emacro(506,TRUE)
+
+// Suppress message about our use of 'goto' in our error macros
+-emacro(801,HGOTO_DONE, H5Epush_goto)
+
+// Turn off warnings about not using the return value from these functions:
+-esym(534, HDfprintf, HDsnprintf, HDvsnprintf)
+-esym(534, H5E_clear_stack, H5E_push_stack)
+-esym(534, H5FL_arr_free, H5FL_blk_free, H5FL_reg_free, H5FL_seq_free)
+-esym(534, H5CS_push, H5CS_pop)
+-esym(534, H5I_clear_type, H5I_dec_type_ref)
+-esym(534, H5MM_xfree)
+-esym(534, H5UC_decr)
+-esym(534, H5VM_array_fill)
+
+
+// Turn off warnings about "Expression-like macro not parenthesized" for
+// enumerated type increment & decrement macros:
+-esym(773, H5_INC_ENUM, H5_DEC_ENUM)
+
+/* So far, the following files have been linted with these options:
+ H5.c
+ H5A.c
+ H5AC.c
+ H5B.c
+
+ H5D.c
+ H5Dcompact.c
+ H5Dcontig.c
+ H5Defl.c
+ H5Dio.c
+ H5Distore.c
+ H5E.c
+ H5F.c
+ H5FD.c
+ H5FDcore.c
+ H5FDfamily.c
+ H5FDlog.c
+ H5FDmulti.c
+ H5FDsec2.c
+ H5FDstdio.c
+ H5FL.c
+ H5FO.c
+
+ H5Tcommit.c
+ H5Tcompound.c
+
+ H5Tcset.c
+ H5Tenum.c
+ H5Tfields.c
+ H5Tfixed.c
+ H5Tfloat.c
+ H5Tnative.c
+ H5Toffset.c
+ H5Topaque.c
+ H5Torder.c
+ H5Tpad.c
+ H5Tprecis.c
+ H5Tstrpad.c
+ H5Tvlen.c
+ H5V.c
+ H5Z.c
+ H5Zdeflate.c
+ H5Zfletcher32.c
+ H5Zshuffle.c
+ H5Zszip.c
+
+ The following files have had their FUNC_ENTER, FUNC_LEAVE & HGOTO*
+ macros cleaned up, but have not been linted
+ due to their dependencies on features that we don't support on Windows:
+ H5FDmpio.c
+ H5FDstream.c
+*/
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/hdf5.git
More information about the Pkg-grass-devel
mailing list