more portability fixes and a prereq check for gnu tar
[openwrt.org/openwrt.git] / include / host.mk
blob:a/include/host.mk -> blob:b/include/host.mk
--- a/include/host.mk
+++ b/include/host.mk
@@ -6,6 +6,8 @@
 #
 
 include $(TOPDIR)/.host.mk
+
+export TAR
 
 $(TOPDIR)/.host.mk: $(INCLUDE_DIR)/host.mk
 	@( \
@@ -23,6 +25,8 @@
 		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" >> $@; \
 	)
 
 

comments