X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/b15238f536bdcbc1fb85c67940b97f1463f90ca0..1f088ed0f35cec10ae1e483a63492dacc066d8db:/include/host.mk diff --git a/include/host.mk b/include/host.mk index 278ad726f..833aa83a6 100644 --- a/include/host.mk +++ b/include/host.mk @@ -9,6 +9,8 @@ include $(TMP_DIR)/.host.mk export TAR +ifneq ($(__host_inc),1) +__host_inc:=1 $(TMP_DIR)/.host.mk: $(TOPDIR)/include/host.mk @mkdir -p $(TMP_DIR) @( \ @@ -23,12 +25,16 @@ $(TMP_DIR)/.host.mk: $(TOPDIR)/include/host.mk echo "HOST_OS:=$$HOST_OS" > $@; \ echo "HOST_ARCH:=$$HOST_ARCH" >> $@; \ echo "GNU_HOST_NAME:=$$GNU_HOST_NAME" >> $@; \ - TAR=`which gtar`; \ - [ -n "$$TAR" -a -x "$$TAR" ] || TAR=`which tar`; \ + TAR=`which gtar 2>/dev/null`; \ + [ -n "$$TAR" -a -x "$$TAR" ] || TAR=`which tar 2>/dev/null`; \ echo "TAR:=$$TAR" >> $@; \ - ZCAT=`which gzcat`; \ - [ -n "$$ZCAT" -a -x "$$ZCAT" ] || ZCAT=`which zcat`; \ - echo "ZCAT:=$$ZCAT" >> $@; \ echo "BASH:=$(shell which bash)" >> $@; \ ) +endif + +ifeq ($(HOST_OS),Linux) + XARGS:=xargs -r +else + XARGS:=xargs +endif