Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7412771ybi; Mon, 8 Jul 2019 21:27:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWOEH7k4pNWNjj7PsWWEV9ZUmBAZkZ2Na3wF2crsM39sOrOIopAffxRQWIKu72ioSf0keX X-Received: by 2002:a17:90a:350c:: with SMTP id q12mr30222962pjb.46.1562646421964; Mon, 08 Jul 2019 21:27:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562646421; cv=none; d=google.com; s=arc-20160816; b=O7LYwZsmjPd/DFmzrXzR8v3uXqO55JyX9lQt9w3lZ7PblmkCRaNHPFIKt8RfKoxgAX Lh5N7j3EINjSDqhMS151fPhHQfL/W3z7KgA88DOAdp5OKmpZziZuI5xT5PXzZi/f9NNo EVb+s85TrY1PByDr3wk4PXGQ5rKxONhGW/VuO//IcCjRC35tlhEfnqMM+U1EeOWOK0Tm 1lTuocVZfwrUdYa07O+/Bum2px2x41muzGzgct/l/492LTO0PhGe5fqlf4FLu6wPehqb KXa+PVGRaue1c0KSPYvQOdwBCr6ZpuNX2neRVsE0xzmXXUwOEAe/l/LLbPxXixuRRtqW ywKg== 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=66C6WSUar+9fCnRwYJ6reDlsM+3fNuxKvxVBSvN7M4A=; b=fv5pG7j/7f+bsB6nVvJ9NTW1iuK0EzkYdkmnXZwZEOalvXZ68U6cTu0sD6TsETTb35 RERA7geer7wAy/NnjR8pYHvg+q+MlZl/QZvPXQcLZDZx7z3WNbd0ou+X3C7a8J1+o+Fk cBUmbkgDyMFuqFf3DQP3zIT6Eevdrs7Xo3iF25sfwuu/qdkMS14MgcUtsnOiWLN6LWkI noPhOBklp1BKSYnKol7Rn7W8W8hP+L6576D2Wg/OLYjL2ojO/k1whndG9+33+CGLpXU1 v0qbHVcFg4rI/1tcIzfOW6UMyISa7Q6upLn6RHq7NC7G+UJTXqZMq9Z4SceR9nVI7lRV njCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=q46wm6dj; 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 b38si20806057pla.137.2019.07.08.21.26.46; Mon, 08 Jul 2019 21:27: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=q46wm6dj; 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 S1727540AbfGIE0E (ORCPT + 99 others); Tue, 9 Jul 2019 00:26:04 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:42171 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727132AbfGIEZm (ORCPT ); Tue, 9 Jul 2019 00:25:42 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x694OqVm009969; Tue, 9 Jul 2019 13:24:55 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x694OqVm009969 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1562646295; bh=66C6WSUar+9fCnRwYJ6reDlsM+3fNuxKvxVBSvN7M4A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q46wm6djBsOMl+UO7ZtYGgKPKq/5uWI1+EejrxIb6jgSgMFQ75kuiq914nMu/wkox UWaJOaXFTlI5UhkkLDUw5QQuPkYP8GjokqLebrW67zJHWz0kyhMvyRX49SqaXWWfn1 5RaasWQ5LjZz8w/Y4fT/31ZmXAHnseqIBx/ca06Ykr/fzMTffYKvlgqd7UFZ+serXT jjgFvGFxeVK7+c7kDsUZLRxNkEt7puygIvDtSYROgA20ui1qdp+fue7Zao5DT2g1n0 Qq7eJnIjoFVv3Bow8jCqqUiIm6AU9unVIBnewsUY87vlr6oNdqb1cMNSHYTnvjJraF xBdJgoF5+M7FA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Nicolas Pitre , Sam Ravnborg , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 03/11] kbuild: remove duplication from modules.order in sub-directories Date: Tue, 9 Jul 2019 13:24:07 +0900 Message-Id: <20190709042416.27554-4-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190709042416.27554-1-yamada.masahiro@socionext.com> References: <20190709042416.27554-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 --- scripts/Makefile.build | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index d827b7a36892..1492e37c3927 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -425,13 +425,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) -- 2.17.1