From owner-freebsd-current@FreeBSD.ORG Thu Jan 8 23:23:24 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A689106567C; Thu, 8 Jan 2009 23:23:24 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 5AAF68FC0A; Thu, 8 Jan 2009 23:23:24 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 799397309E; Fri, 9 Jan 2009 00:28:25 +0100 (CET) Date: Fri, 9 Jan 2009 00:28:25 +0100 From: Luigi Rizzo To: Sam Leffler Message-ID: <20090108232825.GA91454@onelab2.iet.unipi.it> References: <20090108210221.GA87253@onelab2.iet.unipi.it> <4966853A.70605@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4966853A.70605@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: current@freebsd.org Subject: Re: reduce directories in sys/modules ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 23:23:25 -0000 On Thu, Jan 08, 2009 at 02:59:06PM -0800, Sam Leffler wrote: > Luigi Rizzo wrote: > >Is there a way to reduce the number of directories in sys/modules ? > > > >There seems to be one directory per module, even though many of > >those are related and the source resides in one place ... > Perhaps you should start by saying why you want to change this? Because I find it overcomplicated and error prone to force one directory per module. There are many examples of closely related modules whose source live in a single directory whereas the module infrastructure consumes a large subtree. I don't want to put every module in one Makefile, but at least the related ones sometimes do deserve a merge. I already mentioned ata with 15 children, iwifw with 3 entries, netgraph with over 50 children, geom has several too... The problems that I see are: + very easy to forget to update one or more entries when creating or modifying the makefiles; + redundancy in the content of the Makefiles -- e.g. often times related modules share headers and other Makefile variables that right now we need to repeat in every Makefile (and given that the hierarchy is not clear, children Makefiles cannot inherit from the parent's Makefile) + confusion with the names and the hierarchy: sometimes the children are at the same level as the parent (e.g. modules/wlan and modules/wlan_*), sometimes a child replicates a parent's name (modules/ata/ata) sometimes there is a repeated prefix (modules/geom/geom_*) and sometimes there is not (e.g. modules/netgraph/*) I know that kmod.mk is quite large and touching it is perhaps non trivial, but if there is at least agreement on what is the direction we might find someone who wants to work on this. cheers luigi