summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bbrelease1
-rwxr-xr-xbin/chkmanifest16
-rwxr-xr-xbin/cmakehdf5303
-rwxr-xr-xbin/genparser252
-rwxr-xr-xbin/h5vers6
-rwxr-xr-xbin/trace4
6 files changed, 452 insertions, 130 deletions
diff --git a/bin/bbrelease b/bin/bbrelease
index 119dc7a..cb79528 100755
--- a/bin/bbrelease
+++ b/bin/bbrelease
@@ -304,7 +304,6 @@ fi
# Create a manifest that contains only files for distribution.
MANIFEST=$tmpdir/H5_MANIFEST
grep '^\.' MANIFEST | grep -v _DO_NOT_DISTRIBUTE_ >$MANIFEST
-echo "./autogen.sh" >>$MANIFEST
# Prepare the source tree for a release.
#ln -s `pwd` $tmpdir/$HDF5_VERS || exit 1
diff --git a/bin/chkmanifest b/bin/chkmanifest
index 646f815..701b6c4 100755
--- a/bin/chkmanifest
+++ b/bin/chkmanifest
@@ -17,9 +17,12 @@
# Check that all the files in MANIFEST exist and that (if this is a
# SVN checkout) that all the SVN-managed files appear in the
# MANIFEST.
+#
verbose=yes
MANIFEST=/tmp/HD_MANIFEST.$$
+AUTOGEN=./autogen.sh
+AUTOGEN_LOG=/tmp/autogen.log.$$
# Main
test "$verbose" && echo " Checking MANIFEST..." 1>&2
@@ -49,6 +52,19 @@ else
fi
fi
+# Do an autogen if generated files (e.g., configure) is not present
+if [ ! -f configure ]; then
+ echo " running $AUTOGEN -p"
+ $AUTOGEN -p > $AUTOGEN_LOG 2>&1
+ if [ $? -ne 0 ]; then
+ echo $AUTOGEN encountered error. Abort.
+ echo output from $AUTOGEN:
+ cat $AUTOGEN_LOG
+ exit 1
+ fi
+ rm $AUTOGEN_LOG
+fi
+
# Check for duplicate entries. This can be done at any time, but it may as
# well be sooner so that if something else fails the presence of duplicates
# will already be known.
diff --git a/bin/cmakehdf5 b/bin/cmakehdf5
index afd4604..772e54c 100755
--- a/bin/cmakehdf5
+++ b/bin/cmakehdf5
@@ -23,6 +23,7 @@ makelog="#${progname}_2build.log"
testlog="#${progname}_3test.log"
packlog="#${progname}_4pack.log"
installlog="#${progname}_5install.log"
+vflag=1 # verbose flag default to on.
config_summary=libhdf5.settings
exit_code=0
@@ -53,7 +54,10 @@ with_zlib=-DHDF5_ENABLE_Z_LIB_SUPPORT=ON # enable zlib filter default on
with_szlib=-DHDF5_ENABLE_SZIP_SUPPORT=OFF # enables szip filter default off
szlib_path="" # szip lib path default off
shared_lib=-DBUILD_SHARED_LIBS:BOOL=ON # enables shared lib; default on
-
+njobs="" # number of jobs (commands) to
+ # run simultaneously; default is
+ # value from $MAKE if defined,
+ # otherwise none (1)
#=============
# Function definitions
@@ -90,6 +94,11 @@ Usage: $progname [<options>]
Use zlib library for external deflate I/O filter. Default is on.
--with-szlib | --with-szlib=<libpath> | --without-szlib:
Use szlib library for external deflate I/O filter. Default is on.
+ --njobs=<-j N>:
+ number of jobs (commands) to run simultaneously; default is value from
+ $MAKE if defined, otherwise none
+ --enable-verbose | --disable-verbose:
+ enable or disable verbose output. Default is on.
--help: shows details help page
<libpath>: the file path to the library, expect <libpath>/lib and <libpath>/include.
@@ -117,12 +126,12 @@ STEP()
echo "$banner" with output saved in $logfile
(TIMESTAMP; nerror=0 ;
- echo "eval $command"
- eval $command || nerror=1 ;
- TIMESTAMP; exit $nerror) < /dev/null > "$logfile" 2>&1
+ echo "eval $command"
+ eval $command || nerror=1 ;
+ TIMESTAMP; exit $nerror) < /dev/null > "$logfile" 2>&1
if [ $? -ne 0 ]; then
- echo "error in '$banner'. $progname aborted."
- exit 1
+ echo "error in '$banner'. $progname aborted."
+ exit 1
fi
}
@@ -136,28 +145,44 @@ INSTALL_HDF5()
{
myos="`uname -s`"
case "$myos" in
- Linux)
- install_file=./HDF5-${version}-Linux.sh
- $install_file --skip-license $*
- ;;
- Darwin) # Mac OSX DMG file
- install_file=HDF5-${version}-Darwin.dmg
- test -d hdf5 || mkdir hdf5
- basename=`basename $install_file .dmg`
- # mount the DMG file as /Volumes/$basename
- # echo 'Y' as yes for license.
- echo Y | hdiutil mount $install_file
- # copy the contents to the install location
- cp -R "/Volumes/$basename/HDF_Group" hdf5
- # unmount the DMG file
- hdiutil unmount /Volumes/$basename
- ;;
- *) # unknown/unsupported OS.
- echo "INSTALL_HDF5: Error--unknown/unsupported OS($myos)"
- return 1
- ;;
+ Linux)
+ install_file=./HDF5-${version}-Linux.sh
+ $install_file --skip-license $*
+ ;;
+ Darwin) # Mac OSX DMG file
+ install_file=HDF5-${version}-Darwin.dmg
+ test -d hdf5 || mkdir hdf5
+ basename=`basename $install_file .dmg`
+ # mount the DMG file as /Volumes/$basename
+ # echo 'Y' as yes for license.
+ echo Y | hdiutil mount $install_file
+ # copy the contents to the install location
+ cp -R "/Volumes/$basename/HDF_Group" hdf5
+ # unmount the DMG file
+ hdiutil unmount /Volumes/$basename
+ ;;
+ *) # unknown/unsupported OS.
+ echo "INSTALL_HDF5: Error--unknown/unsupported OS($myos)"
+ return 1
+ ;;
esac
- return 0
+}
+
+
+# Print logfiles.
+# $*: logfiles
+DUMP_LOGFILE()
+{
+ for x in $*; do
+ if [ -f $x ]; then
+ echo "=================================="
+ echo "Dumping $x"
+ echo "=================================="
+ cat $x
+ echo "==== END $x ====="
+ echo
+ fi
+ done
}
@@ -168,6 +193,12 @@ INSTALL_HDF5()
# Show a start time stamp
TIMESTAMP
+# Initialize njobs if $AMKE is defined
+if [ -n "$MAKE" ]; then
+ # assume all arguments are for --jobs
+ njobs=`echo $MAKE | cut -s -d' ' -f2-`
+fi
+
# Parse Cmake configure options
# --enable-XXX or --disable-XXX will enable or disable feature XXX.
# XXX can be:
@@ -178,78 +209,88 @@ TIMESTAMP
# tools Build tools
while [ $# -gt 0 ]; do
case "$1" in
- --enable-fortran)
- build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=ON
- ;;
- --disable-fortran)
- build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=OFF
- ;;
- --enable-cxx)
- build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=ON
- ;;
- --disable-cxx)
- build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=OFF
- ;;
- --enable-hl)
- build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=ON
- ;;
- --disable-hl)
- build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=OFF
- ;;
- --enable-shared)
- shared_lib=-DBUILD_SHARED_LIBS:BOOL=ON
- ;;
- --disable-shared)
- shared_lib=-DBUILD_SHARED_LIBS:BOOL=OFF
- ;;
- --enable-tools)
- build_tools=-DHDF5_BUILD_TOOLS:BOOL=ON
- ;;
- --disable-tools)
- build_tools=-DHDF5_BUILD_TOOLS:BOOL=OFF
- ;;
- --enable-testing)
- build_testing=-DBUILD_TESTING:BOOL=ON
- ;;
- --disable-testing)
- build_testing=-DBUILD_TESTING:BOOL=OFF
- ;;
- --with-zlib)
- with_zlib=-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON
- ;;
- --with-zlib=*)
- xarg=`echo $1 | cut -d= -f2-`
- with_zlib="-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON -DZLIB_ROOT=$xarg"
- ;;
- --without-zlib)
- with_zlib=-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF
- ;;
- --with-szlib)
- with_szlib=-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON
- szlib_path="" # szlib is in default paths
- ;;
- --with-szlib=*)
- xarg=`echo $1 | cut -d= -f2-`
- with_szlib="-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON"
- szlib_path="SZIP_INSTALL=$xarg"
- ;;
- --without-szlib)
- with_szlib=-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF
- szlib_path="" # reset the path
- ;;
- --help)
- # print the detail help page and exit
- HELP
- exit 0
- ;;
- *)
- echo "Unknown options: $1"
- HELP
- exit 1
- ;;
+ --enable-fortran)
+ build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=ON
+ ;;
+ --disable-fortran)
+ build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=OFF
+ ;;
+ --enable-cxx)
+ build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=ON
+ ;;
+ --disable-cxx)
+ build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=OFF
+ ;;
+ --enable-hl)
+ build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=ON
+ ;;
+ --disable-hl)
+ build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=OFF
+ ;;
+ --enable-shared)
+ shared_lib=-DBUILD_SHARED_LIBS:BOOL=ON
+ ;;
+ --disable-shared)
+ shared_lib=-DBUILD_SHARED_LIBS:BOOL=OFF
+ ;;
+ --enable-tools)
+ build_tools=-DHDF5_BUILD_TOOLS:BOOL=ON
+ ;;
+ --disable-tools)
+ build_tools=-DHDF5_BUILD_TOOLS:BOOL=OFF
+ ;;
+ --enable-testing)
+ build_testing=-DBUILD_TESTING:BOOL=ON
+ ;;
+ --disable-testing)
+ build_testing=-DBUILD_TESTING:BOOL=OFF
+ ;;
+ --with-zlib)
+ with_zlib=-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON
+ ;;
+ --with-zlib=*)
+ xarg=`echo $1 | cut -d= -f2-`
+ with_zlib="-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON -DZLIB_ROOT=$xarg"
+ ;;
+ --without-zlib)
+ with_zlib=-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF
+ ;;
+ --with-szlib)
+ with_szlib=-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON
+ szlib_path="" # szlib is in default paths
+ ;;
+ --with-szlib=*)
+ xarg=`echo $1 | cut -d= -f2-`
+ with_szlib="-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON"
+ szlib_path="SZIP_INSTALL=$xarg"
+ ;;
+ --without-szlib)
+ with_szlib=-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF
+ szlib_path="" # reset the path
+ ;;
+ --njobs=*)
+ njobs=`echo $1 | cut -d= -f2-`
+ ;;
+ --enable-verbose)
+ vflag=1
+ ;;
+ --disable-verbose)
+ vflag=0
+ ;;
+ --help)
+ # print the detail help page and exit
+ HELP
+ exit 0
+ ;;
+ *)
+ echo "Unknown options: $1"
+ HELP
+ exit 1
+ ;;
esac
shift
done
+$DPRINT after option parsing vflag=$vflag
# Always display the brief help page
HELP_BRIEF
@@ -271,7 +312,13 @@ if [ $? != 0 ]; then
echo $vers failed. Aborted.
exit 1
fi
-echo Running Cmake for HDF5-${version} ...
+
+# setup output of all the log files if verbose is on upon exit
+trap \
+"if [ $vflag -ne 0 ]; then DUMP_LOGFILE \$configlog \$makelog \$testlog \$packlog \$installlog; fi" \
+0
+
+echo Running Cmake for HDF5-${version} ...
# 4. Configure the C library, tools and tests with this command:
# If successful, append the configure summary to the configure logfile.
STEP "Configure..." \
@@ -288,18 +335,17 @@ STEP "Configure..." \
$with_szlib \
$srcdir" $configlog &&\
cat $config_summary >> $configlog
-
+
# 5. Build the C library, tools and tests with this command:
-STEP "Build the library, tools and tests, ..." "cmake --build . --config Release" $makelog
-
+STEP "Build the library, tools and tests, ..." "cmake --build . --config Release -- $njobs" $makelog
+
# 6. Test the C library and tools with this command:
-STEP "Test the library and tools..." "ctest . -C Release" $testlog
-
+STEP "Test the library and tools..." "ctest . -C Release $njobs" $testlog
+
# 7. Create an install image with this command:
STEP "Create an install image..." "cpack -C Release CPackConfig.cmake" $packlog
-
+
# 8. Install with this command:
-#STEP "Install..." "./HDF5-${version}-Linux.sh --skip-license" $installlog
STEP "Install..." "INSTALL_HDF5" $installlog
# save the last exit code
exit_code=$?
@@ -387,7 +433,7 @@ set (SITE_BUILDNAME_SUFFIX "cmakehdf5")
# -- URL set for internal check, default is to not update
set (LOCAL_SKIP_UPDATE TRUE)
set (REPOSITORY_URL "http://svn.${hdfgroup_url}/hdf5/branches/hdf5_1_8")
-# -- Standard build options
+# -- Standard build options
set (ADD_BUILD_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=${CTEST_BINARY_DIRECTORY} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=\"SVN\" -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
# Use multiple CPU cores to build
@@ -401,9 +447,9 @@ if(NOT N EQUAL 0)
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
endif()
-# -----------------------------------------------------------
+# -----------------------------------------------------------
# -- Get environment
-# -----------------------------------------------------------
+# -----------------------------------------------------------
## -- set hostname
## --------------------------
find_program (HOSTNAME_CMD NAMES hostname)
@@ -423,10 +469,10 @@ endif()
else (SITE_BUILDNAME_SUFFIX)
set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
endif (SITE_BUILDNAME_SUFFIX)
-# -----------------------------------------------------------
-
+# -----------------------------------------------------------
+
set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
-
+
#-----------------------------------------------------------------------------
# MAC machines need special option
#-----------------------------------------------------------------------------
@@ -434,21 +480,25 @@ if (APPLE)
# Compiler choice
execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
- SET(ENV{CC} "${XCODE_CC}")
- SET(ENV{CXX} "${XCODE_CXX}")
- # Shared fortran is not supported, build static
+ set(ENV{CC} "${XCODE_CC}")
+ set(ENV{CXX} "${XCODE_CXX}")
+ # Shared fortran is not supported, build static
set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
endif (APPLE)
-# -----------------------------------------------------------
+# -----------------------------------------------------------
find_package (Subversion)
set (CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
-# -- Only clean build folder if LOCAL_CLEAR_BUILD is set
+# -- Only clean build folder if LOCAL_CLEAR_BUILD is set
if (LOCAL_CLEAR_BUILD)
set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
- ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
+ if(NOT EXISTS "${CTEST_BINARY_DIRECTORY}")
+ file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+ else()
+ ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
+ endif()
endif (LOCAL_CLEAR_BUILD)
#-----------------------------------------------------------------------------
@@ -471,7 +521,7 @@ endforeach (req)
## -- set output to english
set($ENV{LC_MESSAGES} "en_EN")
-
+
#-----------------------------------------------------------------------------
# Initialize the CTEST commands
#------------------------------
@@ -494,31 +544,32 @@ foreach (v
endforeach (v)
message ("Dashboard script configuration:\n${vars}\n")
-CTEST_START (${MODEL} TRACK ${MODEL})
+ctest_start (${MODEL} TRACK ${MODEL})
if (NOT LOCAL_SKIP_UPDATE)
- CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
+ ctest_update (SOURCE "${CTEST_SOURCE_DIRECTORY}")
endif (NOT LOCAL_SKIP_UPDATE)
-CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
if(NOT res STREQUAL "0")
message (FATAL_ERROR "Configure FAILED")
endif()
message ("Configure DONE")
-CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
+configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
+ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
+ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
if (NOT LOCAL_NO_SUBMIT)
- CTEST_SUBMIT (PARTS Update Configure Notes)
+ ctest_submit (PARTS Update Configure Notes)
endif (NOT LOCAL_NO_SUBMIT)
-CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res)
+ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res)
if (NOT LOCAL_NO_SUBMIT)
- CTEST_SUBMIT (PARTS Build)
+ ctest_submit (PARTS Build)
endif (NOT LOCAL_NO_SUBMIT)
if(NOT res STREQUAL "0")
message (FATAL_ERROR "Build FAILED")
endif()
message ("build DONE")
if (NOT LOCAL_SKIP_TEST)
- CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
+ ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
if (NOT LOCAL_NO_SUBMIT)
- CTEST_SUBMIT (PARTS Test)
+ ctest_submit (PARTS Test)
endif (NOT LOCAL_NO_SUBMIT)
if(NOT res STREQUAL "0")
message (FATAL_ERROR "Test FAILED")
diff --git a/bin/genparser b/bin/genparser
new file mode 100755
index 0000000..71a8ae2
--- /dev/null
+++ b/bin/genparser
@@ -0,0 +1,252 @@
+#! /bin/bash
+#
+# Copyright by The HDF Group.
+# 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 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@hdfgroup.org.
+#
+
+# This script runs flex/lex and bison/yacc to generate parser code for
+# the high-level library. It used to be a part of autogen.sh, but many
+# people encountered problems with installing flex and bison on their
+# system and the parser code rarely changes, so those parts of the
+# script were moved to their own file.
+#
+# NOTE CAREFULLY!
+#
+# There is NO dependency in either the autotools or CMake to regenerate
+# the parser code. If you modify H5LT analyze.l or H5LTparse.y, you
+# will need to run this scrpit manually on a system with a suitable
+# lexer and parser generator.
+#
+# IMPORTANT OS X NOTE
+#
+# If you are using OS X, you will probably not have flex or bison
+# installed. In addtion, even if you do have bison installed, the bison
+# version you have installed may also have a bug that makes it unable to
+# process our input files.
+#
+# The easiest way to fix this is to install everything via Homebrew:
+#
+# http://brew.sh/
+#
+# After you install the base packages, install flex/bison.
+#
+# brew install flex
+# brew install bison
+#
+# END IMPORTANT OS X NOTE
+#
+# If you want to use a particular version of flex or bison, the paths
+# to each tool can be overridden using the following environment
+# variables:
+#
+# HDF5_FLEX
+# HDF5_BISON
+#
+# This script takes two potential options:
+#
+# -p
+#
+# When this is selected, the flex/bison versions are set to the paths
+# and versions used by The HDF Group to produce the released versions
+# of the library.
+#
+# NOTE: This is probably temporary. Once we update our dev machines
+# to have recent versions of the autotools this option will probably
+# be removed.
+#
+# -v
+#
+# This emits some extra information, mainly tool versions.
+
+echo
+echo "*******************************************"
+echo "* HDF5 high-level parser generator script *"
+echo "*******************************************"
+echo
+
+# Default is not verbose output
+verbose=false
+
+optspec=":hpv-"
+while getopts "$optspec" optchar; do
+ case "${optchar}" in
+ h)
+ echo "usage: $0 [OPTIONS] /path/to/hl/src/directory"
+ echo
+ echo " -h Print this help message."
+ echo
+ echo " -p Used by THG to use hard-codes flex/bison"
+ echo " paths on THG machines. Not for non-HDF-Group"
+ echo " users!"
+ echo
+ echo " -v Show more verbose output."
+ echo
+ echo " NOTE: Each tool can be set via an environment variable."
+ echo " These are documented inside this script."
+ echo
+ exit 0
+ ;;
+ p)
+ echo "Setting THG production mode..."
+ echo
+ production=true
+ ;;
+ v)
+ echo "Setting verbosity: high"
+ echo
+ verbose=true
+ ;;
+ *)
+ if [ "$OPTERR" != 1 ] || [ "${optspec:0:1}" = ":" ]; then
+ echo "Non-option argument: '-${OPTARG}'" >&2
+ fi
+ ;;
+ esac
+done
+
+# Get the path to the hl src directory
+shift $(($OPTIND - 1))
+path_to_hl_src=$1
+if test -z ${path_to_hl_src}; then
+ echo "*** ERROR *** - Path to hl/src not set"
+ echo "Please add the path to the hl/src directory as a parameter"
+ echo "See $0 -h for more help."
+ echo
+ exit -1
+fi
+
+if [ "$production" = true ] ; then
+
+ # Production mode
+ #
+ # Hard-code canonical HDF Group tool locations.
+
+ # If paths to tools are not specified, assume they are
+ # located in /usr/hdf/bin/AUTOTOOLS and set paths accordingly.
+ if test -z ${HDF5_BISON}; then
+ HDF5_BISON=/usr/hdf/bin/AUTOTOOLS/bison
+ fi
+ if test -z ${HDF5_FLEX}; then
+ HDF5_FLEX=/usr/hdf/bin/AUTOTOOLS/flex
+ fi
+
+else
+
+ # Not in production mode
+ #
+ # If paths to autotools are not specified, use whatever the system
+ # has installed as the default. We use 'which <tool>' to
+ # show exactly what's being used.
+ if test -z ${HDF5_BISON}; then
+ HDF5_BISON=$(which bison)
+ fi
+ if test -z ${HDF5_FLEX}; then
+ HDF5_FLEX=$(which flex)
+ fi
+
+fi # production
+
+# Make sure that these versions of the tools are in the path
+BISON_DIR=`dirname ${HDF5_BISON}`
+FLEX_DIR=`dirname ${HDF5_FLEX}`
+PATH=${FLEX_DIR}:${BISON_DIR}:$PATH
+
+# Run flex and bison
+# automatically generates hl/src/H5LTanalyze.c and hl/src/H5LTparse.c
+# Note that, as of Xcode 6.1 (2015), the default bison version on OS X
+# is old enough to have the circular dependency bug. You'll have
+# to install a later version of bison. See the OS X note at the top
+# of this script.
+echo
+echo "Generating H5LT parser code (requires yacc/bison):"
+echo "Generate hl/src/H5LTparse.c from hl/src/H5LTparse.y"
+# HDF5_BISON is set via the environment or 'which bison', above
+if test -z ${HDF5_BISON}; then
+ echo
+ echo "*************************"
+ echo " ERROR - bison not found"
+ echo "*************************"
+ echo "bison is required to generate parser code in H5LT"
+ echo
+ exit 127
+fi
+if [ "$verbose" = true ] ; then
+ ${HDF5_BISON} --version
+fi
+${HDF5_BISON} -pH5LTyy -o ${path_to_hl_src}/H5LTparse.c -d ${path_to_hl_src}/H5LTparse.y
+
+echo
+echo "Generating H5LT lexer code (requires lex/flex):"
+echo "Generate hl/src/H5LTanalyze.c from hl/src/H5LTanalyze.l"
+# HDF5_FLEX is set via the environment or 'which flex', above
+if test -z ${HDF5_FLEX}; then
+ echo
+ echo "************************"
+ echo " ERROR - flex not found"
+ echo "************************"
+ echo "flex is required to generate lexer code in H5LT"
+ echo
+ exit 127
+fi
+if [ "$verbose" = true ] ; then
+ ${HDF5_FLEX} --version
+fi
+${HDF5_FLEX} --nounistd -PH5LTyy -o ${path_to_hl_src}/H5LTanalyze.c ${path_to_hl_src}/H5LTanalyze.l
+
+# fix H5LTparse.c to declare H5LTyyparse return type as an hid_t
+# instead of int. Currently the generated function H5LTyyparse is
+# generated with a return value of type int, which is a mapping to the
+# flex yyparse function. The return value in the HL library should be
+# an hid_t.
+# I propose to not use flex to generate this function, but for now I am
+# adding a perl command to find and replace this function declaration in
+# H5LTparse.c.
+perl -0777 -pi -e 's/int yyparse/hid_t yyparse/igs' ${path_to_hl_src}/H5LTparse.c
+perl -0777 -pi -e 's/int\nyyparse/hid_t\nyyparse/igs' ${path_to_hl_src}/H5LTparse.c
+perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' ${path_to_hl_src}/H5LTparse.c
+
+# Add code that disables warnings in the flex/bison-generated code.
+#
+# Note that the GCC pragmas did not exist until gcc 4.2. Earlier versions
+# will simply ignore them, but we want to avoid those warnings.
+for f in ${path_to_hl_src}/H5LTparse.c ${path_to_hl_src}/H5LTanalyze.c
+do
+ echo '#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2 ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wconversion" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wimplicit-function-declaration" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wmissing-prototypes" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wnested-externs" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wold-style-definition" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wredundant-decls" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wsign-compare" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wsign-conversion" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wstrict-overflow" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wstrict-prototypes" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wswitch-default" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wunused-function" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wunused-macros" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wunused-parameter" ' >> tmp.out
+ echo '#elif defined __SUNPRO_CC ' >> tmp.out
+ echo '#pragma disable_warn ' >> tmp.out
+ echo '#elif defined _MSC_VER ' >> tmp.out
+ echo '#pragma warning(push, 1) ' >> tmp.out
+ echo '#endif ' >> tmp.out
+
+ cat $f >> tmp.out
+ mv tmp.out $f
+done
+
+echo
+exit 0
+
diff --git a/bin/h5vers b/bin/h5vers
index 2fe9105..7e61dc8 100755
--- a/bin/h5vers
+++ b/bin/h5vers
@@ -377,12 +377,12 @@ sub gen_configure {
$conf =~ /^(.*?)\/?configure.ac$/;
if ($1) {
- $rc = system("cd $1 && bin/reconfigure >/dev/null 2>/dev/null && rm -rf autom4te.cache");
+ $rc = system("cd $1 && ./autogen.sh -p >/dev/null 2>/dev/null && rm -rf autom4te.cache");
} else {
- $rc = system("bin/reconfigure >/dev/null 2>/dev/null && rm -rf autom4te.cache");
+ $rc = system("./autogen.sh -p >/dev/null 2>/dev/null && rm -rf autom4te.cache");
}
if ($rc) {
- printf("bin/reconfigure failed with exit code %d. Aborted.\n", $rc);
+ printf("./autogen.sh -p failed with exit code %d. Aborted.\n", $rc);
exit 1;
}
}
diff --git a/bin/trace b/bin/trace
index deed3bc..05d3186 100755
--- a/bin/trace
+++ b/bin/trace
@@ -37,6 +37,7 @@ $Source = "";
"H5D_fill_value_t" => "DF",
"H5FD_mpio_chunk_opt_t" => "Dh",
"H5D_mpio_actual_io_mode_t" => "Di",
+ "H5D_chunk_index_t" => "Dk",
"H5D_layout_t" => "Dl",
"H5D_mpio_no_collective_cause_t" => "Dn",
"H5D_mpio_actual_chunk_opt_mode_t" => "Do",
@@ -101,6 +102,7 @@ $Source = "";
"H5A_operator2_t" => "x",
"H5A_info_t" => "x",
"H5AC_cache_config_t" => "x",
+ "H5D_append_cb_t" => "x",
"H5D_gather_func_t" => "x",
"H5D_operator_t" => "x",
"H5D_scatter_func_t" => "x",
@@ -110,8 +112,10 @@ $Source = "";
"H5E_walk_t" => "x",
"H5E_walk1_t" => "x",
"H5E_walk2_t" => "x",
+ "H5F_flush_cb_t" => "x",
"H5F_info1_t" => "x",
"H5F_info2_t" => "x",
+ "H5F_retry_info_t" => "x",
"H5FD_t" => "x",
"H5FD_class_t" => "x",
"H5FD_stream_fapl_t" => "x",