From efb71006a6e6d72966446e6fc35dec2960a07e58 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 27 May 2001 17:06:30 +0000 Subject: [PATCH] * automake.in (handle_multilib): Only add multilib support code at top level. * lib/am/multilib.am: Handle invocation of *-multi targets differently for SUBDIRS and non-SUBDIRS Makefiles. * m4/multi.m4 (AM_ENABLE_MULTILIB): Removed erroneous comment. Only add multilib code when the Makefile in question is actually rebuilt. --- ChangeLog | 8 ++++++++ automake.in | 7 ++++--- lib/am/multilib.am | 17 ++++++++++++++--- m4/multi.m4 | 12 +++++++----- 4 files changed, 33 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 31a59f0d..6d12b0b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2001-05-27 Tom Tromey + * automake.in (handle_multilib): Only add multilib support code at + top level. + * lib/am/multilib.am: Handle invocation of *-multi targets + differently for SUBDIRS and non-SUBDIRS Makefiles. + * m4/multi.m4 (AM_ENABLE_MULTILIB): Removed erroneous comment. + Only add multilib code when the Makefile in question is actually + rebuilt. + * lib/am/dejagnu.am (check-DEJAGNU): Added AM_RUNTESTFLAGS. 2001-05-25 Alexandre Duret-Lutz diff --git a/automake.in b/automake.in index 9be3fc3a..091ea491 100755 --- a/automake.in +++ b/automake.in @@ -3117,9 +3117,10 @@ sub handle_tags # Handle multilib support. sub handle_multilib { - return unless $seen_multilib; - - $output_rules .= &file_contents ('multilib'); + if ($seen_multilib && $relative_dir eq '.') + { + $output_rules .= &file_contents ('multilib'); + } } diff --git a/lib/am/multilib.am b/lib/am/multilib.am index 9ff16eb9..18df4311 100644 --- a/lib/am/multilib.am +++ b/lib/am/multilib.am @@ -30,6 +30,13 @@ install-multi: .PHONY: all-multi install-multi +if %?SUBDIRS% +all-recursive: all-multi +install-recursive: install-multi +else !%?SUBDIRS% +all-am: all-multi +install-am: install-multi +endif !%?SUBDIRS% mostlyclean-am: mostlyclean-multi clean-am: clean-multi @@ -48,10 +55,14 @@ maintainer-clean-multi: .PHONY: mostlyclean-multi clean-multi distclean-multi maintainer-clean-multi -## FIXME: this is probably broken. -all-recursive: all-multi -install-recursive: install-multi +if %?SUBDIRS% mostlyclean-recursive: mostlyclean-multi clean-recursive: clean-multi distclean-recursive: distclean-multi maintainer-clean-recursive: maintainer-clean-multi +else !%?SUBDIRS% +mostlyclean-am: mostlyclean-multi +clean-am: clean-multi +distclean-am: distclean-multi +maintainer-clean-am: maintainer-clean-multi +endif !%?SUBDIRS% diff --git a/m4/multi.m4 b/m4/multi.m4 index b0fc4e35..447fe621 100644 --- a/m4/multi.m4 +++ b/m4/multi.m4 @@ -29,11 +29,13 @@ fi AC_SUBST(multi_basedir) AC_OUTPUT_COMMANDS([ -if test -n "$CONFIG_FILES"; then - # FIXME: Something is really fishy here, the dot looks like Perl - # code. What was meant? Clearly, this code has never been exercised. - ac_file=ifelse([$1],,Makefile,[$1]) . ${multi_basedir}/config-ml.in -fi], +# Only add multilib support code if we just rebuilt the top-level +# Makefile. +case " $CONFIG_FILES " in + *" ifelse([$1],,Makefile,[$1]) "*) + ac_file=ifelse([$1],,Makefile,[$1]) . ${multi_basedir}/config-ml.in + ;; +esac], [ srcdir="$srcdir" host="$host" -- 2.43.5