@@ -128,13 +128,8 @@ $(call set-vpath, $(SRC_PATH))
LIBS+=-lz $(LIBS_TOOLS)
-vhost-user-json-y =
HELPERS-y =
-ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy)
-vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
-endif
-
# Sphinx does not allow building manuals into the same directory as
# the source files, so if we're doing an in-tree QEMU build we must
# build the manuals into a subdirectory (and then install them from
@@ -240,7 +235,7 @@ dummy := $(call unnest-vars,, \
include $(SRC_PATH)/tests/Makefile.include
-all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all modules $(vhost-user-json-y)
+all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all modules
config-host.h: config-host.h-timestamp
config-host.h-timestamp: config-host.mak
@@ -522,12 +517,6 @@ endif
ifneq ($(HELPERS-y),)
$(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir))
endif
-ifneq ($(vhost-user-json-y),)
- $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/vhost-user/"
- for x in $(vhost-user-json-y); do \
- $(INSTALL_DATA) $$x "$(DESTDIR)$(qemu_datadir)/vhost-user/"; \
- done
-endif
ifdef CONFIG_TRACE_SYSTEMTAP
$(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir)
endif
@@ -2,4 +2,9 @@ if 'CONFIG_VIRGL' in config_host and 'CONFIG_GBM' in config_host
executable('vhost-user-gpu', files('main.c', 'virgl.c', 'vugbm.c'),
link_with: libvhost_user,
dependencies: [qemuutil, pixman, gbm, virgl])
+
+ configure_file(input: '50-qemu-gpu.json.in',
+ output: '50-qemu-gpu.json',
+ configuration: config_host,
+ install_dir: config_host['qemu_datadir'] / 'vhost-user')
endif
@@ -393,10 +393,3 @@ TEXI2MAN = $(call quiet-command, \
$(call TEXI2MAN)
%.8:
$(call TEXI2MAN)
-
-GEN_SUBST = $(call quiet-command, \
- sed -e "s!@libexecdir@!$(libexecdir)!g" < $< > $@, \
- "GEN","$@")
-
-%.json: %.json.in
- $(call GEN_SUBST)