more portability fixes and a prereq check for gnu tar
[openwrt-10.03/.git] / include / prereq-build.mk
index a2e5469fa633b62f074f2863797a0056738305ba..d6396af8e2885c063c297c3dfd133494b87905e3 100644 (file)
@@ -8,6 +8,7 @@
 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" ]
@@ -94,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. \
+))