X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/23ac60b66ca9d7567696ed47f76a25c4fb4dc6aa..e692b6f78e25b78e77387abb0b6e90cbc3407303:/include/host.mk diff --git a/include/host.mk b/include/host.mk index 4a434711c..8b2e56ce5 100644 --- a/include/host.mk +++ b/include/host.mk @@ -5,10 +5,13 @@ # See /LICENSE for more information. # -include $(TMP_DIR)/.host.mk +-include $(TMP_DIR)/.host.mk export TAR +TMP_DIR ?= $(TOPDIR)/tmp +ifneq ($(__host_inc),1) +__host_inc:=1 $(TMP_DIR)/.host.mk: $(TOPDIR)/include/host.mk @mkdir -p $(TMP_DIR) @( \ @@ -26,9 +29,18 @@ $(TMP_DIR)/.host.mk: $(TOPDIR)/include/host.mk TAR=`which gtar 2>/dev/null`; \ [ -n "$$TAR" -a -x "$$TAR" ] || TAR=`which tar 2>/dev/null`; \ echo "TAR:=$$TAR" >> $@; \ - ZCAT=`which gzcat 2>/dev/null`; \ - [ -n "$$ZCAT" -a -x "$$ZCAT" ] || ZCAT=`which zcat 2>/dev/null`; \ - echo "ZCAT:=$$ZCAT" >> $@; \ echo "BASH:=$(shell which bash)" >> $@; \ + if find -L /tmp -maxdepth 0 >/dev/null 2>/dev/null; then \ + echo 'FIND_L=find -L $$(1)' >>$@; \ + else \ + echo 'FIND_L=find $$(1) -follow' >> $@; \ + fi; \ ) +endif + +ifeq ($(HOST_OS),Linux) + XARGS:=xargs -r +else + XARGS:=xargs +endif