From patchwork Thu Aug 22 04:46:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11108405 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 21F4913B1 for ; Thu, 22 Aug 2019 04:46:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B279C2173E for ; Thu, 22 Aug 2019 04:46:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nifty.com header.i=@nifty.com header.b="bs6YWCXk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730908AbfHVEq3 (ORCPT ); Thu, 22 Aug 2019 00:46:29 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:29726 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730890AbfHVEq2 (ORCPT ); Thu, 22 Aug 2019 00:46:28 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x7M4kEYf001492; Thu, 22 Aug 2019 13:46:14 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x7M4kEYf001492 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1566449175; bh=ItuXEcXjS69g1cdGEVKkZEDPDunjHHF2tdkTu2z5CJw=; h=From:To:Cc:Subject:Date:From; b=bs6YWCXkZLcRsTXzpAE94K/ewaJ6jjHWAZOM601tDS95vV9YgyW4ysGflZwIEwzjk 6Y/EtDIAqQrkP86p4XNofVBVSKS8DOa/zTPlzVBacPXJGxKAX9+1BI+ncdeOsekrSJ S2oEKM3Zr70ppCYecSZ76hDb+FY4k6RsOn6IKX9EgpeV+qLUY4XjB2LP8N3cx7/1JY vyBeuus3iusS/nSWhLorhn9c53rQxOAXJTGinR0wwc36A+OwSnx5F3XpQ6ddExQb+y Sqp+NQvaao56/TvnPkyOAXznzeVR7obenLZX76SukrQilUBm9w4lPEQ6X05KvgcWDG /CICuQeV/wJ9A== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Geert Uytterhoeven , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 1/6] kbuild: remove 'Using ... as source for kernel' message Date: Thu, 22 Aug 2019 13:46:08 +0900 Message-Id: <20190822044613.5349-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org You already know the location of the source tree without this message. Signed-off-by: Masahiro Yamada --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 7e54a821b4b0..a77102e4ee90 100644 --- a/Makefile +++ b/Makefile @@ -1118,7 +1118,6 @@ PHONY += prepare archprepare prepare3 # 1) Check that make has not been executed in the kernel src $(srctree) prepare3: include/config/kernel.release ifdef building_out_of_srctree - @$(kecho) ' Using $(srctree) as source for kernel' $(Q)if [ -f $(srctree)/.config -o \ -d $(srctree)/include/config -o \ -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \ From patchwork Thu Aug 22 04:46:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11108407 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 97372174A for ; Thu, 22 Aug 2019 04:46:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 74F362339F for ; Thu, 22 Aug 2019 04:46:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nifty.com header.i=@nifty.com header.b="EqviCUvK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730957AbfHVEq3 (ORCPT ); Thu, 22 Aug 2019 00:46:29 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:29725 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728870AbfHVEq3 (ORCPT ); Thu, 22 Aug 2019 00:46:29 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x7M4kEYg001492; Thu, 22 Aug 2019 13:46:15 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x7M4kEYg001492 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1566449176; bh=6AT+dnC1KRtHZkgR5NDUwVJPbnoa90i0FGA/GZb8vBc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EqviCUvKXVV1ky5vWgW0oSU1yC+wfqhkaix6aM5c8DmuChMg7PZ1EVAJJWUXk59pG N49BYLafCevpEnduIyJ1LCfEH6GsRWksHJ4UCPMaIc9eZ5HdSMxJbPC9+wf6lIhE76 DVLnqAiaI0CFFI9R9mW3MFU4qaZYMq6Ja/V/8lhV3RSlcx9r1LwAnTBBU6Msou7cq9 tshRgYYUfwTqXDjdUcWjpBL3inkCdyejGo13U83nsHXPUkmoKcZ18Bk2j6z2jJgBdU KtfyC45YE3R0RjB1zGY65yrtZ/6RfgXfTRMCYt9Ndy9BrrU2vseMW3zimavi1AkBTC 3tWlmDwOyr/ng== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Geert Uytterhoeven , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 2/6] kbuild: Inform user to pass ARCH= for make mrproper only when necessary Date: Thu, 22 Aug 2019 13:46:09 +0900 Message-Id: <20190822044613.5349-2-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190822044613.5349-1-yamada.masahiro@socionext.com> References: <20190822044613.5349-1-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Since commit 3a475b2166fd ("kbuild: Inform user to pass ARCH= for make mrproper"), if you try out-of-tree build with an unclean source tree, it suggests to run 'make ARCH= mrproper'. This looks odd when you are not cross-compiling the kernel. Show the 'ARCH=' part only when ARCH= was given from the command line. If ARCH is the default (native build) or came from the environment, it should simply suggest 'make mrproper' as before. Signed-off-by: Masahiro Yamada --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a77102e4ee90..d9cbbc27d4ba 100644 --- a/Makefile +++ b/Makefile @@ -1121,7 +1121,7 @@ ifdef building_out_of_srctree $(Q)if [ -f $(srctree)/.config -o \ -d $(srctree)/include/config -o \ -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \ - echo >&2 " $(srctree) is not clean, please run 'make ARCH=$(ARCH) mrproper'"; \ + echo >&2 " $(srctree) is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \ echo >&2 " in the '$(srctree)' directory.";\ /bin/false; \ fi; From patchwork Thu Aug 22 04:46:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11108413 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B1B41864 for ; Thu, 22 Aug 2019 04:46:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0FD6C22DA7 for ; Thu, 22 Aug 2019 04:46:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nifty.com header.i=@nifty.com header.b="f++9zhyS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731026AbfHVEqf (ORCPT ); Thu, 22 Aug 2019 00:46:35 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:29724 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730896AbfHVEq3 (ORCPT ); Thu, 22 Aug 2019 00:46:29 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x7M4kEYh001492; Thu, 22 Aug 2019 13:46:16 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x7M4kEYh001492 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1566449176; bh=hD5x6lRKUb0/bNsPEdTjxNKGIJMjG0FfIIS/kLrvgeQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f++9zhySIjkHbDQkl57baoVaRVeJp+Yd9LX6Vx+VUn/vQK/DTqCnrVAsBxCqnsqz8 wtMD0gsjdD/vyp44n/CHj71HgbsOozl/0M872DhTvwrpZmiwIUG2TCZAFyhtiGRkkg J2AZXIgM8egOXJEfevgHfONc2KzkW/JSUr3p3qXJgqioa4HZo59qRnuVW4kbchavqq iXWFkVDPWeKkpKp2Eip1S4Ts0eiNWdQWscyCZbCeC45N7zmY/dk5Nc/7S9KBq3GUon rnq4vdbOODNiWn6xaTYrHEqW/KUCvi/e7OEfnwlzzisu9F9a400HJwFsWat9st6iVt F6WPMtgX9uPww== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Geert Uytterhoeven , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 3/6] kbuild: clarify where to run make mrproper when out-of-tree fails Date: Thu, 22 Aug 2019 13:46:10 +0900 Message-Id: <20190822044613.5349-3-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190822044613.5349-1-yamada.masahiro@socionext.com> References: <20190822044613.5349-1-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org If you try out-of-tree build with an unclean source tree, Kbuild suggests to run make mrproper. The path to the source tree may be shown with a relative path, for example, "make O=foo" emits the following: .. is not clean, please run 'make mrproper' in the '..' directory. This is somewhat confusing if you ran "make O=foo" in the source tree. Using the absolute path will be clearer. This commit changes the error message like follows: *** *** The source tree is not clean, please run 'make mrproper' *** in /absolute/path/to/linux *** Signed-off-by: Masahiro Yamada --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d9cbbc27d4ba..901fcb8fffbe 100644 --- a/Makefile +++ b/Makefile @@ -1121,8 +1121,10 @@ ifdef building_out_of_srctree $(Q)if [ -f $(srctree)/.config -o \ -d $(srctree)/include/config -o \ -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \ - echo >&2 " $(srctree) is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \ - echo >&2 " in the '$(srctree)' directory.";\ + echo >&2 "***"; \ + echo >&2 "*** The source tree is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \ + echo >&2 "*** in $(abs_srctree)";\ + echo >&2 "***"; \ /bin/false; \ fi; endif From patchwork Thu Aug 22 04:46:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11108409 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4D0A13B1 for ; Thu, 22 Aug 2019 04:46:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A22EE23403 for ; Thu, 22 Aug 2019 04:46:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nifty.com header.i=@nifty.com header.b="NmGd4YJx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730890AbfHVEq3 (ORCPT ); Thu, 22 Aug 2019 00:46:29 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:29723 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728801AbfHVEq3 (ORCPT ); Thu, 22 Aug 2019 00:46:29 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x7M4kEYi001492; Thu, 22 Aug 2019 13:46:17 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x7M4kEYi001492 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1566449177; bh=6gGU+zbwAmmeHsHvPATXUaYKglga5VDWoX8vHpWidI4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NmGd4YJx5J+5TUl1R1UL9Y/DVXvmYu6opIM6HB/+xW3Y9YWmkcmiSmX6V3g3QbFor rnQgKCZrhbpzJQVuCxOx4WOGLuXxNulHev9cmczPQNy3KJ36dlbg6tesPpvtXHoQ38 VtjkmlSZATC6+5IgLPgTY21FzmFWg3876Bq8ITzXVX7hWsGue+Lvq+pfOAoOwfhBnP TuTAcBAgG9pKrcJX2tUNV4lgTIqmxQ8iCFerL4aThscs8OpxK9x2sYWq38KI0Oe5/h TJjo0yD3DzHuQNLpO592JNa4GucanHCTq4ofYosEF824drgC9O2Sesxs8pmSYIwYpL la+UP+JL6ZnbQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Geert Uytterhoeven , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 4/6] kbuild: move the clean srctree check to the outputmakefile target Date: Thu, 22 Aug 2019 13:46:11 +0900 Message-Id: <20190822044613.5349-4-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190822044613.5349-1-yamada.masahiro@socionext.com> References: <20190822044613.5349-1-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org With this commit, the error report is shown earlier, even before running kconfig. Signed-off-by: Masahiro Yamada --- Makefile | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 901fcb8fffbe..ca6851f5ebc9 100644 --- a/Makefile +++ b/Makefile @@ -522,6 +522,7 @@ scripts_basic: $(Q)rm -f .tmp_quiet_recordmcount PHONY += outputmakefile +# Before starting out-of-tree build, make sure the source tree is clean. # outputmakefile generates a Makefile in the output directory, if using a # separate output directory. This allows convenient use of make in the # output directory. @@ -529,6 +530,15 @@ PHONY += outputmakefile # ignore whole output directory outputmakefile: ifdef building_out_of_srctree + $(Q)if [ -f $(srctree)/.config -o \ + -d $(srctree)/include/config -o \ + -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \ + echo >&2 "***"; \ + echo >&2 "*** The source tree is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \ + echo >&2 "*** in $(abs_srctree)";\ + echo >&2 "***"; \ + false; \ + fi $(Q)ln -fsn $(srctree) source $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree) $(Q)test -e .gitignore || \ @@ -1113,21 +1123,7 @@ scripts: scripts_basic scripts_dtc PHONY += prepare archprepare prepare3 -# prepare3 is used to check if we are building in a separate output directory, -# and if so do: -# 1) Check that make has not been executed in the kernel src $(srctree) prepare3: include/config/kernel.release -ifdef building_out_of_srctree - $(Q)if [ -f $(srctree)/.config -o \ - -d $(srctree)/include/config -o \ - -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \ - echo >&2 "***"; \ - echo >&2 "*** The source tree is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \ - echo >&2 "*** in $(abs_srctree)";\ - echo >&2 "***"; \ - /bin/false; \ - fi; -endif archprepare: archheaders archscripts scripts prepare3 outputmakefile \ asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h From patchwork Thu Aug 22 04:46:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11108415 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7246D174A for ; Thu, 22 Aug 2019 04:46:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 45F8B22DA7 for ; Thu, 22 Aug 2019 04:46:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nifty.com header.i=@nifty.com header.b="UodDF6Fh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731057AbfHVEql (ORCPT ); Thu, 22 Aug 2019 00:46:41 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:29728 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729695AbfHVEq3 (ORCPT ); Thu, 22 Aug 2019 00:46:29 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x7M4kEYj001492; Thu, 22 Aug 2019 13:46:17 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x7M4kEYj001492 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1566449178; bh=cZJ6kAU3rAstEUyLNxh1UUw2rnNTVUvdToMaj9qT4sg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UodDF6FhlhdQ2jScgiH8CH9f9iZPFO471syE+3a6wyPpSV1np5LeuOmNblK9Tmwv5 fBiXkfQEuEdyCA+B7eLvHXpaSvm8X4GepBfbM8GCt78nzI4rnlRXPqtVUPTAvsoTui ousZF2aSC7jKIe2PIuBCG/0y6jThnE+UOAcJJqa65sB6ZwxhmYkIoFFHhG1hQnlH0E fdcvb0QBmoLSOwVj/M5CvFXoz6K9fZRoLVkkNVQJwhkPqqcyUCI0bY3iQwOaT/N7Om gvjYRHrQMkcCPpcnrY1MecF5mQAfIiJ/7hOR1D5Dwx56eu+GK5f7qdMjTayH1McEc9 u3ffWNEvnHoYg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Geert Uytterhoeven , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 5/6] kbuild: remove prepare3 target Date: Thu, 22 Aug 2019 13:46:12 +0900 Message-Id: <20190822044613.5349-5-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190822044613.5349-1-yamada.masahiro@socionext.com> References: <20190822044613.5349-1-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Now prepare3 does nothing but depends on include/config/kernel.release Signed-off-by: Masahiro Yamada --- Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index ca6851f5ebc9..960df4d35b15 100644 --- a/Makefile +++ b/Makefile @@ -1121,11 +1121,9 @@ scripts: scripts_basic scripts_dtc # archprepare is used in arch Makefiles and when processed asm symlink, # version.h and scripts_basic is processed / created. -PHONY += prepare archprepare prepare3 +PHONY += prepare archprepare -prepare3: include/config/kernel.release - -archprepare: archheaders archscripts scripts prepare3 outputmakefile \ +archprepare: archheaders archscripts scripts include/config/kernel.release outputmakefile \ asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h prepare0: archprepare @@ -1261,11 +1259,11 @@ endif ifneq ($(dtstree),) -%.dtb: prepare3 scripts_dtc +%.dtb: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ PHONY += dtbs dtbs_install dt_binding_check -dtbs dtbs_check: prepare3 scripts_dtc +dtbs dtbs_check: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) dtbs_check: export CHECK_DTBS=1 From patchwork Thu Aug 22 04:46:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11108411 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 05CC91890 for ; Thu, 22 Aug 2019 04:46:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CEBBB23403 for ; Thu, 22 Aug 2019 04:46:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nifty.com header.i=@nifty.com header.b="ukNEEp0b" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728870AbfHVEqf (ORCPT ); Thu, 22 Aug 2019 00:46:35 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:29727 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730905AbfHVEq3 (ORCPT ); Thu, 22 Aug 2019 00:46:29 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x7M4kEYk001492; Thu, 22 Aug 2019 13:46:18 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x7M4kEYk001492 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1566449178; bh=qUMeOvsH2PJ92pYaiUPXJnmgv8wzxTsns//qrBBelrw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ukNEEp0bnnzgMTNO6zcBJP1NojCo9Td3jckZzfz+VtHhbe5Yh8i496X1+WYcAP0Xh Mvrq39x/ipDBF3/vDZxGDdSf9Vqk4PqOSboyR+Zm60vchqNaMUeIl4DJvHuqrht6zz uwuHWhDH1yQKKgBLkYyVLXtp6cBQBCMAY52nXekony9+QBduLwTeJb9Q+ReLq4TS6c V9Ms86SteH17cF1Uz4d3gLLiZNlAyf62RxjAxaFDGFKyE07iSKWSwrqXo52jX3VhMB ooyBh863rRnwLsJLhbLT3B/ro2Vbird/InXvUSa01q3FdCjNGy062V4hAjteM7NQ+C /B3ZeBmNXUWOA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Geert Uytterhoeven , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 6/6] kbuild: check clean srctree even earlier Date: Thu, 22 Aug 2019 13:46:13 +0900 Message-Id: <20190822044613.5349-6-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190822044613.5349-1-yamada.masahiro@socionext.com> References: <20190822044613.5349-1-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Move the outputmakefile target to the leftmost in the prerequisite list so that this is checked first. There is no guarantee that Make runs the prerequisites from left to right, but at least the released versions of GNU Make work like that when the parallel build option is not given. Of course, when the parallel option -j given, other targets will be run simultaneously but it is nice to show the error as early as possible. Signed-off-by: Masahiro Yamada --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 960df4d35b15..089983a8a028 100644 --- a/Makefile +++ b/Makefile @@ -581,10 +581,10 @@ ifdef config-build include arch/$(SRCARCH)/Makefile export KBUILD_DEFCONFIG KBUILD_KCONFIG CC_VERSION_TEXT -config: scripts_basic outputmakefile FORCE +config: outputmakefile scripts_basic FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@ -%config: scripts_basic outputmakefile FORCE +%config: outputmakefile scripts_basic FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@ else #!config-build @@ -1123,7 +1123,7 @@ scripts: scripts_basic scripts_dtc PHONY += prepare archprepare -archprepare: archheaders archscripts scripts include/config/kernel.release outputmakefile \ +archprepare: outputmakefile archheaders archscripts scripts include/config/kernel.release \ asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h prepare0: archprepare