From patchwork Sat Nov 18 11:23:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cao jin X-Patchwork-Id: 10064781 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 001DF602B8 for ; Sat, 18 Nov 2017 11:24:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D78C92A53C for ; Sat, 18 Nov 2017 11:24:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9AA62A549; Sat, 18 Nov 2017 11:24:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A5E72A53C for ; Sat, 18 Nov 2017 11:24:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424158AbdKRLX5 (ORCPT ); Sat, 18 Nov 2017 06:23:57 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:2245 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1424157AbdKRLX5 (ORCPT ); Sat, 18 Nov 2017 06:23:57 -0500 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="30281256" Received: from localhost (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 18 Nov 2017 19:23:51 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id 8DDAC480D737; Sat, 18 Nov 2017 19:23:47 +0800 (CST) Received: from Tsao.g08.fujitsu.local (10.167.226.60) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.361.1; Sat, 18 Nov 2017 19:23:48 +0800 From: Cao jin To: , CC: , Subject: [PATCH RFC] kbuild: improvement in Makefile.modbuiltin Date: Sat, 18 Nov 2017 19:23:13 +0800 Message-ID: <20171118112313.13557-1-caoj.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.13.6 MIME-Version: 1.0 X-Originating-IP: [10.167.226.60] X-yoursite-MailScanner-ID: 8DDAC480D737.A9AEA X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: caoj.fnst@cn.fujitsu.com Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Drop unnecessary "__subdir-Y" and `cat /dev/null` Signed-off-by: Cao jin --- Don't know why they exist, but a simple build is fine without them in my test scripts/Makefile.modbuiltin | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/Makefile.modbuiltin b/scripts/Makefile.modbuiltin index a763b4775d06..cbb1e3dc1ef9 100644 --- a/scripts/Makefile.modbuiltin +++ b/scripts/Makefile.modbuiltin @@ -26,8 +26,7 @@ kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbui include $(kbuild-file) include scripts/Makefile.lib -__subdir-Y := $(patsubst %/,%,$(filter %/, $(obj-Y))) -subdir-Y += $(__subdir-Y) +subdir-Y := $(patsubst %/,%,$(filter %/, $(obj-Y))) subdir-ym := $(sort $(subdir-y) $(subdir-Y) $(subdir-m)) subdir-ym := $(addprefix $(obj)/,$(subdir-ym)) obj-Y := $(addprefix $(obj)/,$(obj-Y)) @@ -41,7 +40,7 @@ __modbuiltin: $(modbuiltin-target) $(subdir-ym) $(modbuiltin-target): $(subdir-ym) FORCE $(Q)(for m in $(modbuiltin-mods); do echo kernel/$$m; done; \ - cat /dev/null $(modbuiltin-subdirs)) > $@ + cat $(modbuiltin-subdirs)) > $@ PHONY += FORCE