From 3188385febaac0feeb31d500a8ea2cf731a644a6 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 23 Jun 1997 01:24:11 +0000 Subject: [PATCH] BUILT_SOURCES cleanup --- ChangeLog | 6 ++++++ automake.in | 38 +++++++++++++++----------------------- automake.texi | 16 ++-------------- depend.am | 10 ++++++---- lib/am/depend.am | 10 ++++++---- stamp-vti | 2 +- version.texi | 2 +- 7 files changed, 37 insertions(+), 47 deletions(-) diff --git a/ChangeLog b/ChangeLog index 32923335..dd0459a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ Sun Jun 22 14:01:59 1997 Tom Tromey + * automake.in (handle_configure): Don't handle PRE_BUILT_SOURCES. + (handle_built_sources): Likewise; don't have `all' depend on + BUILT_SOURCES. + * depend.am (DEPS_MAGIC): New variable. + (.deps/.P): Depend on BUILT_SOURCES again. + * texinfos.am: Use ||, not ;. Tue Jun 10 11:04:16 1997 Tom Tromey diff --git a/automake.in b/automake.in index 9609b817..a96184f5 100755 --- a/automake.in +++ b/automake.in @@ -1242,33 +1242,25 @@ sub handle_source_transform # Handle the BUILT_SOURCES variable. sub handle_built_sources { - local ($prefix); + return unless &variable_defined ('BUILT_SOURCES'); - foreach $prefix ('', 'PRE_') + local (@sources) = &variable_value_as_list ('BUILT_SOURCES', 'all'); + local ($s); + foreach $s (@sources) { - next unless &variable_defined ($prefix . 'BUILT_SOURCES'); - push (@all, '$(' . $prefix . 'BUILT_SOURCES)'); - - local (@sources) = &variable_value_as_list ($prefix. 'BUILT_SOURCES', - 'all'); - local ($s); - foreach $s (@sources) + if (/^\@.*\@$/) { - if (/^\@.*\@$/) - { - # FIXME: is this really the right thing to do? - &am_line_error ($prefix . 'BUILT_SOURCES', - "\`" . $prefix - . "BUILT_SOURCES' should not contain a configure substitution"); - last; - } + # FIXME: is this really the right thing to do? + &am_line_error ('BUILT_SOURCES', + "\`BUILT_SOURCES' should not contain a configure substitution"); + last; } - - # We don't care about the return value of this function. We - # just want to make sure to update %dep_files with the - # contents of BUILT_SOURCES. - &handle_single_transform_list (@sources); } + + # We don't care about the return value of this function. We just + # want to make sure to update %dep_files with the contents of + # BUILT_SOURCES. + &handle_single_transform_list (@sources); } # Special-case @ALLOCA@ and @LIBOBJS@ in _LDADD or _LIBADD variables. @@ -2910,7 +2902,7 @@ sub handle_configure # a workaround for an obscure bug with # AC_LINK_FILES. Anyway, when dependencies are # turned off, this shouldn't matter. - . ($use_dependencies ? ' $(PRE_BUILT_SOURCES) $(BUILT_SOURCES)' : '') + . ($use_dependencies ? ' $(BUILT_SOURCES)' : '') . "\n" . "\tcd \$(top_builddir) \\\n" . "\t && CONFIG_FILES=" diff --git a/automake.texi b/automake.texi index 6e3903af..2d0b30a6 100644 --- a/automake.texi +++ b/automake.texi @@ -1782,18 +1782,6 @@ automatic dependency tracking, the @file{Makefile} must depend on @code{$(BUILT_SOURCES)}. This can cause these sources to be rebuilt at what might seem like funny times. -There is another variable that can be used to list built sources. It is -called @code{PRE_BUILT_SOURCES}. -@vindex PRE_BUILT_SOURCES -This variable should be used to list any sources that are required -before dependency computation on the @code{BUILT_SOURCES} can be done. -For instance, automatically-generated header files used by other -automatically generated files would be listed here. - -Note that if any files in @code{PRE_BUILT_SOURCES} is rebuilt, then all -the dependency information for every object will need to be recomputed. -So this variable should be used sparingly. - @node Other GNU Tools @chapter Other GNU Tools @@ -1908,8 +1896,8 @@ file was last modified. The @file{version.texi} support requires the Sometimes an info file actually depends on more than one @samp{.texi} file. For instance, in GNU Hello, @file{hello.texi} includes the file -@file{gpl.texi} You can tell Automake about these dependencies using the -@samp{@var{texi}_TEXINFOS} variable. Here is how Hello does it: +@file{gpl.texi}. You can tell Automake about these dependencies using +the @samp{@var{texi}_TEXINFOS} variable. Here is how Hello does it: @vindex TEXINFOS @vindex _TEXINFOS diff --git a/depend.am b/depend.am index 335b98b0..07dd586b 100644 --- a/depend.am +++ b/depend.am @@ -22,15 +22,18 @@ MKDEP = gcc -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) +## We must create the .deps directory if it doesn't exist. We do it +## in this strange way a buglet in make -- it won't try to create +## .deps/.P if the .deps directory doesn't exist. +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) ## We use ".P" as the name of our placeholder because it can't be ## duplicated by any C source file. (Well, there could be ".c", but ## no one does that in practice) -include .deps/.P -## This depends on $(PRE_BUILT_SOURCES) because that lets us generate +## This depends on $(BUILT_SOURCES) because that lets us generate ## dependencies for files that don't exist at the start of a fresh ## build. -.deps/.P: $(PRE_BUILT_SOURCES) - test -d .deps || mkdir .deps +.deps/.P: $(BUILT_SOURCES) ## Use ":" here and not "echo timestamp". Otherwise GNU Make barfs: ## .deps/.P:1: *** missing separator. Stop. ## Actually, use a plain "echo" and not ":". Why? From the Autoconf @@ -41,7 +44,6 @@ MKDEP = gcc -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) echo > $@ -include $(DEP_FILES) -$(DEP_FILES): .deps/.P mostlyclean-depend: diff --git a/lib/am/depend.am b/lib/am/depend.am index 335b98b0..07dd586b 100644 --- a/lib/am/depend.am +++ b/lib/am/depend.am @@ -22,15 +22,18 @@ MKDEP = gcc -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) +## We must create the .deps directory if it doesn't exist. We do it +## in this strange way a buglet in make -- it won't try to create +## .deps/.P if the .deps directory doesn't exist. +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) ## We use ".P" as the name of our placeholder because it can't be ## duplicated by any C source file. (Well, there could be ".c", but ## no one does that in practice) -include .deps/.P -## This depends on $(PRE_BUILT_SOURCES) because that lets us generate +## This depends on $(BUILT_SOURCES) because that lets us generate ## dependencies for files that don't exist at the start of a fresh ## build. -.deps/.P: $(PRE_BUILT_SOURCES) - test -d .deps || mkdir .deps +.deps/.P: $(BUILT_SOURCES) ## Use ":" here and not "echo timestamp". Otherwise GNU Make barfs: ## .deps/.P:1: *** missing separator. Stop. ## Actually, use a plain "echo" and not ":". Why? From the Autoconf @@ -41,7 +44,6 @@ MKDEP = gcc -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) echo > $@ -include $(DEP_FILES) -$(DEP_FILES): .deps/.P mostlyclean-depend: diff --git a/stamp-vti b/stamp-vti index df3eaf18..b64ccb35 100644 --- a/stamp-vti +++ b/stamp-vti @@ -1,3 +1,3 @@ -@set UPDATED 3 June 1997 +@set UPDATED 22 June 1997 @set EDITION 1.1q @set VERSION 1.1q diff --git a/version.texi b/version.texi index df3eaf18..b64ccb35 100644 --- a/version.texi +++ b/version.texi @@ -1,3 +1,3 @@ -@set UPDATED 3 June 1997 +@set UPDATED 22 June 1997 @set EDITION 1.1q @set VERSION 1.1q -- 2.43.5