diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2004-05-21 08:00:17 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2004-05-21 08:00:17 +0000 |
commit | 609754920ff466cb720aa317f96b1b7eceb30ad4 (patch) | |
tree | 8e6c5e406cefca8fca79c1868885d3e4022bbb5b /configure.in | |
parent | 082a099ce4d0c306c9af311189e9ae1f8c4cba68 (diff) | |
download | gcc-609754920ff466cb720aa317f96b1b7eceb30ad4.zip gcc-609754920ff466cb720aa317f96b1b7eceb30ad4.tar.gz gcc-609754920ff466cb720aa317f96b1b7eceb30ad4.tar.bz2 |
Makefile.tpl: Whenever a recursive target is defined...
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.
* Makefile.in: Regenerate.
* configure: Regenerate.
From-SVN: r82088
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 39 |
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. |