Subject: Re: .mk "subroutine" for getting objdir locations
To: None <>
From: Simon J. Gerraty <>
List: tech-toolchain
Date: 08/08/2001 09:20:33
> : I _hope_ you don't mean "fix" make.  This behaviour is extremely handy.
> No, the .mk file, of course.

Cool - thanks.

> However, I'm going to revisit the possibility as a new variable substitution
> modifier in make(1) (that will open("."), go to the variable's corresponding
> objdir, getcwd(), then fchdir() back to the old dir).

Slight correction, chdir("other_srcdir"), work out objdir and return.
Should be easy enough to do.  Just lift the existing code that works
out objdir and put it in a function and use it from main and your
modifier after chdir'ing to the srcdir in question.  You never know,
it may not have an objdir.

> This is the proper place that a srcdir->objdir resolver should go, as a
> couple people have mentioned.  I'm leaning toward lower case `o' as the
> modifier letter, unless someone here knows that it's a conflicting choice.

If we are going to add any new modifiers I think we should seriously
consider multiple char modifier names. Like make's -d command line
option.  Eg. the assignment modifiers ::= ::!= ::+= ::?= all burn only
a single option char ':'.

There are too few single chars left, see if there's a letter that
could mean enhanced/extra/uber/etc and use that as a grab-bag of new
modifier possibilities.

If at all possible don't use a letter that currently has meaning for
other *BSD makes.  :L and :U for example have conflicting meanings for
our make and the others.