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>
# 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.
# 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="
@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
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
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
echo > $@
-include $(DEP_FILES)
-$(DEP_FILES): .deps/.P
mostlyclean-depend:
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
echo > $@
-include $(DEP_FILES)
-$(DEP_FILES): .deps/.P
mostlyclean-depend:
-@set UPDATED 3 June 1997
+@set UPDATED 22 June 1997
@set EDITION 1.1q
@set VERSION 1.1q
-@set UPDATED 3 June 1997
+@set UPDATED 22 June 1997
@set EDITION 1.1q
@set VERSION 1.1q