From patchwork Wed Jul 17 06:17:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 169100 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp530380ilk; Tue, 16 Jul 2019 23:19:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqykFoLXmEo1PvkhkgrU2jqWVuMKyesHF+8tqd2myToi95XWexxDGTJ7faMOG51yWt/yuJxR X-Received: by 2002:a17:902:e613:: with SMTP id cm19mr38519885plb.299.1563344350480; Tue, 16 Jul 2019 23:19:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563344350; cv=none; d=google.com; s=arc-20160816; b=k6LzJJqnCKlpAzylyvj+9azKCBDP68QKDzmHd0aUen0/BIT8MIa088MWD8NB/kLx4Q 6HCNrQ4UDO9NHUjUyDgPb/ej7IWKHva1nbQNPXUaygosG41ZE0AYI/dwtzgQomp2fjvu GcuBx4IyMZT4aaoaicUHwEszpiDoOTJdjlTcrvO1IkoFZvzXUsXDUVz07QsKdGAy3QPF 8YeeOqeg0TRsmZ9H8F4tPUCy55eVXDPoW/wSJiVmtrTdwvKKgo0+xAtcJu521qQ3+1sL C2iReSK//ZOS1QhZCNI69vJkOvakHlfCeMextd7yCMk9jYVofOoA+IgtTeOqIA80Brwk Otww== 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=2G2F1io/a1Cyo3RLgFQtLEcw7nkwBeLTzPQ6b0qTYgw=; b=LeJDsDt93qUePcKljQsJiz5kpEnAEZkc70kApxwvNrTxSs2e4fcWcCPky0Eb/VJ0RK quwdRPRw5BQY1k7N+dJnGP8L8GaNwC2wZfDdWLoSCB9U89AvFKRF+s1dDd7npfkQWNan 4bpZWqQvv7qZkYtGmZ2CLlIwXsTbVdfQh1l+BFbXHL/ekU45K1a583F6nMUn+/WK0jK9 1mr//ZId1XqfypsA88SO8PmUHvWfElb/1O36v69W6FehOU6ig/LaqJwT9YJSZFczf0kW a/0KjYaef6TcUmSdeapxRyVjfYYzNMKa/hWdf80crIRjbwi2uaK3mAEvV6NuDyJ9WX8z 8M5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=0+8YVbrz; 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 h15si22105276plk.74.2019.07.16.23.19.10; Tue, 16 Jul 2019 23:19:10 -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=0+8YVbrz; 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 S1728819AbfGQGTJ (ORCPT + 29 others); Wed, 17 Jul 2019 02:19:09 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:62962 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725932AbfGQGS0 (ORCPT ); Wed, 17 Jul 2019 02:18:26 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id x6H6I5Of009435; Wed, 17 Jul 2019 15:18:08 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com x6H6I5Of009435 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1563344288; bh=2G2F1io/a1Cyo3RLgFQtLEcw7nkwBeLTzPQ6b0qTYgw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0+8YVbrztAoSBFqkGzUPZ8kZKGT1V69CbSed8SLuaCMh1al9n/CsHQJkRVsEuL9f0 Roitzljx5PR6tv3Jg4S2KH2udpdY8BU4CmSmsCogSuBJ8PA2oYbDRHTRRlHYz2hUZd WnAnLNXphpTL1iMItElC+97PRshKMZF5OTTzKvlEStrDc+Pha5mMr9Ew8UiSCISV3n QXJjxgu5IWypy87/z73HVWtooH73btg8B0w/TYnCT+JwYg/HFG41/YaTQy3b28lTz0 6cIJi9O0ePaACVQJAtRM9F8WOWemIaC7LxqhFJAtYieO9Wslvd80P7Rput734rXOuP 4V6pc4mf8O42Q== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Joe Lawrence , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v3 03/12] kbuild: remove duplication from modules.order in sub-directories Date: Wed, 17 Jul 2019 15:17:51 +0900 Message-Id: <20190717061800.10018-4-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190717061800.10018-1-yamada.masahiro@socionext.com> References: <20190717061800.10018-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, only the top-level modules.order drops duplicated entries. The modules.order files in sub-directories potentially contain duplication. To list out the paths of all modules, I want to use modules.order instead of parsing *.mod files in $(MODVERDIR). To achieve this, I want to rip off duplication from modules.order of external modules too. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: None scripts/Makefile.build | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) -- 2.17.1 diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 10e92a27ec20..be32a3752de4 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -423,13 +423,10 @@ endif # builtin-target # # Create commands to either record .ko file or cat modules.order from # a subdirectory -modorder-cmds = \ - $(foreach m, $(modorder), \ - $(if $(filter %/modules.order, $m), \ - cat $m;, echo $m;)) - $(modorder-target): $(subdir-ym) FORCE - $(Q)(cat /dev/null; $(modorder-cmds)) > $@ + $(Q){ $(foreach m, $(modorder), \ + $(if $(filter %/modules.order, $m), cat $m, echo $m);) :; } \ + | $(AWK) '!x[$$0]++' - > $@ # # Rule to compile a set of .o files into one .a file (with symbol table)