aboutsummaryrefslogtreecommitdiffstats
path: root/include/host.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-10-13 22:47:39 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-10-13 22:47:39 +0000
commit518b039995a6e0dbdd2edfbf3099b867c63da732 (patch)
tree1e6551bc9f7addb84e56e1435dc0555745732d6b /include/host.mk
parent550f17100a5e15f9a5ac96c2923e258c786ac454 (diff)
downloadupstream-518b039995a6e0dbdd2edfbf3099b867c63da732.tar.gz
upstream-518b039995a6e0dbdd2edfbf3099b867c63da732.tar.bz2
upstream-518b039995a6e0dbdd2edfbf3099b867c63da732.zip
fix tar detection
SVN-Revision: 5061
Diffstat (limited to 'include/host.mk')
-rw-r--r--include/host.mk7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/host.mk b/include/host.mk
index 3a5fd9683e..11522184b7 100644
--- a/include/host.mk
+++ b/include/host.mk
@@ -22,10 +22,11 @@ $(TOPDIR)/.host.mk: $(INCLUDE_DIR)/host.mk
echo "HOST_OS:=$$HOST_OS" > $@; \
echo "HOST_ARCH:=$$HOST_ARCH" >> $@; \
echo "GNU_HOST_NAME:=$$GNU_HOST_NAME" >> $@; \
- if tar --version 2>&1 | grep 'GNU' >/dev/null; then \
+ TAR=`which gtar`; \
+ [ -n "$$TAR" -a -x "$$TAR" ] || TAR=`which tar`; \
+ echo "TAR:=$$TAR" >> $@; \
+ if $$TAR --version 2>&1 | grep 'GNU' >/dev/null; then \
echo "TAR_WILDCARDS:=--wildcards" >> $@; \
fi; \
- TAR=`which gtar tar | head -n 1`; \
- echo "TAR:=$$TAR" >> $@; \
)