summaryrefslogtreecommitdiff
path: root/usr.bin/make
AgeCommit message (Collapse)Author
2020-06-03somehow, when I used more bool, I forgot to check with WARNINGS=YesMarc Espie
no reason for those types to have different return types, all compilers are slightly unhappy with incompatible function pointers (again, obvious commit, no difference in generated code)
2020-06-03Init_Sigset() isn't a prototype without the void!Marc Espie
obvious warning fix
2020-06-02kill dead lineMarc Espie
okay millert@
2020-06-02use the right abstraction to abort jobs, also show debug info as thisMarc Espie
thing is tricky okay millert@
2020-04-20in case there are several operators on a dependency line, prefer theMarc Espie
standard one (:) to the very BSD specific (!) so that standard Makefiles keep working in the presence of ! in filenames. This doesn't supersede the usual heuristics of choosing the operator followed by space if several are present. okay millert@
2020-01-29in the very strange case where make's child gets ptrace'd by its own infantMarc Espie
(hi mpi@) we may wish to ignore WIFSTOPPED so that other bugs elsewhere may get found. Also give more information in "can't happen" case to speed up figuring problems out. okay millert@, mpi@
2020-01-26remove OP_* for deprecated keywords (document that :: still usesMarc Espie
OP_INVISIBLE) okay millert@
2020-01-26remove documentation for .MADEMarc Espie
2020-01-26deprecate old keywords, some already removed, some now hitting the bitbucket.Marc Espie
okay on principle from millert@/schwarze@ The rationale is that those aren't even documented (apart from .MADE) and the corresponding code has never been maintained (just untouched when changing other things, so it probably doesn't work right if it ever did) This went through a full release/bulk to make sure nobody was using that stuff. okay millert@
2020-01-26simplify logic in compat engine, we can set ABORTED directly instead ofMarc Espie
waiting for the father to do so. okay millert@
2020-01-16turns out there WAS something fishy in signal handling in the "generic"Marc Espie
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.
2020-01-13move function around to minimize conflictsMarc Espie
2020-01-13forgot to remove Job_Begin/Job_EndMarc Espie
2020-01-13proper prototypeMarc Espie
2020-01-13forgot gc'ing one functionMarc Espie
2020-01-13make the choice of engine explicitMarc Espie
simplify the running of .BEGIN/.END so that they pass through the engine first (so they can now have dependencies). Error out properly if .BEGIN/.END fails.
2020-01-13unify compat mode and parallelmode a bit: there's no longer a need forMarc Espie
handle_one_job, always go thru Job_Make now.
2020-01-13make things more complex so that they can become simpler:Marc Espie
in the compatMake case, we still get into handle_all_running_jobs in case of a fatal signal and at the end. Pass compatMake around to job.c so that it will *not* run parallel make code in the sequential make case, thus actually making sure both engines are separate.
2020-01-13less confusing function nameMarc Espie
2020-01-13introduce a JOB_KEEPERROR flag so that the logic for moving jobsMarc Espie
to availableJobs/errorJobs happens just once
2020-01-13cleanup headerMarc Espie
2020-01-13zap more unneeded indirection, may_continue_job is enoughMarc Espie
2020-01-13remove_job no longer pulls its weightMarc Espie
2020-01-13better name for functionMarc Espie
2020-01-13simplify the way we account for different jobs:Marc Espie
- 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
2020-01-13and actually comment about itMarc Espie
2020-01-13move expensive heuristics a bit and explain better why we do thatMarc Espie
in that error case.
2020-01-13concept borrowed from netbsd: turns out SPECIAL_SOURCE/TARGET is no longerMarc Espie
needed, because if we're special it's a target, if we have special_op, it's a source. There's just SPECIAL_WAIT which requires funny handling anyhow
2020-01-13move a large chunk of suff.c into its own file (independent functions whichMarc Espie
are not really directly related to suffix handling), so that I can eventually understand how this whole thing works.
2020-01-13move documentation around to be more specific to suff.cMarc Espie
Rename Suff_ClearSuffixes to the more explicit Suff_DisableAllSuffixes which describes accurately what this function actually does. remove outdated comments about .INCLUDE/.LIBS
2020-01-13a lot of special keywors (.INCLUDE/.LIBRARIES) were removed a few releasesMarc Espie
ago. Document what's actually going on with special keywords (mostly .PATH has special semantics) and document that SPECIAL_NOTHING corresponds to ignoring former keywords.
2020-01-13introduce a "Buf_Reinit" function for handling static buffers that canMarc Espie
be reused throughout running make. Instead of recreating buffers of dubious appropriate size, have one single buffer for various stages of parsing.
2020-01-13tweak special node creation to be simpler: nodes created for special keywordsMarc Espie
are created exactly once, so they don't need to be looked up to check whether they exist or not. Go thru a Targ_mk_node internal with all the special fields, and note the special nodes are the only one with special values in there
2020-01-13document special values.Marc Espie
unconfuse type/special field (first commit of a large patch that was ok'd tb@, millert@)
2020-01-08fix -q: in compatMode, compute and return outofdate just like parallel mode.Marc Espie
Also, never run .END in querymode (we don't actually care about updating problem in that case). okay millert@
2020-01-04create a separate function "may_continue_heldback_jobs" and invokeMarc Espie
it in the main reaper loop, instead of waiting for a job with an expensive command to exit. This prevents jobs with an expensive command from holding back everything else until their full list of commands is run, instead of just the expensive one. (as JOB_IS_EXPENSIVE is updated before and after each command for a job, this is safe) This might make things slightly more parallel. It's definitely more correct and less tangled. okay millert@
2020-01-04remove redundant test, !keepgoing is already a condition forMarc Espie
a job getting on the errorJobs list okay millert@
2019-12-31plug memory leakMarc Espie
okay millert@
2019-12-307 years later, I think the commit message was not enough.Marc Espie
document this rather intricate loop (only comments no code change)
2019-12-25exit_type is already set up with exactly the information we need,Marc Espie
so get rid of cluttered duplicate logic okay kn@
2019-12-24Remove non-sensical line. The node certainly hasn't been rebuilt yet,Marc Espie
and the first thing job_attach_node does is... set the field to BUILDING. probably remnants of code prior to refactoring okay captain_obvious
2019-12-22- give a specific value to OP_ERROR that doesn't occur in natureMarc Espie
- define OP_ZERO as zero, to make some function calls obvious - split ParseDoOp into two functions: ParseDoOp that only deals with : :: ! and ParseDoSpecial that only deals with special nodes. This simplifies both functions accordingly - always initialize special_op okay millert@
2019-12-22we also have "VAR_*" constants in parsevar with totally different meanings.Marc Espie
Rename to avoid ambiguity - VAR_IS_SHELL (in var.c): the SHELL variable, which has specific POSIX semantics - VAR_SHELL (in parsevar.c): assign the result of running the command to the variable. no actual code change
2019-12-21yet another mostly cosmetic diffMarc Espie
- 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@
2019-12-21those fields only hold true/false valueMarc Espie
make it obvious okay millert@
2019-12-21rename a few variable/functions to have better names.Marc Espie
adjust comments to be more meaningful reorder predecessors/successors fields in an order that makes more sense to me. okay millert@
2019-12-21rename built_status constants to be less quirkyMarc Espie
fold back BEINGMADE and BUILDING which mean the same thing GC CYCLE/ENDCYCLE okay millert@
2019-12-21tweak buffer handling a bit:Marc Espie
- make BufExpand a real function, zap BufOverflow - sprinkle assert that justify the arithmetic - use unsigned constants - fix a bug in the unlikely condition where Buf_printf would exactly match the buffer boundary and Buf_Retrieve would be called right after okay millert@
2019-12-21The man page actually didn't explain its main parameters!Marc Espie
fix glaring omission okay schwarze@, jmc@
2019-08-22GC some old stuffMarc Espie
okay millert@