Subject: Re: Proposal EXCLUDE_SUBDIRS
To: John Hawkinson <jhawk@MIT.EDU>
From: Frederick Bruckman <fb@enteract.com>
List: tech-misc
Date: 08/24/2000 14:22:53
On Thu, 24 Aug 2000, John Hawkinson wrote:

> I'm a little concerned about it.
> 
> From my perspective, I would uswe this when I'm in the same CWD
> as a Makefile and want to restrict its descent. I don't know necessarily
> want to know where it really was in the hierarchy, and I might even
> have moved the directory out of the hierarchy. I get the feeling
> that this would not let me do:
> 
>      cd sys/arch/i386/stand
>      make EXCLUDE_SUBDIRS=installboot
> 
> which is what I guess I'd like this to do.

In the tree, you would have to do,

	make EXCLUDE_SUBDIRS=sys/arch/i386/stand/installboot

but that would not work in a detached heirarchy, as you would never
get a match. You could try,

	make BSDSRCDIR=$PWD EXCLUDE_SUBDIRS=installboot

but I'm not sure that helps. Alternatively, for this particular
example, you could take the positive approach,

	cd sys/arch/i386/stand
	make lib libsa biosboot_ser netboot

as you can currently specify subdirectories as targets.

My take on this is that you _have_ to root your specification
somewhere. Recalling that one of the requirements is to specify
directories to exclude in /etc/mk.conf, it would be very inelegant to
simply match the basename of the directory. Besides, I don't want to
be limited to the current directory. Consider, you might want to do
something like this:

	cd gnu
	make lib usr.bin EXCLUDE_SUBDIRS=gnu/usr.bin/{gdb,groff}

Note also, it might be more convenient to set EXCLUDE_SUBDIRS in your
environment. Though I didn't test that, I can't see why it wouldn't work.