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

> >> 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
freebsd-hackers@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"