Make sure that Makefile.rules and Makefile.config.in are not candidates for
authorReid Spencer <rspencer@reidspencer.com>
Tue, 26 Oct 2004 23:10:00 +0000 (23:10 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Tue, 26 Oct 2004 23:10:00 +0000 (23:10 +0000)
automatic makefile update.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17269 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile.rules

index 0e90ed760f10bd9389160887ff6c7936678856fb..3df4811bf89371a751f0e6963bd1c2f8d1a866c5 100644 (file)
@@ -61,7 +61,8 @@ $(USER_TARGETS)::
 # PRECONDITIONS: that which must be built/checked first
 ################################################################################
 
-SRCMKFILES    := $(wildcard $(BUILD_SRC_DIR)/Makefile*)
+SRCMKFILES    := $(filter-out Makefile.rules %.in,\
+                 $(wildcard $(BUILD_SRC_DIR)/Makefile.*))
 OBJMKFILES    := $(subst $(BUILD_SRC_DIR),$(BUILD_OBJ_DIR),$(SRCMKFILES))
 CONFIGURE     := $(LLVM_SRC_ROOT)/configure
 CONFIG_STATUS := $(LLVM_OBJ_ROOT)/config.status
@@ -106,18 +107,19 @@ $(BUILD_OBJ_DIR)/Makefile : $(BUILD_SRC_DIR)/Makefile
        @$(ECHO) "Updating Makefile"
        $(VERB) $(MKDIR) $(@D)
        $(VERB) cp -f $< $@
-       $(VERB) $(MAKE) $(MAKECMDGOALS)
 
 # Copy the Makefile.* files unless we're in the root directory which avoids
 # the copying of Makefile.config.in or other things that should be explicitly
 # taken care of.
-ifneq ($(BUILD_OBJ_DIR),$(BUILD_OBJ_ROOT))
 $(BUILD_OBJ_DIR)/Makefile% : $(BUILD_SRC_DIR)/Makefile%
-       @$(ECHO) "Updating $(@F)"
-       $(VERB) $(MKDIR) $(@D)
-       $(VERB) cp -f $< $@
-       $(VERB) $(MAKE) $(MAKECMDGOALS)
-endif
+       @case '$?' in \
+          *Makefile.rules) ;; \
+          *.in) ;; \
+          *) $(ECHO) "Updating $(@F)" ; \
+            $(MKDIR) $(@D) ; \
+            cp -f $< $@ ;; \
+       esac
+         
 endif
 
 #------------------------------------------------------------------------