X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/a37b2b1bf9fdd4e1a5397b96e8456203e39e0903..957731ef89fc1876a0ab8c56d50001011b20abb0:/include/host.mk diff --git a/include/host.mk b/include/host.mk index 8092e8db7..9b8a32b67 100644 --- a/include/host.mk +++ b/include/host.mk @@ -36,7 +36,7 @@ $(TMP_DIR)/.host.mk: $(TOPDIR)/include/host.mk *) HOST_ARCH=`uname -p`;; \ esac; \ GNU_HOST_NAME=`gcc -dumpmachine`; \ - [ -z "$$GNU_HOST_NAME" -o "$$HOST_OS" == "Darwin" ] && \ + [ -z "$$GNU_HOST_NAME" -o "$$HOST_OS" = "Darwin" ] && \ GNU_HOST_NAME=`$(TOPDIR)/scripts/config.guess`; \ echo "HOST_OS:=$$HOST_OS" > $@; \ echo "HOST_ARCH:=$$HOST_ARCH" >> $@; \ @@ -59,6 +59,9 @@ $(TMP_DIR)/.host.mk: $(TOPDIR)/include/host.mk else \ echo 'XARGS:=xargs' >> $@; \ fi; \ + PATCH=`which gpatch 2>/dev/null`; \ + [ -n "$$PATCH" -a -x "$$PATCH" ] || PATCH=`which patch 2>/dev/null`; \ + echo "PATCH:=$$PATCH" >> $@; \ ) endif