tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: variable MAKEOBJDIR inside of Makefile



On Wed, Feb 05, 2025 at 11:13:12AM +0100, Roland Illig wrote:
 > Am 02.02.2025 um 01:37 schrieb David Holland:
 > > Doing much better than that requires improving make's internal phase
 > > structure. In a world where make parsed first, you could set .OBJDIR
 > > after parsing and before interpreting any string other than an include
 > > name as a path. In that world includes would be relative to
 > > the source directory rather than the object directory and that'd be
 > > fine, probably even desirable.
 > 
 > In make, the ".include" directive is relative to the including file, not
 > the object directory.
 > 
 > Or did you mean the -I option to the C compiler?

No, I meant .include, just wasn't very careful about what I was
saying; basically what I meant was that .include would not become
relative to the object dir.

(but aren't .includes handled with a path that also includes the
current directory?)

 > > (I started trying to move make to that world at one point, a long time
 > > back now, but didn't get very far and rillig's gone off in other
 > > directions since.)
 > 
 > I didn't change the behavior of that part of make, plus, the overall
 > structure of dir.c is mostly the same as in 2019.

Parsing first is pretty much pervasive, because it means not
evaluating variables on the fly any more.

(It's probably not any harder to move in that direction than it was in
2019, but it's all different now. Plus by this point I've forgotten
details.)

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index