Received: by 10.223.176.46 with SMTP id f43csp2132711wra; Thu, 25 Jan 2018 05:31:05 -0800 (PST) X-Google-Smtp-Source: AH8x224SJ3LeSEPFz8Aa6AoFEx/rmidwr1kuqglefyG9TrVAfdUGw/n1K3MY405d6WNpRZXXwcgF X-Received: by 2002:a17:902:241:: with SMTP id 59-v6mr11410335plc.280.1516887065578; Thu, 25 Jan 2018 05:31:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516887065; cv=none; d=google.com; s=arc-20160816; b=PFsmaMxqg10GExqVu/l4ioFB4i07bGfLD9hYgySHcJux/rceKC5bqi783+MaZEtqb8 09ikIpgT95Qms9Vi/BCdW2/Ua6BDsmJnCou/oA3N4WXEWZWkPBW++u8AS6WPcAU1D1EX cq31gMaGHhxuM3agtbrWfdlV3RoEF553ixYuYA1VU3hAicm+UTr9A9ASXyMiFpPCKy9r JJXhyieAG/iIUOhijbOL+EBXpEYZb4JiV4wf4JLd8KErbpVuC9T2ZfIf0F3GyCdVzvFv njNoMMkeNQxrrQnfSSIQbKruW2SeqfKE+wHmpPz8Up5fKDAsJDiyCJV2xeZgDwQQe8FS JnJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=qmFlYON35bDI76d8XXyKv64kk9jdmCvy0cVsARbkv6g=; b=TE6JYUPkisihRmmI09x1UmvHTLZGfRbcHxUNNt6Yjrzmw06GYpFRz/oNglUoRnFEP0 0hQBfgTuPVPC+IoihLOfTaVKvDe9nz+/Oe9NwNz5jY6NZy2vaVsjJ4yLgls+1t8Vqt9q cy6KaXDKV3ELi3yWST0NMrFUCkltVP+Veoy1/vJLDCWg36GSGTYOutjYc8SICBMoZ4Jo 7ttN+L5YUce0DFQmO5flmRJEvJ+sPIfOMdK7r39D/iMr6DIav+YNbtj8x+EtqQnsmDXB CDglFIsi6AcwPU4064jev22HUo49F5fdAveehJzvEM/EbukPd7K9R1+cJdLOaTH4AI5B jhEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=pyapdIXh; 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 4si4632795pfn.115.2018.01.25.05.30.51; Thu, 25 Jan 2018 05:31:05 -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=pyapdIXh; 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 S1752006AbeAYNQn (ORCPT + 99 others); Thu, 25 Jan 2018 08:16:43 -0500 Received: from conssluserg-06.nifty.com ([210.131.2.91]:23522 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751391AbeAYNQl (ORCPT ); Thu, 25 Jan 2018 08:16:41 -0500 Received: from mail-vk0-f46.google.com (mail-vk0-f46.google.com [209.85.213.46]) (authenticated) by conssluserg-06.nifty.com with ESMTP id w0PDGSt2023217; Thu, 25 Jan 2018 22:16:29 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com w0PDGSt2023217 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1516886189; bh=qmFlYON35bDI76d8XXyKv64kk9jdmCvy0cVsARbkv6g=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=pyapdIXhAXE7syKEnWf8hMMRbf1bJ7cFYJmZcp66nVh4QgxMikULFHZQD+T8Fe3W/ S1UXBKhk17NSoFmkiG1KkglRaJTLLlnoQV1AREirPDat9rHUu8eckzLkx9FTTiLQUs /e7GuhZt9YgsRBJhwxkzmkE+0LieeTZa5r6wjCiKMg2Of5QQ7b8VgtFaULZw4/45Qh EsC1BqtPQM2510zcTvCfVV1X/FfBIPmCch0Wn7s62JEb/gt+6bVr5IWNU/6y69h5Mo S5xRO5FRPrmXmul35/XNaJkQQkGgoJrlK7yiaI5r0L3Ycg3x/OPuJQk1lngr9VwTOQ RjpmbWKKO5jpg== X-Nifty-SrcIP: [209.85.213.46] Received: by mail-vk0-f46.google.com with SMTP id x203so4782591vkx.10; Thu, 25 Jan 2018 05:16:29 -0800 (PST) X-Gm-Message-State: AKwxytdPTpZLo2/vvmmUKrswPmWbp2/acOdbUG/Z/sAGvGPVnRnlKc2+ DwUCeSvPNFBMdGlxWGYWdr0PFSBg3jOL2/3ZKfI= X-Received: by 10.31.92.142 with SMTP id q136mr7310214vkb.29.1516886188272; Thu, 25 Jan 2018 05:16:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.49.90 with HTTP; Thu, 25 Jan 2018 05:15:47 -0800 (PST) In-Reply-To: <20180125014119.31219-1-jakub.kicinski@netronome.com> References: <20180125014119.31219-1-jakub.kicinski@netronome.com> From: Masahiro Yamada Date: Thu, 25 Jan 2018 22:15:47 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kbuild: make Makefile|Kbuild in each directory optional To: Jakub Kicinski Cc: Linux Kbuild mailing list , "David S. Miller" , Linux Kernel Mailing List , netdev@vger.kernel.org, oss-drivers@netronome.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-01-25 10:41 GMT+09:00 Jakub Kicinski : > It is useful to be able to build single object files, e.g.: > $ make net/sched/cls_flower.o W=1 C=2 > > Currently kbuild does a hard include of a Kbuild or Makefile > for directory where that object would reside. Kbuild doesn't > cater too well to multi-directory drivers, meaning such drivers > will usually only use a single central Makefile. This in turn > means it will be impossible to build most of object files > individually for such drivers. > > Make the include of $dir/{Makefile,Kbuild} optional. > > Signed-off-by: Jakub Kicinski > Reviewed-by: Dirk van der Merwe > --- > I must admit I have no idea whose tree I should send this to :( > Could it go via net-next if no one on linux-kbuild objects? This should be taken care of by linux-kbuild (and me). For your specific problem, please fix netronome/nfp/Makefile I'd like to take my time to think about this patch. The single target is a bit compromised implementation (it cannot handle subdir-ccflags-y correctly, for example) I wonder if we should do this just for single target... > scripts/Makefile.build | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/Makefile.build b/scripts/Makefile.build > index 47cddf32aeba..178864f877d5 100644 > --- a/scripts/Makefile.build > +++ b/scripts/Makefile.build > @@ -42,7 +42,7 @@ save-cflags := $(CFLAGS) > # The filename Kbuild has precedence over Makefile > kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) > kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile) > -include $(kbuild-file) > +-include $(kbuild-file) > > # If the save-* variables changed error out > ifeq ($(KBUILD_NOPEDANTIC),) > -- > 2.15.1 > -- Best Regards Masahiro Yamada