X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/fa8f555b9dc6b1476a806acc191a58241875a7ea..81ddc1b91ccffce0d0be47c55f9b50115f5a6869:/include/host.mk diff --git a/include/host.mk b/include/host.mk index abcf045d0..3100ce416 100644 --- a/include/host.mk +++ b/include/host.mk @@ -7,6 +7,8 @@ include $(TOPDIR)/.host.mk +export TAR + $(TOPDIR)/.host.mk: $(INCLUDE_DIR)/host.mk @( \ HOST_OS=`uname`; \ @@ -20,8 +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 \ - echo "TAR_WILDCARDS:=--wildcards" >> $@; \ - fi; \ + TAR=`which gtar`; \ + [ -n "$$TAR" -a -x "$$TAR" ] || TAR=`which tar`; \ + echo "TAR:=$$TAR" >> $@; \ + ZCAT=`which gzcat`; \ + [ -n "$$ZCAT" -a -x "$$ZCAT" ] || ZCAT=`which zcat`; \ + echo "ZCAT:=$$ZCAT" >> $@; \ )