From patchwork Thu Mar 8 01:04:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10265747 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 CF73F6055B for ; Thu, 8 Mar 2018 01:07:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C18FD2961A for ; Thu, 8 Mar 2018 01:07:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B658E2961E; Thu, 8 Mar 2018 01:07:29 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 62C592961A for ; Thu, 8 Mar 2018 01:07:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755013AbeCHBH3 (ORCPT ); Wed, 7 Mar 2018 20:07:29 -0500 Received: from conuserg-10.nifty.com ([210.131.2.77]:60402 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755044AbeCHBF4 (ORCPT ); Wed, 7 Mar 2018 20:05:56 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id w28156G6018694; Thu, 8 Mar 2018 10:05:07 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w28156G6018694 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1520471108; bh=b9Rgw1e2FUke82OybP8lef9ykXhCKyGguofV/SsdRmw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K+j5HzRvpsP6D0k4C5VEf4UOpVPHAlNFj/CU8NUh8g3t5XJuJtXIf7GC2HlKPy+Qz DPSIexuibkBae+xeXQRKwai4Vx4zh7FDWh+GCfv9BA0S/TsxSU4P+LnCjsOdK7LUjO cXqgDOZE+bfcDCUXf5yvXACC+Me1Q/qzAi42EgrfKrBEQ/1ODM2WXQfN/dgZ4ZPVFZ deoEUgFgKVpbPS1bL25R4x3zqh9SyTMAdFMirB/So6UBjmP4VwfZ637ez3ZXv48B1H 5WG265avL8ufSl8B9SiiL6Hz93kfQ7HjhAfI9zrWCudDGBJM7PdjD5dAWXAlgGcl2n x2OrqCKHfm/VA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Michal Marek , Cao jin , Govind Singh , Kalle Valo , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 1/5] kbuild: remove unnecessary $(subst $(obj)/, , ...) in modname-multi Date: Thu, 8 Mar 2018 10:04:59 +0900 Message-Id: <1520471103-10089-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520471103-10089-1-git-send-email-yamada.masahiro@socionext.com> References: <1520471103-10089-1-git-send-email-yamada.masahiro@socionext.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 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 --- scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 5589bae..a7e315f 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: