Subject: Re: make -j and failure modes
To: Greywolf <greywolf@starwolf.com>
From: David Laight <david@l8s.co.uk>
List: tech-userlevel
Date: 12/10/2003 21:47:14
> David Laight suggested that it...
> >May even be worth changing make so that it understands cd xxx; yyy
> 
> I have two thoughts on this:
> 1.  Make understands this already.
> 2.  Are you (David) saying "change make to understand
> target:	source
> 	cd xxx
> 	yyy
> ??  i.e. "cd" actually takes effect over more than one line?

Make currently looks at command lines and if they contain any special
characters (even if quoted!) fires the command into the shell.
Command that don't contain special characters are tokenised by make
and it does a fork/exec itself.

If a command is recognised as 'cd xxx; yyy' make could fork, cd and exec.
Other optimisations (eg builtin echo) might also be benefitial.

	David

-- 
David Laight: david@l8s.co.uk