more portability fixes and a prereq check for gnu tar
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 10 Oct 2006 21:06:45 +0000 (21:06 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 10 Oct 2006 21:06:45 +0000 (21:06 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@5037 3c298f89-4303-0410-b956-a3cf2f4a3e73

include/host.mk
include/prereq-build.mk
rules.mk
scripts/make-ipkg-dir.sh

index abcf045d01e05327408dcb6e9bc8310b695ee74d..3a5fd9683e3592f4750a80964a321075e388cde7 100644 (file)
@@ -7,6 +7,8 @@
 
 include $(TOPDIR)/.host.mk
 
+export TAR
+
 $(TOPDIR)/.host.mk: $(INCLUDE_DIR)/host.mk
        @( \
                HOST_OS=`uname`; \
@@ -23,5 +25,7 @@ $(TOPDIR)/.host.mk: $(INCLUDE_DIR)/host.mk
                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" >> $@; \
        )
 
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. \
+))
index b9859dbd3f66e9b653e56331a9ed05319d8fc341..73611029a3c835d933922100339ec6dce842c37b 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -6,6 +6,7 @@
 #
 
 -include $(TOPDIR)/.config
+include $(TOPDIR)/include/host.mk
 include $(TOPDIR)/include/verbose.mk
 
 export SHELL=/usr/bin/env bash -c '. $(TOPDIR)/include/shell.sh; eval "$$2"' --
index 236cb6feb4b01f8428e893fe1b35992d63e96ed2..902a4b526b00a2d81139dc530bc187c28ce9c66b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 BASE=http://svn.openwrt.org/openwrt/trunk/openwrt
 TARGET=$1
 CONTROL=$2