From patchwork Mon Mar 19 09:01:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 132025 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp2475795ljb; Mon, 19 Mar 2018 02:02:31 -0700 (PDT) X-Google-Smtp-Source: AG47ELsbkw+/xDvfiRbyhqGWs/UJ6+fOSDbTwtl2C+1IFle+WqzSXTmFpTYXz0BT1uTmP5GSQPQU X-Received: by 2002:a17:902:b703:: with SMTP id d3-v6mr11453071pls.209.1521450151751; Mon, 19 Mar 2018 02:02:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521450151; cv=none; d=google.com; s=arc-20160816; b=ABMwmFqfAFye+pLS8mhHhZ4W7PK95ATcP84dck52dz2thtKWkuf0BgQTQtrWk0HGms L9Zxmb5zkZmFAPynxINYXXOmvR97xR7pkmz9n30uy27tdu23NoM8GsTXPrBj+bgHChP/ BKetJOkxq64eq4NoXwk/Tp8NQ03SEOIMd/rz7139h8hIIC1c1MOOCOYF/upJqk0X3Pf+ FdowTt8+p7mXPvbcI6mVy5xGamA1VvMnJRSZO0MHhNbCsjBxK6BeujW6EsSDvo8Tg2nl +6Zb5ex0puLfsrXq5xJfuoy4OIwaTm1h+GgS1LNyg2juqAUYA5kd2lEQi5PmOO+YdZBn wsXQ== 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:arc-authentication-results; bh=R/dt7DPdeAApIvBijveYnZMKaqzomizzWysvoVtGnGs=; b=qJScOxA71fQSuCZjJvVagGic/cei3YnFwdWSZxnqfYHETM6K3lbD3+/TXaHHIU17lr ryO2jtJ3czUFmbbMMrdaSbk8l3viUfEq5PfQfwNEvpRvoataj/phvTFITIMVfadUFh5Y TWVTs6CuCOcPDNelv5gMFYRM3tvlhwP9rTx2pnBOoTHMw5nR53tUlBjylIiEr3VlFmb/ ledExvrSGPSnbGKkimYrpQLe4AG3gIYqtoMEUXDDt28W1FY09JHx72XfYaIsoREjs3Tp QlMNT8/b8BxaQ8vKvD0bqdDS/D7S4tv6u64aQ6YD+4fJQNt1zgniz9QJT6/UlJTwK5/R H9cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=OCS6fi/a; 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 v5-v6si10887690ply.427.2018.03.19.02.02.31; Mon, 19 Mar 2018 02:02: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=OCS6fi/a; 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 S932858AbeCSJC1 (ORCPT + 28 others); Mon, 19 Mar 2018 05:02:27 -0400 Received: from conuserg-08.nifty.com ([210.131.2.75]:50217 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932387AbeCSJCU (ORCPT ); Mon, 19 Mar 2018 05:02:20 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id w2J91Vk5014340; Mon, 19 Mar 2018 18:01:31 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com w2J91Vk5014340 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1521450091; bh=R/dt7DPdeAApIvBijveYnZMKaqzomizzWysvoVtGnGs=; h=From:To:Cc:Subject:Date:From; b=OCS6fi/aD+vJ5UEfzWJ0JrIqnMBfMNvK2go50FjthuyJiMq8oTzKjmWkqdvqOyulx UaWe2qCPOnPRUQvfNZNXsW8J8dWnOGjJ4uWDRJqMbLAyEZNhE9CS6zg+qPa5Civf8B Au/RLeg8D6yJjL/UIdUgcYvkRuUvB804ppcs/mAgWusl1wTiVxT94yfUqRAnYBFgJo PrzSBqbWA3RmFObamlnUCylR1i3WjgD2gdV7e/EJkpgMfT6c9Nvwu0si5AIKK+3y0u 2l/pcgXtus2ND4x005hPv3aeAptGRe1OL0OmIKewru33fkZdMqbCVdpOQxEKZJN7aO YAvGlJDVubVgg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Cao jin , linux-kernel@vger.kernel.org, Masahiro Yamada , Michal Marek Subject: [PATCH v2 1/5] kbuild: remove unnecessary $(subst $(obj)/, , ...) in modname-multi Date: Mon, 19 Mar 2018 18:01:23 +0900 Message-Id: <1521450087-27291-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 In the context ... $(obj)/%.s: $(src)/%.c FORCE $(call if_changed_dep,cc_s_c) $(obj)/%.i: $(src)/%.c FORCE $(call if_changed_dep,cpp_i_c) $(obj)/%.o: $(src)/%.c $(recordmcount_source) $(objtool_dep) FORCE $(call cmd,force_checksrc) $(call if_changed_rule,cc_o_c) $(obj)/%.lst: $(src)/%.c FORCE $(call if_changed_dep,cc_lst_c) '$*' returns the stem of the target (the part of '%'), so $(obj)/ has already been ripped off. $(subst $(obj)/,,$*.o) is the same as $*.o Signed-off-by: Masahiro Yamada Reviewed-by: Cao jin --- Changes in v2: None scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 5fd60af..4eedd6e 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -175,7 +175,7 @@ dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ # Finds the multi-part object the current object will be linked into modname-multi = $(sort $(foreach m,$(multi-used),\ - $(if $(filter $(subst $(obj)/,,$*.o), $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=)))) + $(if $(filter $*.o, $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=)))) # Useful for describing the dependency of composite objects # Usage: