aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile18
-rw-r--r--Makefile.rules22
2 files changed, 19 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index 818128e8d7..b474a3a067 100644
--- a/Makefile
+++ b/Makefile
@@ -51,3 +51,21 @@ dist-hook::
tools-only: all
libs-only: all
+
+#------------------------------------------------------------------------
+# Make sure the generated headers are up-to-date. This must be kept in
+# sync with the AC_CONFIG_HEADER invocations in autoconf/configure.ac
+#------------------------------------------------------------------------
+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
+FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
+
+all-local:: $(FilesToConfigPATH)
+$(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in
+ $(Echo) Regenerating $*
+ $(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $*
+.PRECIOUS: $(FilesToConfigPATH)
diff --git a/Makefile.rules b/Makefile.rules
index 9bc8d5b220..656609802f 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -28,13 +28,6 @@ TopLevelTargets := check dist dist-check dist-clean tags dist-gzip dist-bzip2 \
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
################################################################################
@@ -84,10 +77,7 @@ ifneq ($(MakefileConfigIn),)
PreConditions += $(MakefileConfig)
endif
-FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
-PreConditions += $(FilesToConfigPATH)
-
-preconditions : $(PreConditions)
+preconditions: $(PreConditions)
#------------------------------------------------------------------------
# Make sure the BUILT_SOURCES are built first
@@ -145,16 +135,6 @@ $(ConfigStatusScript): $(ConfigureScript)
$(ConfigStatusScript)
#------------------------------------------------------------------------
-# If we're buildilng LLVM, then make sure the generated headers are Up2Dt
-#------------------------------------------------------------------------
-ifeq ($(LLVM_OBJ_ROOT),$(PROJ_OBJ_ROOT))
-.PRECIOUS: $(FilesToConfigPATH)
-$(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in
- $(Echo) Regenerating $*
- $(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $*
-endif
-
-#------------------------------------------------------------------------
# Make sure the configuration makefile is up to date
#------------------------------------------------------------------------
ifneq ($(MakefileConfigIn),)