Fix PR458:

* Don't include Makefile.rules in set of preconditions, it never has to be
  copied to objdir.
* Enable the "update makefile first before executing targets" feature in
  gnu make by *not* using a full path to the Makefile in the rule.

llvm-svn: 17920
This commit is contained in:
Reid Spencer 2004-11-17 19:08:44 +00:00
parent 67c46c8d70
commit 91234ff57a
1 changed files with 3 additions and 3 deletions

View File

@ -59,8 +59,8 @@ $(UserTargets)::
# PRECONDITIONS: that which must be built/checked first # PRECONDITIONS: that which must be built/checked first
################################################################################ ################################################################################
SrcMakefiles := $(filter %Makefile %Makefile.rules %Makefile.tests \ SrcMakefiles := $(filter %Makefile %Makefile.tests %Makefile.JIT,\
%Makefile.JIT,$(wildcard $(BUILD_SRC_DIR)/Makefile*)) $(wildcard $(BUILD_SRC_DIR)/Makefile*))
ObjMakefiles := $(subst $(BUILD_SRC_DIR),$(BUILD_OBJ_DIR),$(SrcMakefiles)) ObjMakefiles := $(subst $(BUILD_SRC_DIR),$(BUILD_OBJ_DIR),$(SrcMakefiles))
ConfigureScript := $(LLVM_SRC_ROOT)/configure ConfigureScript := $(LLVM_SRC_ROOT)/configure
ConfigStatusScript := $(LLVM_OBJ_ROOT)/config.status ConfigStatusScript := $(LLVM_OBJ_ROOT)/config.status
@ -104,7 +104,7 @@ $(MakefileConfig): $(MakefileConfigIn) $(ConfigStatusScript)
#------------------------------------------------------------------------ #------------------------------------------------------------------------
ifneq ($(BUILD_OBJ_DIR),$(BUILD_SRC_DIR)) ifneq ($(BUILD_OBJ_DIR),$(BUILD_SRC_DIR))
$(BUILD_OBJ_DIR)/Makefile : $(BUILD_SRC_DIR)/Makefile Makefile: $(BUILD_SRC_DIR)/Makefile
$(Echo) "Updating Makefile" $(Echo) "Updating Makefile"
$(Verb) $(MKDIR) $(@D) $(Verb) $(MKDIR) $(@D)
$(Verb) cp -f $< $@ $(Verb) cp -f $< $@