Subject: Re: Proposal EXCLUDE_SUBDIRS
To: David Brownlee <abs@netbsd.org>
From: Frederick Bruckman <fb@enteract.com>
List: tech-misc
Date: 09/04/2000 08:22:57
On Mon, 4 Sep 2000, David Brownlee wrote:
> > How about, have EXCLUDE_DIR match against ${BSDSRCDIR}, and
> > EXCLUDE_SUBDIR match against ${PWD}? I think PWD is pulled in from the
> > environment when make is invoked, and not changed by make as it
> > recurses through the subdirectories. Have to check.
Update:
I've been trying to do exactly that, but it's harder than it looks.
From the man page, ${.PARSDIR} looks to be perfect for getting the
directory make was invoked in -- the man page claims that ${PWD} is
changed if MKOBJDIRPREFIX is set -- but ${.PARSEDIR} seems to be a
no-op. I'm also coming up against the fact that you can't put
variables on both sides of the conditional, or at least sometimes you
can, and sometimes you can't.
> Hmm - you could even match EXCLUDE_SUBDIRS against both
> ${BSDSRCDIR} and ${PWD} - two variables may be more complication
> than necessary.
They are two completely different things. I'm wondering if it's really
useful to be able to supply nested subdirectories in the PWD case. If
you're going to do that much typing, you may as well set the exclusion
in your environment, and then you would want to set it relative to
BSDSRCDIR, so it doesn't need to change whenever you change working
directories.
So then you'd give, say, "EXCLUDE" to exclude a section of the tree,
as a path relative to the top, and "EXCLUDE_SUBDIR" to exclude only a
single subdir at the location from which make was invoked.
Frederick