From 1c6aad34405c65cc01911ec89ab7c3eac47a6473 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 6 Mar 2003 18:24:00 +0000 Subject: work around deficiencies in GNU tar that prevented several items from actually being installed --- make/grep.mk | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'make/grep.mk') diff --git a/make/grep.mk b/make/grep.mk index 88dbbbe4a..eadf0df4b 100644 --- a/make/grep.mk +++ b/make/grep.mk @@ -45,12 +45,17 @@ $(GNUGREP_DIR)/.configured: $(GNUGREP_DIR)/.unpacked $(GNUGREP_DIR)/$(GNUGREP_BINARY): $(GNUGREP_DIR)/.configured $(MAKE) -C $(GNUGREP_DIR) -$(TARGET_DIR)/$(GNUGREP_TARGET_BINARY): $(GNUGREP_DIR)/$(GNUGREP_BINARY) - rm -f $(TARGET_DIR)/bin/grep $(TARGET_DIR)/bin/egrep $(TARGET_DIR)/bin/fgrep - cp -a $(GNUGREP_DIR)/src/grep $(GNUGREP_DIR)/src/egrep $(GNUGREP_DIR)/src/fgrep $(TARGET_DIR)/bin/ +# This stuff is needed to work around GNU make deficiencies +grep-target_binary: $(GNUGREP_DIR)/$(GNUGREP_BINARY) + @if [ -L $(TARGET_DIR)/$(GNUGREP_TARGET_BINARY) ] ; then \ + rm -f $(TARGET_DIR)/$(GNUGREP_TARGET_BINARY); fi; + @if [ $(TARGET_DIR)/$(GNUGREP_TARGET_BINARY) -ot $(GNUGREP_DIR)/$(GNUGREP_BINARY) ] ; then \ + set -x; \ + rm -f $(TARGET_DIR)/bin/grep $(TARGET_DIR)/bin/egrep $(TARGET_DIR)/bin/fgrep; \ + cp -a $(GNUGREP_DIR)/src/grep $(GNUGREP_DIR)/src/egrep \ + $(GNUGREP_DIR)/src/fgrep $(TARGET_DIR)/bin/; fi - -grep: uclibc $(TARGET_DIR)/$(GNUGREP_TARGET_BINARY) +grep: uclibc grep-target_binary grep-clean: $(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUGREP_DIR) uninstall -- cgit v1.2.3