[llvm-commits] [llvm] r105636 - /llvm/trunk/Makefile.rules
Daniel Dunbar
daniel at zuster.org
Tue Jun 8 13:10:13 PDT 2010
Author: ddunbar
Date: Tue Jun 8 15:10:13 2010
New Revision: 105636
URL: http://llvm.org/viewvc/llvm-project?rev=105636&view=rev
Log:
Makefiles: Teach LLVM's recursive makefile descent to update objdir Makefiles if
they are out of date, instead of only testing if they exist.
Modified:
llvm/trunk/Makefile.rules
Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=105636&r1=105635&r2=105636&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Tue Jun 8 15:10:13 2010
@@ -807,7 +807,8 @@
ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
$(RecursiveTargets)::
$(Verb) for dir in $(DIRS); do \
- if [ ! -f $$dir/Makefile ]; then \
+ if ([ ! -f $$dir/Makefile ] || \
+ [ $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ]); then \
$(MKDIR) $$dir; \
$(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
fi; \
@@ -829,7 +830,8 @@
ifdef EXPERIMENTAL_DIRS
$(RecursiveTargets)::
$(Verb) for dir in $(EXPERIMENTAL_DIRS); do \
- if [ ! -f $$dir/Makefile ]; then \
+ if ([ ! -f $$dir/Makefile ] || \
+ [ $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ]); then \
$(MKDIR) $$dir; \
$(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
fi; \
@@ -863,7 +865,9 @@
ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T))
$(ParallelTargets) :
- $(Verb) if [ ! -f $(@D)/Makefile ]; then \
+ $(Verb) if ([ ! -f $(@D)/Makefile ] || \
+ [ $(@D)/Makefile -ot \
+ $(PROJ_SRC_DIR)/$(@D)/Makefile ]); then \
$(MKDIR) $(@D); \
$(CP) $(PROJ_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \
fi; \
@@ -882,7 +886,8 @@
$(RecursiveTargets)::
$(Verb) for dir in $(OPTIONAL_DIRS); do \
if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\
- if [ ! -f $$dir/Makefile ]; then \
+ if ([ ! -f $$dir/Makefile ] || \
+ [ $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ]); then \
$(MKDIR) $$dir; \
$(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
fi; \
More information about the llvm-commits
mailing list