]> sourceware.org Git - automake.git/commitdiff
BUILT_SOURCES cleanup
authorTom Tromey <tromey@redhat.com>
Mon, 23 Jun 1997 01:24:11 +0000 (01:24 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 23 Jun 1997 01:24:11 +0000 (01:24 +0000)
ChangeLog
automake.in
automake.texi
depend.am
lib/am/depend.am
stamp-vti
version.texi

index 329233352302695e794811c89bb33dc425751004..dd0459a99edba12a71ad4bf51fea9925eb131a09 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 Sun Jun 22 14:01:59 1997  Tom Tromey  <tromey@cygnus.com>
 
+       * 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  <tromey@cygnus.com>
index 9609b817147ec9c56cbe6f80728b54b3ace07d41..a96184f59e4c5d817a5f2fc5bd62d64b9c33bfe6 100755 (executable)
@@ -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="
index 6e3903af4f6b52ba1f72f8a7987f528fb4675080..2d0b30a677fda557676ede6b58c04455fc57acb9 100644 (file)
@@ -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
 
index 335b98b055b58159ae1f7adae95bd76dbb71472f..07dd586b6c47722218079592f03a099c2d9d67f5 100644 (file)
--- a/depend.am
+++ b/depend.am
 
 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:
 
index 335b98b055b58159ae1f7adae95bd76dbb71472f..07dd586b6c47722218079592f03a099c2d9d67f5 100644 (file)
 
 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:
 
index df3eaf18b082fe71033c905386c046d8187865f4..b64ccb356c5fdb8c67b1fd68d76f74124791b86f 100644 (file)
--- 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
index df3eaf18b082fe71033c905386c046d8187865f4..b64ccb356c5fdb8c67b1fd68d76f74124791b86f 100644 (file)
@@ -1,3 +1,3 @@
-@set UPDATED 3 June 1997
+@set UPDATED 22 June 1997
 @set EDITION 1.1q
 @set VERSION 1.1q
This page took 0.059549 seconds and 5 git commands to generate.