Up to [local] / src / usr.bin / make
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: MAIN
Revision 1.74 / (download) - annotate - [select for diffs], Tue Apr 9 15:08:21 2024 UTC (2 months ago) by cheloha
Branch: MAIN
CVS Tags: HEAD
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored)
make(1): inline set_times() into Job_Touch() set_times() has one caller: Job_Touch(). set_times() is a thin utimes(2) wrapper. Using utimes(2) to reset a file's atime/mtime to the current time is not cumbersome. So, remove set_times() and just call utimes(2) directly. Thread: https://marc.info/?l=openbsd-tech&m=171262211713835&w=2 ok kn@
Revision 1.73 / (download) - annotate - [select for diffs], Mon Sep 4 11:35:11 2023 UTC (9 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE,
OPENBSD_7_5,
OPENBSD_7_4_BASE,
OPENBSD_7_4
Changes since 1.72: +1 -2 lines
Diff to previous 1.72 (colored)
GC old code that was originally implemented to facilitate adoption by other BSDs, which never happened, so make things simpler for further development. Ditches config.h entirely since it gets reduced to 2 defines. okay tb@
Revision 1.72 / (download) - annotate - [select for diffs], Thu Aug 31 06:53:28 2023 UTC (9 months, 1 week ago) by espie
Branch: MAIN
Changes since 1.71: +2 -99 lines
Diff to previous 1.71 (colored)
reuse the code to exec command for VAR != cmd *and* normal target processing okay tb@
Revision 1.71 / (download) - annotate - [select for diffs], Tue May 30 04:42:21 2023 UTC (12 months, 1 week ago) by espie
Branch: MAIN
Changes since 1.70: +3 -1 lines
Diff to previous 1.70 (colored)
Due to the way make is designed, not being able to read a makefile is basically silent. Record errors due to missing permissions and other oddities, and display them when we error out due to lack of targets, as a quality-of-life diagnostic. Based on a remark from sthen@, with some feedback and tweaks from op@ okay op@, kn@
Revision 1.70 / (download) - annotate - [select for diffs], Mon Oct 25 19:54:29 2021 UTC (2 years, 7 months ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE,
OPENBSD_7_3,
OPENBSD_7_2_BASE,
OPENBSD_7_2,
OPENBSD_7_1_BASE,
OPENBSD_7_1
Changes since 1.69: +1 -2 lines
Diff to previous 1.69 (colored)
Zap unused variables/functions under /usr/src/*bin/ OK deraadt
Revision 1.69 / (download) - annotate - [select for diffs], Sun Jan 26 12:41:21 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
CVS Tags: 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
Changes since 1.68: +6 -20 lines
Diff to previous 1.68 (colored)
remove OP_* for deprecated keywords (document that :: still uses OP_INVISIBLE) okay millert@
Revision 1.68 / (download) - annotate - [select for diffs], Thu Jan 16 16:07:18 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.67: +2 -1 lines
Diff to previous 1.67 (colored)
turns out there WAS something fishy in signal handling in the "generic" reaper. Specifically, the sigprocmask/wait/sigsuspend dance is correct for the main process, BUT you have to remember to reset the signal mask to something sane for the child (this was a duh! moment, that bug is very stupid) Finally, bluhm@ saw the actual issue. Kudoes to him. The change to "unify" sequential and parallel make made the bug reproducible under some circumstances (because in the parallel make case, many things may happen in different successions, so you don't get the wrong signal mask that often, but the sequential case is reproducible, and using the "streamlined" reaper meant the fork would occur WITHIN the signal loop instead of OUTSIDE) So: - discover signal state early on through Sigset_init; - introduce reset_signal_mask to get back to the initial state; - call reset_signal_mask systematically after fork This organisation thanks to cmd_exec. SOME cmd_exec happens before Job_Init happens, some afterwards (variables are still lazy and both !!= and :sh will occur AFTER parsing), so both fork() need to be protected. okay bluhm@ thx to sthen@ and naddy@ and mpi@ for helping out.
Revision 1.67 / (download) - annotate - [select for diffs], Mon Jan 13 15:24:31 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.66: +3 -19 lines
Diff to previous 1.66 (colored)
unify compat mode and parallelmode a bit: there's no longer a need for handle_one_job, always go thru Job_Make now.
Revision 1.66 / (download) - annotate - [select for diffs], Mon Jan 13 15:15:17 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored)
less confusing function name
Revision 1.65 / (download) - annotate - [select for diffs], Mon Jan 13 15:12:58 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.64: +9 -5 lines
Diff to previous 1.64 (colored)
introduce a JOB_KEEPERROR flag so that the logic for moving jobs to availableJobs/errorJobs happens just once
Revision 1.64 / (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.63: +2 -2 lines
Diff to previous 1.63 (colored)
better name for function
Revision 1.63 / (download) - annotate - [select for diffs], Mon Jan 13 14:51:50 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.62: +12 -8 lines
Diff to previous 1.62 (colored)
simplify the way we account for different jobs: - have a simple variable "sequential" that counts whether we are running more than one job (for the expensive heuristics) - don't expose various things globally, just have a set_noparallel() for the parser - preallocate exactly enough job structures and record them in availableJobs - keep one job on the side for .INTERRUPT
Revision 1.62 / (download) - annotate - [select for diffs], Mon Jan 13 14:15:21 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.61: +5 -1 lines
Diff to previous 1.61 (colored)
and actually comment about it
Revision 1.61 / (download) - annotate - [select for diffs], Mon Jan 13 14:14:24 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.60: +3 -4 lines
Diff to previous 1.60 (colored)
move expensive heuristics a bit and explain better why we do that in that error case.
Revision 1.60 / (download) - annotate - [select for diffs], Tue Dec 24 13:57:42 2019 UTC (4 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.59: +1 -3 lines
Diff to previous 1.59 (colored)
Remove non-sensical line. The node certainly hasn't been rebuilt yet, and the first thing job_attach_node does is... set the field to BUILDING. probably remnants of code prior to refactoring okay captain_obvious
Revision 1.59 / (download) - annotate - [select for diffs], Sat Dec 21 15:31:54 2019 UTC (4 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.58: +2 -2 lines
Diff to previous 1.58 (colored)
yet another mostly cosmetic diff - rename context into localvars, which is more meaningful and less generic - instantiate the random rumbling at the start of gnode.h with actual variable names - explain and group gnode.h variables better - make some comments terser/more meaningful okay millert@
Revision 1.58 / (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.57: +8 -9 lines
Diff to previous 1.57 (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.57 / (download) - annotate - [select for diffs], Sat Dec 21 15:28:16 2019 UTC (4 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.56: +4 -4 lines
Diff to previous 1.56 (colored)
rename built_status constants to be less quirky fold back BEINGMADE and BUILDING which mean the same thing GC CYCLE/ENDCYCLE okay millert@
Revision 1.56 / (download) - annotate - [select for diffs], Tue May 21 17:10:49 2019 UTC (5 years ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE,
OPENBSD_6_6
Changes since 1.55: +4 -1 lines
Diff to previous 1.55 (colored)
fix very stupid bug.
Revision 1.55 / (download) - annotate - [select for diffs], Tue Nov 27 09:33:48 2018 UTC (5 years, 6 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE,
OPENBSD_6_5
Changes since 1.54: +4 -12 lines
Diff to previous 1.54 (colored)
handle -s and -i in a uniform fashion, do not try to change the node type but use the Targ_* functions correctly. This fixes an oddity in end node handling noticed by kn@ review and okay kn@
Revision 1.54 / (download) - annotate - [select for diffs], Mon Jul 24 12:08:15 2017 UTC (6 years, 10 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE,
OPENBSD_6_4,
OPENBSD_6_3_BASE,
OPENBSD_6_3,
OPENBSD_6_2_BASE,
OPENBSD_6_2
Changes since 1.53: +6 -4 lines
Diff to previous 1.53 (colored)
turn stupid message into a proper warning. noticed by Michael W. Bombardieri okay schwarze@
Revision 1.53 / (download) - annotate - [select for diffs], Sun Jul 9 15:28:00 2017 UTC (6 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.52: +5 -1 lines
Diff to previous 1.52 (colored)
there's no need to fork/exec to execute comments okay millert@
Revision 1.52 / (download) - annotate - [select for diffs], Sun Jan 29 10:04:13 2017 UTC (7 years, 4 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE,
OPENBSD_6_1
Changes since 1.51: +5 -1 lines
Diff to previous 1.51 (colored)
obvious protection against null pointer, because it's quite possible for cgn to not have a parent...
Revision 1.51 / (download) - annotate - [select for diffs], Fri Oct 21 16:12:38 2016 UTC (7 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored)
small obvious cleanups: - remove a lot of unnecessary casts - zap extra param that's no longer needed - add proper prototype and make function static okay natano@
Revision 1.50 / (download) - annotate - [select for diffs], Fri Jan 23 13:18:40 2015 UTC (9 years, 4 months ago) by espie
Branch: MAIN
CVS Tags: 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
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)
remove a bunch of dangerous casts (useless casts from void * to something else, in some cases by adding extra temporary variables. IMO, it's much better practice to do void *a; int *p = a; *p = 42; rather than void *a; *(int *)a = 42; okay miod@... to be revisited for some possible const additions later.
Revision 1.49 / (download) - annotate - [select for diffs], Fri Oct 31 13:29:42 2014 UTC (9 years, 7 months ago) by gsoares
Branch: MAIN
Changes since 1.48: +2 -3 lines
Diff to previous 1.48 (colored)
redirect error output to stderr instead of stdout stderr is always unbuffered by default, so zap fflush(3) its no longer makes any sense here reminded by espie@ OK espie@
Revision 1.48 / (download) - annotate - [select for diffs], Fri May 30 21:19:57 2014 UTC (10 years ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE,
OPENBSD_5_6
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)
modern bourne shells handle ~. Unlikely in makefiles, but still, better fork a shell then (as seen in a commit message in netbsd's make, apparently taken from debian. didn't look at the actual code, but it was a "duh" moment) okay millert@
Revision 1.47 / (download) - annotate - [select for diffs], Fri Nov 22 15:47:35 2013 UTC (10 years, 6 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE,
OPENBSD_5_5
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)
wrappers for is*/to* that make damn sure their arguments are cast to unsigned chars. okay deraadt@
Revision 1.46 / (download) - annotate - [select for diffs], Mon Aug 26 14:15:07 2013 UTC (10 years, 9 months ago) by naddy
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)
replace rand(3)/random(3) calls with secure arc4random*() npppd ok yasuoka@ ok millert@
Revision 1.45 / (download) - annotate - [select for diffs], Thu May 30 08:58:38 2013 UTC (11 years ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE,
OPENBSD_5_4
Changes since 1.44: +7 -8 lines
Diff to previous 1.44 (colored)
remove cmtime again, but with a proper test for nodes without children. problem seen by aja, make pointed by matthieu, sleuthing by me, okay by millert (and you say OpenBSD developers don't work together)
Revision 1.44 / (download) - annotate - [select for diffs], Sat May 25 11:54:14 2013 UTC (11 years ago) by espie
Branch: MAIN
Changes since 1.43: +7 -6 lines
Diff to previous 1.43 (colored)
obviously missed something, so revert. (noticed by sthen@/matthieu@)
Revision 1.43 / (download) - annotate - [select for diffs], Wed May 22 12:14:08 2013 UTC (11 years ago) by espie
Branch: MAIN
Changes since 1.42: +7 -8 lines
Diff to previous 1.42 (colored)
as checked through thorough tests, youngest->mtime == ctime, so ditch the extra field. remove some extra abstraction layer: use clock_gettime directly instead of ts_set_from_now (what is "now" anyways) time_to_string takes param by pointer rename "now" into starttime (more accurate term) randomize queue uses arc4random_uniform (prompted by deraadt@) display debug timestamp with ns too (it's debug, so it doesn't really matter whichever way it's done, as long as it's done) okay millert@
Revision 1.42 / (download) - annotate - [select for diffs], Tue May 14 18:47:40 2013 UTC (11 years ago) by espie
Branch: MAIN
Changes since 1.41: +6 -3 lines
Diff to previous 1.41 (colored)
keep track of the youngest child, helps a lot with out-of-date messages in -dm mode. okay millert@
Revision 1.41 / (download) - annotate - [select for diffs], Tue Apr 23 14:32:53 2013 UTC (11 years, 1 month ago) by espie
Branch: MAIN
Changes since 1.40: +7 -6 lines
Diff to previous 1.40 (colored)
remove TIMESTAMP abstraction layer, prodded by theo. while there, clean up includes. use strtoll for ar timestamps (pretty much unused in reality, more standard conforming than anything) use idea from Todd to adapt to time_t being 32 bits OR 64 bits (pedantically correct: INT_MIN would work just fine up to 1910 or so...) okay millert@, gone thru a make build.
Revision 1.40 / (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_5_3_BASE,
OPENBSD_5_3
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)
document engine interface, remove internal function from visible interface
Revision 1.39 / (download) - annotate - [select for diffs], Wed Nov 21 23:21:54 2012 UTC (11 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.38: +4 -1 lines
Diff to previous 1.38 (colored)
${.ALLSRC} and ${.OODATE} should always be defined, even for empty lists of prerequisites. This prevents complaints from the var module and from other developers. That's a bug I introduced 5 years ago... found out by miod@ okay miod@
Revision 1.38 / (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.37: +14 -3 lines
Diff to previous 1.37 (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.37 / (download) - annotate - [select for diffs], Tue Oct 9 19:50:44 2012 UTC (11 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.36: +10 -2 lines
Diff to previous 1.36 (colored)
warn about targets with multiple command lists (debug option), as it's definitely non portable behavior. discussed with millert@, who rightfully insisted on the optional debug part
Revision 1.36 / (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.35: +40 -8 lines
Diff to previous 1.35 (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.35 / (download) - annotate - [select for diffs], Thu Oct 4 13:20:46 2012 UTC (11 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.34: +1 -3 lines
Diff to previous 1.34 (colored)
backout pgroup/job control from make, there is something deeply bogus in stdin interaction. Fixes update-patches as reported by aja...
Revision 1.34 / (download) - annotate - [select for diffs], Tue Oct 2 10:29:30 2012 UTC (11 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.33: +54 -26 lines
Diff to previous 1.33 (colored)
more changes, discussed and tested by various people. - put back some job control, turns out it's necessary when we don't run a shell. - zap old #ifdef CLEANUP code... probably doesn't even compile. - kill most of the OP_LIB code. Just keep a wee little bit for compatibility (deprecated .LIBS and .INCLUDES, warns for weird dependencies instead of erroring out). - much improved debugging and -p output: sort variables, targets, rules, output stuff in a nicer format mimicing input. - better error message when no command is found, explain where the target comes from. - sort final error list by file. - show system files in errors as <bsd.prog.mk> - reincorporate random delay, that was dropped - optimize siginfo output by not regenerating the whole string each time. - finish zapping old LocationInfo field that's no longer used.
Revision 1.33 / (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.32: +193 -256 lines
Diff to previous 1.32 (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.32 / (download) - annotate - [select for diffs], Fri Sep 14 14:18:50 2012 UTC (11 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)
more accurate fix: don't mark '!' as a meta character, recognize "!" as a shell reserved word. okay millert@
Revision 1.31 / (download) - annotate - [select for diffs], Fri Sep 14 08:46:39 2012 UTC (11 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)
! is a meta character, this lets test: ! pgrep process work, without trying to look for a '!' command (remember that not running a shell for each command is an optimization ?) bug fix prompted by eric@'s remark, okay millert@
Revision 1.30 / (download) - annotate - [select for diffs], Sat Aug 25 08:12:56 2012 UTC (11 years, 9 months ago) by espie
Branch: MAIN
Changes since 1.29: +4 -1 lines
Diff to previous 1.29 (colored)
- make wrong variable specs (unterminated) parse errors. - add info to be able to pinpoint parse errors at runtime. - let job runners abort when a parse error happens while expanding a variable during execution - fix an infinite loop when compiling without FEATURE_RECVARS. okay millert@, krw@ the very few errors found out by this (less than 10 over src/X/ports) fixed trivially beforehand, as requested by deraadt@
Revision 1.29 / (download) - annotate - [select for diffs], Thu Mar 22 13:47:12 2012 UTC (12 years, 2 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE,
OPENBSD_5_2
Changes since 1.28: +3 -5 lines
Diff to previous 1.28 (colored)
minor cleanup: error messages include lineno and fileno together, so recognize that and create a struct Location_ for it. mostly from Jonathan Calmels, a few nits from me. okay otto@
Revision 1.28 / (download) - annotate - [select for diffs], Sun Apr 25 13:59:53 2010 UTC (14 years, 1 month ago) by espie
Branch: MAIN
CVS Tags: 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.27: +9 -9 lines
Diff to previous 1.27 (colored)
pure whitespace cleanup
Revision 1.27 / (download) - annotate - [select for diffs], Sun Aug 16 09:49:22 2009 UTC (14 years, 9 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE,
OPENBSD_4_7
Changes since 1.26: +3 -4 lines
Diff to previous 1.26 (colored)
write sensible error message
Revision 1.26 / (download) - annotate - [select for diffs], Sun Aug 16 09:47:06 2009 UTC (14 years, 9 months ago) by espie
Branch: MAIN
Changes since 1.25: +3 -2 lines
Diff to previous 1.25 (colored)
avoid touching .PHONY targets, they don't exist.
Revision 1.25 / (download) - annotate - [select for diffs], Tue May 12 09:46:39 2009 UTC (15 years, 1 month ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE,
OPENBSD_4_6
Changes since 1.24: +1 -2 lines
Diff to previous 1.24 (colored)
zap double prototype
Revision 1.24 / (download) - annotate - [select for diffs], Sun May 10 11:07:37 2009 UTC (15 years, 1 month ago) by espie
Branch: MAIN
Changes since 1.23: +27 -51 lines
Diff to previous 1.23 (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.23 / (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.22: +43 -16 lines
Diff to previous 1.22 (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.22 / (download) - annotate - [select for diffs], Mon Nov 10 10:48:43 2008 UTC (15 years, 7 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE,
OPENBSD_4_5
Changes since 1.21: +1 -1 lines
Diff to previous 1.21 (colored)
missing static
Revision 1.21 / (download) - annotate - [select for diffs], Mon Nov 10 09:22:18 2008 UTC (15 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.20: +1 -1 lines
Diff to previous 1.20 (colored)
adjust comment to reflect reality (CompatRunCommand is gone)
Revision 1.20 / (download) - annotate - [select for diffs], Tue Nov 4 07:22:35 2008 UTC (15 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.19: +56 -47 lines
Diff to previous 1.19 (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.19 / (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.18: +31 -15 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Wed Jan 2 15:37:22 2008 UTC (16 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.17: +3 -2 lines
Diff to previous 1.17 (colored)
fix obvious bug in .NODEFAULT handling
Revision 1.17 / (download) - annotate - [select for diffs], Mon Dec 31 15:49:23 2007 UTC (16 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.16: +7 -0 lines
Diff to previous 1.16 (colored)
if our node doesn't have a lineno/fname, inherit from `used' node. This lets suffix rules finally print out where they come from...
Revision 1.16 / (download) - annotate - [select for diffs], Sat Nov 17 16:39:45 2007 UTC (16 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.15: +68 -42 lines
Diff to previous 1.15 (colored)
simplify dynamic variable handling a great deal: first remove all usage of Varq_Append by building the string directly. then replace `common' handling with specialized handling for dynamic strings (since they no longer need a buffer). Finally, identify the place where the variable value needs to be copied because it's going to be free'd or erased soon, and finally, use simple char* pointers. Shaves about 80 bytes off every gnode structure, and kills quite a few unnecessary malloc()s as well.
Revision 1.15 / (download) - annotate - [select for diffs], Sat Nov 17 16:32:04 2007 UTC (16 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.14: +1 -1 lines
Diff to previous 1.14 (colored)
.PHONY targets should not look at files.
Revision 1.14 / (download) - annotate - [select for diffs], Sat Nov 10 12:51:40 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.13: +7 -7 lines
Diff to previous 1.13 (colored)
rename make -> must_make, made -> built_status to make them easier to find in source files.
Revision 1.13 / (download) - annotate - [select for diffs], Tue Nov 6 21:12:23 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.12: +4 -0 lines
Diff to previous 1.12 (colored)
simplify the way we deal with implicit rules and handle $<. Having an `iParents' field is actually backwards, it's ways simpler to store the pointer in the child, as an impliedsrc, and to set the variable just in time along with all the rest in DoAllVar. This is simpler, and it should allow us to call SuffFindDeps much later.
Revision 1.12 / (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.11: +2 -2 lines
Diff to previous 1.11 (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.11 / (download) - annotate - [select for diffs], Sat Nov 3 11:42:41 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.10: +8 -0 lines
Diff to previous 1.10 (colored)
do the silent/ignore check in Job_CheckCommands, so that make -j4 -s works
Revision 1.10 / (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.9: +362 -1 lines
Diff to previous 1.9 (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.9 / (download) - annotate - [select for diffs], Mon Sep 17 12:42:09 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.8: +62 -202 lines
Diff to previous 1.8 (colored)
rewrite of the basic suffix/target parsing: use hash for suffixes. Store special targets in target hash, and use them for the parsing. Use OP_DUMMY flag to mark targets that don't really exist yet, such as interrupt and default nodes. Also, .PATHxxx is special in suffixes. Small tweaks to compat.c, so that run_commands does more stuff after the fork() (and thus no need to free things). Remove distinction between local and global jobs.
Revision 1.8 / (download) - annotate - [select for diffs], Mon Sep 17 12:19:11 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)
fix indent
Revision 1.7 / (download) - annotate - [select for diffs], Mon Sep 17 12:10:35 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.6: +5 -7 lines
Diff to previous 1.6 (colored)
minor tweaks
Revision 1.6 / (download) - annotate - [select for diffs], Mon Sep 17 12:07:22 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.5: +26 -19 lines
Diff to previous 1.5 (colored)
separate rewrite_times function
Revision 1.5 / (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.4: +10 -10 lines
Diff to previous 1.4 (colored)
kill extra spaces at end of line
Revision 1.4 / (download) - annotate - [select for diffs], Mon Sep 17 08:36:57 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)
kill += 1, -= 1 -> ++, --
Revision 1.3 / (download) - annotate - [select for diffs], Sun Sep 16 14:36:57 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.2: +275 -268 lines
Diff to previous 1.2 (colored)
reindent
Revision 1.2 / (download) - annotate - [select for diffs], Sun Sep 16 12:09: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)
rename Targ_FmtTime into time_to_string and move it, as it's not related to target nodes at all (reduces modules inter-dependencies)
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.