aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/mk
AgeCommit message (Collapse)AuthorFilesLines
2020-01-13mk: fix hash function (#315)Neven Sajko1-7/+3
Avoid signed integer overflow using ulong instead of long h.
2020-01-13mk: treat X= as empty list in rc shellRuss Cox1-6/+12
This brings mk's behavior when using rc in line with Plan 9's. The existing code is for Unix environment data structures but also was assuming Unix shell semantics where empty and missing variables are mostly equivalent. The Plan 9 code (/sys/src/cmd/mk/plan9.c in the distribution) explicitly removes /env/name (creating an empty list) when the value is missing or an empty string. Fixes #255.
2020-01-12all: fix or silence various gcc warningsRuss Cox1-1/+1
As usual, gcc finds some real problems but also reports a ton of noise. Fix the problems and quiet the noise.
2020-01-10Trivial changes: whitespace and modes.Dan Cross8-13/+11
Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>
2020-01-08mk: plan9 style.Dan Cross1-7/+8
In general, no space after `if` etc, and no braces for a single statement inside of a loop or conditional. Signed-off-by: Dan Cross <cross@gajendra.net>
2020-01-07mk: fix out of bounds accessNeven Sajko1-7/+21
A loop is added for each structure field instead of accessing the other fields through the first one in one loop. Updates #313 Change-Id: I0e27e15feacb77391bc1decee7cf720d64d14586
2015-08-27mk: avoid infinite loop when targets are repeatedRuss Cox2-0/+6
Fixes "mk -f /tmp/x.mk y x" or "mk -f /tmp/x.mk" where /tmp/x.mk is: x y x: f echo hi Change-Id: I7fa87dc4750c04fdba010b990c190722b432b333 Reviewed-on: https://plan9port-review.googlesource.com/1361 Reviewed-by: Russ Cox <rsc@swtch.com>
2011-08-27mk: pass environment to P commandRuss Cox1-1/+1
R=rsc http://codereview.appspot.com/4977041
2007-04-21unix fixrsc1-0/+5
2007-03-26fix empty string interpolation bugs (Michael Teichgräber)rsc2-9/+14
2007-03-26better rc detection (Michael Teichgräber)rsc1-1/+1
2007-03-2664-bitrsc1-1/+1
2006-10-12avoid broken print (Gabriel Diaz)rsc1-0/+2
2006-04-2064-bitrsc14-27/+30
2006-04-01Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.rsc8-9/+9
2005-10-31undo debugging.rsc1-1/+0
2005-10-31ctype sign fixes (Tom Miller)rsc2-1/+2
2005-10-29Detect rc again.rsc1-3/+5
2005-08-10Fix time race.rsc1-1/+1
2005-05-07use full prototypesrsc1-1/+1
2005-02-02silence archive warning for .a filesrsc1-1/+2
2005-01-23avoid saying unsigned long, for unix portrsc2-2/+2
2005-01-15Long-standing bug in syminit, tickled by placingrsc2-3/+5
initshell before syminit. Don't understand why syminit exists at all.
2005-01-14not reachedrsc1-1/+0
2005-01-14checkpointrsc2-666/+1
2005-01-13Many small edits.rsc3-23/+20
2005-01-04add new | syntax.rsc19-83/+281
syntax will change.
2005-01-04Goodbye SHORTLIBrsc1-1/+2
2004-12-28more little compile fixesrsc1-0/+3
2004-12-27add readn to avoid need for plan9port libcrsc2-0/+20
2004-05-14More little bug fixesrsc1-0/+8
2004-04-21the lastbug fix?rsc4-9/+12
2004-04-21handle long namesrsc1-10/+63
2004-04-21Who'd have guessed this was broken?rsc1-2/+2
2004-04-19clean up when finished.rsc1-1/+0
don't set PLAN9 don't set PLAN9
2004-03-03Whoops.rsc1-0/+4
2004-03-02More Mac tweaks.rsc4-35/+5
2004-02-29Various tweaks.rsc1-1/+1
2004-02-29Small tweaks to make things build again.rsc1-1/+1
2003-11-23make -> mkrsc1-3/+3
2003-11-23print current directory in "don't know how to make" errors.rsc1-1/+9
2003-10-11Use new directory structure.rsc1-4/+4
2003-10-11Licensing and various tweaks.rsc1-258/+0
2003-09-30Reorgrsc12-253/+4
2003-09-30Initial revisionrsc38-0/+5150
2003-09-30Initial import.rsc5-0/+155