more portability fixes and a prereq check for gnu tar
[openwrt-10.03/.git] / include / prereq-build.mk
index 11403c2fdcaf5ee68bffec541cc0245685f020db..d6396af8e2885c063c297c3dfd133494b87905e3 100644 (file)
@@ -6,7 +6,9 @@
 #
 
 include $(TOPDIR)/rules.mk
+TMP_DIR:=$(TOPDIR)/tmp
 include $(INCLUDE_DIR)/prereq.mk
+include $(INCLUDE_DIR)/host.mk
 
 define Require/non-root
        [ "$$(shell whoami)" != "root" ]
@@ -93,3 +95,11 @@ $(eval $(call RequireCommand,patch, \
 $(eval $(call RequireCommand,perl, \
        Please install perl. \
 ))
+
+define Require/gnutar
+       $(TAR) --version 2>&1 | grep GNU > /dev/null
+endef
+
+$(eval $(call Require,gnutar, \
+       Please install GNU tar. \
+))