From 28a5096d6920ee026654873aa07b74d0d5ec3031 Mon Sep 17 00:00:00 2001 From: Roman Bogorodskiy Date: Wed, 5 Aug 2020 19:49:02 +0400 Subject: [PATCH] build-aux: use GNU sed for syntax-check on FreeBSD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é --- build-aux/syntax-check.mk | 8 ++++++++ 1 file changed, 8 insertions(+) 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 =