mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-05 05:45:46 +00:00
meson: Check GNU sed's availability
As explained in the comment in build-aux/Makefile.in, the version of sed included in the FreeBSD base system is not GNU sed, which our syntax-check rules expect; as a result, many checks will fail with gmake: gsed: No such file or directory /bin/sh: gsed: not found Similarly to what we're already doing with GNU make and GNU grep, look for GNU sed during the configuration step and fail early if it's not available. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
5254532e3a
commit
7cbcc9f888
@ -6,6 +6,7 @@ FLAKE8 = @flake8_path@
|
|||||||
RUNUTF8 = @runutf8@
|
RUNUTF8 = @runutf8@
|
||||||
PYTHON = @PYTHON3@
|
PYTHON = @PYTHON3@
|
||||||
GREP = @GREP@
|
GREP = @GREP@
|
||||||
|
SED = @SED@
|
||||||
|
|
||||||
# include syntax-check.mk file
|
# include syntax-check.mk file
|
||||||
include $(top_srcdir)/build-aux/syntax-check.mk
|
include $(top_srcdir)/build-aux/syntax-check.mk
|
||||||
|
@ -12,8 +12,10 @@ syntax_check_conf.set('PYTHON3', python3_prog.path())
|
|||||||
|
|
||||||
if host_machine.system() == 'freebsd'
|
if host_machine.system() == 'freebsd'
|
||||||
make_prog = find_program('gmake')
|
make_prog = find_program('gmake')
|
||||||
|
sed_prog = find_program('gsed')
|
||||||
else
|
else
|
||||||
make_prog = find_program('make')
|
make_prog = find_program('make')
|
||||||
|
sed_prog = find_program('sed')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if host_machine.system() == 'freebsd'
|
if host_machine.system() == 'freebsd'
|
||||||
@ -34,6 +36,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
syntax_check_conf.set('GREP', grep_prog.path())
|
syntax_check_conf.set('GREP', grep_prog.path())
|
||||||
|
syntax_check_conf.set('SED', sed_prog.path())
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'Makefile.in',
|
input: 'Makefile.in',
|
||||||
|
@ -27,15 +27,6 @@ ME := build-aux/syntax-check.mk
|
|||||||
# of the module description. But some packages import this file directly,
|
# of the module description. But some packages import this file directly,
|
||||||
# ignoring the module description.
|
# ignoring the module description.
|
||||||
AWK ?= awk
|
AWK ?= awk
|
||||||
# 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.
|
# Helper variables.
|
||||||
_empty =
|
_empty =
|
||||||
|
Loading…
Reference in New Issue
Block a user