From nobody Mon Feb 9 20:59:49 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1580236167757245.2727061472143; Tue, 28 Jan 2020 10:29:27 -0800 (PST) Received: from localhost ([::1]:35174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwVc3-0003Q3-7c for importer@patchew.org; Tue, 28 Jan 2020 13:29:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59622) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwV54-0007st-RK for qemu-devel@nongnu.org; Tue, 28 Jan 2020 12:55:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iwV53-0001eb-49 for qemu-devel@nongnu.org; Tue, 28 Jan 2020 12:55:18 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:36267) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iwV52-0001WH-Np for qemu-devel@nongnu.org; Tue, 28 Jan 2020 12:55:16 -0500 Received: by mail-wm1-x32b.google.com with SMTP id p17so3577144wma.1 for ; Tue, 28 Jan 2020 09:55:14 -0800 (PST) Received: from localhost.localdomain (93-36-56-206.ip58.fastwebnet.it. [93.36.56.206]) by smtp.gmail.com with ESMTPSA id o4sm27046968wrx.25.2020.01.28.09.55.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jan 2020 09:55:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=o3TXGYGmV/MwP/W8uOvf4xhCM1C9M0jbEjzBD/qYMIs=; b=pdyIFjbBQDuaVMcefWHqyKtrmAvD+3hbC2uvjuXkc35MStGMIEbTnf7BT8m2nUarCa Z75czulP0HgXe+QSyyUo4aO7kNpJJmrapG/h40WXU/o1A3Bjv4PdzJIJX01U323GDfOX u78YCp0DhNS7V0VwDg7o+6CpZVQN2pS3+u4MdD0f5Xh4mq3GX7TZS73LMZSaeD8TuuNW 6xhqf75kI25eP0Bw6KHDYGdDTV8KHAMuA5zFOpsz+aDpd5Swaq1/9oVeF/leiSAaKoYu mqrGMXZBhhHQHr52lQSphkGd0nxLSWUIYmxxIaucL2nfvEfq1hnbAYzTDaZBkMJDt6k+ cBCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=o3TXGYGmV/MwP/W8uOvf4xhCM1C9M0jbEjzBD/qYMIs=; b=SOdA0GLkeYjx+aFAoFa02Np7+nwaFgfwjbx1tM9EPSgQjCmk254WF+iZ/IQDalHHH/ hVdzd/4/Ai5ko6gpjDvttLaUqdk0M6UEBVgXtMIxPRgwy7Yiw30w0S72K4oJF8PKAUmf zNNV4L+xsYduFOiF6bekdc7LNT9MgEnyeHNlYyqF4neotwmcKn34Tt9oZETqu1hHUDdG xdexKdXXhotwL+Lb+OYynBmq2Qi+5CqX9KPTm5GEQDBRBgLuVBZ0RkBwmCyq/Ox93K+P OV3/6r1veHqvpdFAom380zqIaNCg6Fn5wfocpocvV2Z/l60N407F5y/v/GgofFeWLE0c r3LQ== X-Gm-Message-State: APjAAAXAe6q7f5sfn6tN+Xfb7+vxWOZzf2c7NvucyLgsCYWDUa1KKLc8 lgRx8JkHV3nBDIv51THbEnd22uwG X-Google-Smtp-Source: APXvYqxBVns92yuyHHHTnTeqVvl82kmMkoWvnWn0mG2imUZSVOcD98sQjH2jY/X02I2o+tM/z0hoCg== X-Received: by 2002:a7b:c109:: with SMTP id w9mr6180827wmi.14.1580234113259; Tue, 28 Jan 2020 09:55:13 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 035/142] meson: generate hxtool files Date: Tue, 28 Jan 2020 18:51:55 +0100 Message-Id: <20200128175342.9066-36-pbonzini@redhat.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200128175342.9066-1-pbonzini@redhat.com> References: <20200128175342.9066-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32b X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- Makefile | 20 +------------------- Makefile.target | 6 ------ meson.build | 35 +++++++++++++++++++++++++++++++++++ scripts/hxtool | 2 +- 4 files changed, 37 insertions(+), 26 deletions(-) mode change 100644 =3D> 100755 scripts/hxtool diff --git a/Makefile b/Makefile index a1cddb8476..040bcad43a 100644 --- a/Makefile +++ b/Makefile @@ -106,7 +106,7 @@ include $(SRC_PATH)/rules.mak # lor is defined in rules.mak CONFIG_BLOCK :=3D $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)) =20 -generated-files-y =3D config-host.h qemu-options.def +generated-files-y =3D config-host.h =20 generated-files-y +=3D module_block.h =20 @@ -244,8 +244,6 @@ all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(= HELPERS-y) recurse-all mo =20 config-host.h: config-host.h-timestamp config-host.h-timestamp: config-host.mak -qemu-options.def: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool - $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@= ") =20 TARGET_DIRS_RULES :=3D $(foreach t, all clean install, $(addsuffix /$(t), = $(TARGET_DIRS))) =20 @@ -343,9 +341,6 @@ ifdef CONFIG_MPATH scsi/qemu-pr-helper$(EXESUF): LIBS +=3D -ludev -lmultipath -lmpathpersist endif =20 -qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool - $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@= ") - module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak $(call quiet-command,$(PYTHON) $< $@ \ $(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \ @@ -363,7 +358,6 @@ clean: recurse-clean rm -f $(edk2-decompressed) rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) TAGS cscope.* *.pod *~ */= *~ rm -f fsdev/*.pod scsi/*.pod - rm -f qemu-img-cmds.h rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp) rm -f config-all-devices.mak =20 @@ -639,18 +633,6 @@ $(MANUAL_BUILDDIR)/specs/index.html: $(call manual-dep= s,specs) $(MANUAL_BUILDDIR)/interop/qemu-ga.8: $(call manual-deps,interop) $(call build-manual,interop,man) =20 -qemu-options.texi: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool - $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@= ") - -qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx $(SRC_PATH)/scripts/hxtool - $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@= ") - -qemu-monitor-info.texi: $(SRC_PATH)/hmp-commands-info.hx $(SRC_PATH)/scrip= ts/hxtool - $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@= ") - -qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool - $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@= ") - docs/interop/qemu-qmp-qapi.texi: qapi/qapi-doc.texi @cp -p $< $@ =20 diff --git a/Makefile.target b/Makefile.target index 7ffb46ef73..d94fa687bf 100644 --- a/Makefile.target +++ b/Makefile.target @@ -212,12 +212,6 @@ endif gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/scripts/feature_to_c.sh $(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/scripts/feature_to_= c.sh $@ $(TARGET_XML_FILES),"GEN","$(TARGET_DIR)$@") =20 -hmp-commands.h: $(SRC_PATH)/hmp-commands.hx $(SRC_PATH)/scripts/hxtool - $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$(= TARGET_DIR)$@") - -hmp-commands-info.h: $(SRC_PATH)/hmp-commands-info.hx $(SRC_PATH)/scripts/= hxtool - $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$(= TARGET_DIR)$@") - clean: clean-target rm -f *.a *~ $(PROGS) rm -f $(shell find . -name '*.[od]') diff --git a/meson.build b/meson.build index c0122a1ab9..08e37fd677 100644 --- a/meson.build +++ b/meson.build @@ -117,6 +117,7 @@ have_block =3D have_system or have_tools =20 # Generators =20 +hxtool =3D find_program('scripts/hxtool') shaderinclude =3D find_program('scripts/shaderinclude.pl') qapi_gen =3D find_program('scripts/qapi-gen.py') qapi_gen_depends =3D [ meson.source_root() / 'scripts/qapi/__init__.py', @@ -137,6 +138,40 @@ qapi_gen_depends =3D [ meson.source_root() / 'scripts/= qapi/__init__.py', meson.source_root() / 'scripts/qapi/doc.py', ] =20 +hxdep =3D [] +hx_headers =3D [ + ['qemu-options.hx', 'qemu-options.def'], + ['qemu-img-cmds.hx', 'qemu-img-cmds.h'], +] +if have_system + hx_headers +=3D [ + ['hmp-commands.hx', 'hmp-commands.h'], + ['hmp-commands-info.hx', 'hmp-commands-info.h'], + ] +endif +foreach d : hx_headers + custom_target(d[1], + input: files(d[0]), + output: d[1], + capture: true, + build_by_default: true, # to be removed when added to a ta= rget + command: [hxtool, '-h', '@INPUT0@']) +endforeach + +foreach d : [ + ['qemu-options.hx', 'qemu-options.texi'], + ['hmp-commands.hx', 'qemu-monitor.texi'], + ['hmp-commands-info.hx', 'qemu-monitor-info.texi'], + ['qemu-img-cmds.hx', 'qemu-img-cmds.texi'], +] + custom_target(d[1], + input: files(d[0]), + output: d[1], + capture: true, + build_by_default: true, # to be removed when added to a ta= rget + command: [hxtool, '-t', '@INPUT0@']) +endforeach + # Collect sourcesets. =20 util_ss =3D ss.source_set() diff --git a/scripts/hxtool b/scripts/hxtool old mode 100644 new mode 100755 index 7d7c4289e3..27cbab59bf --- a/scripts/hxtool +++ b/scripts/hxtool @@ -64,6 +64,6 @@ case "$1" in "-h") hxtoh ;; "-t") hxtotexi ;; *) exit 1 ;; -esac +esac < "$2" =20 exit 0 --=20 2.21.0