diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2020-12-18 20:31:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-18 20:31:19 (GMT) |
commit | 179dfd5a25e183ce1139c79e51ec28bffa7694b6 (patch) | |
tree | 8e4e57bdc5a7d38d8b6cfa36cd8a586e2e46b5ff /bin/switch_maint_mode | |
parent | 353665f95e57a393070ae854685025e6bc7585e7 (diff) | |
download | hdf5-179dfd5a25e183ce1139c79e51ec28bffa7694b6.zip hdf5-179dfd5a25e183ce1139c79e51ec28bffa7694b6.tar.gz hdf5-179dfd5a25e183ce1139c79e51ec28bffa7694b6.tar.bz2 |
Restores maintainer mode in the autotools (#200) (#204)
* close #195. (#196)
* Update HDF5PluginMacros.cmake
* Update HDF5PluginMacros.cmake
* Restores maintainer mode in the autotools (#200)
Maintainer mode should be enabled in development branches.
Also adds helpful commenting.
Add script bin/switch_maint_mode.
Add file changes generated by bin reconfigure in
src/H5Edefin.h
src/H5Einit.h
src/H5Epubgen.h
src/H5Eterm.h
* Update MANIFEST for switch_maint_mode.
Co-authored-by: H. Joe Lee <hyoklee@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Diffstat (limited to 'bin/switch_maint_mode')
-rwxr-xr-x | bin/switch_maint_mode | 81 |
1 files changed, 81 insertions, 0 deletions
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@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 + |