diff options
Diffstat (limited to 'make/tar.mk')
-rw-r--r-- | make/tar.mk | 15 |
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 |