summaryrefslogtreecommitdiffstats
path: root/make/tar.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/tar.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/tar.mk')
-rw-r--r--make/tar.mk15
1 files changed, 10 insertions, 5 deletions
diff --git a/make/tar.mk b/make/tar.mk
index a0213dd0a..9fc76031e 100644
--- a/make/tar.mk
+++ b/make/tar.mk
@@ -43,11 +43,16 @@ $(GNUTAR_DIR)/.configured: $(GNUTAR_DIR)/.unpacked
$(GNUTAR_DIR)/$(GNUTAR_BINARY): $(GNUTAR_DIR)/.configured
$(MAKE) -C $(GNUTAR_DIR)
-$(TARGET_DIR)/$(GNUTAR_TARGET_BINARY): $(GNUTAR_DIR)/$(GNUTAR_BINARY)
- rm -f $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY)
- cp -a $(GNUTAR_DIR)/$(GNUTAR_BINARY) $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY)
-
-tar: uclibc $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY)
+# This stuff is needed to work around GNU make deficiencies
+tar-target_binary: $(GNUTAR_DIR)/$(GNUTAR_BINARY)
+ @if [ -L $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY) ] ; then \
+ rm -f $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); fi;
+ @if [ $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY) -ot $(GNUTAR_DIR)/$(GNUTAR_BINARY) ] ; then \
+ set -x; \
+ rm -f $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); \
+ cp -a $(GNUTAR_DIR)/$(GNUTAR_BINARY) $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); fi ;
+
+tar: uclibc tar-target_binary
tar-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUTAR_DIR) uninstall