aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2004-05-21 19:08:54 +0000
committerPaolo Bonzini <bonzini@gnu.org>2004-05-21 19:08:54 +0000
commit6bd3dfaaa22d67e2070f89b4c960311842a3faaf (patch)
tree79026774d4f1bdcc4c55fce85ce95d4871a93bff /configure.in
parent734b8fe8d4618b0e7bf87d3f9371c6805b95551d (diff)
downloadfsf-binutils-gdb-6bd3dfaaa22d67e2070f89b4c960311842a3faaf.zip
fsf-binutils-gdb-6bd3dfaaa22d67e2070f89b4c960311842a3faaf.tar.gz
fsf-binutils-gdb-6bd3dfaaa22d67e2070f89b4c960311842a3faaf.tar.bz2
2004-05-21 Paolo Bonzini <bonzini@gnu.org>
* Makefile.tpl: Whenever a recursive target is defined, wrap it in a special @if/@endif block, and prepare its maybe dependency in the @if/@endif block * configure.in: Instead of writing maybe dependencies, remove the @if/@endif statements, and remove the @if/@endif blocks that remain. * configure: Regenerate. * Makefile.in: Regenerate.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in39
1 files changed, 18 insertions, 21 deletions
diff --git a/configure.in b/configure.in
index 1b60f7d..c27fc12 100644
--- a/configure.in
+++ b/configure.in
@@ -1716,31 +1716,28 @@ case "$enable_gdbtk" in
;;
esac
-# Create the 'maybe dependencies'. This uses a temporary file.
+# Strip out unwanted targets.
# While at that, we remove Makefiles if we were started for recursive
# configuration, so that the top-level Makefile reconfigures them,
# like we used to do when configure itself was recursive.
-rm -f maybedep.tmp
-echo '# maybedep.tmp' > maybedep.tmp
-# Make-targets which may need maybe dependencies.
-mts="configure all install check clean distclean dvi info install-info"
-mts="${mts} installcheck mostlyclean maintainer-clean TAGS"
+# Loop over modules. $extrasub must be used with care, limiting as
+# much as possible the usage of range addresses. That's because autoconf
+# splits the sed script to overcome limits in the number of commands,
+# and relying on carefully-timed sed passes may turn out to be very hard
+# to maintain later. In this particular case, you just have to be careful
+# not to nest @if/@endif pairs, because configure will not warn you at all.
-# Loop over modules and make-targets.
for module in ${build_modules} ; do
if test -z "${no_recursion}" \
&& test -f ${build_subdir}/${module}/Makefile; then
echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
rm -f ${build_subdir}/${module}/Makefile
fi
- for mt in ${mts} ; do
- case ${mt} in
- install) ;; # No installing build modules.
- *) echo "maybe-${mt}-build-${module}: ${mt}-build-${module}" >> maybedep.tmp ;;
- esac
- done
+ extrasub="$extrasub
+/^@if build-$module\$/d
+/^@endif build-$module\$/d"
done
for module in ${configdirs} ; do
if test -z "${no_recursion}" \
@@ -1748,9 +1745,9 @@ for module in ${configdirs} ; do
echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
rm -f ${module}/Makefile
fi
- for mt in ${mts} ; do
- echo "maybe-${mt}-${module}: ${mt}-${module}" >> maybedep.tmp
- done
+ extrasub="$extrasub
+/^@if $module\$/d
+/^@endif $module\$/d"
done
for module in ${target_configdirs} ; do
if test -z "${no_recursion}" \
@@ -1758,12 +1755,12 @@ for module in ${target_configdirs} ; do
echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
rm -f ${target_subdir}/${module}/Makefile
fi
- for mt in ${mts} ; do
- echo "maybe-${mt}-target-${module}: ${mt}-target-${module}" >> maybedep.tmp
- done
+ extrasub="$extrasub
+/^@if target-$module\$/d
+/^@endif target-$module\$/d"
done
-maybe_dependencies=maybedep.tmp
-AC_SUBST_FILE(maybe_dependencies)
+extrasub="$extrasub
+/^@if /,/^@endif /d"
# Create the serialization dependencies. This uses a temporary file.