diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-10-10 21:06:45 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-10-10 21:06:45 +0000 |
commit | 3dcf8b9e33a39bb791904fcf6b2a4ff6ccbcfa7a (patch) | |
tree | aff9fc1ec79abef6e7b1da340aadb99c6e19c285 /include | |
parent | 9a66e2ac6a392314bcf3cbf0f24673e3e3bc40d3 (diff) |
more portability fixes and a prereq check for gnu tar
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@5037 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r-- | include/host.mk | 4 | ||||
-rw-r--r-- | include/prereq-build.mk | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/host.mk b/include/host.mk index abcf045d0..3a5fd9683 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`; \ @@ -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" >> $@; \ ) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index a2e5469fa..d6396af8e 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -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. \ +)) |