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.
2001-05-27 Tom Tromey <tromey@redhat.com>
+ * 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 <duret_g@epita.fr>
# 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');
+ }
}
.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
.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%
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"