Subject: Re: make -j and failure modes
To: David Laight <email@example.com>
From: Greywolf <firstname.lastname@example.org>
Date: 12/10/2003 14:01:31
Thus spake David Laight ("DL> ") sometime Today...
DL> > I have two thoughts on this:
DL> > 1. Make understands this already.
DL> > 2. Are you (David) saying "change make to understand
DL> > target: source
DL> > cd xxx
DL> > yyy
DL> > ?? i.e. "cd" actually takes effect over more than one line?
DL> Make currently looks at command lines and if they contain any special
DL> characters (even if quoted!) fires the command into the shell.
DL> Command that don't contain special characters are tokenised by make
DL> and it does a fork/exec itself.
Hm. That's interesting; didn't know it did that...
DL> If a command is recognised as 'cd xxx; yyy' make could fork, cd and exec.
DL> Other optimisations (eg builtin echo) might also be benefitial.
What if you have strings of those, i.e.
cd xxx; yyy; cd xxn; yyz; cd foo; bar; ...
You only gain one level of optimization, unless you're thinking make
should also be parsing command lines (which is starting to sound like a
NetBSD: Stop, Drop, and Load