Received: by 10.223.176.46 with SMTP id f43csp2629128wra; Thu, 25 Jan 2018 12:45:25 -0800 (PST) X-Google-Smtp-Source: AH8x224MhMpojUMZ4ujNe6reLVLU+Ozc6HZmhaq2pqwM0fV75qbJqwzS8XYKCN8Szlm5NmT8Hbgm X-Received: by 10.98.65.193 with SMTP id g62mr16999032pfd.60.1516913125792; Thu, 25 Jan 2018 12:45:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516913125; cv=none; d=google.com; s=arc-20160816; b=OBuiYdRkiCjw/GnA61vXTZsS2segZEm/5QsMi9EtiupWiUZO51imKEo21RUMxRANWl BnXnmGSGmPri+gZvZdaOIsdwSmhgkh3BpZnnQ101hsjYvJJjp2FCzu6Ry67cGmYUJ6St g50pYbQjEWXtRlwmIg5RGRMd939p24dP027InYDOIbgYCoI17P2uy+fRiwnHYsgP5FxN H0ZKcyZl8O0FZ4GCwJLh0c387UfRu7LIpABfLkmKYUCA4dbAIWtx4dio5wMi1hDVlnA1 Fo3a8tZa8frZoksqBD5kwwm+bjajjfGtaAYZ2dOB8OFDiYLQeCSCUyU6s5oTn9VqPZXN FhVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=CQubnVDaozX7hVzzP58j3zLLE6OUXuGZB+VF+hidVFI=; b=JsQ/2QYAihr+QRmilRiduogIUWFUDUG3MAdKbCyccSCYMdalIslrP/2neeVXd6N13g kLzV4EIac1HVnZevCqQB2frEoMmZGg0H2t4sVRprKRGsZLcLp/NKnphEuPREyyGrYOSA /M4l0oJWAz7Xk5pM6GmYc1Yte/0n5k3jgV+3cWCpsyFVRPd7l7MTtJKtU7sAOFiTwZhv CM//kCJr7hKc+OHDWwpTtmaGawXpqi6cLC/j59TxXhltzcOV7/GY0tiw89/ffRnawGSD 8hXkZo+Wvu/Z5mTPVDjAEwtodxRHETCo0aDPU63LfvK9Kcq/vA8J5mv99rYBeWNsNATb 7+7g== ARC-Authentication-Results: i=1; mx.google.com; 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 o2-v6si2519556pli.507.2018.01.25.12.45.09; Thu, 25 Jan 2018 12:45:25 -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; 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 S1751335AbeAYUmW (ORCPT + 99 others); Thu, 25 Jan 2018 15:42:22 -0500 Received: from asavdk4.altibox.net ([109.247.116.15]:50262 "EHLO asavdk4.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750838AbeAYUmV (ORCPT ); Thu, 25 Jan 2018 15:42:21 -0500 Received: from ravnborg.org (126.158-248-196.customer.lyse.net [158.248.196.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id 791D4803DD; Thu, 25 Jan 2018 21:42:18 +0100 (CET) Date: Thu, 25 Jan 2018 21:42:17 +0100 From: Sam Ravnborg To: Jakub Kicinski Cc: linux-kbuild@vger.kernel.org, LKML Subject: Re: Mutli-directory module Makefiles Message-ID: <20180125204217.GA14181@ravnborg.org> References: <20180122134607.00d77101@cakuba.netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180122134607.00d77101@cakuba.netronome.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.2 cv=eqGd9chX c=1 sm=1 tr=0 a=ddpE2eP9Sid01c7MzoqXPA==:117 a=ddpE2eP9Sid01c7MzoqXPA==:17 a=kj9zAlcOel0A:10 a=Pi9v5OaOCuNBb4BhNIgA:9 a=CjuIK1q_8ugA:10 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jakub. On Mon, Jan 22, 2018 at 01:46:07PM -0800, Jakub Kicinski wrote: > Hi! > > in drivers/net/ethernet/netronome/nfp there is a module which is built > from C sources in 4 directories. What is the best way to handle that? Move all .c files to th same directory - like done for almost all other drives. In this case we have a directory: drivers/net/ethernet/netronome which is just an indirection to nfp/ and nfp/ contains a structure with 25 .c files in subdirs. With some careful renaming everything could reside in one dir without loosing any structure. And then the driver starts to look a bit more like any other driver in the kernel. And as an added benefit some of the other goodies like building single files just works. Sam