From: Roman Bogorodskiy Date: Wed, 5 Aug 2020 15:49:02 +0000 (+0400) Subject: build-aux: use GNU sed for syntax-check on FreeBSD X-Git-Tag: v6.8.0-rc1~305 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28a5096d6920ee026654873aa07b74d0d5ec3031;p=thirdparty%2Flibvirt.git build-aux: use GNU sed for syntax-check on FreeBSD BSD sed(1) and GNU sed(1) syntax are not compatible, and as synax-check.mk uses the GNU flavor, set SED variable to 'gsed' by default. Signed-off-by: Roman Bogorodskiy Reviewed-by: Daniel P. Berrangé --- diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index af3af54de4..80b94425a0 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -28,7 +28,15 @@ ME := build-aux/syntax-check.mk # ignoring the module description. AWK ?= awk GREP ?= grep +# FreeBSD (and probably some other OSes too) ships own version of sed(1), not +# compatible with the GNU sed. GNU sed is available as gsed(1), so use this +# instead +UNAME := $(shell uname) +ifeq ($(UNAME),FreeBSD) +SED ?= gsed +else SED ?= sed +endif # Helper variables. _empty =