Received: by 10.223.185.116 with SMTP id b49csp5713585wrg; Wed, 7 Mar 2018 17:09:14 -0800 (PST) X-Google-Smtp-Source: AG47ELu2MtXqUnMAetzGbwVA/dA/skN+TfhAAIk5c+i3mNU82oEHDC9ismXW5RFMXHlv+y//iuZc X-Received: by 2002:a17:902:1:: with SMTP id 1-v6mr22261957pla.187.1520471354705; Wed, 07 Mar 2018 17:09:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520471354; cv=none; d=google.com; s=arc-20160816; b=Zqew/4tIG4tdCW1bqX0wIMUEnhbaOXm7fwFo+uB9F46sAa729KD5v7TnAS5kyhWakE GmkavuIayFD6jk05VPhSAKwFCvb4lSwok7G75oTD+DTFaYdHbt5cgHNHSYZYaKSwpjXg WMQed0MMdaEkxBsxu9lok/IIRIgk88ozxeIvZ7ozhVMR4b8l2nPPEFvKdT2NnrGofh86 v9JCvxx12IVMMrJi1+wmRTWQS7M8efPcYS9WhN89H4FuVDfsa1+PCL8UJ4/Fty3hRTb7 lcLXmAP7gMAJn3KC2MelJ8sD+uQUB3RXSULUaVAiH3SR7BNXp8EXK+V2uD6YzS4BVovL 9y5A== 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 :arc-authentication-results; bh=4lomp+gC9NVfrDilIoUeb1MJJxF/93EiIzW2eRiO8aQ=; b=lbD/qfo/P9aIgKWV8JlErWtHxq/KO3xeAZgBf5X+XbS3HN/cvKkb/+b1SZ5zcJYJEu k04zhMlzHZQjNKsZmV5xRpvQzyILusp3IHjr1yUgIZYxxH/nmL0lZp2AA1yjvxVfJnsi cbek9IZTnlajD4/UYeBE4CRmBwx+R0ujLykesLyM5TG+7WHlvQQe44wp3rhCXzZJDmPV AFWMFVZKqKUcUNyEJzYwR4LKYQADsH3oTlxbvLTcTYb6jXrINuUshflNXeUZWY8T8Z0M OQGZo3PB02aIiGYXum80WePq7foEB5E1eYnlyAPfKC4ND3ngrM+9lsSK+snrE2+1tzoM T+sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=LeCgv5EG; 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 l137si12095804pga.525.2018.03.07.17.09.00; Wed, 07 Mar 2018 17:09:14 -0800 (PST) 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=LeCgv5EG; 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 S1755194AbeCHBGf (ORCPT + 99 others); Wed, 7 Mar 2018 20:06:35 -0500 Received: from conuserg-10.nifty.com ([210.131.2.77]:60436 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755046AbeCHBF5 (ORCPT ); Wed, 7 Mar 2018 20:05:57 -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 w28156GA018694; Thu, 8 Mar 2018 10:05:10 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w28156GA018694 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1520471111; bh=4lomp+gC9NVfrDilIoUeb1MJJxF/93EiIzW2eRiO8aQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LeCgv5EGzbyQVbiSUrOp8C2BrwguQj0qZc6r+1AyDQtniwzPcJfC7mNHIioHrdQWL Z5OsKfoRTyjWcf6/SzEzBPE+90Ql7LXdvWKS63vKP4vFo4+d3gxvbDOwZadBX2FzE5 rmMG7v6/7s5ZR9bYFdFU8EkOyPZ+TDxldHihh3H5uJlfLrKpqSaqDUkZ6ily1T9m23 EYdpDnOpOHy91DARdM5lJFnpEaLR0gQO7JSY3uVDrJaGga3iXzHmfGgQYtuNI9A2gO yR9UpxXmX/+6WaBX0b/oT3d1NAUlBg6nyz6PDEFgVekHTjUG/k8Aqjdvxmn+vX2hO7 jX0cqUENDeg1Q== 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 5/5] kbuild: move modname and modname-multi close to modname_flags Date: Thu, 8 Mar 2018 10:05:03 +0900 Message-Id: <1520471103-10089-6-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just a cosmetic change to put related code close together. Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 2 -- scripts/Makefile.lib | 14 ++++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index b8aecb7..2d8f90e 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -131,8 +131,6 @@ $(real-objs-m:.o=.lst): quiet_modtag := [M] $(obj-m) : quiet_modtag := [M] -modname = $(if $(modname-multi),$(modname-multi),$(basetarget)) - quiet_cmd_cc_s_c = CC $(quiet_modtag) $@ cmd_cc_s_c = $(CC) $(c_flags) $(DISABLE_LTO) -fverbose-asm -S -o $@ $< diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index e4e8e1b..b17f4cd 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -77,6 +77,14 @@ multi-used-y := $(addprefix $(obj)/,$(multi-used-y)) multi-used-m := $(addprefix $(obj)/,$(multi-used-m)) subdir-ym := $(addprefix $(obj)/,$(subdir-ym)) +# Finds the multi-part object the current object will be linked into. +# If the object belongs to two or more multi-part objects, all of them are +# concatenated with a colon separator. +modname-multi = $(subst $(space),:,$(sort $(foreach m,$(multi-used),\ + $(if $(filter $*.o, $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$(m:.o=))))) + +modname = $(if $(modname-multi),$(modname-multi),$(basetarget)) + # These flags are needed for modversions and compiling, so we define them here # $(modname_flags) defines KBUILD_MODNAME as the name of the module it will # end up in (or would, if it gets compiled in) @@ -165,12 +173,6 @@ dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ $(addprefix -I,$(DTC_INCLUDE)) \ -undef -D__DTS__ -# Finds the multi-part object the current object will be linked into -# If the object belongs to two or more multi-part objects, all of them are -# concatenated with a colon separator. -modname-multi = $(subst $(space),:,$(sort $(foreach m,$(multi-used),\ - $(if $(filter $*.o, $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$(m:.o=))))) - # Useful for describing the dependency of composite objects # Usage: # $(call multi_depend, multi_used_targets, suffix_to_remove, suffix_to_add) -- 2.7.4