From nobody Tue Apr 30 14:45:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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 (zoho.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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1568909871; cv=none; d=zoho.com; s=zohoarc; b=RXA4Edj5/8Pbw2fFkxobVvM/W6G+yrSkh+10RKkrr7W8+dbYZsxxk34C1BEJKKAYRMjQ4JK45FUnX1WK3rRqNBesObFFS2Zz6vvVwjKkU99IowiipliCC6N1i6h2CEuHwbpiDWWHNlQ10tjnlRwYs5McLnzfNES7ku7mTXdGxtE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568909871; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=mxbpLFgbvXahsfaVwZ9WqZ1fAPev+aEfkTXQWBTT2B0=; b=fX1fI4Y2sTtT2/rW1q83mXnPW54ObB7ACibtenllsN6Mz2JeepK1pn/CWwR79k4I8XbDHYiTF9IJNFfhzxeT0neHm0ixfd6cj7d+cOgJzKnmncSc2X8+RTXvriKEx7geLvgId0NxymuKToA3C146PI+9hUuchem8antoPI0ZQ7Q= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 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 1568909870961439.9669688619515; Thu, 19 Sep 2019 09:17:50 -0700 (PDT) Received: from localhost ([::1]:46162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAz7s-0008Fw-Tb for importer@patchew.org; Thu, 19 Sep 2019 12:17:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41326) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAz4e-00066q-E9 for qemu-devel@nongnu.org; Thu, 19 Sep 2019 12:14:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iAyqg-0000Gd-DE for qemu-devel@nongnu.org; Thu, 19 Sep 2019 12:00:03 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:51971) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iAyqg-0000FZ-4f for qemu-devel@nongnu.org; Thu, 19 Sep 2019 12:00:02 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 7so5242839wme.1 for ; Thu, 19 Sep 2019 09:00:01 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id r6sm6131493wmh.38.2019.09.19.08.59.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Sep 2019 08:59:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mxbpLFgbvXahsfaVwZ9WqZ1fAPev+aEfkTXQWBTT2B0=; b=do31j4xLBXcXlW/y83xkvfwl6HVbamfqvv4inkU34bFFphJSIBzFAO9gdNYxUWg1vx Sa9dfCdnNiTVOcLz1v6/tbhBy2fZUb9ABI7nIA30gu0DW7IBtAbVcci7IB/54IbXuJRO MYOstFPlnCgzqujG3mZ6EqOmXMPGuIMIp0njWD4ASzS9yD4/WQtq4Ps3t0r+IyBJdPT9 pjfcRZI1Sh38cJZXiJBv2UzuL9M153XcmWAOB3kcUsg45fkp24Z0CLwh2yC80qRkUVE+ kng8308mnHSP/2wgLP5k608e39XLT4vyraQihXmPvBEIz7tSGB8Ax5Ejl0Y95EdtcsjP EYnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mxbpLFgbvXahsfaVwZ9WqZ1fAPev+aEfkTXQWBTT2B0=; b=qDm2bmymwvhMWl8RavYDS04o4Jka2f/3IA0irhRhCg6oeICyQXo84kPktvAJJ8BdaM GI3Gvm8CVbRwOzIbj1n/MkiyKJDNW9Ck50r6Y8VQnADVGu9ExATxbyPanaCWuda839rt RvCGslAWa0osOPym8xJOlA8t4DeoHJoJlP39hQeXqd/VIfdP8RZHgo9/BpD6yT/tKE6a Qsy09vewhRE4JDBkblR1T9xwyaAOkpPKAb3AL3wBqNB9B1yC3ZzyR7eNobOlvyytVd4g kbq/nuZUE4oMPJWtWPYO7O/SC45QGK0FCVl7gP1Wx0zEdbdMIz+++wE9sCSqbNIkcDIh 26Og== X-Gm-Message-State: APjAAAWwDRp5nefY6RfsmWGKkyzyFFNftF5qCRPCdz3WU/x3KZgRGCh8 uGwhJ4Z3GHiwFU8KzBY/zQsgrsRY3oo3Ag== X-Google-Smtp-Source: APXvYqyl4YiPZ93ASMweC9DA/+C0QorDddtMAujRVexaKvcrXwrDEkeY+2YJHqleW6PsgYUuQYVBVQ== X-Received: by 2002:a1c:9615:: with SMTP id y21mr3494503wmd.5.1568908800022; Thu, 19 Sep 2019 09:00:00 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH] Makefile: Fix in-tree builds when Sphinx is available Date: Thu, 19 Sep 2019 16:59:57 +0100 Message-Id: <20190919155957.12618-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 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::32c 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?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" In commit 27a296fce9821e we switched the qemu-ga manpage over to being built from Sphinx. The makefile rules for this were correct for an out-of-tree build, but break for in-tree builds if Sphinx is present and we're trying to build the documentation. Specifically, because Sphinx refuses to build output files into the same directory as its sources, for an in-tree build we tell it to build into a subdirectory docs/built, and set up a makefile variable MANUAL_BUILDDIR indicating where the docs are going. The makefile rule telling Make how to build qemu-ga.8 correctly used this variable, but the lines adding qemu-ga.8 to the list of DOCS to be built and the 'make install' rune did not. The effect was that for an in-tree build we told Make to build 'docs/interop/qemu-ga.8' but did not provide a specific rule for doing so, which caused Make to fall back to the old rules.make rule for building any "%.8" file. Make tried to invoke texi2pod with a bogus command line, resulting in the error: GEN docs/interop/qemu-ga.8 No filename or title make: *** [rules.mak:394: docs/interop/qemu-ga.8] Fix this by using $(MANUAL_BUILDDIR) when constructing the list of DOCS files we want to build and also in the source file name we install for 'make install'. (Among other things, this broke the Shippable CI builds.) Reported-by: Eric Blake Signed-off-by: Peter Maydell Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Eric Blake Tested-by: Alex Benn=C3=A9e Tested-by: Eric Blake tested-by/reviewed-by tags. --- Makefile | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 111082ce545..a0c1430b407 100644 --- a/Makefile +++ b/Makefile @@ -324,8 +324,19 @@ endif endif endif =20 +# 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 +# there for 'make install'). For an out-of-tree build we can just +# use the docs/ subdirectory in the build tree as normal. +ifeq ($(realpath $(SRC_PATH)),$(realpath .)) +MANUAL_BUILDDIR :=3D docs/built +else +MANUAL_BUILDDIR :=3D docs +endif + ifdef BUILD_DOCS -DOCS=3Dqemu-doc.html qemu-doc.txt qemu.1 qemu-img.1 qemu-nbd.8 docs/intero= p/qemu-ga.8 +DOCS=3Dqemu-doc.html qemu-doc.txt qemu.1 qemu-img.1 qemu-nbd.8 $(MANUAL_BU= ILDDIR)/interop/qemu-ga.8 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 DOCS+=3Ddocs/qemu-block-drivers.7 @@ -699,17 +710,6 @@ dist: qemu-$(VERSION).tar.bz2 qemu-%.tar.bz2: $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2= ,%,$@)" =20 -# 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 -# there for 'make install'). For an out-of-tree build we can just -# use the docs/ subdirectory in the build tree as normal. -ifeq ($(realpath $(SRC_PATH)),$(realpath .)) -MANUAL_BUILDDIR :=3D docs/built -else -MANUAL_BUILDDIR :=3D docs -endif - define clean-manual =3D rm -rf $(MANUAL_BUILDDIR)/$1/_static rm -f $(MANUAL_BUILDDIR)/$1/objects.inv $(MANUAL_BUILDDIR)/$1/searchindex.= js $(MANUAL_BUILDDIR)/$1/*.html @@ -819,7 +819,7 @@ ifdef CONFIG_TRACE_SYSTEMTAP $(INSTALL_DATA) scripts/qemu-trace-stap.1 "$(DESTDIR)$(mandir)/man1" endif ifneq (,$(findstring qemu-ga,$(TOOLS))) - $(INSTALL_DATA) docs/interop/qemu-ga.8 "$(DESTDIR)$(mandir)/man8" + $(INSTALL_DATA) $(MANUAL_BUILDDIR)/interop/qemu-ga.8 "$(DESTDIR)$(mandir)= /man8" $(INSTALL_DATA) docs/interop/qemu-ga-ref.html "$(DESTDIR)$(qemu_docdir)" $(INSTALL_DATA) docs/interop/qemu-ga-ref.txt "$(DESTDIR)$(qemu_docdir)" $(INSTALL_DATA) docs/interop/qemu-ga-ref.7 "$(DESTDIR)$(mandir)/man7" --=20 2.20.1