From 7fee9fa5b426ea08a450c4570593d4f464376548 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 8 Feb 1996 02:47:23 +0000 Subject: [PATCH] Rebuild files listed in AC_OUTPUT --- ChangeLog | 4 ++++ Makefile.am | 5 ----- Makefile.in | 13 +++++-------- NEWS | 2 ++ TODO | 2 -- automake.in | 23 +++++++++++++++++++++++ lib/am/Makefile.am | 5 ----- 7 files changed, 34 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0efde9e54..533f20dea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Wed Feb 7 18:00:29 1996 Tom Tromey + * Makefile.am (automake): Removed. + (DIST_OTHER): Removed. + * automake.in (handle_source_transform): All dep_files are relative to $(srcdir). (handle_libraries): Ditto. @@ -11,6 +14,7 @@ Wed Feb 7 18:00:29 1996 Tom Tromey Give error if appropriate install macro not seen. (handle_subdirs): Ensure $seen_gettext before requiring gettext-specific files. + (handle_configure): Automatically rebuild From Jim Meyering: * automake.in (handle_source_transform): Use \W when quoting diff --git a/Makefile.am b/Makefile.am index 77088aa0e..471b31e79 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,8 +20,6 @@ libraries-clean.am scripts-clean.am programs-clean.am data-clean.am \ COPYING INSTALL install-sh mdate-sh mkinstalldirs texinfo.tex \ config.guess config.sub -DIST_OTHER = automake.in - # Gross. DIST_SUBDIRS = samples/cpio/*Makefile.am @@ -48,9 +46,6 @@ maintainer-check: automake perl4.036 -c -w automake; \ else :; fi -automake: automake.in - CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status - # Tag before making distribution. Also, don't make a distribution if # checks fail. Also, make sure the NEWS file is up-to-date. cvs-dist: maintainer-check diff --git a/Makefile.in b/Makefile.in index 356bd35d6..b8dbf4089 100644 --- a/Makefile.in +++ b/Makefile.in @@ -58,8 +58,6 @@ libraries-clean.am scripts-clean.am programs-clean.am data-clean.am \ COPYING INSTALL install-sh mdate-sh mkinstalldirs texinfo.tex \ config.guess config.sub -DIST_OTHER = automake.in - # Gross. DIST_SUBDIRS = samples/cpio/*Makefile.am @@ -80,9 +78,9 @@ TEXINFOS = automake.texi DATA = $(pkgdata_DATA) DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ -Makefile.in NEWS README THANKS TODO aclocal.m4 config.guess config.sub \ -configure configure.in install-sh mdate-sh mkinstalldirs stamp-vti \ -texinfo.tex version.texi +Makefile.in NEWS README THANKS TODO aclocal.m4 automake.in config.guess \ +config.sub configure configure.in install-sh mdate-sh mkinstalldirs \ +stamp-vti texinfo.tex version.texi PACKAGE = @PACKAGE@ @@ -106,6 +104,8 @@ config.status: configure ./config.status --recheck $(srcdir)/configure: configure.in $(ACLOCAL) cd $(srcdir) && autoconf +automake: $(top_builddir)/config.status automake.in + cd $(top_srcdir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status mostlyclean-binSCRIPTS: @@ -322,9 +322,6 @@ maintainer-check: automake perl4.036 -c -w automake; \ else :; fi -automake: automake.in - CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status - # Tag before making distribution. Also, don't make a distribution if # checks fail. Also, make sure the NEWS file is up-to-date. cvs-dist: maintainer-check diff --git a/NEWS b/NEWS index 78237d822..4e9ad342e 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,8 @@ New in 0.29: * Allow hierarchies deeper than 2. From Gord Matzigkeit. * HEADERS variable no longer needed; now can put .h files directly into foo_SOURCES variable. +* Automake automatically rebuilds files listed in AC_OUTPUT. The + corresponding ".in" files are included in the distribution. New in 0.28: * Added --gnu and --gnits options diff --git a/TODO b/TODO index b42596859..2024810a9 100644 --- a/TODO +++ b/TODO @@ -2,8 +2,6 @@ Top priorities: * Must rewrite am_install_var. Should break into multiple functions. This will allow the callers to be a little smarter. * Rewrite clean targets. -* Use @other_input_files to automate regeneration. Must do dirname - canonicalization Handle MAINT_CHARSET. Use recode in dist target. Handle dist-zoo and dist-zip. diff --git a/automake.in b/automake.in index 9f998ba36..04d5b48d6 100755 --- a/automake.in +++ b/automake.in @@ -1141,6 +1141,29 @@ sub handle_configure if $config_name; $contents{'CONFIG_HEADER'} = "${top_builddir}/${config_name}" if $config_name; + + # Now look for other files in this directory which must be remade + # by config.status, and generate rules for them. + local ($file, $local); + foreach $file (@other_input_files) + { + # Skip files not in this directory, any Makefile, and the + # config header. These last two must be handled specially. + next unless &dirname ($file) eq $relative_dir; + next if $file eq $top_builddir . '/' . $config_name; + ($local = $file) =~ s/^.*\///; + next if $local eq 'Makefile'; + + # FIXME support ":" syntax of AC_OUTPUT here. + $output_rules .= ($local . ': ' + . '$(top_builddir)/config.status ' . $local . ".in\n" + . "\t" + . 'cd $(top_srcdir) && CONFIG_FILES=' + . ($relative_dir eq '.' ? '' : '$(subdir)/') + . '$@ CONFIG_HEADERS= ./config.status' + . "\n"); + &require_file ($NORMAL, $local . '.in'); + } } # Handle C headers. diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index 77088aa0e..471b31e79 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -20,8 +20,6 @@ libraries-clean.am scripts-clean.am programs-clean.am data-clean.am \ COPYING INSTALL install-sh mdate-sh mkinstalldirs texinfo.tex \ config.guess config.sub -DIST_OTHER = automake.in - # Gross. DIST_SUBDIRS = samples/cpio/*Makefile.am @@ -48,9 +46,6 @@ maintainer-check: automake perl4.036 -c -w automake; \ else :; fi -automake: automake.in - CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status - # Tag before making distribution. Also, don't make a distribution if # checks fail. Also, make sure the NEWS file is up-to-date. cvs-dist: maintainer-check -- 2.11.4.GIT