From 7ed6e09fc403d33eb4d5b38be0edea0258c041f4 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 17 Jul 1998 17:21:55 +0000 Subject: [PATCH] AM_MAKEFLAGS patch from Ian --- ChangeLog | 5 +++++ Makefile.in | 8 ++++---- NEWS | 1 + TODO | 1 + automake.in | 51 +++++++++++++++++++++++++++++------------------ configure | 2 +- configure.in | 2 +- lib/am/subdirs.am | 4 ++-- m4/Makefile.in | 10 ++++++++-- stamp-vti | 4 ++-- subdirs.am | 4 ++-- tests/Makefile.in | 9 +++++++-- version.texi | 4 ++-- 13 files changed, 68 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index 550270fc..62474669 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jul 17 11:58:27 1998 Ian Lance Taylor + + * automake.in: Use $(AM_MAKEFLAGS) in every invocation of $(MAKE). + * subdirs.am: Likewise. + Thu Jul 16 18:09:03 1998 Ian Lance Taylor * remake.am (config.status): Depend upon diff --git a/Makefile.in b/Makefile.in index 16c3492a..f7ed177f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -102,10 +102,10 @@ TEXINFOS = automake.texi DATA = $(pkgdata_DATA) DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ -Makefile.in NEWS THANKS TODO aclocal.in aclocal.m4 ansi2knr.1 \ -ansi2knr.c automake.in config.guess config.sub configure configure.in \ -elisp-comp install-sh mdate-sh missing mkinstalldirs stamp-vti \ -texinfo.tex version.texi ylwrap +Makefile.in NEWS README-alpha THANKS TODO aclocal.in aclocal.m4 \ +ansi2knr.1 ansi2knr.c automake.in config.guess config.sub configure \ +configure.in elisp-comp install-sh mdate-sh missing mkinstalldirs \ +stamp-vti texinfo.tex version.texi ylwrap DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) diff --git a/NEWS b/NEWS index b42e5fb6..9bc76e07 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ New in 1.3a: * Added `AM_FOOFLAGS' variable for each compiler invocation; e.g. AM_CFLAGS can be used in Makefile.am to set C compiler flags +* Bug fixes New in 1.3: * Bug fixes diff --git a/TODO b/TODO index c43c2417..67725ebe 100644 --- a/TODO +++ b/TODO @@ -449,6 +449,7 @@ document how to use Automake with CVS. Idea from Mark Galassi. Also include Greg Woods' more sophisticated "cvs-dist" target. document rebuilding configure. CONFIGURE_DEPENDENCIES +CONFIG_STATUS_DEPENDENCIES -- must document all variables that are supposed to be public knowledge diff --git a/automake.in b/automake.in index 84c16022..0ebdd967 100755 --- a/automake.in +++ b/automake.in @@ -821,11 +821,13 @@ sub get_object_extension else { $output_rules .= ("\tcd " . &dirname ($options{'ansi2knr'}) - . " && \$(MAKE) ansi2knr\n\n"); + . " && \$(MAKE) \$(AM_MAKEFLAGS) " + . "ansi2knr\n\n"); # This is required for non-GNU makes. $output_rules .= ($options{'ansi2knr'} . ".o:\n"); $output_rules .= ("\tcd " . &dirname ($options{'ansi2knr'}) - . " && \$(MAKE) ansi2knr.o\n\n"); + . " && \$(MAKE) \$(AM_MAKEFLAGS) " + . "ansi2knr.o\n\n"); } # Make sure ansi2knr can be found: if no path specified, @@ -2282,12 +2284,12 @@ sub handle_man_pages # Generate list of install dirs. $output_rules .= ("install-man: \$(MANS)\n" . "\t\@\$(NORMAL_INSTALL)\n"); - &pretty_print_rule ("\t\$(MAKE)", "\t ", @namelist); + &pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ", @namelist); push (@phony, 'install-man'); $output_rules .= "uninstall-man:\n\t\@\$(NORMAL_UNINSTALL)\n"; grep ($_ = 'un' . $_, @namelist); - &pretty_print_rule ("\t\$(MAKE)", "\t ", @namelist); + &pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ", @namelist); push (@phony, 'uninstall-man'); $output_vars .= &file_contents ('mans-vars'); @@ -2319,7 +2321,8 @@ sub handle_tags . "\tlist=\'\$(SUBDIRS)\'; for subdir in \$\$list; do \\\n" # Never fail here if a subdir fails; it # isn't important. - . "\t (cd \$\$subdir && \$(MAKE) tags); \\\n" + . "\t (cd \$\$subdir" + . " && \$(MAKE) \$(AM_MAKEFLAGS) tags); \\\n" . "\tdone\n"); push (@tag_deps, 'tags-recursive'); push (@phony, 'tags-recursive'); @@ -2526,7 +2529,8 @@ sub handle_dist_worker . "\t" . ' || mkdir $(distdir)/$$subdir ' . "\\\n" . "\t" . ' || exit 1; ' . "\\\n" . "\t" . ' chmod 777 $(distdir)/$$subdir; ' . "\\\n" - . "\t" . ' (cd $$subdir && $(MAKE) top_distdir=../$(' + . "\t" . ' (cd $$subdir' + . ' && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(' . (($relative_dir eq '.') ? 'distdir' : 'top_distdir') . ') distdir=../$(distdir)/$$subdir distdir) ' . "\\\n" . "\t" . ' || exit 1; ' . "\\\n" @@ -2543,7 +2547,9 @@ sub handle_dist_worker { # We must explicitly set distdir and top_distdir for these # sub-makes. - $output_rules .= "\t\$(MAKE) top_distdir=\"\$(top_distdir)\" distdir=\"\$(distdir)\" $targ\n"; + $output_rules .= ("\t\$(MAKE) \$(AM_MAKEFLAGS)" + . " top_distdir=\"\$(top_distdir)\"" + . " distdir=\"\$(distdir)\" $targ\n"); } push (@phony, 'distdir'); @@ -2644,7 +2650,8 @@ distcheck: dist mkdir $(distdir)/=inst dc_install_base=`cd $(distdir)/=inst && pwd`; \\' . (defined $contents{'distcheck-hook'} - ? "\t\$(MAKE) distcheck-hook" + ? ("\t\$(MAKE) \$(AM_MAKEFLAGS)" + . " distcheck-hook") : '') . ' cd $(distdir)/=build \\ @@ -2652,12 +2659,12 @@ distcheck: dist . ($seen_gettext ? '--with-included-gettext ' : '') . '--srcdir=.. --prefix=$$dc_install_base \\ - && $(MAKE) \\ - && $(MAKE) dvi \\ - && $(MAKE) check \\ - && $(MAKE) install \\ - && $(MAKE) installcheck \\ - && $(MAKE) dist + && $(MAKE) $(AM_MAKEFLAGS) \\ + && $(MAKE) $(AM_MAKEFLAGS) dvi \\ + && $(MAKE) $(AM_MAKEFLAGS) check \\ + && $(MAKE) $(AM_MAKEFLAGS) install \\ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \\ + && $(MAKE) $(AM_MAKEFLAGS) dist -rm -rf $(distdir) @echo "========================"; \\ echo "$(distdir).tar.gz is ready for distribution"; \\ @@ -3494,7 +3501,9 @@ sub handle_merge_targets # using parallel makes. Instead we handle things # explicitly. $output_rules .= ("all-recursive-am: ${local_headers}" - . "\n\t" . '$(MAKE) all-recursive' + . "\n\t" + . '$(MAKE) $(AM_MAKEFLAGS)' + . " all-recursive" . "\n\n"); push (@hackall, 'all-recursive-am'); push (@phony, 'all-recursive-am'); @@ -3567,7 +3576,9 @@ sub handle_merge_targets $output_rules .= "\t\@\$(NORMAL_INSTALL)\n"; if (defined $contents{'install-exec-hook'}) { - $output_rules .= "\t" . '$(MAKE) install-exec-hook' . "\n"; + $output_rules .= ("\t" + . '$(MAKE) $(AM_MAKEFLAGS) install-exec-hook' + . "\n"); } $output_rules .= "\n"; push (@install, 'install-exec') if !$recursive_install; @@ -3579,7 +3590,9 @@ sub handle_merge_targets $output_rules .= "\t\@\$(NORMAL_INSTALL)\n"; if (defined $contents{'install-data-hook'}) { - $output_rules .= "\t" . '$(MAKE) install-data-hook' . "\n"; + $output_rules .= ("\t" + . '$(MAKE) $(AM_MAKEFLAGS) install-data-hook' + . "\n"); } $output_rules .= "\n"; push (@install, 'install-data') if !$recursive_install; @@ -3610,7 +3623,7 @@ sub handle_merge_targets # Generate the new 'install-strip' target. Must set # INSTALL_SCRIPT to avoid stripping scripts. $output_rules .= ("install-strip:\n\t" - . '$(MAKE) INSTALL_PROGRAM=\'$(INSTALL_PROGRAM) -s\' INSTALL_SCRIPT=\'$(INSTALL_PROGRAM)\' install' + . '$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM=\'$(INSTALL_PROGRAM) -s\' INSTALL_SCRIPT=\'$(INSTALL_PROGRAM)\' install' . "\n"); } @@ -3671,7 +3684,7 @@ sub do_check_merge_target # provide any real synchronization facilities? The official # answer is that you can push the dependencies out to the leaves # of the dependency tree. That seems fairly gross to me. - &pretty_print_rule ("\t\$(MAKE)", "\t ", @check_tests) + &pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ", @check_tests) if @check_tests; } diff --git a/configure b/configure index 2f904723..666ba5cb 100755 --- a/configure +++ b/configure @@ -688,7 +688,7 @@ fi PACKAGE=automake -VERSION=1.3 +VERSION=1.3a if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } diff --git a/configure.in b/configure.in index 67d2261f..7da7fd42 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(automake.in) -AM_INIT_AUTOMAKE(automake, 1.3) +AM_INIT_AUTOMAKE(automake, 1.3a) # Find an appropriate tar for use in "dist" targets. A "best guess" # is good enough -- if we can't find GNU tar, we don't really care. diff --git a/lib/am/subdirs.am b/lib/am/subdirs.am index 5eb30572..3452df45 100644 --- a/lib/am/subdirs.am +++ b/lib/am/subdirs.am @@ -31,7 +31,7 @@ check-recursive installcheck-recursive info-recursive dvi-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ target=`echo $@ | sed s/-recursive//`; \ echo "Making $$target in $$subdir"; \ - (cd $$subdir && $(MAKE) $$target) \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \ ## This trick allows "-k" to keep its natural meaning when running a ## recursive rule. || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ @@ -52,7 +52,7 @@ maintainer-clean-recursive: for subdir in $$rev; do \ target=`echo $@ | sed s/-recursive//`; \ echo "Making $$target in $$subdir"; \ - (cd $$subdir && $(MAKE) $$target) \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \ ## This trick allows "-k" to keep its natural meaning when running a ## recursive rule. || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ diff --git a/m4/Makefile.in b/m4/Makefile.in index a883fc89..1f6990ba 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -32,7 +32,7 @@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include -DESTDIR = +DISTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -135,6 +135,7 @@ distdir: $(DISTFILES) info: dvi: check: all + $(MAKE) installcheck: install-exec: @$(NORMAL_INSTALL) @@ -154,14 +155,19 @@ installdirs: mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f Makefile $(DISTCLEANFILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) mostlyclean: mostlyclean-generic clean: clean-generic mostlyclean diff --git a/stamp-vti b/stamp-vti index 0cc49d7a..2fcbcb02 100644 --- a/stamp-vti +++ b/stamp-vti @@ -1,3 +1,3 @@ @set UPDATED 23 June 1998 -@set EDITION 1.3 -@set VERSION 1.3 +@set EDITION 1.3a +@set VERSION 1.3a diff --git a/subdirs.am b/subdirs.am index 5eb30572..3452df45 100644 --- a/subdirs.am +++ b/subdirs.am @@ -31,7 +31,7 @@ check-recursive installcheck-recursive info-recursive dvi-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ target=`echo $@ | sed s/-recursive//`; \ echo "Making $$target in $$subdir"; \ - (cd $$subdir && $(MAKE) $$target) \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \ ## This trick allows "-k" to keep its natural meaning when running a ## recursive rule. || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ @@ -52,7 +52,7 @@ maintainer-clean-recursive: for subdir in $$rev; do \ target=`echo $@ | sed s/-recursive//`; \ echo "Making $$target in $$subdir"; \ - (cd $$subdir && $(MAKE) $$target) \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \ ## This trick allows "-k" to keep its natural meaning when running a ## recursive rule. || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 4d3650d4..c77eb9a8 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -32,7 +32,7 @@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include -DESTDIR = +DISTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -182,14 +182,19 @@ installdirs: mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f Makefile $(DISTCLEANFILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) mostlyclean: mostlyclean-generic clean: clean-generic mostlyclean diff --git a/version.texi b/version.texi index 0cc49d7a..2fcbcb02 100644 --- a/version.texi +++ b/version.texi @@ -1,3 +1,3 @@ @set UPDATED 23 June 1998 -@set EDITION 1.3 -@set VERSION 1.3 +@set EDITION 1.3a +@set VERSION 1.3a -- 2.43.5