From f6c14d4c1fcffae3bbdf90978352c7f5c8c36b8a Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Thu, 18 Jun 2020 01:47:11 +0200 Subject: [PATCH] meson: tools: generate virt-xml-validate script Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa Reviewed-by: Neal Gompa --- tools/Makefile.am | 7 +------ tools/meson.build | 13 +++++++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tools/Makefile.am b/tools/Makefile.am index 0973801420..64a8dbc845 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -24,7 +24,7 @@ STANDALONE_CPPFLAGS = -I$(top_srcdir) confdir = $(sysconfdir)/libvirt conf_DATA = -bin_SCRIPTS = virt-xml-validate virt-pki-validate +bin_SCRIPTS = virt-pki-validate libexec_SCRIPTS = libvirt-guests.sh if WITH_SANLOCK @@ -35,11 +35,6 @@ if WITH_LOGIN_SHELL conf_DATA += virt-login-shell.conf endif WITH_LOGIN_SHELL -virt-xml-validate: virt-xml-validate.in Makefile - $(AM_V_GEN)sed -e 's|[@]schemadir@|$(pkgdatadir)/schemas|g' \ - -e 's|[@]VERSION@|$(VERSION)|g' \ - < $< > $@ || (rm $@ && exit 1) && chmod +x $@ - virt-pki-validate: virt-pki-validate.in Makefile $(AM_V_GEN)sed -e 's|[@]sysconfdir@|$(sysconfdir)|g' \ -e 's|[@]VERSION@|$(VERSION)|g' \ diff --git a/tools/meson.build b/tools/meson.build index 6217b36a32..32f4d767d4 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -219,3 +219,16 @@ executable( install_dir: bindir, install_rpath: libdir, ) + +tools_conf = configuration_data() +tools_conf.set('VERSION', meson.project_version()) +tools_conf.set('schemadir', pkgdatadir / 'schemas') + +configure_file( + input: 'virt-xml-validate.in', + output: 'virt-xml-validate', + configuration: tools_conf, + install: true, + install_dir: bindir, + install_mode: 'rwxrwxr-x', +)