Up to [local] / src / usr.bin / make
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: MAIN
Revision 1.17 / (download) - annotate - [select for diffs], Mon Jan 13 15:12:58 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE,
OPENBSD_7_5,
OPENBSD_7_4_BASE,
OPENBSD_7_4,
OPENBSD_7_3_BASE,
OPENBSD_7_3,
OPENBSD_7_2_BASE,
OPENBSD_7_2,
OPENBSD_7_1_BASE,
OPENBSD_7_1,
OPENBSD_7_0_BASE,
OPENBSD_7_0,
OPENBSD_6_9_BASE,
OPENBSD_6_9,
OPENBSD_6_8_BASE,
OPENBSD_6_8,
OPENBSD_6_7_BASE,
OPENBSD_6_7,
HEAD
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)
introduce a JOB_KEEPERROR flag so that the logic for moving jobs to availableJobs/errorJobs happens just once
Revision 1.16 / (download) - annotate - [select for diffs], Mon Jan 13 15:08:08 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.15: +10 -10 lines
Diff to previous 1.15 (colored)
cleanup header
Revision 1.15 / (download) - annotate - [select for diffs], Mon Jan 13 14:56:59 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)
better name for function
Revision 1.14 / (download) - annotate - [select for diffs], Sat Dec 21 15:29:25 2019 UTC (4 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)
rename a few variable/functions to have better names. adjust comments to be more meaningful reorder predecessors/successors fields in an order that makes more sense to me. okay millert@
Revision 1.13 / (download) - annotate - [select for diffs], Fri Dec 7 15:08:03 2012 UTC (11 years, 6 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE,
OPENBSD_6_6,
OPENBSD_6_5_BASE,
OPENBSD_6_5,
OPENBSD_6_4_BASE,
OPENBSD_6_4,
OPENBSD_6_3_BASE,
OPENBSD_6_3,
OPENBSD_6_2_BASE,
OPENBSD_6_2,
OPENBSD_6_1_BASE,
OPENBSD_6_1,
OPENBSD_6_0_BASE,
OPENBSD_6_0,
OPENBSD_5_9_BASE,
OPENBSD_5_9,
OPENBSD_5_8_BASE,
OPENBSD_5_8,
OPENBSD_5_7_BASE,
OPENBSD_5_7,
OPENBSD_5_6_BASE,
OPENBSD_5_6,
OPENBSD_5_5_BASE,
OPENBSD_5_5,
OPENBSD_5_4_BASE,
OPENBSD_5_4,
OPENBSD_5_3_BASE,
OPENBSD_5_3
Changes since 1.12: +28 -4 lines
Diff to previous 1.12 (colored)
document engine interface, remove internal function from visible interface
Revision 1.12 / (download) - annotate - [select for diffs], Thu Oct 18 17:54:43 2012 UTC (11 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.11: +1 -2 lines
Diff to previous 1.11 (colored)
numerous error message fixes: - do ^C checking differently: don't record sent signals, but when jobs die, recheck whether we received/have pending a INT/QUIT/TERM/HUP signal. Then don't display our process group "normally", instead group together everything dying by signal/shell dying by signal (just give the target names). - make certain we always handle signals before dying from "other conditions" - have the parser messages look more like normal messages - remove double error messages from some parser errors - make sure unclosed variables ARE errors when some modifiers are present - keep track of the base directory we're run from, so that submakes can get shortened directories... - make sure the whole error message including silent command fits into a reasonable length. okay millert@
Revision 1.11 / (download) - annotate - [select for diffs], Sat Oct 6 09:32:40 2012 UTC (11 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.10: +3 -2 lines
Diff to previous 1.10 (colored)
- extra juice for debugging signal passing. Note when we can't pass the signal because the process already bought it (pgroups will do that to you) (lots of discussion with Todd on that one) - tweak error handling some more to make it less verbose when just one job is running... - show signal name in case of signal interrupts. - zap OP_LIB, move that stuff to the location where we warn when we meet that bug. okay millert@
Revision 1.10 / (download) - annotate - [select for diffs], Fri Sep 21 07:55:20 2012 UTC (11 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.9: +47 -15 lines
Diff to previous 1.9 (colored)
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.
Revision 1.9 / (download) - annotate - [select for diffs], Mon Jul 19 19:30:37 2010 UTC (13 years, 10 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE,
OPENBSD_5_2,
OPENBSD_5_1_BASE,
OPENBSD_5_1,
OPENBSD_5_0_BASE,
OPENBSD_5_0,
OPENBSD_4_9_BASE,
OPENBSD_4_9,
OPENBSD_4_8_BASE,
OPENBSD_4_8
Changes since 1.8: +0 -0 lines
Diff to previous 1.8 (colored)
two small changes: - allow variables in SysV modifiers, as requested by matthieu@ (since recursive variables are an extension, this just extends the extension) - variation on :Q called :QL (quote list), which does quote every character EXCEPT for whitespace. e.g., toto: @for i in ${VAR:QL} ...
Revision 1.8 / (download) - annotate - [select for diffs], Sun May 10 11:07:37 2009 UTC (15 years, 1 month ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE,
OPENBSD_4_7,
OPENBSD_4_6_BASE,
OPENBSD_4_6
Changes since 1.7: +5 -2 lines
Diff to previous 1.7 (colored)
simplify job handling a great deal: we don't care when jobs get stopped/continued, as we won't try to start new jobs when other stuff is stopped. Redo signal handling so that most stuff can be done directly in the handler. This requires blocking/unblocking signals while creating new jobs, and creating a small list that only contains job's pids. Switch to pgrps for jobs, since that works. Add a clamping heuristic that avoids starting new jobs while an expensive job is running (expensive meaning "very likely to be a recursive make run"). This idea is mostly from Theo, through the implementation is mine.
Revision 1.7 / (download) - annotate - [select for diffs], Sun Apr 26 09:25:49 2009 UTC (15 years, 1 month ago) by espie
Branch: MAIN
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (colored)
move code around a bit, extract code from run_prepared_gnode into a run_gnode_parallel. That simplifies the control flow of that routine a bit, to allow for more tweaks in the parallel case. okay kettenis@, otto@
Revision 1.6 / (download) - annotate - [select for diffs], Tue Nov 4 07:22:35 2008 UTC (15 years, 7 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE,
OPENBSD_4_5
Changes since 1.5: +3 -2 lines
Diff to previous 1.5 (colored)
changes to get target equivalence to work better. - add new file to create lists of equivalent targets (siblings) - use that for sequential mode to have much better VPATH support - separate checking commands from reporting error, for later. - zap DieHorribly accordingly - renumber existing flags - signal_running_jobs() is simpler than pass_signal_to_jobs() - new debug option -dn for name matching. Similar code to handle parallel make is still missing. thanks to Mark, Miod, Theo, Otto, Todd for tests and/or comments.
Revision 1.5 / (download) - annotate - [select for diffs], Tue Jan 29 22:23:10 2008 UTC (16 years, 4 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE,
OPENBSD_4_4,
OPENBSD_4_3_BASE,
OPENBSD_4_3
Changes since 1.4: +3 -1 lines
Diff to previous 1.4 (colored)
A few changes: - expand commands earlier, so that we can eventually scan them to take smarter decisions. - clean up the select() mask code and rename variables to sensible things. - quite a few minor renames for readability - erecalloc - clean up wait status handling, do not try to rebuild wait status, but instead parse it early and deal with the parsed code. tested by lots of people, thanks guys!
Revision 1.4 / (download) - annotate - [select for diffs], Sat Nov 3 14:05:39 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)
simplify: Job_CheckCommands deals with silent and ignerr now, so there's no need to duplicate that info at the job level since we can just use the gn->type.
Revision 1.3 / (download) - annotate - [select for diffs], Fri Nov 2 17:27:24 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.2: +11 -1 lines
Diff to previous 1.2 (colored)
Work done at p2k7. This is a really big step towards getting parallel make to work. Note that this is not yet complete. There are still a few `details' to fix before this works 100%. Specifically: sequential make (compat) and parallel make don't use the same engine, and the parallel engine still has a few limitations. For instance, some known issues: - parallel make does not deal with .phony targets correctly all the time. - some errors are deadly in parallel make mode. - parallel make NEEDS way more sturdy correspondance of file system paths and target names, since it often needs to match dependencies to targets before the corresponding files exist. - some local variables like $* get set in a bogus way in some cases. - suffix handling has issues, especially related to the NULL suffix. So, if you find stuff that does NOT yet work with parallel make, don't go blindly try to fix the Makefile. It's very likely you might have stumbled into a make bug. (unless you really, really, understand Makefiles, DON'T GO CHANGING THEM YET). Tested by lots of people, thanks go to miod@, and robert@ among other people. Quick summary of what this does: - remove `saving commands' extension (it's not really usable, nor used) - move compat job runner and parallel interrupt handling into engine.c - tweak the code so that both compat and parallel mode use the same job runner and the same interrupt handling. Remove the other one. - optimize job runner so that, in parallel mode, the last command does not fork if we can avoid it (as it's already running in a sub shell). - scrape all the code that dealt with creating shell scripts from commands. - scrape all the code that dealt with recognizing special sequences in command output to print/not print output. - fix the parallel job pipe to not keep around file descriptors that are not needed. - replace the parallel job buffering with a nicer one, that deals with non-blocking descriptors to try to agregate as much output from one job in one go (greed) to unconfuse the users. - create two pipes per job, so that stdout and stderr stay separate. - make job token printing a debug option. - always use the parallel job-runner to `execute' commands, even if we just print them out. - store list of errors encountered during parallel make running, and print them on exit, so that we know what went wrong. - add a dirty hack to targ.c to deal with paths produced by gccmakedep.
Revision 1.2 / (download) - annotate - [select for diffs], Mon Sep 17 09:28:36 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)
kill extra spaces at end of line
Revision 1.1 / (download) - annotate - [select for diffs], Sun Sep 16 10:39:07 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
first step towards sanity: take the functions common to parallel/not parallel make outside of make.c and job.c, and create an engine.c file to hold them.