CVSROOT:        /cvs
Module name:    src
Changes by:     es...@cvs.openbsd.org   2012/09/21 01:55:20

Modified files:
        usr.bin/make   : Makefile buf.c buf.h compat.c defines.h 
                         engine.c engine.h error.c error.h gnode.h job.c 
                         job.h lowparse.c lowparse.h main.c make.1 
                         parse.c targ.c varmodifiers.c 
Added files:
        usr.bin/make   : dump.c dump.h 

Log message:
major overhaul of the way make handle jobs, inspired by dpb:
instead of forking a "job" per target, and having that job further fork
separate commands, have make maintain a list of jobs, indexed by pid
of currently running commands, and handle process termination
continuation-style.  This has lots of benefits:
- make is responsible for most printing, so we no longer need pipes nor
job control: make -j jobs see the tty.
- no more special-casing for jobs that don't really execute anything.
- unify code for make -jn and make -B, including signal handlers and
job waiting.  So make -n, make -q, +cmd now run commands in the same
way in all cases.
- unified more accurate error-reporting, as make knows precisely which
command failed. Commands are tagged with their lines, and we display failing
commands in silent mode.
- fine-grained "expensive" command handling (recursion limiter). Do it
per-command instead of per-target.

Moreover, signal response is now simpler, as we just block the signals
in a small critical sections, test for events, and sigpause (thanks a lot
to guenther@ and millert@), so running make is now almost always paused
without any busy-waiting.

Thanks to everyone who tested and gave input.

Reply via email to