From patchwork Fri Feb 17 15:12:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 94163 Delivered-To: patches@linaro.org Received: by 10.140.20.99 with SMTP id 90csp212336qgi; Fri, 17 Feb 2017 07:12:23 -0800 (PST) X-Received: by 10.223.164.10 with SMTP id d10mr6459161wra.90.1487344343501; Fri, 17 Feb 2017 07:12:23 -0800 (PST) Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by mx.google.com with ESMTPS id w81si2041375wmg.39.2017.02.17.07.12.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Feb 2017 07:12:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) client-ip=2001:8b0:1d0::2; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1cekCr-0003kA-9p; Fri, 17 Feb 2017 15:12:21 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Markus Armbruster , =?utf-8?q?Marc-Andr=C3=A9_Lure?= =?utf-8?q?au?= Subject: [PATCH] Makefile: Put VERSION info into version.texi rather than using -D Date: Fri, 17 Feb 2017 15:12:20 +0000 Message-Id: <1487344340-30471-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 Unfortunately some older versions of makeinfo don't correctly handle the -D command line option and fail to set the variable. This then causes them to complain docs/qemu-ga-ref.texi:41: warning: undefined flag: VERSION Work around this by doing as the autotools do, and writing the information into a version.texi file which we then include from the .texi files that need it. Signed-off-by: Peter Maydell --- Makefile | 17 ++++++++++------- docs/qemu-ga-ref.texi | 2 ++ docs/qemu-qmp-ref.texi | 2 ++ 3 files changed, 14 insertions(+), 7 deletions(-) -- 2.7.4 Reviewed-by: Eric Blake diff --git a/Makefile b/Makefile index 830fa5a..1c4c04f 100644 --- a/Makefile +++ b/Makefile @@ -516,7 +516,7 @@ distclean: clean rm -f qemu-doc.vr qemu-doc.txt rm -f config.log rm -f linux-headers/asm - rm -f qemu-ga-qapi.texi qemu-qapi.texi + rm -f qemu-ga-qapi.texi qemu-qapi.texi version.texi rm -f docs/qemu-qmp-ref.7 docs/qemu-ga-ref.7 rm -f docs/qemu-qmp-ref.txt docs/qemu-ga-ref.txt rm -f docs/qemu-qmp-ref.pdf docs/qemu-ga-ref.pdf @@ -663,21 +663,24 @@ ui/console-gl.o: $(SRC_PATH)/ui/console-gl.c \ # documentation MAKEINFO=makeinfo -MAKEINFOFLAGS=--no-split --number-sections -D 'VERSION $(VERSION)' -TEXIFLAG=$(if $(V),,--quiet) --command='@set VERSION $(VERSION)' +MAKEINFOFLAGS=--no-split --number-sections +TEXIFLAG=$(if $(V),,--quiet) -%.html: %.texi +version.texi: $(SRC_PATH)/VERSION + $(call quiet-command,echo "@set VERSION $(VERSION)" > $@,"GEN","$@") + +%.html: %.texi version.texi $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers \ --html $< -o $@,"GEN","$@") -%.info: %.texi +%.info: %.texi version.texi $(call quiet-command,$(MAKEINFO) $(MAKEINFOFLAGS) $< -o $@,"GEN","$@") -%.txt: %.texi +%.txt: %.texi version.texi $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers \ --plaintext $< -o $@,"GEN","$@") -%.pdf: %.texi +%.pdf: %.texi version.texi $(call quiet-command,texi2pdf $(TEXIFLAG) -I $(SRC_PATH) -I . $< -o $@,"GEN","$@") qemu-options.texi: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool diff --git a/docs/qemu-ga-ref.texi b/docs/qemu-ga-ref.texi index 87cc8d0..ddb76ce 100644 --- a/docs/qemu-ga-ref.texi +++ b/docs/qemu-ga-ref.texi @@ -1,6 +1,8 @@ \input texinfo @setfilename qemu-ga-ref.info +@include version.texi + @exampleindent 0 @paragraphindent 0 diff --git a/docs/qemu-qmp-ref.texi b/docs/qemu-qmp-ref.texi index 818e525..0a00569 100644 --- a/docs/qemu-qmp-ref.texi +++ b/docs/qemu-qmp-ref.texi @@ -1,6 +1,8 @@ \input texinfo @setfilename qemu-qmp-ref.info +@include version.texi + @exampleindent 0 @paragraphindent 0