]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build-aux: use GNU sed for syntax-check on FreeBSD
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Wed, 5 Aug 2020 15:49:02 +0000 (19:49 +0400)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Thu, 3 Sep 2020 14:56:03 +0000 (18:56 +0400)
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 <bogorodskiy@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
build-aux/syntax-check.mk

index af3af54de4d4bd3dc564bed84cf8563431877001..80b94425a0ffa47a2e35ed70cc5d5f9f2f26835a 100644 (file)
@@ -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 =