summaryrefslogtreecommitdiff
path: root/usr.bin/make
AgeCommit message (Collapse)Author
2024-04-23correct indentation; no functional changeJonathan Gray
ok tb@
2024-04-09make(1): inline set_times() into Job_Touch()Scott Soule Cheloha
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@
2023-11-05current code no longer uses Lst_Replace not Lst_RequeueMarc Espie
so don't bother compiling them.
2023-09-05unifdef HAS_INLINESJonathan Gray
inline is part of gnu89 and c99 ok kn@ espie@
2023-09-04GC old code that was originally implemented to facilitate adoption byMarc Espie
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@
2023-08-31reuse the code to exec command for VAR != cmd *and* normal target processingMarc Espie
okay tb@
2023-08-19Copy entire st_*tim structs at once, rather than copyingPhilip Guenther
the st_*time and (obsolete) st_*timensec members separately. ok millert@
2023-08-10document .VARIABLESMarc Espie
2023-08-10Add support for .VARIABLES, to which I have use.Marc Espie
This is an extension but also exists in gnu-make. okay millert@, kn@, thfr@ (I've added an XXX comment on top of the patch you've seen, no actual further code change)
2023-07-08max_processes -> max_jobs in usage();Jason McIntyre
2023-07-08nitpicking: singular of children is childMarc Espie
2023-07-08talk about "jobs" because that's make knows, and mention the heuristicsMarc Espie
about the recursive non exploding kitten recursive behavior outside of BUGS. okay naddy@, jca@
2023-05-30Due to the way make is designed, not being able to read a makefileMarc Espie
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@
2023-03-08Delete obsolete /* ARGSUSED */ lint comments.Philip Guenther
ok miod@ millert@
2023-02-17Remove unused variables; ok millert@Miod Vallat
2023-01-17Arguments may contain more than one variable assignmentKlemens Nanni
`make FOO=1 BAR=2 ...' works as expected and lots of things wouldn't work if make only accepted a single assignment, as currently documented. Fix SYNOPSIS and usage to match reality and POSIX spec (thanks jmc). OK jmc
2022-12-28the S in CSRC is Science not SciencesJonathan Gray
2022-12-26spelling fixes; from paul tagliamonteJason McIntyre
amendments to his diff are noted on tech
2022-12-04userspace: remove vestigial '?' cases from top-level getopt(3) loopsScott Soule Cheloha
getopt(3) returns '?' when it encounters a flag not present in the in the optstring or if a flag is missing its option argument. We can handle this case with the "default" failure case with no loss of legibility. Hence, remove all the redundant "case '?':" lines. Prompted by dlg@. With help from dlg@ and millert@. Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2 ok naddy@ millert@ dlg@
2022-10-14Document missing cases of variable substitutionKlemens Nanni
Feedback OK op
2022-08-03make(1) first appeared outside of Bell Labs in PWB/UNIX 1.0Jonathan Gray
it did not start in the PWB group "PWB did not create make; Stu Feldman did it in research." Doug McIlroy https://minnie.tuhs.org/pipermail/tuhs/2015-November/007572.html with and ok schwarze@
2022-06-09point developers to the other place where the remaining flags values areMarc Espie
defined (nice gotcha when you come back to the code after a few months).
2022-03-31man pages: add missing commas between subordinate and main clausesChristian Weisgerber
jmc@ dislikes a comma before "then" in a conditional, so leave those untouched. ok jmc@
2022-03-02make searches for makefile before Makefile;Jason McIntyre
from raf czlonka
2022-01-05remove unused definesJonathan Gray
ok gnezdo@
2021-11-11add some missing Ns; from leon fischerJason McIntyre
2021-10-25Zap unused variables/functions under /usr/src/*bin/Klemens Nanni
OK deraadt
2021-03-08use a journal reference instead of cstr when possibleJonathan Gray
2021-03-08Add some references, most of these were removed when we stopped buildingJonathan Gray
and installing USD/SMM/PSD docs. jmc@ agrees with the direction, ok millert@ on an earlier diff
2021-03-06put back Lst_Destroy(paths) where it belongsMarc Espie
noticed by jsg@
2021-03-04warn about proper usage of Lst_Destroy.Marc Espie
as noticed by jsg@
2021-03-04better if I commit the version which actually includes the header ;)Marc Espie
2021-03-04somehow I forgot to add copyright and to include the right prototypes.Marc Espie
No actual code change (checked with cmp)
2020-08-30Fix :S with anchors and replacementTheo Buehler
gnezdo noticed that :S/old_string/new_string/ variable modifiers such as :S/^sth/&/ and :S/sth$/&/ with an anchor in the old_string and an & in the new_string don't work as documented (and expected) since they replace & with old_string including the anchors. This is because get_spatternarg() deals with skipping the anchors in pattern->lhs only after having replaced any '&' in the buffer that will eventually become new_string with pattern->lhs. Fix this by moving the logic of skipping the anchors from get_spatternarg() into common_get_patternarg() so it is done before & is handled. ok millert
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.