From patchwork Fri Nov 23 04:51:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 151830 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1599093ljp; Thu, 22 Nov 2018 20:51:49 -0800 (PST) X-Google-Smtp-Source: AFSGD/X4hTypKr29sNTZ4rGirWCTCF9r+3gsvzmLHguCgZjwjauvvY5ZHgHRsY+hnTV8HKKGWyn/ X-Received: by 2002:a17:902:7e44:: with SMTP id a4mr14161219pln.338.1542948709059; Thu, 22 Nov 2018 20:51:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542948709; cv=none; d=google.com; s=arc-20160816; b=q6uQ971wLB8eMmvslo+gCiJICZEUjwvFyJOWldrZ+Vz2Wr9/icGNIzoIIzJ+MTUuXu WGcgqYZhNOhDtdrXi7fA1jHBsTebqbWIQ644g0mZ4rBR93ZHBrB8hBKr4Z6Smt6PfesX EDxPmYpfLRPQlXN3jqZ+9alu88gUHCPtZDLGpdCBUpnFmrYNJVwCUzg9Q5z41DoiM940 wzaG06stC+vKv+OC9q9arvI8DYEu09NEGgKGnCyYh0y3doF7SkIvu+K0lBvxagZtAuhU cdm0WULIo7Ct4BxCEKjlyeaUOBv9Iy1qM4HgHphu7fXLa8Sup8AyfSoxgLsyHxDUEZhK jIyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=dOs9bDoO5WsxGBpwTJjGsltucWemOPc7mrzxRG/Ehnc=; b=JQ84kGXQgfiM6K8biqxCYSzQGvZTT43xjlpEW0a+xPUdCdd1OqfFPAv75VA/t/0OYa +MownE+rvhxADS3O5h9bCkJpcVq8EeQfoO5iWZF/gG218yHHNbVrBHucSonMiOXyN/Id dXlWcGWz+ffMRTn0z1kW1s51JyIduBn24z27WYvfVUXctc6oX4JlWkb2/UgFK2cUC1aQ 8EWV7fHVzn5B6D3qTbi0x7L/mST2ymFnR4CYklDi+m80hu88+iPkoOBrsQG/F+kEs09e Vqe6b6TMktmZ4Ln8rgb88FvieJtw4HHYcGsFiG2F2C7lwYTF3WObMZPCVjHXtnKN0PZ1 enVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="1HjJs/1w"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x24si17840939plr.379.2018.11.22.20.51.48; Thu, 22 Nov 2018 20:51:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="1HjJs/1w"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393207AbeKWPeU (ORCPT + 32 others); Fri, 23 Nov 2018 10:34:20 -0500 Received: from conuserg-10.nifty.com ([210.131.2.77]:48170 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730451AbeKWPeU (ORCPT ); Fri, 23 Nov 2018 10:34:20 -0500 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-10.nifty.com with ESMTP id wAN4pTNM020182; Fri, 23 Nov 2018 13:51:29 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com wAN4pTNM020182 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1542948689; bh=dOs9bDoO5WsxGBpwTJjGsltucWemOPc7mrzxRG/Ehnc=; h=From:To:Cc:Subject:Date:From; b=1HjJs/1wyjGni0ShlOn6fBLgUbJV/NCtILmQjzNujlVLwb6vbcpz/s6QOhZ4TuUGD eE+OSNSdnruBNxAmUD/s8SXhpT3dtWNFWnsvVZmbP/98y30R3e+cOwKnpA9Ha81xJJ a55uanI437JNgHwWyoOtdmV6gDDMttcdFCA1CVLY7k4OGcio6JNMyXOlXQwWw3jFCf i/tpaZqYygbOIxPiznzVZ/mSkmB23cCGh48s1qi4H0kPCjku2lwutpsqH1/ZSwdQnB qVtkpFmjrlSdIMH6FZOpzBKgO1q/w9clr0f3qRbIZ1JKP4Biq+L4fBVZsaVbVBJlBE mCHXrMx7XQVng== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] kbuild: make 'scripts' depend on 'prepare0' Date: Fri, 23 Nov 2018 13:51:26 +0900 Message-Id: <1542948687-7326-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Before start descending, Kbuild needs to run 'prepare' and 'scripts', which were orthogonal to each other prior to this commit. Let's consider 'scripts' is a part of the preparation. This will allow more cleanups. Move 'scripts' to the prerequisite of 'prepare0', which starts compiling target *.c files. Signed-off-by: Masahiro Yamada --- Makefile | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) -- 2.7.4 diff --git a/Makefile b/Makefile index 36f3f0e..cee4cec 100644 --- a/Makefile +++ b/Makefile @@ -1062,7 +1062,7 @@ $(sort $(vmlinux-deps)): $(vmlinux-dirs) ; # Error messages still appears in the original language PHONY += $(vmlinux-dirs) -$(vmlinux-dirs): prepare scripts +$(vmlinux-dirs): prepare $(Q)$(MAKE) $(build)=$@ need-builtin=1 define filechk_kernel.release @@ -1114,7 +1114,7 @@ macroprepare: prepare1 archmacros archprepare: archheaders archscripts macroprepare scripts_basic -prepare0: archprepare gcc-plugins +prepare0: scripts archprepare gcc-plugins $(Q)$(MAKE) $(build)=scripts/mod $(Q)$(MAKE) $(build)=. @@ -1286,7 +1286,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modules.builtin) # Target to prepare building external modules PHONY += modules_prepare -modules_prepare: prepare scripts +modules_prepare: prepare # Target to install modules PHONY += modules_install @@ -1604,11 +1604,9 @@ help: @echo ' clean - remove generated files in module directory only' @echo '' -# Dummies... -PHONY += prepare scripts +PHONY += prepare prepare: $(cmd_crmodverdir) -scripts: ; endif # KBUILD_EXTMOD clean: $(clean-dirs) @@ -1712,33 +1710,33 @@ else target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@)) endif -%.s: %.c prepare scripts FORCE +%.s: %.c prepare FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) -%.i: %.c prepare scripts FORCE +%.i: %.c prepare FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) -%.o: %.c prepare scripts FORCE +%.o: %.c prepare FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) -%.lst: %.c prepare scripts FORCE +%.lst: %.c prepare FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) -%.s: %.S prepare scripts FORCE +%.s: %.S prepare FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) -%.o: %.S prepare scripts FORCE +%.o: %.S prepare FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) -%.symtypes: %.c prepare scripts FORCE +%.symtypes: %.c prepare FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) -%.ll: %.c prepare scripts FORCE +%.ll: %.c prepare FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) # Modules -/: prepare scripts FORCE +/: prepare FORCE $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) # Make sure the latest headers are built for Documentation Documentation/ samples/: headers_install -%/: prepare scripts FORCE +%/: prepare FORCE $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) -%.ko: prepare scripts FORCE +%.ko: prepare FORCE $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) $(@:.ko=.o) $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost