Subject: Re: Patch to config(8) to allow inclusions relative to the file being
To: Jason Thorpe <thorpej@wasabisystems.com>
From: Jaromir Dolecek <jdolecek@NetBSD.org>
List: tech-kern
Date: 09/04/2003 09:56:25
THis is already supported via 'package', isn't it?
Jaromir
Jason Thorpe wrote:
> Hi folks...
>
> The following patch allows file inclusions relative to the file being
> included. This is useful if, say, you have a config file with multiple
> fragments that is kept outside the kernel source tree. It allows you
> to e.g.:
>
> include "arch/i386/conf/GENERIC"
> include "./CONFIG.frag1"
> include "./CONFIG.frag2"
> include "./../../feature/config.feature"
>
> ...and "config.feature" would be able to say:
>
> include "./../someotherfeature/config.someotherfeature"
>
> What the change does is track the "current directory" of the file
> currently being parsed, and when it encouters "./" at the beginning of
> an include'd file name, interprets the remainder of the file name as
> relative to the "current directory".
>
> I decided on the "./" as the trigger mostly to avoid changing the
> syntax for traditional include directives. In a perfect world,
> srcdir-relative includes would be include <...> and curdir-relative
> includes would be include "...", but alas, we do not live in a perfect
> world at the moment.
>
> Since the change is simple, and does not affect any existing config
> file or fragment, I'll check it in now.
>
> -- Jason R. Thorpe <thorpej@wasabisystems.com>
[ Attachment, skipping... ]
--
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.NetBSD.cz/
-=- We should be mindful of the potential goal, but as the tantric -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow. Do not let this distract you.'' -=-