summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2013-09-15 19:28:45 (GMT)
committer Peter Korsgaard <jacmet@sunsite.dk>2013-09-15 21:34:25 (GMT)
commit63344acefaa31b713a1811e5b0ba66217bd596d3 (patch)
treee424410f35fe335cac8a8bd099aae0718993d86d
parentbd315a19ef2a95aeb281ea4455fe652f357e64d6 (diff)
downloadbuildroot-63344acefaa31b713a1811e5b0ba66217bd596d3.tar.gz
buildroot-63344acefaa31b713a1811e5b0ba66217bd596d3.tar.bz2
Makefile: make $(BUILD_DIR)/.root rule idempotent
The $(BUILD_DIR)/.root rule is executed as part of the 'dirs' target. The 'dirs' target is re-executed at every execution of 'make external-deps', and make external-deps explicitly tells make to ignore targets that have already been made (through the -B option). This means that the $(BUILD_DIR)/.root rule has to be idempotant, which was not the case this the introduction of the lib32/lib64 symbolic link. Running 'make external-deps' three times in a row was sufficient to trigger an error due to symbolic links being incorrectly created. This patch fixes that. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index e2454a7..819a597 100644
--- a/Makefile
+++ b/Makefile
@@ -451,9 +451,9 @@ $(BUILD_DIR)/.root:
--exclude .hg --exclude=CVS --exclude '*~' \
$(TARGET_SKELETON)/ $(TARGET_DIR)/
cp support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE)
- @ln -s lib $(TARGET_DIR)/$(LIB_SYMLINK)
+ @ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK)
@mkdir -p $(TARGET_DIR)/usr
- @ln -s lib $(TARGET_DIR)/usr/$(LIB_SYMLINK)
+ @ln -snf lib $(TARGET_DIR)/usr/$(LIB_SYMLINK)
touch $@
$(TARGET_DIR): $(BUILD_DIR)/.root