From patchwork Tue Aug 6 10:03:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 170654 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp5474480ile; Tue, 6 Aug 2019 03:04:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNm+mWpSj4sO41fAUgS6sgDTpG4zNsYLJWtUaIKSJrCBKPJSnCwjIWOaNDxqoxx8J7k78Y X-Received: by 2002:a65:518a:: with SMTP id h10mr2268316pgq.117.1565085841727; Tue, 06 Aug 2019 03:04:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565085841; cv=none; d=google.com; s=arc-20160816; b=DYjtcRZrSEglbfLtWwePykBAr1xU350EcxMteHFHi3XPzENDh3VFS4B/hvAASphKWy OlTrEKkHsAa+lFJkFGlhwqaeg4mnr8z2m+IfXAFp9hwvekExMdA7jg2Awqay31jyK0zP xUM6+Dh1FxeFWeN0lUU3WUANHUbXp4BaM7EfDmN+miMEMpO3wRgn85zVAAbfejBXQGQl V2ZjmzIuTwwUu7WDLnCqgdyPe4RgXOt85R4eyqh1GRqemPbr2iFO/2o6RVVUnE223Lor LGjBbNUVa+7+j7hroztUZqHL6ZWN+iBlDVBG8NVB2HbaQmp+Y/lJL7jNmJ6wCwrFgjk0 8OJA== 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=hqrexllHfLZTAkJJn6Gw3NY0h4befaHZw0q0NAO9avI=; b=gpgmWcnammorVGoSzVrCc99pynXPVwgy3E8qS56hbpLtz/oQ0/6bCBP/FZL1sFAwwJ EVsL+jVAzTaIsEb3Q2cLX0YOu4GaXbcfr0HEPWRE92TR5v16f/KYvSr/dQNRGJN0Oz1U 9dOC6FemCRcmO2tePpJpEt84pPofOjS592+pF/hoMA4O4sommaT4znaR8E+oRDxpepTV Pn1OZBVduFZbFPikaoUy+PJ5YWWBofDdNclm4eGrKgGpg2VOXfpbWSyY9OTDKqmUY5HB Gk6fpPs5KJpbNhfLnXEvV+NwjcX5Mp6hzCu7IkEPpiMVJoTdJhjNbyNq/ZY6maYA22I6 9aOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=mkb1F4nT; 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 z26si46262701pgl.562.2019.08.06.03.04.01; Tue, 06 Aug 2019 03:04:01 -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=mkb1F4nT; 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 S1732731AbfHFKEA (ORCPT + 29 others); Tue, 6 Aug 2019 06:04:00 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:35533 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732584AbfHFKD6 (ORCPT ); Tue, 6 Aug 2019 06:03:58 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x76A3QP6032264; Tue, 6 Aug 2019 19:03:27 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x76A3QP6032264 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1565085807; bh=hqrexllHfLZTAkJJn6Gw3NY0h4befaHZw0q0NAO9avI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mkb1F4nTNsDMbt5jCGEYav0ufh9ooFndRQLs3DeFxQbPRzQT3R7QeZXB5q+tAVi8g UVTHRRvR6fE5617epVKueSGkKKO7kcDi4c4uHzKH+5W8Z4b/ACBIP9StpIsTjewyoN SGJ0HWCy6q7faVRDVH88uD+aH+1kA8kkeF/crWUZctBTHTm4ixp30miVLnyNEJ2KPR kurpyioaRYJ6IrYUV8TLiEl2X+lpi3Grh0isGNKMMtANi+DSUZQlGAqXZIXnS17EEQ zk39qweoc69ntZmQbR0yQnGfYJVL7I9D6+dauY+aDXALbvTQAcDzuPAw2Lytm2lJmi IX4R6nJL8zVHw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Jan Kiszka , Tom Stonecypher , linux-kernel@vger.kernel.org, Masahiro Yamada , Michal Marek Subject: [PATCH 2/3] kbuild: generate modules.order only in directories visited by obj-y/m Date: Tue, 6 Aug 2019 19:03:22 +0900 Message-Id: <20190806100323.22919-2-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190806100323.22919-1-yamada.masahiro@socionext.com> References: <20190806100323.22919-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The modules.order files in directories visited by the chain of obj-y or obj-m are merged to the upper-level ones, and become parts of the top-level modules.order. On the other hand, there is no need to generate modules.order in directories visited by subdir-y or subdir-m. They would become orphan anyway. Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 3fe0c73e002c..37a1d2cd49d4 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -488,7 +488,8 @@ targets += $(call intermediate_targets, .asn1.o, .asn1.c .asn1.h) \ PHONY += $(subdir-ym) $(subdir-ym): $(Q)$(MAKE) $(build)=$@ \ - need-builtin=$(if $(filter $@/built-in.a, $(subdir-obj-y)),1) + need-builtin=$(if $(filter $@/built-in.a, $(subdir-obj-y)),1) \ + need-modorder=$(if $(need-modorder),$(if $(filter $@/modules.order, $(modorder)),1)) # Add FORCE to the prequisites of a target to force it to be always rebuilt. # ---------------------------------------------------------------------------