aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Samuelsson <ulf.samuelsson@atmel.com>2007-08-14 07:24:45 +0000
committerUlf Samuelsson <ulf.samuelsson@atmel.com>2007-08-14 07:24:45 +0000
commit74cda1e49b8c0d3ee6d6069452cfc74ab8f9a536 (patch)
tree32f3adc534c94315d3f2b27f598f36c51de9ef9a
parent58dc3e46ef5008caae698f482ccacf35b9e7bf94 (diff)
downloadbuildroot-novena-74cda1e49b8c0d3ee6d6069452cfc74ab8f9a536.tar.gz
buildroot-novena-74cda1e49b8c0d3ee6d6069452cfc74ab8f9a536.zip
Avoid continuous rebuilds of TARGET_DIR and /etc/* project files
-rw-r--r--Makefile27
1 files changed, 16 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index f3dc4f051..4d5227ba6 100644
--- a/Makefile
+++ b/Makefile
@@ -230,7 +230,7 @@ world: dependencies dirs target-host-info $(BASE_TARGETS) $(TARGETS)
#
#############################################################
$(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) \
- $(PROJECT_BUILD_DIR) $(BINARIES_DIR):
+ $(PROJECT_BUILD_DIR) $(BINARIES_DIR) $(TARGET_DIR):
@mkdir -p $@
$(STAGING_DIR):
@@ -246,23 +246,28 @@ else
endif
@mkdir -p $(STAGING_DIR)/usr/include
-$(TARGET_DIR): $(STAGING_DIR)
- mkdir -p $(TARGET_DIR)
- if [ -d "$(TARGET_SKELETON)" ] ; then \
- cp -fa $(TARGET_SKELETON)/* $(TARGET_DIR)/; \
+$(PROJECT_BUILD_DIR)/.root: $(TARGET_DIR)
+ if ! [ -d "$(TARGET_DIR)/bin" ] ; then \
+ @echo "Rebuilding TARGET_DIR" ; \
+ if [ -d "$(TARGET_SKELETON)" ] ; then \
+ cp -fa $(TARGET_SKELETON)/* $(TARGET_DIR)/; \
+ fi; \
+ touch $(STAGING_DIR)/.fakeroot.00000 ; \
+ -find $(TARGET_DIR) -type d -name CVS | xargs rm -rf ; \
+ -find $(TARGET_DIR) -type d -name .svn | xargs rm -rf ; \
fi;
- touch $(STAGING_DIR)/.fakeroot.00000
- -find $(TARGET_DIR) -type d -name CVS | xargs rm -rf
- -find $(TARGET_DIR) -type d -name .svn | xargs rm -rf
+ touch $@
-target-host-info: dirs $(TARGET_DIR)/etc/issue $(TARGET_DIR)/etc/hostname
+target-host-info: $(TARGET_DIR)/etc/issue $(TARGET_DIR)/etc/hostname
-$(TARGET_DIR)/etc/issue: $(TARGET_DIR) .config
+$(TARGET_DIR)/etc/issue: .config
+ mkdir -p $(TARGET_DIR)/etc
echo "" > $(TARGET_DIR)/etc/issue
echo "" >> $(TARGET_DIR)/etc/issue
echo "$(BANNER)" >> $(TARGET_DIR)/etc/issue
-$(TARGET_DIR)/etc/hostname: $(TARGET_DIR) .config
+$(TARGET_DIR)/etc/hostname: .config
+ mkdir -p $(TARGET_DIR)/etc
echo "$(TARGET_HOSTNAME)" > $(TARGET_DIR)/etc/hostname
source: $(TARGETS_SOURCE) $(HOST_SOURCE)