[llvm-commits] CVS: llvm/Makefile.rules

Reid Spencer reid at x10sys.com
Wed Aug 24 03:43:22 PDT 2005



Changes in directory llvm:

Makefile.rules updated: 1.319 -> 1.320
---
Log message:

For PR619: http://llvm.cs.uiuc.edu/PR619 :
Make any header files that are automatically generated be preconditions of
the compilation. This ensures that if a *.h.in file is changed then its
corresponding *.h file gets updated on the next rebuild. Note that this can
lead to confusing (but correct) results if the *.h.in file changed 
unsubstantially so that autoheader doesn't update the *.h file. In that case, 
manually touch the *.h file in question to restore order. Moral of the story,
if you're going to "touch" a *.in file then modify it substantially.


---
Diffs of the changes:  (+16 -0)

 Makefile.rules |   16 ++++++++++++++++
 1 files changed, 16 insertions(+)


Index: llvm/Makefile.rules
diff -u llvm/Makefile.rules:1.319 llvm/Makefile.rules:1.320
--- llvm/Makefile.rules:1.319	Tue Aug 16 21:38:56 2005
+++ llvm/Makefile.rules	Wed Aug 24 05:43:10 2005
@@ -28,6 +28,13 @@
 UserTargets      := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets)
 InternalTargets  := preconditions distdir dist-hook
 
+FilesToConfig := \
+  include/llvm/Config/config.h \
+  include/llvm/Support/DataTypes.h \
+  include/llvm/ADT/hash_map \
+  include/llvm/ADT/hash_set \
+  include/llvm/ADT/iterator
+
 ################################################################################
 # INITIALIZATION: Basic things the makefile needs
 ################################################################################
@@ -77,6 +84,9 @@
 PreConditions      += $(MakefileConfig)
 endif
 
+FilesToConfigPATH  := $(addprefix $(PROJ_OBJ_ROOT)/,$(FilesToConfig))
+PreConditions      += $(FilesToConfigPATH)
+
 preconditions : $(PreConditions)
 
 #------------------------------------------------------------------------
@@ -134,6 +144,11 @@
 	  $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
 	  $(ConfigStatusScript)
 
+.PRECIOUS: $(FilesToConfigPATH)
+$(FilesToConfigPATH) : $(PROJ_OBJ_ROOT)/% : $(PROJ_SRC_ROOT)/%.in 
+	$(Echo) Regenerating $*
+	$(Verb) cd $(PROJ_OBJ_ROOT) && $(ConfigStatusScript) $*
+
 #------------------------------------------------------------------------
 # Make sure the configuration makefile is up to date
 #------------------------------------------------------------------------
@@ -1576,3 +1591,4 @@
 	$(Echo) "YaccFiles    : " '$(YaccFiles)'
 	$(Echo) "LexFiles     : " '$(LexFiles)'
 	$(Echo) "Module       : " '$(Module)'
+	$(Echo) "FilesToConfig: " '$(FilesToConfigPATH)'






More information about the llvm-commits mailing list