From ae0488442fe4e4aa4863815ba2241d960d46d2bb Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 1 Jun 1997 19:54:27 +0000 Subject: [PATCH] various bug fixes --- ChangeLog | 9 +++++++++ TODO | 3 +++ automake.in | 2 +- automake.texi | 14 ++++++++++++-- depend.am | 4 ++-- depend2.am | 6 ++++-- lib/am/depend.am | 4 ++-- lib/am/depend2.am | 6 ++++-- stamp-vti | 2 +- version.texi | 2 +- 10 files changed, 39 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index f9ceaaa8..0c2d8452 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ Sun Jun 1 13:16:05 1997 Tom Tromey + * depend2.am (.deps/%.P): Don't generate file if MKDEP fails. + From Alexandre Oliva. + + * depend.am (.deps/.P): Depend on PRE_BUILT_SOURCES, not + BUILT_SOURCES. + + * automake.in (initialize_global_constants): Added 1997 to + copyright info. + * automake.in (output_yacc_build_rule): Never move y.tab.c over the .h file. From Jim Meyering. diff --git a/TODO b/TODO index 0cdf60c5..69706d38 100644 --- a/TODO +++ b/TODO @@ -12,6 +12,9 @@ * BUILT_SOURCES should not be distributed, even when they appear in another _SOURCES line. [? or maybe just leave this up to the to-be-defined generic distribution method ] + must completely revisit the entire BUILT_SOURCES idea + probably should generate dependencies as side effect of compile + (but that will mess up guile distributions... sigh) * in --cygnus, clean-info not generated at top level diff --git a/automake.in b/automake.in index 4e92d99a..4c90c5eb 100755 --- a/automake.in +++ b/automake.in @@ -5225,7 +5225,7 @@ sub initialize_global_constants # Copyright on generated Makefile.ins. $gen_copyright = "\ -# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. "; diff --git a/automake.texi b/automake.texi index f335ef08..d009e412 100644 --- a/automake.texi +++ b/automake.texi @@ -1770,8 +1770,6 @@ Occasionally a file which would otherwise be called ``source'' (eg a C should be listed in the @code{BUILT_SOURCES} variable. @vindex BUILT_SOURCES -By default, built sources are not included in a distribution. - Built sources are also not compiled by default. You must either explicitly mention them in some other @samp{_SOURCES} variable for this to happen. @@ -1782,6 +1780,18 @@ 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 diff --git a/depend.am b/depend.am index ec6489c5..335b98b0 100644 --- a/depend.am +++ b/depend.am @@ -26,10 +26,10 @@ MKDEP = gcc -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) ## duplicated by any C source file. (Well, there could be ".c", but ## no one does that in practice) -include .deps/.P -## This depends on $(BUILT_SOURCES) because that lets us generate +## This depends on $(PRE_BUILT_SOURCES) because that lets us generate ## dependencies for files that don't exist at the start of a fresh ## build. -.deps/.P: $(BUILT_SOURCES) +.deps/.P: $(PRE_BUILT_SOURCES) test -d .deps || mkdir .deps ## Use ":" here and not "echo timestamp". Otherwise GNU Make barfs: ## .deps/.P:1: *** missing separator. Stop. diff --git a/depend2.am b/depend2.am index 2c399fb7..1eed7925 100644 --- a/depend2.am +++ b/depend2.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. +## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -19,4 +19,6 @@ @echo "Computing dependencies for $<..." @o='o'; \ ONLYC test -n "$o" && o='$$o'; \ - $(@MKDEP@) $< | sed "s,^\(.*\)\.o:,\1.$$o \1.l$$o $@:," > $@ + $(@MKDEP@) $< >$@.tmp \ + && sed "s,^\(.*\)\.o:,\1.$$o \1.l$$o $@:," < $@.tmp > $@ \ + && rm -f $@.tmp diff --git a/lib/am/depend.am b/lib/am/depend.am index ec6489c5..335b98b0 100644 --- a/lib/am/depend.am +++ b/lib/am/depend.am @@ -26,10 +26,10 @@ MKDEP = gcc -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) ## duplicated by any C source file. (Well, there could be ".c", but ## no one does that in practice) -include .deps/.P -## This depends on $(BUILT_SOURCES) because that lets us generate +## This depends on $(PRE_BUILT_SOURCES) because that lets us generate ## dependencies for files that don't exist at the start of a fresh ## build. -.deps/.P: $(BUILT_SOURCES) +.deps/.P: $(PRE_BUILT_SOURCES) test -d .deps || mkdir .deps ## Use ":" here and not "echo timestamp". Otherwise GNU Make barfs: ## .deps/.P:1: *** missing separator. Stop. diff --git a/lib/am/depend2.am b/lib/am/depend2.am index 2c399fb7..1eed7925 100644 --- a/lib/am/depend2.am +++ b/lib/am/depend2.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. +## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -19,4 +19,6 @@ @echo "Computing dependencies for $<..." @o='o'; \ ONLYC test -n "$o" && o='$$o'; \ - $(@MKDEP@) $< | sed "s,^\(.*\)\.o:,\1.$$o \1.l$$o $@:," > $@ + $(@MKDEP@) $< >$@.tmp \ + && sed "s,^\(.*\)\.o:,\1.$$o \1.l$$o $@:," < $@.tmp > $@ \ + && rm -f $@.tmp diff --git a/stamp-vti b/stamp-vti index 765248ed..c50d1dfc 100644 --- a/stamp-vti +++ b/stamp-vti @@ -1,3 +1,3 @@ -@set UPDATED 26 May 1997 +@set UPDATED 1 June 1997 @set EDITION 1.1q @set VERSION 1.1q diff --git a/version.texi b/version.texi index 765248ed..c50d1dfc 100644 --- a/version.texi +++ b/version.texi @@ -1,3 +1,3 @@ -@set UPDATED 26 May 1997 +@set UPDATED 1 June 1997 @set EDITION 1.1q @set VERSION 1.1q -- 2.43.5