From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 28 15:31:05 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44DCE106566B for ; Tue, 28 Oct 2008 15:31:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id BF0678FC0A for ; Tue, 28 Oct 2008 15:31:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id m9SFUCWm024647; Tue, 28 Oct 2008 11:30:51 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 28 Oct 2008 10:54:06 -0400 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810281054.07065.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Tue, 28 Oct 2008 11:30:51 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8526/Tue Oct 28 09:21:35 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Srinivas Subject: Re: Usage of "files" for config X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 15:31:05 -0000 On Tuesday 28 October 2008 05:31:36 am Srinivas wrote: > Eygene, Your reply is very helpful. Thank you very much. > > On Tue, Oct 28, 2008 at 1:16 PM, Eygene Ryabinkin wrote: > >> I would like to know the usage of files and files.[arch] in sys/conf. > >> Basically, I didnt get the advantage of having a common file for > >> compilation(like files) rather than an individual Makefile in each > >> subdirectory. > > > > 'files' and 'files.$ARCH' are the input directives for the config(8) > > utility. Makefile is produced with the help of these files. The > > rationale for having 'files' and 'files.$ARCH' is simple: there are > > platform-specific directives and common directives. > > Still, I didnt get the purpose of having a common "files" file for the > kernel to generate Makefile. > > I am trying to understand the advantage of this approach with the > conventional way of having a makefile for each sub-directory(device or > module) and recurse from top of kernel with a configuration file > dictating what features need to be included in the kernel. The usage of config goes back to BSD itself prior to FreeBSD for one. However, I find the 'files' format a lot easier to parse and work with then the mess of .ifdef's, etc. that would end up in 'kern/Makefile' for example. -- John Baldwin