summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cmakehdf523
-rwxr-xr-xbin/switch_maint_mode83
2 files changed, 104 insertions, 2 deletions
diff --git a/bin/cmakehdf5 b/bin/cmakehdf5
index 6e22e17..ccef469 100755
--- a/bin/cmakehdf5
+++ b/bin/cmakehdf5
@@ -46,6 +46,7 @@ cacheinit=$srcdir/config/cmake/cacheinit.cmake
build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=OFF # C++ interface default off
build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=OFF # Fortran interface default off
build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=ON # High Level interface default on
+build_threadsafe=-DHDF5_ENABLE_THREADSAFE:BOOL=OFF # Threadsafe feature default off
build_testing=-DBUILD_TESTING:BOOL=ON # Build tests default on
build_tools=-DHDF5_BUILD_TOOLS:BOOL=ON # Build tools default on
with_zlib=-DHDF5_ENABLE_Z_LIB_SUPPORT=ON # enable zlib filter default on
@@ -82,6 +83,8 @@ Usage: $progname [<options>]
enable or disable c++ API. Default is off.
--enable-hl | --disable-hl:
enable or disable high level API. Default is on.
+ --enable-threadsafe | --disable-threadsafe:
+ enable or disable threadsafe feature. Default is off
--enable-shared | --disable-shared:
enable or disable shared lib. Default is on.
--enable-tools | --disable-tools:
@@ -148,6 +151,10 @@ INSTALL_HDF5()
$install_file --skip-license $*
;;
Darwin) # Mac OSX DMG file
+ # These steps were a kludge. Need proper support from Cmake engineering.
+ echo Darwin install step needs proper implementation. Quit.
+ return 1
+ #
install_file=HDF5-${version}-Darwin.dmg
test -d hdf5 || mkdir hdf5
basename=`basename $install_file .dmg`
@@ -225,6 +232,12 @@ while [ $# -gt 0 ]; do
--disable-hl)
build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=OFF
;;
+ --enable-threadsafe)
+ build_threadsafe=-DHDF5_ENABLE_THREADSAFE:BOOL=ON
+ ;;
+ --disable-threadsafe)
+ build_threadsafe=-DHDF5_ENABLE_THREADSAFE:BOOL=OFF
+ ;;
--enable-shared)
shared_lib=-DBUILD_SHARED_LIBS:BOOL=ON
;;
@@ -313,8 +326,8 @@ fi
# 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
+ "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:
@@ -326,6 +339,7 @@ STEP "Configure..." \
$build_cpp_lib \
$build_fortran \
$build_hl_lib \
+ $build_threadsafe \
$shared_lib \
$build_testing \
$build_tools \
@@ -343,8 +357,13 @@ 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
+# The implementation of installation is imcomplete (only works for linux).
+# Screen it out for now till it is completed.
+if false; then
# 8. Install with this command:
STEP "Install..." "INSTALL_HDF5" $installlog
+fi
+
# save the last exit code
exit_code=$?
diff --git a/bin/switch_maint_mode b/bin/switch_maint_mode
new file mode 100755
index 0000000..2b62545
--- /dev/null
+++ b/bin/switch_maint_mode
@@ -0,0 +1,83 @@
+#!/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 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@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
+