< prev index next >
make/autoconf/configure
Print this page
*** 1,8 ****
#!/bin/bash
#
! # Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
--- 1,8 ----
#!/bin/bash
#
! # Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
*** 44,57 ****
export CONFIG_SHELL=$BASH
export _as_can_reexec=no
conf_script_dir="$TOPDIR/make/autoconf"
! if [ "$CUSTOM_CONFIG_DIR" = "" ]; then
! conf_custom_script_dir="$TOPDIR/closed/autoconf"
! else
! conf_custom_script_dir="$CUSTOM_CONFIG_DIR"
fi
###
### Test that the generated configure is up-to-date
###
--- 44,59 ----
export CONFIG_SHELL=$BASH
export _as_can_reexec=no
conf_script_dir="$TOPDIR/make/autoconf"
! if test "x$CUSTOM_CONFIG_DIR" != x; then
! if test ! -e $CUSTOM_CONFIG_DIR/generated-configure.sh; then
! echo "CUSTOM_CONFIG_DIR not pointing to a proper custom config dir."
! echo "Error: Cannot continue" 1>&2
! exit 1
! fi
fi
###
### Test that the generated configure is up-to-date
###
*** 74,87 ****
echo "Warning: The configure source files is newer than the generated files."
run_autogen_or_fail
fi
done
! if test -e $conf_custom_script_dir/generated-configure.sh; then
# If custom source configure is available, make sure it is up-to-date as well.
! for file in $conf_script_dir/configure.ac $conf_script_dir/*.m4 $conf_custom_script_dir/*.m4; do
! if test $file -nt $conf_custom_script_dir/generated-configure.sh; then
echo "Warning: The configure source files is newer than the custom generated files."
run_autogen_or_fail
fi
done
fi
--- 76,89 ----
echo "Warning: The configure source files is newer than the generated files."
run_autogen_or_fail
fi
done
! if test "x$CUSTOM_CONFIG_DIR" != x; then
# If custom source configure is available, make sure it is up-to-date as well.
! for file in $conf_script_dir/configure.ac $conf_script_dir/*.m4 $CUSTOM_CONFIG_DIR/*.m4; do
! if test $file -nt $CUSTOM_CONFIG_DIR/generated-configure.sh; then
echo "Warning: The configure source files is newer than the custom generated files."
run_autogen_or_fail
fi
done
fi
*** 91,105 ****
if test "x`which hg 2> /dev/null | grep -v '^no hg in'`" != x; then
conf_updated_autoconf_files=`cd $conf_script_dir && hg status -mard 2> /dev/null | grep autoconf`
if test "x$conf_updated_autoconf_files" != x; then
echo "Configure source code has been updated, checking time stamps"
check_autoconf_timestamps
! fi
!
! if test -e $conf_custom_script_dir; then
# If custom source configure is available, make sure it is up-to-date as well.
! conf_custom_updated_autoconf_files=`cd $conf_custom_script_dir && hg status -mard 2> /dev/null | grep autoconf`
if test "x$conf_custom_updated_autoconf_files" != x; then
echo "Configure custom source code has been updated, checking time stamps"
check_autoconf_timestamps
fi
fi
--- 93,105 ----
if test "x`which hg 2> /dev/null | grep -v '^no hg in'`" != x; then
conf_updated_autoconf_files=`cd $conf_script_dir && hg status -mard 2> /dev/null | grep autoconf`
if test "x$conf_updated_autoconf_files" != x; then
echo "Configure source code has been updated, checking time stamps"
check_autoconf_timestamps
! elif test "x$CUSTOM_CONFIG_DIR" != x; then
# If custom source configure is available, make sure it is up-to-date as well.
! conf_custom_updated_autoconf_files=`cd $CUSTOM_CONFIG_DIR && hg status -mard 2> /dev/null | grep autoconf`
if test "x$conf_custom_updated_autoconf_files" != x; then
echo "Configure custom source code has been updated, checking time stamps"
check_autoconf_timestamps
fi
fi
*** 107,121 ****
}
# Check for local changes
check_hg_updates
! if test -e $conf_custom_script_dir/generated-configure.sh; then
# Test if open configure is newer than custom configure, if so, custom needs to
# be regenerated. This test is required to ensure consistency with custom source.
conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED= $conf_script_dir/generated-configure.sh | cut -d"=" -f 2`
! conf_custom_configure_timestamp=`grep DATE_WHEN_GENERATED= $conf_custom_script_dir/generated-configure.sh | cut -d"=" -f 2`
if test $conf_open_configure_timestamp -gt $conf_custom_configure_timestamp; then
echo "Warning: The generated configure file contains changes not present in the custom generated file."
run_autogen_or_fail
fi
fi
--- 107,121 ----
}
# Check for local changes
check_hg_updates
! if test "x$CUSTOM_CONFIG_DIR" != x; then
# Test if open configure is newer than custom configure, if so, custom needs to
# be regenerated. This test is required to ensure consistency with custom source.
conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED= $conf_script_dir/generated-configure.sh | cut -d"=" -f 2`
! conf_custom_configure_timestamp=`grep DATE_WHEN_GENERATED= $CUSTOM_CONFIG_DIR/generated-configure.sh | cut -d"=" -f 2`
if test $conf_open_configure_timestamp -gt $conf_custom_configure_timestamp; then
echo "Warning: The generated configure file contains changes not present in the custom generated file."
run_autogen_or_fail
fi
fi
*** 239,252 ****
conf_processed_arguments=("--enable-option-checking=fatal" "${conf_processed_arguments[@]}")
###
### Call the configure script
###
! if test -e $conf_custom_script_dir/generated-configure.sh; then
# Custom source configure available; run that instead
echo "Running custom generated-configure.sh"
! conf_script_to_run=$conf_custom_script_dir/generated-configure.sh
else
echo "Running generated-configure.sh"
conf_script_to_run=$conf_script_dir/generated-configure.sh
fi
--- 239,252 ----
conf_processed_arguments=("--enable-option-checking=fatal" "${conf_processed_arguments[@]}")
###
### Call the configure script
###
! if test "x$CUSTOM_CONFIG_DIR" != x; then
# Custom source configure available; run that instead
echo "Running custom generated-configure.sh"
! conf_script_to_run=$CUSTOM_CONFIG_DIR/generated-configure.sh
else
echo "Running generated-configure.sh"
conf_script_to_run=$conf_script_dir/generated-configure.sh
fi
< prev index next >