summaryrefslogtreecommitdiffstats
path: root/make/sed.mk
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-03-06 18:24:00 +0000
committerEric Andersen <andersen@codepoet.org>2003-03-06 18:24:00 +0000
commit1c6aad34405c65cc01911ec89ab7c3eac47a6473 (patch)
tree60e110144de97bca390756246378fd9092485420 /make/sed.mk
parent55de6e5b69aebddba08af9c038025d1c8e9f21b6 (diff)
downloadbuildroot-novena-1c6aad34405c65cc01911ec89ab7c3eac47a6473.tar.gz
buildroot-novena-1c6aad34405c65cc01911ec89ab7c3eac47a6473.zip
work around deficiencies in GNU tar that prevented several
items from actually being installed
Diffstat (limited to 'make/sed.mk')
-rw-r--r--make/sed.mk15
1 files changed, 10 insertions, 5 deletions
diff --git a/make/sed.mk b/make/sed.mk
index 9220682de..3342fb406 100644
--- a/make/sed.mk
+++ b/make/sed.mk
@@ -43,13 +43,18 @@ $(SED_DIR)/.configured: $(SED_DIR)/.unpacked
$(SED_DIR)/$(SED_BINARY): $(SED_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(SED_DIR)
-$(TARGET_DIR)/$(SED_TARGET_BINARY): $(SED_DIR)/$(SED_BINARY)
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(SED_DIR) install
- mv $(TARGET_DIR)/usr/bin/sed $(TARGET_DIR)/bin/
+# This stuff is needed to work around GNU make deficiencies
+sed-target_binary: $(SED_DIR)/$(SED_BINARY)
+ @if [ -L $(TARGET_DIR)/$(SED_TARGET_BINARY) ] ; then \
+ rm -f $(TARGET_DIR)/$(SED_TARGET_BINARY); fi;
+ @if [ $(TARGET_DIR)/$(SED_TARGET_BINARY) -ot $(SED_DIR)/$(SED_BINARY) ] ; then \
+ set -x; \
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(SED_DIR) install; \
+ mv $(TARGET_DIR)/usr/bin/sed $(TARGET_DIR)/bin/; \
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
- $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
+ $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc; fi
-sed: uclibc $(TARGET_DIR)/$(SED_TARGET_BINARY)
+sed: uclibc sed-target_binary
sed-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(SED_DIR) uninstall