From nobody Sun May 19 09:42:13 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; 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1562067380; cv=none; d=zoho.com; s=zohoarc; b=enWp9YPBv12km+1EUX5VorMkvDaYmJbsT9D35aeyrOzQKKuSmZVG7s+fLHmKE1TqgIdeYYvFHKo0JJyRLxctL8AKlZFMZkyMXUTd6jdIRzItR5rkfeo4orJhvC+N2imk0N3/O/lWj6FxtMKqhfGFy53KJFMTBg7M3BAhqQndUAk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562067380; 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:ARC-Authentication-Results; bh=E0ZtVsU/XOIQR5kHRsU78cCqxbYHvb8nXGkTbTTN7HM=; b=Bx9kmVXXGsaAJpgP4hbw2E+Axnep69luwU4A9pGHQDcEnQ1elQUsVvGITYcl+iq40bkFuti/gyCZm9j+PzswefOapXnUaJvM1oYOc32bHojJw42ts6TW3UVzV2J/majddsBo0F/tZ+ihfMJgejV8tB25/YRUZbLI4bnwDxOS11k= ARC-Authentication-Results: i=1; mx.zoho.com; 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1562067380405672.128280991199; Tue, 2 Jul 2019 04:36:20 -0700 (PDT) Received: from localhost ([::1]:51882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiH53-0007tk-Qy for importer@patchew.org; Tue, 02 Jul 2019 07:36:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60944) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiH3J-0006CG-KE for qemu-devel@nongnu.org; Tue, 02 Jul 2019 07:34:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiH3I-0001Z4-En for qemu-devel@nongnu.org; Tue, 02 Jul 2019 07:34:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49356) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hiH3I-0001X8-8A for qemu-devel@nongnu.org; Tue, 02 Jul 2019 07:34:24 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 14EF3C057F2E; Tue, 2 Jul 2019 11:34:18 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-102.ams2.redhat.com [10.36.116.102]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 92C6E1750A; Tue, 2 Jul 2019 11:34:15 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 25B5B1132ADD; Tue, 2 Jul 2019 13:34:14 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 2 Jul 2019 13:34:11 +0200 Message-Id: <20190702113414.6896-2-armbru@redhat.com> In-Reply-To: <20190702113414.6896-1-armbru@redhat.com> References: <20190702113414.6896-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 02 Jul 2019 11:34:18 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/4] Makefile: Remove code to smooth transition to config.status 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?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" When commit bdf523e6923 made configure generate config.status, it added a fallback to Makefile to smooth the transition, with a TODO "code can be removed after QEMU 1.7." It's been more than five years. Remove it. Signed-off-by: Markus Armbruster Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190528082308.22032-2-armbru@redhat.com> --- Makefile | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Makefile b/Makefile index b1c93ac027..0f2cb271a2 100644 --- a/Makefile +++ b/Makefile @@ -73,14 +73,7 @@ CONFIG_ALL=3Dy =20 config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VER= SION @echo $@ is out-of-date, running configure - @# TODO: The next lines include code which supports a smooth - @# transition from old configurations without config.status. - @# This code can be removed after QEMU 1.7. - @if test -x config.status; then \ - ./config.status; \ - else \ - sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh; \ - fi + @./config.status else config-host.mak: ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOAL= S),,fail)) --=20 2.21.0 From nobody Sun May 19 09:42:13 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; 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1562067380; cv=none; d=zoho.com; s=zohoarc; b=XwQSpky8O1N3PffCGdvqdHjGyHkCu44TR5mCNKLgga9KHMmBgZ9Id6QEJ5z7rafYeIlEldbn8+oPwYCN7feOto5Tv9JuxX0xFtBDRGzKni9ccux5C0p01BS4iBLcEe6eMzRiLN3yqrBUAKavjKMibsD33Us8HTD4OtKtt3FBKck= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562067380; 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:ARC-Authentication-Results; bh=WBktTr0pCy5g4hMLKYL+1bQiBbjlIkPnaoNQ25kij6c=; b=Kzo1FGSF3YNZmg0S/BnM/t+o2G+ToHNWlcp4kDVdBGWLClnJUihgqI+XZtiCKeStsNbbjfYKzEOPHM7nhJggMFnEp6iWANEJhauyPU7MrWzOvWrNTFzoHkvZZpqbLmjoiwgVMxc3sGAqzDlj6wUd9yGSBvvzgm4P5zHN/YdspRw= ARC-Authentication-Results: i=1; mx.zoho.com; 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1562067380459939.0825353577171; Tue, 2 Jul 2019 04:36:20 -0700 (PDT) Received: from localhost ([::1]:51880 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiH53-0007tI-Vk for importer@patchew.org; Tue, 02 Jul 2019 07:36:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60943) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiH3J-0006CF-JL for qemu-devel@nongnu.org; Tue, 02 Jul 2019 07:34:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiH3I-0001ZX-Jq for qemu-devel@nongnu.org; Tue, 02 Jul 2019 07:34:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46284) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hiH3I-0001XO-Du for qemu-devel@nongnu.org; Tue, 02 Jul 2019 07:34:24 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 40E1F128B5; Tue, 2 Jul 2019 11:34:18 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-102.ams2.redhat.com [10.36.116.102]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 96A0B5D9D6; Tue, 2 Jul 2019 11:34:15 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 291B81132A05; Tue, 2 Jul 2019 13:34:14 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 2 Jul 2019 13:34:12 +0200 Message-Id: <20190702113414.6896-3-armbru@redhat.com> In-Reply-To: <20190702113414.6896-1-armbru@redhat.com> References: <20190702113414.6896-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 02 Jul 2019 11:34:23 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/4] Makefile: Drop bogus cleaning of $(ALL_SUBDIRS)/qemu-options.def 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?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" When commit df2943ba3c7 moved "rm -f qemu-options.def" from distclean to clean, it also added "rm -f $$d/qemu-options.def" to the for d in $(ALL_SUBDIRS) loop. That file doesn't exist. Remove the mistaken rm. Signed-off-by: Markus Armbruster Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190528082308.22032-3-armbru@redhat.com> --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 0f2cb271a2..cf4f34e45b 100644 --- a/Makefile +++ b/Makefile @@ -678,7 +678,6 @@ clean: rm -rf qga/qapi-generated for d in $(ALL_SUBDIRS); do \ if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \ - rm -f $$d/qemu-options.def; \ done rm -f config-all-devices.mak =20 --=20 2.21.0 From nobody Sun May 19 09:42:13 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; 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1562067396; cv=none; d=zoho.com; s=zohoarc; b=fP3Ea3cdGijNmEeWffhwBbXMNQR8fyMmLvmD4swvPw6M61Rv2YGY9COA+abplk99aLCizvVcuBZmW6qi3ZS0UEzEJgL0myO6mm4QvwbB7Y8k+FiFtEK+5YFTcYzP8RlLhEPqgCZ+AOJneE7AutGOH8IjH+K7ANTjMuNLekPXxOw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562067396; 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:ARC-Authentication-Results; bh=TVYaq5ieYOe7swkEhLh9gB0S2YdOyegC9DvkZQZw1p4=; b=aX74/E9Kvjq+Wc98hZsVCZlzZg0Y8D8ahScB/PKb3Rhg4NOy387D1MULfDdUbRHxMqNJtRvZMLNCJ8nmvvRGz4RmghSxLIsVUJj/HxAA64jjQhDbDQ4JGS/QGnCiUrODN9A5nk3YwXZEXZUy+aO/jrdrj/FzQH+InXoxWscRNFU= ARC-Authentication-Results: i=1; mx.zoho.com; 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 1562067396180569.3297532252722; Tue, 2 Jul 2019 04:36:36 -0700 (PDT) Received: from localhost ([::1]:51886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiH5N-0008LE-6T for importer@patchew.org; Tue, 02 Jul 2019 07:36:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32771) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiH3P-0006Md-Og for qemu-devel@nongnu.org; Tue, 02 Jul 2019 07:34:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiH3N-0001hH-9x for qemu-devel@nongnu.org; Tue, 02 Jul 2019 07:34:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57670) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hiH3N-0001g0-0v for qemu-devel@nongnu.org; Tue, 02 Jul 2019 07:34:29 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5343B13A98; Tue, 2 Jul 2019 11:34:18 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-102.ams2.redhat.com [10.36.116.102]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 98BA41001B00; Tue, 2 Jul 2019 11:34:15 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 2D1861132A0B; Tue, 2 Jul 2019 13:34:14 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 2 Jul 2019 13:34:13 +0200 Message-Id: <20190702113414.6896-4-armbru@redhat.com> In-Reply-To: <20190702113414.6896-1-armbru@redhat.com> References: <20190702113414.6896-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 02 Jul 2019 11:34:23 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 3/4] Makefile: Rename targets for make recursion 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?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" We make a few sub-directories recursively, in particular $(TARGET_DIRS). For goal "all", we do it the nice way: "all" has a prerequisite subdir-T for each T in $(TARGET_DIRS), and T's recipe runs make recursively. Behaves nicely with -j and -k. For other goals such as "clean" and "install", the recipe runs make recursively in a for loop. Ignores -j and -k. The next commit will fix that for "clean" and "install". This commit prepares the ground by renaming the targets we use for "all" to include the goal for the sub-make. This will permit reusing them for goals other than "all". Targets subdir-T for T in $(TARGET_DIRS) run "make all" in T. Rename to T/all, and declare phony. Targets romsubdir-R for R in $(ROMS) run "make" in pc-bios/R. Default goal is "all" for all R. Rename to pc-bios/R/all, and declare phony. The remainder are renamed just for consistency. Target subdir-dtc runs "make libbft/libfdt.a" in dtc. Rename to dtc/all, and declare phony. Target subdir-capstone runs make $(BUILD_DIR)/capstone/$(LIBCAPSTONE) in $(SRC_PATH)/capstone. Rename to capstone/all, and declare phony. Target subdir-slirp runs "make" in $(SRC_PATH)/slirp. Default goal is all, which builds $(BUILD_DIR)/libslirp.a. Rename to slirp/all, and declare phony. Signed-off-by: Markus Armbruster Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190528082308.22032-4-armbru@redhat.com> --- Makefile | 30 ++++++++++++++++++------------ configure | 6 +++--- tests/Makefile.include | 5 +++-- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index cf4f34e45b..e68982bd99 100644 --- a/Makefile +++ b/Makefile @@ -454,8 +454,8 @@ 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 -SUBDIR_RULES=3D$(patsubst %,subdir-%, $(TARGET_DIRS)) -SOFTMMU_SUBDIR_RULES=3D$(filter %-softmmu,$(SUBDIR_RULES)) +SUBDIR_RULES=3D$(addsuffix /all, $(TARGET_DIRS)) +SOFTMMU_SUBDIR_RULES=3D$(filter %-softmmu/all,$(SUBDIR_RULES)) =20 $(SOFTMMU_SUBDIR_RULES): $(authz-obj-y) $(SOFTMMU_SUBDIR_RULES): $(block-obj-y) @@ -465,14 +465,16 @@ $(SOFTMMU_SUBDIR_RULES): $(io-obj-y) $(SOFTMMU_SUBDIR_RULES): config-all-devices.mak $(SOFTMMU_SUBDIR_RULES): $(edk2-decompressed) =20 -subdir-%: - $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V=3D"$(V)" TARGET_= DIR=3D"$*/" all,) +.PHONY: $(SUBDIR_RULES) +$(SUBDIR_RULES): + $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V=3D"$(V)" = TARGET_DIR=3D"$(dir $@)" all,) =20 DTC_MAKE_ARGS=3D-I$(SRC_PATH)/dtc VPATH=3D$(SRC_PATH)/dtc -C dtc V=3D"$(V)= " LIBFDT_srcdir=3D$(SRC_PATH)/dtc/libfdt DTC_CFLAGS=3D$(CFLAGS) $(QEMU_CFLAGS) DTC_CPPFLAGS=3D-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libf= dt =20 -subdir-dtc: .git-submodule-status dtc/libfdt dtc/tests +.PHONY: dtc/all +dtc/all: .git-submodule-status dtc/libfdt dtc/tests $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS=3D"$(DTC_CPPFLAGS)= " CFLAGS=3D"$(DTC_CFLAGS)" LDFLAGS=3D"$(LDFLAGS)" ARFLAGS=3D"$(ARFLAGS)" CC= =3D"$(CC)" AR=3D"$(AR)" LD=3D"$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,) =20 dtc/%: .git-submodule-status @@ -490,21 +492,25 @@ CAP_CFLAGS +=3D -DCAPSTONE_HAS_ARM64 CAP_CFLAGS +=3D -DCAPSTONE_HAS_POWERPC CAP_CFLAGS +=3D -DCAPSTONE_HAS_X86 =20 -subdir-capstone: .git-submodule-status +.PHONY: capstone/all +capstone/all: .git-submodule-status $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=3Dno= BUILDDIR=3D"$(BUILD_DIR)/capstone" CC=3D"$(CC)" AR=3D"$(AR)" LD=3D"$(LD)" = RANLIB=3D"$(RANLIB)" CFLAGS=3D"$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_D= IR)/capstone/$(LIBCAPSTONE)) =20 -subdir-slirp: .git-submodule-status +.PHONY: slirp/all +slirp/all: .git-submodule-status $(call quiet-command,$(MAKE) -C $(SRC_PATH)/slirp BUILD_DIR=3D"$(BUILD_DI= R)/slirp" CC=3D"$(CC)" AR=3D"$(AR)" LD=3D"$(LD)" RANLIB=3D"$(RANLIB)" CFLAG= S=3D"$(QEMU_CFLAGS) $(CFLAGS)" LDFLAGS=3D"$(LDFLAGS)") =20 $(SUBDIR_RULES): libqemuutil.a $(common-obj-y) \ $(qom-obj-y) $(crypto-user-obj-$(CONFIG_USER_ONLY)) =20 -ROMSUBDIR_RULES=3D$(patsubst %,romsubdir-%, $(ROMS)) +ROM_DIRS =3D $(addprefix pc-bios/, $(ROMS)) +ROMSUBDIR_RULES=3D$(addsuffix /all, $(ROM_DIRS)) # Only keep -O and -g cflags -romsubdir-%: - $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V=3D"$(V)"= TARGET_DIR=3D"$*/" CFLAGS=3D"$(filter -O% -g%,$(CFLAGS))",) +.PHONY: $(ROMSUBDIR_RULES) +$(ROMSUBDIR_RULES): + $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V=3D"$(V)" = TARGET_DIR=3D"$(dir $@)" CFLAGS=3D"$(filter -O% -g%,$(CFLAGS))",) =20 -ALL_SUBDIRS=3D$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS)) +ALL_SUBDIRS=3D$(TARGET_DIRS) $(ROM_DIRS) =20 recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) =20 @@ -1131,7 +1137,7 @@ endif @$(if $(TARGET_DIRS), \ echo 'Architecture specific targets:'; \ $(foreach t, $(TARGET_DIRS), \ - printf " %-30s - Build for %s\\n" $(patsubst %,subdir-%,$(t)) $(t);) \ + printf " %-30s - Build for %s\\n" $(t)/all $(t);) \ echo '') @echo 'Cleaning targets:' @echo ' clean - Remove most generated files but keep the conf= ig' diff --git a/configure b/configure index f2cb9f3c66..6586420f30 100755 --- a/configure +++ b/configure @@ -6609,7 +6609,7 @@ if test "$slirp" !=3D "no"; then echo "SLIRP_LIBS=3D$slirp_libs" >> $config_host_mak fi if [ "$slirp" =3D "git" -o "$slirp" =3D "internal" ]; then - echo "config-host.h: subdir-slirp" >> $config_host_mak + echo "config-host.h: slirp/all" >> $config_host_mak fi if test "$vde" =3D "yes" ; then echo "CONFIG_VDE=3Dy" >> $config_host_mak @@ -7881,10 +7881,10 @@ if test -n "$enabled_cross_compilers"; then fi =20 if [ "$fdt" =3D "git" ]; then - echo "config-host.h: subdir-dtc" >> $config_host_mak + echo "config-host.h: dtc/all" >> $config_host_mak fi if [ "$capstone" =3D "git" -o "$capstone" =3D "internal" ]; then - echo "config-host.h: subdir-capstone" >> $config_host_mak + echo "config-host.h: capstone/all" >> $config_host_mak fi if test -n "$LIBCAPSTONE"; then echo "LIBCAPSTONE=3D$LIBCAPSTONE" >> $config_host_mak diff --git a/tests/Makefile.include b/tests/Makefile.include index db750dd6d0..b54fea1bb4 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -1,3 +1,4 @@ +# -*- Mode: makefile -*- =20 .PHONY: check-help check-help: @@ -890,7 +891,7 @@ define do_test_tap endef =20 .PHONY: $(patsubst %, check-qtest-%, $(QTEST_TARGETS)) -$(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: subdir-%-so= ftmmu $(check-qtest-y) +$(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: %-softmmu/a= ll $(check-qtest-y) $(call do_test_human,$(check-qtest-$*-y) $(check-qtest-generic-y), \ QTEST_QEMU_BINARY=3D$*-softmmu/qemu-system-$* \ QTEST_QEMU_IMG=3Dqemu-img$(EXESUF)) @@ -903,7 +904,7 @@ check-speed: $(check-speed-y) =20 # gtester tests with TAP output =20 -$(patsubst %, check-report-qtest-%.tap, $(QTEST_TARGETS)): check-report-qt= est-%.tap: subdir-%-softmmu $(check-qtest-y) +$(patsubst %, check-report-qtest-%.tap, $(QTEST_TARGETS)): check-report-qt= est-%.tap: %-softmmu/all $(check-qtest-y) $(call do_test_tap, $(check-qtest-$*-y) $(check-qtest-generic-y), \ QTEST_QEMU_BINARY=3D$*-softmmu/qemu-system-$* \ QTEST_QEMU_IMG=3Dqemu-img$(EXESUF)) --=20 2.21.0 From nobody Sun May 19 09:42:13 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; 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1562067391; cv=none; d=zoho.com; s=zohoarc; b=Dav6s2/3pa/jvaGEZla+aOS1MvRPIb/p3U0B6q6ABkCTp9CRQXS5KmYR99heEzz20mQWUTZkuNyRhvD9xAJMJXNZBixUnrOlLEDaUbj29f2rL0tc2ZxLOxOJ7fz6/pDVlR2U8MFFvSldy9tYcQ1SIC1qpfm2eBGOto/L0FxQHFM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562067391; 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:ARC-Authentication-Results; bh=uIJn8i6XaPUvJpPUq8sxFtqPjvbBWuQi16enyYoziIA=; b=dsjWyNp6yXg2fakv77SHEvLCKVl4LPHrrFbsjTJl0FllgZxpEerA4NH5v5PlpH2muKw/bNxSA/4Cfq7ZCsghn9OFYxfBnNGwp6LK1fN94qy4U7fSK1Ke9wCfp4gZ2aMMkXDIdfBnQlk/2GAYIqHyqW5THu2+3j+QdsEgtbE0PrI= ARC-Authentication-Results: i=1; mx.zoho.com; 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 1562067391794756.7862941208133; Tue, 2 Jul 2019 04:36:31 -0700 (PDT) Received: from localhost ([::1]:51884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiH5F-00084V-L7 for importer@patchew.org; Tue, 02 Jul 2019 07:36:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60952) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiH3K-0006CI-21 for qemu-devel@nongnu.org; Tue, 02 Jul 2019 07:34:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiH3I-0001Zn-O4 for qemu-devel@nongnu.org; Tue, 02 Jul 2019 07:34:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42394) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hiH3I-0001Xh-5H for qemu-devel@nongnu.org; Tue, 02 Jul 2019 07:34:24 -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 mx1.redhat.com (Postfix) with ESMTPS id 6807E30C3192; Tue, 2 Jul 2019 11:34:18 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-102.ams2.redhat.com [10.36.116.102]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9CEE060C43; Tue, 2 Jul 2019 11:34:15 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 30EAE11329C7; Tue, 2 Jul 2019 13:34:14 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 2 Jul 2019 13:34:14 +0200 Message-Id: <20190702113414.6896-5-armbru@redhat.com> In-Reply-To: <20190702113414.6896-1-armbru@redhat.com> References: <20190702113414.6896-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 02 Jul 2019 11:34:18 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 4/4] Makefile: Reuse all's recursion machinery for clean and install 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?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Targets "clean" and "install" run make recursively in a for loop. This ignores -j and -k. Target "all" depends on SUBDIR/all to recurse into each SUBDIR. Behaves nicely with -j and -k. Put that to use for "clean" and "install": depend on SUBDIR/clean or SUBDIR/install, respectively, and delete the loop. Signed-off-by: Markus Armbruster Reviewed-by: Richard Henderson Message-Id: <20190528082308.22032-5-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- Makefile | 53 +++++++++++++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/Makefile b/Makefile index e68982bd99..8cf6cbc4c4 100644 --- a/Makefile +++ b/Makefile @@ -454,20 +454,22 @@ 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 -SUBDIR_RULES=3D$(addsuffix /all, $(TARGET_DIRS)) -SOFTMMU_SUBDIR_RULES=3D$(filter %-softmmu/all,$(SUBDIR_RULES)) +TARGET_DIRS_RULES :=3D $(foreach t, all clean install, $(addsuffix /$(t), = $(TARGET_DIRS))) =20 -$(SOFTMMU_SUBDIR_RULES): $(authz-obj-y) -$(SOFTMMU_SUBDIR_RULES): $(block-obj-y) -$(SOFTMMU_SUBDIR_RULES): $(chardev-obj-y) -$(SOFTMMU_SUBDIR_RULES): $(crypto-obj-y) -$(SOFTMMU_SUBDIR_RULES): $(io-obj-y) -$(SOFTMMU_SUBDIR_RULES): config-all-devices.mak -$(SOFTMMU_SUBDIR_RULES): $(edk2-decompressed) +SOFTMMU_ALL_RULES=3D$(filter %-softmmu/all, $(TARGET_DIRS_RULES)) +$(SOFTMMU_ALL_RULES): $(authz-obj-y) +$(SOFTMMU_ALL_RULES): $(block-obj-y) +$(SOFTMMU_ALL_RULES): $(chardev-obj-y) +$(SOFTMMU_ALL_RULES): $(crypto-obj-y) +$(SOFTMMU_ALL_RULES): $(io-obj-y) +$(SOFTMMU_ALL_RULES): config-all-devices.mak +$(SOFTMMU_ALL_RULES): $(edk2-decompressed) =20 -.PHONY: $(SUBDIR_RULES) -$(SUBDIR_RULES): - $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V=3D"$(V)" = TARGET_DIR=3D"$(dir $@)" all,) +.PHONY: $(TARGET_DIRS_RULES) +# The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that +# $(dir $@) yields the sub-directory, and $(notdir $@) yields the sub-goal +$(TARGET_DIRS_RULES): + $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V=3D"$(V)" = TARGET_DIR=3D"$(dir $@)" $(notdir $@),) =20 DTC_MAKE_ARGS=3D-I$(SRC_PATH)/dtc VPATH=3D$(SRC_PATH)/dtc -C dtc V=3D"$(V)= " LIBFDT_srcdir=3D$(SRC_PATH)/dtc/libfdt DTC_CFLAGS=3D$(CFLAGS) $(QEMU_CFLAGS) @@ -500,19 +502,19 @@ capstone/all: .git-submodule-status slirp/all: .git-submodule-status $(call quiet-command,$(MAKE) -C $(SRC_PATH)/slirp BUILD_DIR=3D"$(BUILD_DI= R)/slirp" CC=3D"$(CC)" AR=3D"$(AR)" LD=3D"$(LD)" RANLIB=3D"$(RANLIB)" CFLAG= S=3D"$(QEMU_CFLAGS) $(CFLAGS)" LDFLAGS=3D"$(LDFLAGS)") =20 -$(SUBDIR_RULES): libqemuutil.a $(common-obj-y) \ +$(filter %/all, $(TARGET_DIRS_RULES)): libqemuutil.a $(common-obj-y) \ $(qom-obj-y) $(crypto-user-obj-$(CONFIG_USER_ONLY)) =20 ROM_DIRS =3D $(addprefix pc-bios/, $(ROMS)) -ROMSUBDIR_RULES=3D$(addsuffix /all, $(ROM_DIRS)) +ROM_DIRS_RULES=3D$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS))) # Only keep -O and -g cflags -.PHONY: $(ROMSUBDIR_RULES) -$(ROMSUBDIR_RULES): - $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V=3D"$(V)" = TARGET_DIR=3D"$(dir $@)" CFLAGS=3D"$(filter -O% -g%,$(CFLAGS))",) +.PHONY: $(ROM_DIRS_RULES) +$(ROM_DIRS_RULES): + $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V=3D"$(V)" = TARGET_DIR=3D"$(dir $@)" CFLAGS=3D"$(filter -O% -g%,$(CFLAGS))" $(notdir $@= ),) =20 -ALL_SUBDIRS=3D$(TARGET_DIRS) $(ROM_DIRS) - -recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) +recurse-all: $(addsuffix /all, $(TARGET_DIRS) $(ROM_DIRS)) +recurse-clean: $(addsuffix /clean, $(TARGET_DIRS) $(ROM_DIRS)) +recurse-install: $(addsuffix /install, $(TARGET_DIRS)) =20 $(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc config-host.h $(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<,"RC","version.o") @@ -661,7 +663,7 @@ clean-coverage: "CLEAN", "coverage files") endif =20 -clean: +clean: recurse-clean # avoid old build problems by removing potentially incorrect old files rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h ge= n-op-arm.h rm -f qemu-options.def @@ -682,9 +684,6 @@ clean: rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp) rm -f qapi-gen-timestamp rm -rf qga/qapi-generated - for d in $(ALL_SUBDIRS); do \ - if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \ - done rm -f config-all-devices.mak =20 VERSION ?=3D $(shell cat VERSION) @@ -832,7 +831,8 @@ endif ICON_SIZES=3D16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 =20 install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-local= statedir \ - $(if $(INSTALL_BLOBS),$(edk2-decompressed)) + $(if $(INSTALL_BLOBS),$(edk2-decompressed)) \ + recurse-install ifneq ($(TOOLS),) $(call install-prog,$(subst qemu-ga,qemu-ga$(EXESUF),$(TOOLS)),$(DESTDIR)= $(bindir)) endif @@ -898,9 +898,6 @@ endif $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadi= r)/keymaps"; \ done $(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/= trace-events-all" - for d in $(TARGET_DIRS); do \ - $(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=3D$$d/ -C $$d $@ || exit 1 ; \ - done =20 .PHONY: ctags ctags: --=20 2.21.0