From: Stefano Lattarini Date: Sat, 11 Aug 2012 16:18:18 +0000 (+0200) Subject: [ng] subdirs: verbatim include of relevant makefile fragment X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62a04670b01130a8cbf71d837ec4944ad38dad05;p=thirdparty%2Fautomake.git [ng] subdirs: verbatim include of relevant makefile fragment * lib/am/subdirs.am: Rename ... * lib/am/subdirs.mk: ... like this. Prefer '#' comments over '##' ones. * automake.in (handle_subdirs): Include it with the 'verbatim' function rather than with the 'file_contents' one. (generate_makefile): Move its call later. This is actually required to avoid spurious failures. * Makefile.am (dist_am_DATA): Adjust. Signed-off-by: Stefano Lattarini --- diff --git a/Makefile.am b/Makefile.am index 6a773a9f4..899d301d2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -197,6 +197,7 @@ dist_am_DATA = \ lib/am/dejagnu.mk \ lib/am/distcheck.mk \ lib/am/distdir.mk \ + lib/am/subdirs.mk \ lib/am/compile.am \ lib/am/configure.am \ lib/am/data.am \ @@ -218,7 +219,6 @@ dist_am_DATA = \ lib/am/python.am \ lib/am/remake-hdr.am \ lib/am/scripts.am \ - lib/am/subdirs.am \ lib/am/texi-vers.am \ lib/am/texi-spec.am \ lib/am/texinfos.am \ diff --git a/automake.in b/automake.in index 17e4c638a..736194540 100644 --- a/automake.in +++ b/automake.in @@ -3357,7 +3357,7 @@ sub handle_subdirs () check_directories_in_var $dsubdirs if $dsubdirs; - $output_rules .= &file_contents ('subdirs', new Automake::Location); + verbatim ('subdirs'); } @@ -6736,7 +6736,6 @@ sub generate_makefile ($$) handle_data; handle_headers; verbatim ('tags'); - handle_subdirs; handle_user_recursion; handle_minor_options; @@ -6762,6 +6761,9 @@ sub generate_makefile ($$) verbatim ('common-targets'); handle_clean (); + # This must really come late. + handle_subdirs; + handle_factored_dependencies; # Comes last, because all the above procedures may have diff --git a/lib/am/subdirs.am b/lib/am/subdirs.mk similarity index 95% rename from lib/am/subdirs.am rename to lib/am/subdirs.mk index aa1eef466..de1faa4a0 100644 --- a/lib/am/subdirs.am +++ b/lib/am/subdirs.mk @@ -23,8 +23,8 @@ am__recursive_targets = \ $(RECURSIVE_CLEAN_TARGETS) \ $(am.recurs.extra-targets) -## All documented targets which invoke 'make' recursively, or depend -## on targets that do so. GNUmakefile from gnulib depends on this. +# All documented targets which invoke 'make' recursively, or depend +# on targets that do so. GNUmakefile from gnulib depends on this. AM_RECURSIVE_TARGETS += $(am__recursive_targets:-recursive=) .PHONY: $(am__recursive_targets) @@ -72,4 +72,3 @@ mostlyclean: mostlyclean-recursive clean: clean-recursive distclean: distclean-recursive maintainer-clean: maintainer-clean-recursive -