Fix toplevel config.status for HP-UX sed.
/: * configure.ac: Do not use $extrasub for replacing @if/@endif parts in Makefile; instead, use additional arguments to AC_CONFIG_COMMANDS to do the replacement manually, with several sed invocations, to avoid HP-UX sed command limits. * configure: Regenerate.
This commit is contained in:
parent
fbfaaae50b
commit
06a51eac44
3 changed files with 62 additions and 21 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2009-09-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||||
|
|
||||||
|
* configure.ac: Do not use $extrasub for replacing @if/@endif
|
||||||
|
parts in Makefile; instead, use additional arguments to
|
||||||
|
AC_CONFIG_COMMANDS to do the replacement manually, with several
|
||||||
|
sed invocations, to avoid HP-UX sed command limits.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
2009-09-04 Alexandre Oliva <aoliva@redhat.com>
|
2009-09-04 Alexandre Oliva <aoliva@redhat.com>
|
||||||
|
|
||||||
* configure.ac (with-build-config): Document. Handle without.
|
* configure.ac (with-build-config): Document. Handle without.
|
||||||
|
|
40
configure
vendored
40
configure
vendored
|
@ -6519,12 +6519,13 @@ INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
|
||||||
# configuration, so that the top-level Makefile reconfigures them,
|
# configuration, so that the top-level Makefile reconfigures them,
|
||||||
# like we used to do when configure itself was recursive.
|
# like we used to do when configure itself was recursive.
|
||||||
|
|
||||||
# Loop over modules. $extrasub must be used with care, limiting as
|
# Loop over modules. We used to use the "$extrasub" feature from Autoconf
|
||||||
# much as possible the usage of range addresses. That's because autoconf
|
# but now we're fixing up the Makefile ourselves with the additional
|
||||||
# splits the sed script to overcome limits in the number of commands,
|
# commands passed to AC_CONFIG_FILES. Use separate variables
|
||||||
# and relying on carefully-timed sed passes may turn out to be very hard
|
# extrasub-{build,host,target} not because there is any reason to split
|
||||||
# to maintain later. In this particular case, you just have to be careful
|
# the substitutions up that way, but only to remain below the limit of
|
||||||
# not to nest @if/@endif pairs, because configure will not warn you at all.
|
# 99 commands in a script, for HP-UX sed.
|
||||||
|
# Do not nest @if/@endif pairs, because configure will not warn you at all.
|
||||||
|
|
||||||
# Check whether --enable-bootstrap was given.
|
# Check whether --enable-bootstrap was given.
|
||||||
if test "${enable_bootstrap+set}" = set; then :
|
if test "${enable_bootstrap+set}" = set; then :
|
||||||
|
@ -6620,18 +6621,20 @@ fi
|
||||||
$as_echo "$BUILD_CONFIG" >&6; }
|
$as_echo "$BUILD_CONFIG" >&6; }
|
||||||
|
|
||||||
|
|
||||||
|
extrasub_build=
|
||||||
for module in ${build_configdirs} ; do
|
for module in ${build_configdirs} ; do
|
||||||
if test -z "${no_recursion}" \
|
if test -z "${no_recursion}" \
|
||||||
&& test -f ${build_subdir}/${module}/Makefile; then
|
&& test -f ${build_subdir}/${module}/Makefile; then
|
||||||
echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
|
echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
|
||||||
rm -f ${build_subdir}/${module}/Makefile
|
rm -f ${build_subdir}/${module}/Makefile
|
||||||
fi
|
fi
|
||||||
extrasub="$extrasub
|
extrasub_build="$extrasub_build
|
||||||
/^@if build-$module\$/d
|
/^@if build-$module\$/d
|
||||||
/^@endif build-$module\$/d
|
/^@endif build-$module\$/d
|
||||||
/^@if build-$module-$bootstrap_suffix\$/d
|
/^@if build-$module-$bootstrap_suffix\$/d
|
||||||
/^@endif build-$module-$bootstrap_suffix\$/d"
|
/^@endif build-$module-$bootstrap_suffix\$/d"
|
||||||
done
|
done
|
||||||
|
extrasub_host=
|
||||||
for module in ${configdirs} ; do
|
for module in ${configdirs} ; do
|
||||||
if test -z "${no_recursion}"; then
|
if test -z "${no_recursion}"; then
|
||||||
for file in stage*-${module}/Makefile prev-${module}/Makefile ${module}/Makefile; do
|
for file in stage*-${module}/Makefile prev-${module}/Makefile ${module}/Makefile; do
|
||||||
|
@ -6641,12 +6644,13 @@ for module in ${configdirs} ; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
extrasub="$extrasub
|
extrasub_host="$extrasub_host
|
||||||
/^@if $module\$/d
|
/^@if $module\$/d
|
||||||
/^@endif $module\$/d
|
/^@endif $module\$/d
|
||||||
/^@if $module-$bootstrap_suffix\$/d
|
/^@if $module-$bootstrap_suffix\$/d
|
||||||
/^@endif $module-$bootstrap_suffix\$/d"
|
/^@endif $module-$bootstrap_suffix\$/d"
|
||||||
done
|
done
|
||||||
|
extrasub_target=
|
||||||
for module in ${target_configdirs} ; do
|
for module in ${target_configdirs} ; do
|
||||||
if test -z "${no_recursion}" \
|
if test -z "${no_recursion}" \
|
||||||
&& test -f ${target_subdir}/${module}/Makefile; then
|
&& test -f ${target_subdir}/${module}/Makefile; then
|
||||||
|
@ -6660,14 +6664,15 @@ for module in ${target_configdirs} ; do
|
||||||
*) target_bootstrap_suffix=no-bootstrap ;;
|
*) target_bootstrap_suffix=no-bootstrap ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
extrasub="$extrasub
|
extrasub_target="$extrasub_target
|
||||||
/^@if target-$module\$/d
|
/^@if target-$module\$/d
|
||||||
/^@endif target-$module\$/d
|
/^@endif target-$module\$/d
|
||||||
/^@if target-$module-$target_bootstrap_suffix\$/d
|
/^@if target-$module-$target_bootstrap_suffix\$/d
|
||||||
/^@endif target-$module-$target_bootstrap_suffix\$/d"
|
/^@endif target-$module-$target_bootstrap_suffix\$/d"
|
||||||
done
|
done
|
||||||
|
|
||||||
extrasub="$extrasub
|
# Do the final fixup along with target modules.
|
||||||
|
extrasub_target="$extrasub_target
|
||||||
/^@if /,/^@endif /d"
|
/^@if /,/^@endif /d"
|
||||||
|
|
||||||
# Create the serialization dependencies. This uses a temporary file.
|
# Create the serialization dependencies. This uses a temporary file.
|
||||||
|
@ -14036,6 +14041,13 @@ _ASBOX
|
||||||
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
|
#
|
||||||
|
# INIT-COMMANDS
|
||||||
|
#
|
||||||
|
extrasub_build="$extrasub_build"
|
||||||
|
extrasub_host="$extrasub_host"
|
||||||
|
extrasub_target="$extrasub_target"
|
||||||
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||||
|
@ -14491,6 +14503,14 @@ which seems to be undefined. Please make sure it is defined." >&2;}
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
case $ac_file$ac_mode in
|
||||||
|
"Makefile":F) sed "$extrasub_build" Makefile |
|
||||||
|
sed "$extrasub_host" |
|
||||||
|
sed "$extrasub_target" > mf$$
|
||||||
|
mv -f mf$$ Makefile ;;
|
||||||
|
|
||||||
|
esac
|
||||||
done # for ac_tag
|
done # for ac_tag
|
||||||
|
|
||||||
|
|
||||||
|
|
35
configure.ac
35
configure.ac
|
@ -2410,12 +2410,13 @@ INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
|
||||||
# configuration, so that the top-level Makefile reconfigures them,
|
# configuration, so that the top-level Makefile reconfigures them,
|
||||||
# like we used to do when configure itself was recursive.
|
# like we used to do when configure itself was recursive.
|
||||||
|
|
||||||
# Loop over modules. $extrasub must be used with care, limiting as
|
# Loop over modules. We used to use the "$extrasub" feature from Autoconf
|
||||||
# much as possible the usage of range addresses. That's because autoconf
|
# but now we're fixing up the Makefile ourselves with the additional
|
||||||
# splits the sed script to overcome limits in the number of commands,
|
# commands passed to AC_CONFIG_FILES. Use separate variables
|
||||||
# and relying on carefully-timed sed passes may turn out to be very hard
|
# extrasub-{build,host,target} not because there is any reason to split
|
||||||
# to maintain later. In this particular case, you just have to be careful
|
# the substitutions up that way, but only to remain below the limit of
|
||||||
# not to nest @if/@endif pairs, because configure will not warn you at all.
|
# 99 commands in a script, for HP-UX sed.
|
||||||
|
# Do not nest @if/@endif pairs, because configure will not warn you at all.
|
||||||
|
|
||||||
AC_ARG_ENABLE([bootstrap],
|
AC_ARG_ENABLE([bootstrap],
|
||||||
[ --enable-bootstrap enable bootstrapping @<:@yes if native build@:>@],,
|
[ --enable-bootstrap enable bootstrapping @<:@yes if native build@:>@],,
|
||||||
|
@ -2502,18 +2503,20 @@ fi
|
||||||
AC_MSG_RESULT($BUILD_CONFIG)
|
AC_MSG_RESULT($BUILD_CONFIG)
|
||||||
AC_SUBST(BUILD_CONFIG)
|
AC_SUBST(BUILD_CONFIG)
|
||||||
|
|
||||||
|
extrasub_build=
|
||||||
for module in ${build_configdirs} ; do
|
for module in ${build_configdirs} ; do
|
||||||
if test -z "${no_recursion}" \
|
if test -z "${no_recursion}" \
|
||||||
&& test -f ${build_subdir}/${module}/Makefile; then
|
&& test -f ${build_subdir}/${module}/Makefile; then
|
||||||
echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
|
echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
|
||||||
rm -f ${build_subdir}/${module}/Makefile
|
rm -f ${build_subdir}/${module}/Makefile
|
||||||
fi
|
fi
|
||||||
extrasub="$extrasub
|
extrasub_build="$extrasub_build
|
||||||
/^@if build-$module\$/d
|
/^@if build-$module\$/d
|
||||||
/^@endif build-$module\$/d
|
/^@endif build-$module\$/d
|
||||||
/^@if build-$module-$bootstrap_suffix\$/d
|
/^@if build-$module-$bootstrap_suffix\$/d
|
||||||
/^@endif build-$module-$bootstrap_suffix\$/d"
|
/^@endif build-$module-$bootstrap_suffix\$/d"
|
||||||
done
|
done
|
||||||
|
extrasub_host=
|
||||||
for module in ${configdirs} ; do
|
for module in ${configdirs} ; do
|
||||||
if test -z "${no_recursion}"; then
|
if test -z "${no_recursion}"; then
|
||||||
for file in stage*-${module}/Makefile prev-${module}/Makefile ${module}/Makefile; do
|
for file in stage*-${module}/Makefile prev-${module}/Makefile ${module}/Makefile; do
|
||||||
|
@ -2523,12 +2526,13 @@ for module in ${configdirs} ; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
extrasub="$extrasub
|
extrasub_host="$extrasub_host
|
||||||
/^@if $module\$/d
|
/^@if $module\$/d
|
||||||
/^@endif $module\$/d
|
/^@endif $module\$/d
|
||||||
/^@if $module-$bootstrap_suffix\$/d
|
/^@if $module-$bootstrap_suffix\$/d
|
||||||
/^@endif $module-$bootstrap_suffix\$/d"
|
/^@endif $module-$bootstrap_suffix\$/d"
|
||||||
done
|
done
|
||||||
|
extrasub_target=
|
||||||
for module in ${target_configdirs} ; do
|
for module in ${target_configdirs} ; do
|
||||||
if test -z "${no_recursion}" \
|
if test -z "${no_recursion}" \
|
||||||
&& test -f ${target_subdir}/${module}/Makefile; then
|
&& test -f ${target_subdir}/${module}/Makefile; then
|
||||||
|
@ -2542,14 +2546,15 @@ for module in ${target_configdirs} ; do
|
||||||
*) target_bootstrap_suffix=no-bootstrap ;;
|
*) target_bootstrap_suffix=no-bootstrap ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
extrasub="$extrasub
|
extrasub_target="$extrasub_target
|
||||||
/^@if target-$module\$/d
|
/^@if target-$module\$/d
|
||||||
/^@endif target-$module\$/d
|
/^@endif target-$module\$/d
|
||||||
/^@if target-$module-$target_bootstrap_suffix\$/d
|
/^@if target-$module-$target_bootstrap_suffix\$/d
|
||||||
/^@endif target-$module-$target_bootstrap_suffix\$/d"
|
/^@endif target-$module-$target_bootstrap_suffix\$/d"
|
||||||
done
|
done
|
||||||
|
|
||||||
extrasub="$extrasub
|
# Do the final fixup along with target modules.
|
||||||
|
extrasub_target="$extrasub_target
|
||||||
/^@if /,/^@endif /d"
|
/^@if /,/^@endif /d"
|
||||||
|
|
||||||
# Create the serialization dependencies. This uses a temporary file.
|
# Create the serialization dependencies. This uses a temporary file.
|
||||||
|
@ -3167,4 +3172,12 @@ case "$target" in
|
||||||
esac
|
esac
|
||||||
AC_SUBST(compare_exclusions)
|
AC_SUBST(compare_exclusions)
|
||||||
|
|
||||||
AC_OUTPUT(Makefile)
|
AC_CONFIG_FILES([Makefile],
|
||||||
|
[sed "$extrasub_build" Makefile |
|
||||||
|
sed "$extrasub_host" |
|
||||||
|
sed "$extrasub_target" > mf$$
|
||||||
|
mv -f mf$$ Makefile],
|
||||||
|
[extrasub_build="$extrasub_build"
|
||||||
|
extrasub_host="$extrasub_host"
|
||||||
|
extrasub_target="$extrasub_target"])
|
||||||
|
AC_OUTPUT
|
||||||
|
|
Loading…
Reference in a new issue