Subject: Re: Problem in new toolchain builds (need comments)
To: None <>
From: Simon J. Gerraty <>
List: tech-toolchain
Date: 10/23/2001 20:55:38
> The only real concern I have there is teaching people to type something
> different than "make" when they cd into part of the srcdir and work on it.

Yep, and for that reason 'mk' has a companion called 'workon' that
does the environment setup once only (then defaults to running $SHELL)
so using 'make' just works.  I typically run screen(1) on build servers
and in each window run 'workon' for a different tree.  Using 'mk' from
within Emacs though is pretty painless.

BTW I'm well aware of the problems of getting folk to change habbits,
but the cost of trying to do anything clever and doing it N different
ways can be high.

> I'm thinking my last idea might be the best. Have use a != rule
> to recurse back and set a var based on whether it finds a top level 
> The biggest concern there would be overhead but the maintaince
> nightmares go away.

Well provided you do something like:

.ifndef SRCTOP
SRCTOP!= work out top of tree

you'll only have to work it out once - it will be automagically
propagated to sub-makes, so the overhead shouldn't be too bad.
Of course you need to either have those *.mk installed in
/usr/share/mk or have MAKESYSPATH, MAKEFLAGS or -m set appropriately.