From nobody Fri May 3 00:22:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1528557162037298.15978394641536; Sat, 9 Jun 2018 08:12:42 -0700 (PDT) Received: from localhost ([::1]:40611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRfXc-0001Ry-F1 for importer@patchew.org; Sat, 09 Jun 2018 11:12:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRfWe-00014L-Ui for qemu-devel@nongnu.org; Sat, 09 Jun 2018 11:11:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRfWb-0002EU-PP for qemu-devel@nongnu.org; Sat, 09 Jun 2018 11:11:32 -0400 Received: from mail-qt0-x232.google.com ([2607:f8b0:400d:c0d::232]:43562) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRfWb-0002EQ-K7; Sat, 09 Jun 2018 11:11:29 -0400 Received: by mail-qt0-x232.google.com with SMTP id y89-v6so16386155qtd.10; Sat, 09 Jun 2018 08:11:29 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id o31-v6sm6503531qte.16.2018.06.09.08.11.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Jun 2018 08:11:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GyQu28x08eY14sQuR6djY0yHljoIa7T09bju5auHauk=; b=kI2T7Ep7wHpSx7d5H/hFvFP1k04gr588kOZLNGaBVZY+GljDGiIuj6wPGPcP6ZfUIF Juc+0GE61RKp2DckUxYcKvDOZMaFsEehyT3A21zcbMAHVv0+B1paUwORfHq/ED6GqLD3 pkgK2BaAZzJWpdmJh6dt6g/vj/92rmtgzwYICTDZO2+E+XSmHWla2dmkhvJrDKdBoFvZ 2nVTaSKrILSYw8ji6nUO28SVJwqnXmDjYIWXov0PvKltLbtYxLzg4gc4FsJFMqkQgHOi cujJydp1BSsLjIJWhb0Tp1anD7bt1NixF4m2Zv0ie5EQti6/v7opJ8fkpqrnVwjX0nau cUgw== 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 :mime-version:content-transfer-encoding; bh=GyQu28x08eY14sQuR6djY0yHljoIa7T09bju5auHauk=; b=ns9bf4g+5cZVWLwpczmJOhuAG15unh8mjRSDJz7BEjagRDYZnSJr1xfr0vSfEdJdNh 4s2OO6F0o60ZNbpNhYEL9rgxWw1mTj2d/2qFq3um5jVzV3ArrLoAFRXWUNVKN8T2d1eZ wjBXiMAlCkT8K8CE6xBaCYyiZWyHpD3KVyxmLjlItpf63ukPmy6FDM1ljZQyw5/O1etg TaQM5Jz7gV5RyHL9d2I6ERbrUaiiosh0pSD2GLVqKRqXTKP1jKflUN+QORhN6O9uQq1M JrLje5Q0t28POBrSS3kCCxHlHq+Q0AMehFvZa5Uzd7xVnv+Ip/ihXJAiZnb9q0dwo4T7 ohHA== X-Gm-Message-State: APt69E2ESc68+Peij7NYwQarLOxdfwItwtPS6dR013Yk/HWS2IDqY862 SPoe4+9L83eSyQYCJlAzqK8= X-Google-Smtp-Source: ADUXVKIgXU3T9pSuye69XDpvZW1S1eAfHUKs4FKSW7GbPYsUADeOa2KaxcUmcW7qelgq2ewXkNsyRw== X-Received: by 2002:ac8:36d:: with SMTP id w45-v6mr9892104qtg.382.1528557088979; Sat, 09 Jun 2018 08:11:28 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Markus Armbruster , Eric Blake , Thomas Huth , "Michael S . Tsirkin" , Peter Maydell Date: Sat, 9 Jun 2018 12:10:48 -0300 Message-Id: <20180609151048.9628-1-f4bug@amsat.org> X-Mailer: git-send-email 2.17.1 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: 2607:f8b0:400d:c0d::232 Subject: [Qemu-devel] [PATCH v2] Makefile: Check for more dangling scratch files in out-of-tree builds X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 It is easy to catch the generated 'config-host.mak' in the source tree, however qemu-version.h and qemu-options.def are also generated files and are hidden by .gitignore rules. Improve the out-of-tree safety net rule added in d1bd2423a90, by also checking for these two files. This solves building issues with out-of-tree builds from a source tree that has been built in: - /qemu-version.h existing in source tree: /source/qemu/qemu-nbd.c: In function =E2=80=98version=E2=80=99: /source/qemu/qemu-nbd.c:133:6: error: expected =E2=80=98)=E2=80=99 befo= re =E2=80=98QEMU_FULL_VERSION=E2=80=99 "%s " QEMU_FULL_VERSION "\n" ^~~~~~~~~~~~~~~~~~ ) /source/qemu/qemu-nbd.c:133:3: error: format =E2=80=98%s=E2=80=99 expec= ts a matching =E2=80=98char *=E2=80=99 argument [-Werror=3Dformat=3D] "%s " QEMU_FULL_VERSION "\n" ~^ cc1: all warnings being treated as errors - /qemu-options.def existing in source tree: /source/qemu/vl.c: In function =E2=80=98main=E2=80=99: /source/qemu/vl.c:3052:18: error: =E2=80=98QEMU_OPTION_blockdev=E2=80= =99 undeclared (first use in this function); did you mean =E2=80=98QEMU_OPTION_clock= =E2=80=99? case QEMU_OPTION_blockdev: ^~~~~~~~~~~~~~~~~~~~ QEMU_OPTION_clock /source/qemu/vl.c:3052:18: note: each undeclared identifier is reported only once for each function it appears in Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell --- Since v1 http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg02254.h= tml: Peter noticed [1] those files already are in GENERATED_FILES [1] http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg02338.html Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 023b3437ec..521009964c 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,8 @@ endif # Check that we're not trying to do an out-of-tree build from # a tree that's been used for an in-tree build. ifneq ($(realpath $(SRC_PATH)),$(realpath .)) -ifneq ($(wildcard $(SRC_PATH)/config-host.mak),) +scratch_files =3D config-host.mak qemu-version.h qemu-options.def +ifneq ($(wildcard $(addprefix $(SRC_PATH)/,$(scratch_files))),) $(error This is an out of tree build but your source tree ($(SRC_PATH)) \ seems to have been used for an in-tree build. You can fix this by running \ "$(MAKE) distclean && rm -rf *-linux-user *-softmmu" in your source tree) --=20 2.17.1