Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2304732pxv; Sat, 24 Jul 2021 11:40:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjN0N5xDXYbqz9WzKXlUjNq7lXIX/L3vOqJL0LS+MSzxzkOthuJU5crxGSiiC+/PKux/10 X-Received: by 2002:aa7:c98d:: with SMTP id c13mr12234403edt.255.1627152033947; Sat, 24 Jul 2021 11:40:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627152033; cv=none; d=google.com; s=arc-20160816; b=ap48bDrH+CXJYA2BsPgrEoVgbdtfnG0h2+qoebqAYlCuakOD3erX0EY41ZWKFztNlq aY3LXSqDzU8vbRamnoffZOKBXxzZFK1AmGUgt/AOW17iXZ3icElpp0t3FdxsR4d4u6e8 C02PUEyFLUkGWTxWTn40BMEpEZ/04zlCBm+LqlIvOQnplBOevhWjAqZ4PsCauSsQdus+ Dj7/Vv6mUlmIM/IKJ1ZV+fX7dLrTf2+T7wy8rR9JDVnIJDrCcIxnehB2PWJ3Dt3owYED EiixMFG/hd9a+9NXrJvWNF+f2RezipzQ6WNsHfsQb/2lmTiXWluA9DUA7Ts5qem8vsKE B1Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=adPHQfj4dkdvDSuI2P8Sk/NYpUO6MJy1Eba1ZmTwIqQ=; b=zhhfNtuNfavvMGtGmRGdys8f56IZYyt1SscGThBey6l2Dga1wgCDEGGWIctnLmhSRj ABIxQ3a/BTktDnLzjK56X92CCTDh+IewwtpP8UhSKESbvRBtGF3AA9seXSsev7zn3Npl 76ivApyrgFO5x4KBd5I25HJQBScti+3QK/+Sasf/W7a41eOXjboDHpQVsm6gUrpzxYDf Tt0uqVNKtGyq06EMUQiY+j2rDzb3yWjTeRy+jt9eFlx3QqAQ+B7C5jkYTDZp+ZkbhSy2 SE6cVC/59H8CS9nRo+3EaopG2Kq8vJbBUbmkqKAn7UqFjsuPulR2S4BTkNbE8bqJLcNN 3vsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=mwy+A+Wo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b22si35858253ejc.675.2021.07.24.11.40.10; Sat, 24 Jul 2021 11:40:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=mwy+A+Wo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229667AbhGXR6C (ORCPT + 99 others); Sat, 24 Jul 2021 13:58:02 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:37976 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbhGXR57 (ORCPT ); Sat, 24 Jul 2021 13:57:59 -0400 Received: from localhost.localdomain (133-32-232-101.west.xps.vectant.ne.jp [133.32.232.101]) (authenticated) by conuserg-09.nifty.com with ESMTP id 16OIa5fW011807; Sun, 25 Jul 2021 03:36:06 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com 16OIa5fW011807 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1627151766; bh=adPHQfj4dkdvDSuI2P8Sk/NYpUO6MJy1Eba1ZmTwIqQ=; h=From:To:Cc:Subject:Date:From; b=mwy+A+WoxA23v7DCIpvZqa01h//pg2w0vRfZRtk8hESAyrN042xstnK84DPzcoea0 Beda2yGgKgQ8ezrhrsTt1sXbPOJVN3u+19AnZEZNSpg+BoT1oOKRYZ24GdaREpBSCn fD9NIOGpMZKN8TG7PKW0m/idNM80eGkYUAGzJa+tKDxXaQWP4Zzm9qib1DY3lLHfHW GHHMdqyJ78F6lyNZaPnF16HDyOdcyDxrft1d5WodjnFot7HDAPGwEAIWBQ2c4IBBcU OwFO3HimmyMXY2tYJBWOsoT2f9X+/B9V6bemsoVMOgCLlVzfQnqiuT3+B1bA7FQbAi +/wU2T2agkHoA== X-Nifty-SrcIP: [133.32.232.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , "H. Peter Anvin" , Thomas Bogendoerfer , Borislav Petkov , x86@kernel.org, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Thomas Gleixner , linux-mips@vger.kernel.org, Michal Marek , Richard Weinberger , Ingo Molnar , Jeff Dike , Anton Ivanov Subject: [PATCH] kbuild: do not require sub-make for separate output tree builds Date: Sun, 25 Jul 2021 03:35:56 +0900 Message-Id: <20210724183556.76680-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As explained in commit 3204a7fb98a3 ("kbuild: prefix $(srctree)/ to some included Makefiles"), I want to stop using --include-dir some day. I already fixed up the top Makefile, but some arch Makefiles (mips, um, x86) still include check-in Makefiles without $(srctree)/. Fix them up so 'need-sub-make := 1' can go away for this case. Signed-off-by: Masahiro Yamada --- Makefile | 5 ++--- arch/mips/Makefile | 2 +- arch/um/Makefile | 6 +++--- arch/x86/Makefile | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index e4f5895badb5..bb10a93edf5c 100644 --- a/Makefile +++ b/Makefile @@ -191,10 +191,9 @@ endif ifneq ($(abs_srctree),$(abs_objtree)) # Look for make include files relative to root of kernel src # -# This does not become effective immediately because MAKEFLAGS is re-parsed -# once after the Makefile is read. We need to invoke sub-make. +# --included-dir is added for backward compatibility, but you should not rely on +# it. Please add $(srctree)/ prefix to include Makefiles in the source tree. MAKEFLAGS += --include-dir=$(abs_srctree) -need-sub-make := 1 endif ifneq ($(filter 3.%,$(MAKE_VERSION)),) diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 4e942b7ef022..bc2e1857d8ce 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -254,7 +254,7 @@ endif # # Board-dependent options and extra files # -include arch/mips/Kbuild.platforms +include $(srctree)/arch/mips/Kbuild.platforms ifdef CONFIG_PHYSICAL_START load-y = $(CONFIG_PHYSICAL_START) diff --git a/arch/um/Makefile b/arch/um/Makefile index 12a7acef0357..f2fe63bfd819 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -41,8 +41,8 @@ endif HOST_DIR := arch/$(HEADER_ARCH) -include $(ARCH_DIR)/Makefile-skas -include $(HOST_DIR)/Makefile.um +include $(srctree)/$(ARCH_DIR)/Makefile-skas +include $(srctree)/$(HOST_DIR)/Makefile.um core-y += $(HOST_DIR)/um/ @@ -76,7 +76,7 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \ -idirafter $(objtree)/include -D__KERNEL__ -D__UM_HOST__ #This will adjust *FLAGS accordingly to the platform. -include $(ARCH_DIR)/Makefile-os-$(OS) +include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/include \ -I$(srctree)/$(HOST_DIR)/include/uapi \ diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 307fd0000a83..0fa7dc73b5d8 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -75,7 +75,7 @@ ifeq ($(CONFIG_X86_32),y) KBUILD_CFLAGS += $(call cc-option,$(cc_stack_align4)) # CPU-specific tuning. Anything which can be shared with UML should go here. - include arch/x86/Makefile_32.cpu + include $(srctree)/arch/x86/Makefile_32.cpu KBUILD_CFLAGS += $(cflags-y) # temporary until string.h is fixed -- 2.27.0