llvm.org GIT mirror llvm / ca739c6
For PR614: Move the implementation of the fix from Makefile.rules to Makefile. This ensures that it is only checked on a top-level rebuild, and not in every single subdirectory. This removes some annoying messages from the build and numerous executions of config.status if the .in file changes but not substantively enough to cause the .h file to be modified by config.status. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23039 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 14 years ago
2 changed file(s) with 19 addition(s) and 21 deletion(s). Raw diff Collapse all Expand all
5050
5151 tools-only: all
5252 libs-only: all
53
54 #------------------------------------------------------------------------
55 # Make sure the generated headers are up-to-date. This must be kept in
56 # sync with the AC_CONFIG_HEADER invocations in autoconf/configure.ac
57 #------------------------------------------------------------------------
58 FilesToConfig := \
59 include/llvm/Config/config.h \
60 include/llvm/Support/DataTypes.h \
61 include/llvm/ADT/hash_map \
62 include/llvm/ADT/hash_set \
63 include/llvm/ADT/iterator
64 FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
65
66 all-local:: $(FilesToConfigPATH)
67 $(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in
68 $(Echo) Regenerating $*
69 $(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $*
70 .PRECIOUS: $(FilesToConfigPATH)
2727 UserTargets := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets)
2828 InternalTargets := preconditions distdir dist-hook
2929
30 FilesToConfig := \
31 include/llvm/Config/config.h \
32 include/llvm/Support/DataTypes.h \
33 include/llvm/ADT/hash_map \
34 include/llvm/ADT/hash_set \
35 include/llvm/ADT/iterator
36
3730 ################################################################################
3831 # INITIALIZATION: Basic things the makefile needs
3932 ################################################################################
8376 PreConditions += $(MakefileConfig)
8477 endif
8578
86 FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
87 PreConditions += $(FilesToConfigPATH)
88
89 preconditions : $(PreConditions)
79 preconditions: $(PreConditions)
9080
9181 #------------------------------------------------------------------------
9282 # Make sure the BUILT_SOURCES are built first
142132 fi ; \
143133 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
144134 $(ConfigStatusScript)
145
146 #------------------------------------------------------------------------
147 # If we're buildilng LLVM, then make sure the generated headers are Up2Dt
148 #------------------------------------------------------------------------
149 ifeq ($(LLVM_OBJ_ROOT),$(PROJ_OBJ_ROOT))
150 .PRECIOUS: $(FilesToConfigPATH)
151 $(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in
152 $(Echo) Regenerating $*
153 $(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $*
154 endif
155135
156136 #------------------------------------------------------------------------
157137 # Make sure the configuration makefile is up to date