From nobody Tue Feb 10 11:33:03 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1597686273; cv=none; d=zohomail.com; s=zohoarc; b=FNFpESaBv+vghy4lil23ImAEYK9EEpKZ6/Itu5k4odatVW77WEzy2mQ/l9JpDeVWgSce59buIyHImKcgAC5AdBFcO3kypFHTGqoFtRsHp831EahMx3P93WRHZWljR7c9HCnLV9AL+/uXhFuNyvH3vNK7DHVPcJozhSaQlvxc9bw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597686273; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Q/za4A9kj35z4V8zRYzZxdU0L26jy7y+ma7iFE0p11I=; b=BsJKkXgsGycjFamT2DnyHzWH8STHZTTarcwshOAi/M2gtLWLU/MJWq9e0VDTvvY/WHo/1t6nixRjOJFev5uYtmNzil1WLIpp+P5W7QECsoJinN7KaSvafxcnFVfx7kmORxy/DV8Y6g7AwljshCXvzapFF1mtt1ABCYa8Uc8puAI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1597686273744199.1974931541364; Mon, 17 Aug 2020 10:44:33 -0700 (PDT) Received: from localhost ([::1]:40932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k7hLy-00005P-8F for importer@patchew.org; Mon, 17 Aug 2020 11:47:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k7gLG-0003lW-2H for qemu-devel@nongnu.org; Mon, 17 Aug 2020 10:42:30 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:20310 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k7gLD-0006wQ-Gb for qemu-devel@nongnu.org; Mon, 17 Aug 2020 10:42:29 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-16-2yilabFpNA6kG7vi4ti59A-1; Mon, 17 Aug 2020 10:42:23 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D54E61DDE8 for ; Mon, 17 Aug 2020 14:42:22 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-113-20.ams2.redhat.com [10.36.113.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0775670C3D; Mon, 17 Aug 2020 14:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597675346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q/za4A9kj35z4V8zRYzZxdU0L26jy7y+ma7iFE0p11I=; b=RS/cAliorgd8hKsa6J5RTC1LNlpFI7XDe/glAK4bEUTMd2vrLgr7xwBHTU6GTO1GHUnDpz T/tsS2bp7Uy11P3lfgSGMVRG7Bptk1QgMlMuryzq7h1Dr2Xb2NuIVBHYAxp9RkKTF/bvvl VlaD0NDINqOz3gCbdIvD2RaCvCkI4ew= X-MC-Unique: 2yilabFpNA6kG7vi4ti59A-1 From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 139/150] meson: build texi doc Date: Mon, 17 Aug 2020 16:40:42 +0200 Message-Id: <20200817144053.345107-44-pbonzini@redhat.com> In-Reply-To: <20200817143723.343284-1-pbonzini@redhat.com> References: <20200817143723.343284-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.003 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=205.139.110.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/17 05:13:21 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: pass (identity @redhat.com) Signed-off-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- Makefile | 106 ++------------------------------- docs/interop/qemu-ga-ref.texi | 2 +- docs/interop/qemu-qmp-ref.texi | 2 +- meson.build | 85 ++++++++++++++++++++++++++ qga/meson.build | 12 +++- version.texi.in | 2 + 6 files changed, 104 insertions(+), 105 deletions(-) create mode 100644 version.texi.in diff --git a/Makefile b/Makefile index fe7e719075..9e4edd9c97 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,6 @@ BUILD_DIR=3D$(CURDIR) SRC_PATH=3D. =20 UNCHECKED_GOALS :=3D %clean TAGS cscope ctags dist \ - html info pdf txt \ help check-help print-% \ docker docker-% vm-help vm-test vm-build-% =20 @@ -117,20 +116,13 @@ generated-files-y +=3D .git-submodule-status Makefile: ; configure: ; =20 -.PHONY: all clean cscope distclean html info install install-doc \ - pdf txt recurse-all dist msi FORCE +.PHONY: all clean cscope distclean install \ + recurse-all dist msi FORCE =20 $(call set-vpath, $(SRC_PATH)) =20 LIBS+=3D-lz $(LIBS_TOOLS) =20 -ifdef BUILD_DOCS -DOCS+=3Ddocs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/= interop/qemu-qmp-ref.7 -DOCS+=3Ddocs/interop/qemu-ga-ref.html docs/interop/qemu-ga-ref.txt docs/in= terop/qemu-ga-ref.7 -else -DOCS=3D -endif - SUBDIR_MAKEFLAGS=3D$(if $(V),,--no-print-directory --quiet) BUILD_DIR=3D$(= BUILD_DIR) =20 ifneq ($(wildcard config-host.mak),) @@ -139,7 +131,7 @@ endif =20 include $(SRC_PATH)/tests/Makefile.include =20 -all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) recurse-all modules +all: recurse-all modules =20 # LIBFDT_lib=3D"": avoid breaking existing trees with objects requiring -f= PIC DTC_MAKE_ARGS=3D-I$(SRC_PATH)/dtc VPATH=3D$(SRC_PATH)/dtc -C dtc V=3D"$(V)= " LIBFDT_lib=3D"" @@ -212,7 +204,7 @@ qemu-%.tar.bz2: =20 distclean: clean ninja-distclean -test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean -g - rm -f config-host.mak config-host.h* $(DOCS) + rm -f config-host.mak config-host.h* rm -f tests/tcg/config-*.mak rm -f config-all-disas.mak config.status rm -f po/*.mo tests/qemu-iotests/common.env @@ -223,12 +215,6 @@ distclean: clean ninja-distclean rm -f Makefile.ninja ninjatool ninjatool.stamp Makefile.mtest rm -f config.log rm -f linux-headers/asm - rm -f docs/version.texi - rm -f docs/interop/qemu-ga-qapi.texi docs/interop/qemu-qmp-qapi.texi - rm -f docs/interop/qemu-qmp-ref.7 docs/interop/qemu-ga-ref.7 - rm -f docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt - rm -f docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf - rm -f docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html rm -Rf .sdk =20 KEYMAPS=3Dda en-gb et fr fr-ch is lt no pt-br sv \ @@ -262,29 +248,6 @@ else BLOBS=3D endif =20 -install-doc: $(DOCS) - $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)" - $(INSTALL_DATA) docs/interop/qemu-qmp-ref.html "$(DESTDIR)$(qemu_docdir)/= interop" - $(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)/i= nterop" -ifdef CONFIG_POSIX - $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" - $(INSTALL_DATA) $(MANUAL_BUILDDIR)/system/qemu.1 "$(DESTDIR)$(mandir)/man= 1" - $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7" - $(INSTALL_DATA) docs/interop/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7" -ifeq ($(CONFIG_GUEST_AGENT),y) - $(INSTALL_DATA) docs/interop/qemu-ga-ref.html "$(DESTDIR)$(qemu_docdir)/i= nterop" - $(INSTALL_DATA) docs/interop/qemu-ga-ref.txt "$(DESTDIR)$(qemu_docdir)/in= terop" - $(INSTALL_DATA) docs/interop/qemu-ga-ref.7 "$(DESTDIR)$(mandir)/man7" -endif -endif -ifdef CONFIG_VIRTFS - $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" - $(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/virtfs-proxy-helper.1 "$(DESTDIR= )$(mandir)/man1" -endif -ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy) - $(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/virtiofsd.1 "$(DESTDIR)$(mandir)= /man1" -endif - install-datadir: $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)" =20 @@ -299,8 +262,7 @@ ICON_SIZES=3D16x16 24x24 32x32 48x48 64x64 128x128 256x= 256 512x512 =20 # Needed by "meson install" export DESTDIR -install: all $(if $(BUILD_DOCS),install-doc) \ - install-datadir install-localstatedir +install: all install-datadir install-localstatedir ifdef CONFIG_TRACE_SYSTEMTAP $(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir) endif @@ -331,62 +293,6 @@ endif $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadi= r)/keymaps"; \ done =20 -# documentation -MAKEINFO=3Dmakeinfo -MAKEINFOINCLUDES=3D -I docs -I $( $@,"GEN","$@") - -%.html: %.texi docs/version.texi - $(call quiet-command,LC_ALL=3DC $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers= \ - --html $< -o $@,"GEN","$@") - -%.info: %.texi docs/version.texi - $(call quiet-command,$(MAKEINFO) $(MAKEINFOFLAGS) $< -o $@,"GEN","$@") - -%.txt: %.texi docs/version.texi - $(call quiet-command,LC_ALL=3DC $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers= \ - --plaintext $< -o $@,"GEN","$@") - -%.pdf: %.texi docs/version.texi - $(call quiet-command,texi2pdf $(TEXI2PDFFLAGS) $< -o $@,"GEN","$@") - -docs/interop/qemu-qmp-qapi.texi: qapi/qapi-doc.texi - @cp -p $< $@ - -docs/interop/qemu-ga-qapi.texi: qga/qga-qapi-doc.texi - @cp -p $< $@ - -html: docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html sphinxd= ocs -info: docs/interop/qemu-qmp-ref.info docs/interop/qemu-ga-ref.info -pdf: docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf -txt: docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt - -docs/interop/qemu-ga-ref.dvi docs/interop/qemu-ga-ref.html \ - docs/interop/qemu-ga-ref.info docs/interop/qemu-ga-ref.pdf \ - docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7: \ - docs/interop/qemu-ga-ref.texi docs/interop/qemu-ga-qapi.texi - -docs/interop/qemu-qmp-ref.dvi docs/interop/qemu-qmp-ref.html \ - docs/interop/qemu-qmp-ref.info docs/interop/qemu-qmp-ref.pdf \ - docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7: \ - docs/interop/qemu-qmp-ref.texi docs/interop/qemu-qmp-qapi.texi - -$(filter %.1 %.7 %.8,$(DOCS)): scripts/texi2pod.pl - $(call quiet-command, \ - perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $(TEXI2PODFLAGS) $< $@.pod = && \ - $(POD2MAN) --section=3D$(subst .,,$(suffix $@)) --center=3D" " --releas= e=3D" " $@.pod > $@, \ - "GEN","$@") - -man: $(filter %.1 %.7 %.8,$(DOCS)) - ifdef CONFIG_WIN32 =20 INSTALLER =3D qemu-setup-$(VERSION)$(EXESUF) @@ -485,7 +391,7 @@ endif $(call print-help,vm-help,Help about targets running tests inside VM) @echo '' @echo 'Documentation targets:' - $(call print-help,html info pdf txt,Build documentation in specified form= at) + $(call print-help,html info pdf txt man,Build documentation in specified = format) @echo '' ifdef CONFIG_WIN32 @echo 'Windows targets:' diff --git a/docs/interop/qemu-ga-ref.texi b/docs/interop/qemu-ga-ref.texi index ddb76ce1c2..a23cc2ed7f 100644 --- a/docs/interop/qemu-ga-ref.texi +++ b/docs/interop/qemu-ga-ref.texi @@ -65,7 +65,7 @@ along with this manual. If not, see http://www.gnu.org/l= icenses/. @c for texi2pod: @c man begin DESCRIPTION =20 -@include qemu-ga-qapi.texi +@include qga/qga-qapi-doc.texi =20 @c man end =20 diff --git a/docs/interop/qemu-qmp-ref.texi b/docs/interop/qemu-qmp-ref.texi index bb25758bd0..ea1d7fe6c2 100644 --- a/docs/interop/qemu-qmp-ref.texi +++ b/docs/interop/qemu-qmp-ref.texi @@ -65,7 +65,7 @@ along with this manual. If not, see http://www.gnu.org/l= icenses/. @c for texi2pod: @c man begin DESCRIPTION =20 -@include qemu-qmp-qapi.texi +@include qapi/qapi-doc.texi =20 @c man end =20 diff --git a/meson.build b/meson.build index bce7580726..c29627e83b 100644 --- a/meson.build +++ b/meson.build @@ -1050,6 +1050,91 @@ subdir('pc-bios') subdir('tests') subdir('docs') =20 +if build_docs + makeinfo =3D find_program('makeinfo', required: build_docs) + + docs_inc =3D [ + '-I', meson.current_source_dir(), + '-I', meson.current_build_dir() / 'docs', + '-I', '@OUTDIR@', + ] + + version_texi =3D configure_file(output: 'version.texi', + input: 'version.texi.in', + configuration: {'VERSION': meson.project_ver= sion(), + 'qemu_confdir': config_host[= 'qemu_confdir']}) + + texi =3D { + 'qemu-qmp-ref': ['docs/interop/qemu-qmp-ref.texi', qapi_doc_texi, vers= ion_texi], + } + if 'CONFIG_GUEST_AGENT' in config_host + texi +=3D {'qemu-ga-ref': ['docs/interop/qemu-ga-ref.texi', qga_qapi_d= oc_texi, version_texi]} + endif + + if makeinfo.found() + cmd =3D [ + 'env', 'LC_ALL=3DC', makeinfo, '--no-split', '--number-sections', do= cs_inc, + '@INPUT0@', '-o', '@OUTPUT@', + ] + foreach ext, args: { + 'info': [], + 'html': ['--no-headers', '--html'], + 'txt': ['--no-headers', '--plaintext'], + } + t =3D [] + foreach doc, input: texi + output =3D doc + '.' + ext + t +=3D custom_target(output, + input: input, + output: output, + install: true, + install_dir: config_host['qemu_docdir'] / 'interop', + command: cmd + args) + endforeach + alias_target(ext, t) + endforeach + endif + + texi2pdf =3D find_program('texi2pdf', required: false) + + if texi2pdf.found() + pdfs =3D [] + foreach doc, input: texi + output =3D doc + '.pdf' + pdfs +=3D custom_target(output, + input: input, + output: output, + command: [texi2pdf, '-q', docs_inc, '@INPUT0@', '-o', = '@OUTPUT@'], + build_by_default: false) + endforeach + alias_target('pdf', pdfs) + endif + + texi2pod =3D find_program('scripts/texi2pod.pl') + pod2man =3D find_program('pod2man', required: build_docs) + + if pod2man.found() + foreach doc, input: texi + man =3D doc + '.7' + pod =3D custom_target(man + '.pod', + input: input, + output: man + '.pod', + command: [texi2pod, + '-DVERSION=3D"' + meson.project_versio= n() + '"', + '-DCONFDIR=3D"' + config_host['qemu_co= nfdir'] + '"', + '@INPUT0@', '@OUTPUT@']) + man =3D custom_target(man, + input: pod, + output: man, + capture: true, + install: true, + install_dir: config_host['mandir'] / 'man7', + command: [pod2man, '--utf8', '--section=3D7', '-= -center=3D" "', + '--release=3D" "', '@INPUT@']) + endforeach + endif +endif + summary_info =3D {} summary_info +=3D {'Install prefix': config_host['prefix']} summary_info +=3D {'BIOS directory': config_host['qemu_datadir']} diff --git a/qga/meson.build b/qga/meson.build index 7e7174b0a3..6fdddd68e3 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -1,7 +1,6 @@ qga_qapi_outputs =3D [ 'qga-qapi-commands.c', 'qga-qapi-commands.h', - 'qga-qapi-doc.texi', 'qga-qapi-emit-events.c', 'qga-qapi-emit-events.h', 'qga-qapi-events.c', @@ -17,12 +16,19 @@ qga_qapi_outputs =3D [ ] =20 qga_qapi_files =3D custom_target('QGA QAPI files', - output: qga_qapi_outputs, + output: qga_qapi_outputs + ['qga-qapi-doc.t= exi'], input: 'qapi-schema.json', command: [ qapi_gen, '-o', 'qga', '-p', 'qg= a-', '@INPUT0@' ], depend_files: qapi_gen_depends) + qga_ss =3D ss.source_set() -qga_ss.add(qga_qapi_files) +i =3D 0 +foreach output: qga_qapi_outputs + qga_ss.add(qga_qapi_files[i]) + i =3D i + 1 +endforeach +qga_qapi_doc_texi =3D qga_qapi_files[i] + qga_ss.add(files( 'commands.c', 'guest-agent-command-state.c', diff --git a/version.texi.in b/version.texi.in new file mode 100644 index 0000000000..0a723b8be6 --- /dev/null +++ b/version.texi.in @@ -0,0 +1,2 @@ +@set VERSION @VERSION@ +@set CONFDIR @qemu_confdir@ --=20 2.26.2