From patchwork Sat Mar 30 12:04: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: 161494 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3168264jan; Sat, 30 Mar 2019 05:04:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxb/QwLAifTMHvm2Hw8/rgrKroTy8mc2qtuUgrvTF1Qga6JaIOJjfHWBwu/dNgs1d4V+VbC X-Received: by 2002:a62:4351:: with SMTP id q78mr39066280pfa.86.1553947471332; Sat, 30 Mar 2019 05:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553947471; cv=none; d=google.com; s=arc-20160816; b=QvtMHlUZQxd2QvohSRHFfQ2igvgw40bNe9FPEq3kQMV815YhdH9GGn9+7/Yav0T6ST M3zPKIPaoq1GP8HDqnGbdySUKR9uk7KErHB/ygffERp9lHfFJo+PrQ3i7FbZRECVdPby 1A/Shioe/89U4/XEcnViZVlH2B0ytF9XNOuUG9L8InypuXqPbtc5+7C5vb2Ubx/UjDMb TdU31GCBpSBgJgDewoLNXZGAodbqDB84HWSB4s9kCTCG01gPuXkprEACKi3L321S6YEz nXo05cJ81JfQb7/F2pGW3NP+nVpg8VDt7Uv1FRMdxnaLKeQg6nN60PZRlH+sWlhUNTSg 0xNg== 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=FHNK6eyXi8sis+WrpzX624MLFcG4c9ZDVhLL5yNCvIQ=; b=Y8XpI74ozOH6XzDw00NNE9pxacgCVbK6cQh1XLfF6qEIiZk52oFmBS3LHKSzYhO1hH TFT961DwNOQmHBRkxqv8fuomBdf0ITz2iSN/wOyG5DmD7mwTpmQMcqt1amHqV3dP0Ryg HQFliP3SJBQPchxsQXvqxjnVNUYXhQDqkeRqgocq5nWACXdmhNVsdgqhhZGpx+YtTPlC hsXiNym3y1YIQlN/DLzDyYfKpcVXzC97h2cUJ7hV//GJgJhta3O8NojQxeC6VAZTDlEZ aqa1BuMQzs+arTC5R9BFAB/XNOrUUopDzXSQTM3BPnYX7xzkhF00o3GShQWAm1MiW8l5 yv8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=GUqfKCXu; 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 f16si824959pgh.309.2019.03.30.05.04.31; Sat, 30 Mar 2019 05:04:31 -0700 (PDT) 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=GUqfKCXu; 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 S1730771AbfC3ME3 (ORCPT + 31 others); Sat, 30 Mar 2019 08:04:29 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:36041 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730691AbfC3ME2 (ORCPT ); Sat, 30 Mar 2019 08:04:28 -0400 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-10.nifty.com with ESMTP id x2UC4MsN021262; Sat, 30 Mar 2019 21:04:23 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com x2UC4MsN021262 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1553947463; bh=FHNK6eyXi8sis+WrpzX624MLFcG4c9ZDVhLL5yNCvIQ=; h=From:To:Cc:Subject:Date:From; b=GUqfKCXumTTXXHmrKSXNdkpjrlJBkG7x90UZEWrqZMCQNCrtFkZk8Cz5dxb1s0Csh 8DipHMZQ489U4bhE3BpLDCw3WfVHlzVFpntsxDOteSnrxM71lOkTggMPon8i9Y4kjL qbsqlGOnIhkPjP9uJvOwAOxQ4fjtOWEj0z0L1bLv2kvgYINVJf/5hpt/5TYNZIILoM c5swsIQFgUzBLDUiUtDQyNASRey+brKS6sQyU21BttCyOE5LVHpI/9UKKw0NcetzvG AAPlnGxpUqrSKGblny+79Kb8XPRMhr9RLWd6kkzhFZpOycEOO9Zz+Kaf02AsWDEt+t tuRk5sUmYOY3Q== 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/6] kbuild: pass $(MAKECMDGOALS) to sub-make as is Date: Sat, 30 Mar 2019 21:04:13 +0900 Message-Id: <1553947458-8311-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 Manipulating $(MAKECMDGOALS) for sub-make seems odd to me. [1] 'make O=foo sub-make' is turned into 'make O=foo', which builds the default targets. It would make sense to terminate the build with: *** No rule to make target 'sub-make'. Stop. [2] 'make O=foo defconfig _all' is turned into 'make O=foo defconfig', which changes the behavior. Let's pass $(MAKECMDGOALS) as is. Signed-off-by: Masahiro Yamada --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/Makefile b/Makefile index 92ad066..9cbd367 100644 --- a/Makefile +++ b/Makefile @@ -168,7 +168,7 @@ $(filter-out _all sub-make $(lastword $(MAKEFILE_LIST)), $(MAKECMDGOALS)) _all: sub-make: $(Q)$(MAKE) \ $(if $(KBUILD_OUTPUT),-C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR)) \ - -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS)) + -f $(CURDIR)/Makefile $(MAKECMDGOALS) endif # need-sub-make endif # sub_make_done From patchwork Sat Mar 30 12:04:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 161495 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3168309jan; Sat, 30 Mar 2019 05:04:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyVG+h6UAqHcl45zsVGniJnGdjmrRBuuNtXtRlUglbQM+fx1IHtpQqF0kC2QwsSUJpY/c+ X-Received: by 2002:a17:902:2888:: with SMTP id f8mr54994537plb.244.1553947474291; Sat, 30 Mar 2019 05:04:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553947474; cv=none; d=google.com; s=arc-20160816; b=LOgZuvIUGKaSwt9xchqhJyhCanfVDxlPcI06Vi7PuJzqk3nV5zzn1aliQ2ZW7/LAvI rsdmQcf7ZQrtLZexG3UCsG3Aox+aboHFDj1PHLX118iEeaPS9D44PjXSOujWPy4jx2vy 4ArkgIN3CWoT9qPyi9Of0Mv4PqJhLUnFLyrudXr4IY9fJrZdnwWG1qcN8XKHIxugDEBu 9SpSf35x5blxp3Nn1vpIyVm5Qvo0H8MLcToWOMqIGhgB2cI6Xeh2TxngI6XLkAkQH1n9 UhuBVMii20RaRnzm60ENOMb7kG4hsYJeJk79QAtKokCy1VdQ1/3hxSvZ0OALKvpYkaZ8 d9pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=9yEvR1x1Ke1YeqsC6yVRM/WecwsH6o1PtvvtPG1nSUQ=; b=fF+E/PNANFMurAGJXRkwwDDr7x7owZ0ipVyKbKNUeRtaQnKozKV6Nplt5WifW074CZ P0daMBzEeKqEu8/I6OnJBEj1Hzfnx86LbLoXXlSUQv5X/148BnzC7dF68od7559T6Xbl k/G1fhbteEfJfvjpf5ZKsT+dnlVsCsm9/1BsF15WLHqMNIzBpa7H/YeQ+80lf2eMM+NR LLXXTWhyWt2QJU4NGA3bK8a1x2atf8syhqfurMrTxJlDlK7cp9M34Xzt39K2bNLHGrmW JGPoT8O8axavoIdK2jVlvbZBwinCmwsqS0oMW1upvUs3zPtd9HlI6gf02FefO/uo2CkU SqdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=be+xqpt4; 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 u10si4193960pgr.112.2019.03.30.05.04.33; Sat, 30 Mar 2019 05:04:34 -0700 (PDT) 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=be+xqpt4; 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 S1730794AbfC3MEc (ORCPT + 31 others); Sat, 30 Mar 2019 08:04:32 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:36039 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730384AbfC3ME3 (ORCPT ); Sat, 30 Mar 2019 08:04:29 -0400 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-10.nifty.com with ESMTP id x2UC4MsO021262; Sat, 30 Mar 2019 21:04:24 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com x2UC4MsO021262 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1553947464; bh=9yEvR1x1Ke1YeqsC6yVRM/WecwsH6o1PtvvtPG1nSUQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=be+xqpt4jaJ3qrr97pGw11Fpjmu10JPmv/0RBeDuakDS0goO3ig+QYLlkOGa+AS0I k+2kXOuJoG17veDZq5bLFoNGpq2Y2706trYiROYCzmEZX42o+jemjLcf49ngm6RpCQ 6vFVGYcewA9wvF2dJHWH65btor1MiSTH2UELE4bcpBtpaKQra0hT8lNCO4dM4zh+za nyVR7h3pAsRj5uTiqcvFYpomO1fpU2vcFC9uTYMb+92ZD1OIDm+MOYqYVb6TSCHTgz 453WLgGQz1vJ5nzp/Cp0yX/4LBxQShaa3VUrI8MKcU4y8izKa3qdye2jVch20Qcb4I q3ZcBiLZVVgzA== 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 2/6] kbuild: allow Kbuild to start from any directory Date: Sat, 30 Mar 2019 21:04:14 +0900 Message-Id: <1553947458-8311-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1553947458-8311-1-git-send-email-yamada.masahiro@socionext.com> References: <1553947458-8311-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kbuild always runs in the top of the output directory. If Make starts in the source directory with O=, it relocates the working directory to the location specified by O=. Also, users can start build from the output directory by using the Makefile generated by scripts/mkmakefile. With a little more effort, Kbuild will be able to start from any directory path. This commit allows to specify the source directory by using the -f option. For example, you can do: $ cd path/to/output/dir $ make -f path/to/source/dir/Makefile Or, for the equivalent behavior, you can do: $ make O=path/to/output/dir -f path/to/source/dir/Makefile KBUILD_SRC is now deprecated. Signed-off-by: Masahiro Yamada --- Makefile | 87 +++++++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 50 insertions(+), 37 deletions(-) -- 2.7.4 Reviewed-by: Kieran Bingham diff --git a/Makefile b/Makefile index 9cbd367..1b2a70e 100644 --- a/Makefile +++ b/Makefile @@ -96,56 +96,65 @@ endif export quiet Q KBUILD_VERBOSE -# kbuild supports saving output files in a separate directory. -# To locate output files in a separate directory two syntaxes are supported. -# In both cases the working directory must be the root of the kernel src. +# Kbuild will save output files in the current working directory. +# This does not need to match to the root of the kernel source tree. +# +# For example, you can do this: +# +# cd /dir/to/store/output/files; make -f /dir/to/kernel/source/Makefile +# +# If you want to save output files in a different location, there are +# two syntaxes to specify it. +# # 1) O= # Use "make O=dir/to/store/output/files/" # # 2) Set KBUILD_OUTPUT -# Set the environment variable KBUILD_OUTPUT to point to the directory -# where the output files shall be placed. -# export KBUILD_OUTPUT=dir/to/store/output/files/ -# make +# Set the environment variable KBUILD_OUTPUT to point to the output directory. +# export KBUILD_OUTPUT=dir/to/store/output/files/; make # # The O= assignment takes precedence over the KBUILD_OUTPUT environment # variable. -# KBUILD_SRC is not intended to be used by the regular user (for now), -# it is set on invocation of make with KBUILD_OUTPUT or O= specified. - -# OK, Make called in directory where kernel src resides -# Do we want to locate output files in a separate directory? +# Do we want to change the working directory? ifeq ("$(origin O)", "command line") KBUILD_OUTPUT := $(O) endif -ifneq ($(words $(subst :, ,$(CURDIR))), 1) - $(error main directory cannot contain spaces nor colons) +ifneq ($(KBUILD_OUTPUT),) +# Make's built-in functions such as $(abspath ...), $(realpath ...) cannot +# expand a shell special character '~'. We use a bit tredious way to handle it. +abs_objtree := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) && pwd) +$(if $(abs_objtree),, \ + $(error failed to create output directory "$(KBUILD_OUTPUT)")) + +# $(realpath ...) resolves symlinks +abs_objtree := $(realpath $(abs_objtree)) +else +abs_objtree := $(CURDIR) +endif # ifneq ($(KBUILD_OUTPUT),) + +ifeq ($(abs_objtree),$(CURDIR)) +# Suppress "Entering directory ..." unless we are changing the work directory. +MAKEFLAGS += --no-print-directory +else +need-sub-make := 1 endif -ifneq ($(KBUILD_OUTPUT),) -# check that the output directory actually exists -saved-output := $(KBUILD_OUTPUT) -KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \ - && pwd) -$(if $(KBUILD_OUTPUT),, \ - $(error failed to create output directory "$(saved-output)")) +abs_srctree := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) + +ifneq ($(words $(subst :, ,$(abs_srctree))), 1) +$(error source directory cannot contain spaces or colons) +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. It is OK since we are going to invoke -# 'sub-make' below. -MAKEFLAGS += --include-dir=$(CURDIR) - +# once after the Makefile is read. We need to invoke sub-make. +MAKEFLAGS += --include-dir=$(abs_srctree) need-sub-make := 1 -else - -# Do not print "Entering directory ..." at all for in-tree build. -MAKEFLAGS += --no-print-directory - -endif # ifneq ($(KBUILD_OUTPUT),) +endif ifneq ($(filter 3.%,$(MAKE_VERSION)),) # 'MAKEFLAGS += -rR' does not immediately become effective for GNU Make 3.x @@ -155,6 +164,7 @@ need-sub-make := 1 $(lastword $(MAKEFILE_LIST)): ; endif +export abs_srctree abs_objtree export sub_make_done := 1 ifeq ($(need-sub-make),1) @@ -166,9 +176,7 @@ $(filter-out _all sub-make $(lastword $(MAKEFILE_LIST)), $(MAKECMDGOALS)) _all: # Invoke a second make in the output directory, passing relevant variables sub-make: - $(Q)$(MAKE) \ - $(if $(KBUILD_OUTPUT),-C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR)) \ - -f $(CURDIR)/Makefile $(MAKECMDGOALS) + $(Q)$(MAKE) -C $(abs_objtree) -f $(abs_srctree)/Makefile $(MAKECMDGOALS) endif # need-sub-make endif # sub_make_done @@ -213,16 +221,21 @@ ifeq ("$(origin M)", "command line") KBUILD_EXTMOD := $(M) endif -ifeq ($(KBUILD_SRC),) +ifeq ($(abs_srctree),$(abs_objtree)) # building in the source tree srctree := . else - ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR))) + ifeq ($(abs_srctree)/,$(dir $(abs_objtree))) # building in a subdirectory of the source tree srctree := .. else - srctree := $(KBUILD_SRC) + srctree := $(abs_srctree) endif + + # TODO: + # KBUILD_SRC is only used to distinguish in-tree/out-of-tree build. + # Replace it with $(srctree) or something. + KBUILD_SRC := $(abs_srctree) endif export KBUILD_CHECKSRC KBUILD_EXTMOD KBUILD_SRC From patchwork Sat Mar 30 12:04:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 161497 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3168507jan; Sat, 30 Mar 2019 05:04:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCxZaHmHnoUCnLIOY3TM/ifuKJchjzd0603ljvyAlPo7xZgADjMzf9kF45ph4na6JM51qI X-Received: by 2002:a63:6605:: with SMTP id a5mr51141497pgc.372.1553947484819; Sat, 30 Mar 2019 05:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553947484; cv=none; d=google.com; s=arc-20160816; b=bZ9Iyo2eyC1P+OGQURAAx201bsVYQ5DWVZEpWr1fu2xLsMWH8ChYi9rXx1lQWiBcnf 3PuAGNGN7Q9dM1ZIaAeLxMrkYcc+fsQMYKejcm3x2k0WDqR3Wd5WwuFQMo/XJQ5T6Bxk FQXWHg8bFnRSn3Z09glpU93IfoO2uMSY5HVj+50k9hIZh1H1rvdvT6hAAu/9U1WxE18H 2mNWiSagOdXSnxI0QHY7LQHb6rJmvu+c3IWBcrdKlkUutwTKyAQkCK36a1nfoj6n5f4w KnaMCxTNcyp1IzZZfFLnW8iIoN61JywIP6jGaari49FLuS83UqXl+oR65roENItGGL5g wpiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=uVzljSN+7FodKIL08wsjW9LWqryQWeeomDXG3kJzSxw=; b=cH8mz/cWoXGIcQdQZYX3HGJD+Ntow1KFGz5e2g80DIxV51zgYCO37znDB3fifL4Q7P bXl7xWJ/8pa2soiU2r1FWSTrhDXXOOdeDBM8b6yxPcb0PDecPH2z4+yFYmnvNwCKlrmX LdQk8z98q/G2kpH6f2UPJebT/b5vzTOoCUzwITLDsXQgEy8X1zO/QAAZqmeMbjFTXgNQ Gvx81wMr0RTXoKvJEOrpBmotQzKUT7CuM/J0rNcMFPGSHHljZIANmnS4wGh2QKY3YQU8 lSaOaWd0om/v7etSIioQmYMdSZbKE39X6GQAApvIPeGBgPxv2cC2Yvu/Ri7yldW7V3C1 ZMOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=1f8uCkfF; 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 w2si4161227pgp.266.2019.03.30.05.04.44; Sat, 30 Mar 2019 05:04:44 -0700 (PDT) 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=1f8uCkfF; 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 S1730741AbfC3ME3 (ORCPT + 31 others); Sat, 30 Mar 2019 08:04:29 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:36046 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730414AbfC3ME2 (ORCPT ); Sat, 30 Mar 2019 08:04:28 -0400 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-10.nifty.com with ESMTP id x2UC4MsP021262; Sat, 30 Mar 2019 21:04:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com x2UC4MsP021262 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1553947465; bh=uVzljSN+7FodKIL08wsjW9LWqryQWeeomDXG3kJzSxw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1f8uCkfF3pECtf0HJc5H88nAd4mEuW6N4TxjyK2jMBX8krDlSF8+rgHSPnbZNeOxC r04vf4QSIF8rP+iz2BOXXqf7oQP8TwmaZO8kiWwTByCNyxnbkfZR96BVbxyELB/lQt jSoxx8zc19d+xsMaSryBzz01DVO2r0BP0FHV0JUsBsOl0JqSs9sY1wnBP3Up7KPYSs UB6UviH4G+/+EQbFynGM9IBFun1a+2laN7bCdB5c4jTwpGMAZcANu7MoMRO9OodtYB xpuJoNAaQBFruGl1uvIktDGm5+1xVv2N8Tnh60HC7DWzWpwcgIRlkCHCiVUWgqrnma imMXBvcKVicnw== 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 3/6] kbuild: mkmakefile: do not check the generated Makefile marker Date: Sat, 30 Mar 2019 21:04:15 +0900 Message-Id: <1553947458-8311-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1553947458-8311-1-git-send-email-yamada.masahiro@socionext.com> References: <1553947458-8311-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This hunk was added to avoid accidental overwrite of the top Makefile in case O= points to the top of the source tree. As commit 4f1127e20437 ("kbuild: fix infinite make recursion"), it caused some troubles in the past because Kbuild assumes O= as out-of-tree build, while it actually works in the source tree. Now this works more properly; if O= points to the source directory, it is handled as in-tree build. So, this sanity check is unneeded. Signed-off-by: Masahiro Yamada --- scripts/mkmakefile | 6 ------ 1 file changed, 6 deletions(-) -- 2.7.4 diff --git a/scripts/mkmakefile b/scripts/mkmakefile index 412f13f..31de468 100755 --- a/scripts/mkmakefile +++ b/scripts/mkmakefile @@ -7,12 +7,6 @@ # Usage # $1 - Kernel src directory -# Only overwrite automatically generated Makefiles -# (so we do not overwrite kernel Makefile) -if test -e Makefile && ! grep -q Automatically Makefile -then - exit 0 -fi if [ "${quiet}" != "silent_" ]; then echo " GEN Makefile" fi From patchwork Sat Mar 30 12:04:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 161496 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3168353jan; Sat, 30 Mar 2019 05:04:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzpQ+w/Vw0XmO+lFEHmnGtsZczT6RyKfDheKQ0J+sOiIG3C6Qcpnkv9xila85RmtUsKHvjN X-Received: by 2002:a65:6241:: with SMTP id q1mr23375465pgv.244.1553947477061; Sat, 30 Mar 2019 05:04:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553947477; cv=none; d=google.com; s=arc-20160816; b=jptBA5tz1VUqWTXUUWxB1/7tcCTzG/jqe128sekf+d0mxtQnLEsejofNpq0rgNXrtg k4nAvd/Y66aa/5yC3jmkWt6WUofPFsWScfxHjPMRS/RTz3D9N2UwrYG07TxZKEpaDP7z DYI9aZRzuEz1KwgaAWTwFnbZq3qCGFnWpiJlIAet+yLJbsZ1LXnQ7tq/bTuyPiFDSKar qJZtfna7k2zLbB0j0qEoukypmYfuaUPrCDXqHsUaqx9Q6DH1W2faJxwB6GRsFO2eoZJB eQbjL3oq1YeMxxpw4MS4vRBlRlEktMDelRRTRjE6qrTEiswVI+61sEihG3umQJWyX+DQ cCtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=vECKjhBdepZ/JkB+LcXMbI5D09fQNGuN2ICmhd1CZhU=; b=TtGyX+vzn+Ymtl994pQX9zulEQ2AnEBh1nKT2Ognmms6CB0PDx9z0I3qBbbhOR+wuZ t+mF6W40uZpvlqUKtgmqU7IA2rJMW9xU6SUrOhQlx7OauZXswDtvZX3qPlMEyVSVCzjz HMj7qqJ5n5W8MnadjZyiiYUG13MqpBVwxAduOx1yjqMTZf1olVCvM/71g2JqZ7XDWkOT Q6Bd6xTEl2x2xNISXrsB1yNnfGKRwZ2B8Aye3xje3ZCnpSno+T7hQVUGIgpjdF93OU4S 8wBis8liW4z2/D7/QiBibhmyXyasoYyU6g2YjY4tmNY9LmHd4IoecVA1IAJ32wPdqncg vtLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=KdwnuBTr; 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 127si4404037pgf.595.2019.03.30.05.04.36; Sat, 30 Mar 2019 05:04:37 -0700 (PDT) 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=KdwnuBTr; 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 S1730820AbfC3MEf (ORCPT + 31 others); Sat, 30 Mar 2019 08:04:35 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:36171 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730384AbfC3MEe (ORCPT ); Sat, 30 Mar 2019 08:04:34 -0400 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-10.nifty.com with ESMTP id x2UC4MsQ021262; Sat, 30 Mar 2019 21:04:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com x2UC4MsQ021262 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1553947466; bh=vECKjhBdepZ/JkB+LcXMbI5D09fQNGuN2ICmhd1CZhU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KdwnuBTrTktyVNyUyzhLQmBFTFynIPYYHQx1Rag2icU23E6jdXMOglnq0PmxmRSGk 04jktMukNMefv9erfAfeaph8BriFqV/1g3AjyHPA1ndQ7eJHZMjOHk1JehRq1XnA42 Jp11eH53haehk+A7lr/KVfrLp21uaczvySUai+3OQXF+Fafo1M50Trix1cQd1R+R7s /7230eJZo1ZZ6N3wom+tTc/lL4W0wnPU3Vn3gSNP0hPSQHzuQXCD80wGxZ0KhJtt0W soFmHzl3woiuRlPS4uxyUEWEckIErSOp5AySTBP51JEkznXDM5c/51jtAWjbuSmKpW Qh3syYoxjusTQ== 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 4/6] kbuild: mkmakefile: generate a simple wrapper of top Makefile Date: Sat, 30 Mar 2019 21:04:16 +0900 Message-Id: <1553947458-8311-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1553947458-8311-1-git-send-email-yamada.masahiro@socionext.com> References: <1553947458-8311-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that Kbuild is able to start from any directory, the generated Makefile can simply wrap the top Makefile. Signed-off-by: Masahiro Yamada --- scripts/mkmakefile | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) -- 2.7.4 Reviewed-by: Kieran Bingham diff --git a/scripts/mkmakefile b/scripts/mkmakefile index 31de468..4d0faeb 100755 --- a/scripts/mkmakefile +++ b/scripts/mkmakefile @@ -12,22 +12,6 @@ if [ "${quiet}" != "silent_" ]; then fi cat << EOF > Makefile -# Automatically generated by $0: don't edit - -ifeq ("\$(origin V)", "command line") -VERBOSE := \$(V) -endif -ifneq (\$(VERBOSE),1) -Q := @ -endif - -MAKEFLAGS += --no-print-directory - -.PHONY: __sub-make \$(MAKECMDGOALS) - -__sub-make: - \$(Q)\$(MAKE) -C $1 O=\$(CURDIR) \$(MAKECMDGOALS) - -\$(filter-out __sub-make, \$(MAKECMDGOALS)): __sub-make - @: +# Automatically generated by $(realpath $0): don't edit +include $(realpath $1/Makefile) EOF From patchwork Sat Mar 30 12:04:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 161499 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3169705jan; Sat, 30 Mar 2019 05:05:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqySXeDGQqYaRSPIkCtTZA+d3cattuxr/JfNB21nMQWJZKVyxhwLb2SWMZNSrpX/7kgm35xX X-Received: by 2002:a62:3186:: with SMTP id x128mr34954956pfx.30.1553947549748; Sat, 30 Mar 2019 05:05:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553947549; cv=none; d=google.com; s=arc-20160816; b=y1HBkHL0K+N9zR61W9QjmunjeuAp19J8c9TQYA44z0Oe1BF8kULOrR4T652KBcQZ1n c5ucAIwnK3EReanan/8L0c36ustcLz+RwcJomLSWxtz/Of0CKSHzItqBf5X2aXJlBmPr gUJlhZtoPu+fn/hMWCGVNlwIpzdSDkFvzeVOSAKS25nUS7YgcTFlw4LfQorQFKuDrCZd ItJ3H66GVF+Px7HyNuas7BYOrGGU+hcUYNCZp5SRQ97Fi2sund4+rzr7kw75Il01fWXW 5uhlIfbWkn9wKMAq+2yw9VRaVEpbPdG5qeIJYr3udwpvueruMQ0cY0WBPyvyjKMnoIZ4 T5+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=8V2O1fiyQWP/VAAUtS8guLdWmxJutLI9feIbvt/wlM0=; b=IJJ+wJge523oWaueA4o5GvpjpscK2eSn67xDILT2fKFxJyuK4h/s3HFaKiTNZzXMJZ KmQ81agVNzq1ryR1inluCGWZBXgww1IDbppihirQo2kbnb+z3u2TzLcF+vnqRzecsPZq VnW8ORBuksJlKHldd35Y6l3CdrXDbWu3lAd7pRVaZMu7HeBz4aYpah7DoigDdYcqWCCG BZZTFf+m69TWhBiu/KRUecWP59jodb1n9K0GVRthzlKv+Y5fGQ+IuhFts874gPVP2d1o e1p9aBB+gscQEIMag/8RIUjUD8zSGsjse10ifHBH4n9GcFtqab2jfPM5gr3PyQi2C5e2 LCMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="kNk4jvE/"; 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 k75si4313572pgc.515.2019.03.30.05.05.49; Sat, 30 Mar 2019 05:05:49 -0700 (PDT) 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="kNk4jvE/"; 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 S1730828AbfC3MFr (ORCPT + 31 others); Sat, 30 Mar 2019 08:05:47 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:37863 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730510AbfC3MFr (ORCPT ); Sat, 30 Mar 2019 08:05:47 -0400 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-10.nifty.com with ESMTP id x2UC4MsR021262; Sat, 30 Mar 2019 21:04:26 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com x2UC4MsR021262 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1553947467; bh=8V2O1fiyQWP/VAAUtS8guLdWmxJutLI9feIbvt/wlM0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kNk4jvE/UOCW0Lopt8HNV+PzcKTfbWcFL2XiR2HRLLFRRkB0Ffr46P0dYCuQcPfBK 0EfkcnAkvMYI6/1f8K9e8szITdEpcn5c8ONjASFl/c052xnzeuEXE6JEsJgXBlBcBp d9mlWBdxIKCaukEWY0yShGKusgAU16Wvb/+zAuK1ce4tcUW1ewQXJhby1AHdbiIvGh sxGLs6QAWonrM5FTBv2sm4111bG0gTV+lbkOYDkvvySk4aiC2DEDjW3sz5gXTfcFlm Bb4f//fegq8YYk1jGM72I8fm7j6TgHywfb4IXJ1E+PBih8+Qm+38KmiE1MVMTO68SM HS1zHLEAnAASA== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , "David S. Miller" , Joey Pabalinas , Kirill Tkhai , linux-kernel@vger.kernel.org, Constantine Shulyupin , Michal Marek , Kieran Bingham , Matthew Wilcox , Jan Kiszka , Andrew Morton Subject: [PATCH 5/6] kbuild: use $(srctree) instead of KBUILD_SRC to check out-of-tree build Date: Sat, 30 Mar 2019 21:04:17 +0900 Message-Id: <1553947458-8311-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1553947458-8311-1-git-send-email-yamada.masahiro@socionext.com> References: <1553947458-8311-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org KBUILD_SRC was conventionally used for some different purposes: [1] To remember the source tree path [2] As a flag to check if sub-make is already done [3] As a flag to check if Kbuild runs out of tree For [1], we do not need to remember it because the top Makefile can compute it by $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) [2] has been replaced with self-commenting 'sub_make_done'. For [3], we can distinguish in-tree/out-of-tree by comparing $(srctree) and '.' This commit converts [3] to prepare for the KBUILD_SRC removal. Signed-off-by: Masahiro Yamada --- Makefile | 6 +++--- scripts/Makefile.build | 2 +- scripts/Makefile.host | 2 +- scripts/Makefile.lib | 2 +- scripts/Makefile.modbuiltin | 2 +- scripts/gdb/linux/Makefile | 2 +- scripts/tags.sh | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) -- 2.7.4 diff --git a/Makefile b/Makefile index 1b2a70e..fa441ca 100644 --- a/Makefile +++ b/Makefile @@ -448,7 +448,7 @@ USERINCLUDE := \ LINUXINCLUDE := \ -I$(srctree)/arch/$(SRCARCH)/include \ -I$(objtree)/arch/$(SRCARCH)/include/generated \ - $(if $(KBUILD_SRC), -I$(srctree)/include) \ + $(if $(filter .,$(srctree)),,-I$(srctree)/include) \ -I$(objtree)/include \ $(USERINCLUDE) @@ -509,7 +509,7 @@ PHONY += outputmakefile # At the same time when output Makefile generated, generate .gitignore to # ignore whole output directory outputmakefile: -ifneq ($(KBUILD_SRC),) +ifneq ($(srctree),.) $(Q)ln -fsn $(srctree) source $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree) $(Q)test -e .gitignore || \ @@ -1087,7 +1087,7 @@ PHONY += prepare archprepare prepare1 prepare3 # and if so do: # 1) Check that make has not been executed in the kernel src $(srctree) prepare3: include/config/kernel.release -ifneq ($(KBUILD_SRC),) +ifneq ($(srctree),.) @$(kecho) ' Using $(srctree) as source for kernel' $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \ echo >&2 " $(srctree) is not clean, please run 'make mrproper'"; \ diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 76ca30c..9dddfb6 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -501,7 +501,7 @@ existing-targets := $(wildcard $(sort $(targets))) -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) -ifneq ($(KBUILD_SRC),) +ifneq ($(srctree),.) # Create directories for object files if they do not exist obj-dirs := $(sort $(obj) $(patsubst %/,%, $(dir $(targets)))) # If targets exist, their directories apparently exist. Skip mkdir. diff --git a/scripts/Makefile.host b/scripts/Makefile.host index a115259..73b8041 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -71,7 +71,7 @@ __hostc_flags = $(_hostc_flags) __hostcxx_flags = $(_hostcxx_flags) ifeq ($(KBUILD_EXTMOD),) -ifneq ($(KBUILD_SRC),) +ifneq ($(srctree),.) __hostc_flags = -I$(obj) $(call flags,_hostc_flags) __hostcxx_flags = -I$(obj) $(call flags,_hostcxx_flags) endif diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 8a1f64f..41e98fa 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -144,7 +144,7 @@ __cpp_flags = $(_cpp_flags) # If building the kernel in a separate objtree expand all occurrences # of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/'). ifeq ($(KBUILD_EXTMOD),) -ifneq ($(KBUILD_SRC),) +ifneq ($(srctree),.) # -I$(obj) locates generated .h files # $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files diff --git a/scripts/Makefile.modbuiltin b/scripts/Makefile.modbuiltin index a072a42..ea90a90 100644 --- a/scripts/Makefile.modbuiltin +++ b/scripts/Makefile.modbuiltin @@ -15,7 +15,7 @@ include include/config/tristate.conf include scripts/Kbuild.include -ifneq ($(KBUILD_SRC),) +ifneq ($(srctree),.) # Create output directory if not already present _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) endif diff --git a/scripts/gdb/linux/Makefile b/scripts/gdb/linux/Makefile index 3df395a..9fd3d8e 100644 --- a/scripts/gdb/linux/Makefile +++ b/scripts/gdb/linux/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 -ifneq ($(KBUILD_SRC),) +ifneq ($(srctree),.) symlinks := $(patsubst $(srctree)/$(src)/%,%,$(wildcard $(srctree)/$(src)/*.py)) diff --git a/scripts/tags.sh b/scripts/tags.sh index f470d99..6a55180 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -19,7 +19,7 @@ ignore="$ignore ( -name *.mod.c ) -prune -o" # Do not use full path if we do not use O=.. builds # Use make O=. {tags|cscope} # to force full paths for a non-O= build -if [ "${KBUILD_SRC}" = "" ]; then +if [ "${srctree}" = "." ]; then tree= else tree=${srctree}/ From patchwork Sat Mar 30 12:04:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 161498 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3168885jan; Sat, 30 Mar 2019 05:05:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqygSBCcHoTCAOBYuj1Oem0plEhzXMU+uu/upkNPyWfYZf4KETtpXuyAdCLoNT4+PwrO45T5 X-Received: by 2002:a63:2106:: with SMTP id h6mr50471956pgh.441.1553947504061; Sat, 30 Mar 2019 05:05:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553947504; cv=none; d=google.com; s=arc-20160816; b=K6X7WK9sMa4rIDpzLtWY6MCRD5pVHuvbwhq9y/mGmitVaMWBkHMbJSGTHyHmccakqC 2k9Z7lrxJBx4nX7Of5YFuVszEew7y6Sfr5MoQEhCEIeKYBNaHnvjhaxq/Xg8fiZwLbxE HQ6FHuqKWnL/7qQR0+JUsRrfCIdg+nXmy0O0xHvuoQPq4L+d+lj3Pqan2+V1vVOoNLUn RytjTCL/AV4GE2nAzqCrkL2QPBoxeAttGC7A0Vo5IPN/lhfl0TYiyfDq18Zz6gQRFXLu NPKuj81UelzGIOPZdQiE8Y4vVarTq2DfGyExbBJYK9/kjHtmEpRYOiwXpkCt5X5pgtnp KiIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=AlH6VdZl5Lh+GjcQTaXSUl8konDDboFGt2lJg/++ZRI=; b=HB8crkIB+lZyXHV01b6xYhNJQevos8p1Xn502GvuLU8fLEOh2zus9s5lmwliJ9lRdY AJgHByWgxyjbKQGWa34HOmbJxAS7UxeFqQh0rCU4RY6jOlR/x9vEUAnr69lYgnCyKQv+ L/yAFVOls4YTaz/UAgcEvqvYtpCjoKjXQzeX+ww6Op7AKyH9Ckqh20D8+eFcaDlQGgCq d7sPj6R6zodTXsn9zgU4UntaHyH6y/4Vql4vnMbMhTzqZLS7wkS7acEH7zxlhx8jSb/L WdkoFHxoL9Phx7xZfgGv6Kp1xZcq/I6Ma5MkEyziJndLTV/FuoZCz3LcKWDEkd+4DB84 pEGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=br2GMjVa; 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 m86si4173914pfi.235.2019.03.30.05.05.03; Sat, 30 Mar 2019 05:05:04 -0700 (PDT) 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=br2GMjVa; 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 S1730827AbfC3MFC (ORCPT + 31 others); Sat, 30 Mar 2019 08:05:02 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:36854 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730384AbfC3MFB (ORCPT ); Sat, 30 Mar 2019 08:05:01 -0400 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-10.nifty.com with ESMTP id x2UC4MsS021262; Sat, 30 Mar 2019 21:04:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com x2UC4MsS021262 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1553947468; bh=AlH6VdZl5Lh+GjcQTaXSUl8konDDboFGt2lJg/++ZRI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=br2GMjVaNqFkHG72EDZGUYosdysgF6ehYuIhTDkZb08CBOezfLr8QVtg5MJ8wzGw6 xCZ4K0iwQK8+oUrxBEmj2HF/YFAXCbDfIQxRUk9St0+4nnEnE9f0j/eBWKytVeBQ3q zac5e08deDDUmNpnIkmWLpNcA+bjUOb4d+l8RuO7Meg/9h7LFzExpv/GwhO14JoMdP d1vFyrjaLJC6wNRPRmKjycbL1ptngSfWviAuXO+xU8nRMwXXl+L2A0QvpG3ZiQJ+cU UxQv69/zivJAVCT9lmZxhUeRhRwAT461Ba2QlkQEbYCDKTXeJhwn0WWijV4CcQW/xM Ga1NzJwt4apVg== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Naga Sureshkumar Relli , Michal Simek , Thierry Reding , Linus Walleij , linux-kernel@vger.kernel.org, Dmitry Osipenko Subject: [PATCH 6/6] memory: squash drivers/memory/Makefile.asm-offsets Date: Sat, 30 Mar 2019 21:04:18 +0900 Message-Id: <1553947458-8311-6-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1553947458-8311-1-git-send-email-yamada.masahiro@socionext.com> References: <1553947458-8311-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org drivers/memory/Makefile.asm-offsets is small enough, and included from a single place. Squash it into drivers/memory/Makefile. Signed-off-by: Masahiro Yamada --- drivers/memory/Makefile | 5 ++++- drivers/memory/Makefile.asm-offsets | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 drivers/memory/Makefile.asm-offsets -- 2.7.4 diff --git a/drivers/memory/Makefile b/drivers/memory/Makefile index 90161de..aaf6771 100644 --- a/drivers/memory/Makefile +++ b/drivers/memory/Makefile @@ -28,6 +28,9 @@ ti-emif-sram-objs := ti-emif-pm.o ti-emif-sram-pm.o AFLAGS_ti-emif-sram-pm.o :=-Wa,-march=armv7-a -include drivers/memory/Makefile.asm-offsets +include/generated/ti-emif-asm-offsets.h: drivers/memory/emif-asm-offsets.s FORCE + $(call filechk,offsets,__TI_EMIF_ASM_OFFSETS_H__) + +targets += emif-asm-offsets.s drivers/memory/ti-emif-sram-pm.o: include/generated/ti-emif-asm-offsets.h diff --git a/drivers/memory/Makefile.asm-offsets b/drivers/memory/Makefile.asm-offsets deleted file mode 100644 index 0447e17..0000000 --- a/drivers/memory/Makefile.asm-offsets +++ /dev/null @@ -1,4 +0,0 @@ -include/generated/ti-emif-asm-offsets.h: drivers/memory/emif-asm-offsets.s FORCE - $(call filechk,offsets,__TI_EMIF_ASM_OFFSETS_H__) - -targets += emif-asm-offsets.s