Commit Graph

892 Commits

Author SHA1 Message Date
sjg
03c533138a We need to have set curdir before calling Dir_FindHereOrAbove().
We can call getcwd again if -C is used.
2010-01-04 17:05:25 +00:00
wiz
af753b56d3 New sentence, new line; remove trailing whitespace. 2009-11-19 06:48:37 +00:00
sjg
9772f81de8 Add .unexport - the exact opposite of .export
and .unexport-env which unexport's all previously .export'd globals
as well as clearing environ[].
Allow's sys.mk near total controll.

Reviewed by: apb
2009-11-19 00:30:25 +00:00
sjg
b87966b319 PR: make.unexport
Reviewed by:
2009-11-19 00:30:24 +00:00
sjg
f3c8b50aa4 Add .unexport - the exact opposite of .export
and .unexport-env which unexport's all previously .export'd globals
as well as clearing environ[].
Allow's sys.mk near total controll.

Reviewed by: apb
2009-11-19 00:30:24 +00:00
dsl
c85c5e109a Report lines that ought to contain a ':' operator but start with a '.'
as "Unknown directive" sinze they are more likely to be .elseif (etc).
Lets me close PR/37222!
2009-11-06 20:20:56 +00:00
dsl
9e7c371385 Change enum values so that TOK_FALSE is 0 and TOK_TRUE is 1.
Use this fact to remove loads of ? : clauses.
2009-11-06 19:44:06 +00:00
joerg
568625a8d1 Do not work around ancient groff limits with .Xo/.Xc. 2009-10-15 02:27:44 +00:00
sjg
baca35f4e0 The parser used to break dependency lines at ';' without regard
for substitution patterns.  This (perhaps coupled with the
new handling of .for variables in ${:U<value>...) caused interesting
results for lines like:

.for file in ${LIST}
for-subst:       ${file:S;^;${here}/;g}

add a unit-test to keep an eye on this.
2009-10-07 16:40:30 +00:00
wiz
3c9c8e60ab Remove trailing whitespace. 2009-10-02 07:43:15 +00:00
dsl
b7ab3bd781 Add example of how to use the ?: modifier properly. 2009-10-01 21:40:31 +00:00
sjg
d86fd0848e We must delay setting .CURDIR and .OBJDIR until after MainParseArgs()
in case -C is used - in which case we should also ignore $PWD.
2009-09-09 17:09:49 +00:00
sjg
44c6580dd0 Reviewed by: apb
Use .MAKE.LEVEL to track recursion.
The first instance of make will have .MAKE.LEVEL 0, which
can be handy for excluding rules which should not apply
in a sub-make.
gmake and freebsd's make have a similar mechanism, but each
uses a different variable to track it.  Since we cannot be
compatible with both, we allow the makefiles to cope if they want
by handling the export of .MAKE.LEVEL+1 in Var_Set().
2009-09-08 17:29:20 +00:00
sjg
cd5a3748ef PR: 41998
:Ufu\:goo

should expand to fu:goo even when it appears in :M${:Ufu\:goo}
When scanning for :M do not compress \: if we know we have
to call Var_Subst.
2009-09-07 17:56:23 +00:00
dholland
01f8dc7731 Use the W* macros to test wait results.
(Mentioned by Joerg in chat a few days ago.)
2009-09-03 06:45:23 +00:00
sjg
b69bd507ef Bump date 2009-08-26 23:18:57 +00:00
sjg
3745b729fb Add -C directory, same as gmake and freebsd make. 2009-08-26 23:17:11 +00:00
sjg
dd8e1ba252 JobExec: child of vfork must not empty the sigset_t that parent will
restore.  Use a separate mask.
2009-06-26 01:26:32 +00:00
sjg
39bb2e98a1 Child of vfork() must not alter the state of parent.
There is no need to touch the state of vars in child anyway.
Change 2nd arg to Var_Export1() to indicate if we are the parent or child,
and only set flags in the parent.
2009-06-16 05:44:06 +00:00
sjg
2428caab9f Missing ':' in .ORDER example 2009-06-01 23:28:39 +00:00
wiz
7560090357 Whitespace fix. 2009-05-13 22:56:42 +00:00
lukem
c1ceae17f0 Enable WARNS=4 by default for usr.bin, except for:
awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
2009-04-14 22:15:16 +00:00
snj
ab4a318284 Typo fix: many file -> many files. 2009-04-11 15:51:42 +00:00
wiz
8216b2d443 Bump date for previous. 2009-04-11 09:44:22 +00:00
apb
af9429a671 Honour the TMPDIR environment variable instead of always using /tmp
as a place to store temporary files.
2009-04-11 09:41:18 +00:00
perry
08429de660 remove unneeded special rule for main.o 2009-03-24 13:54:37 +00:00
perry
f113e91b18 per dholland, put back MAKE_VERSION for the benefit of third party users. 2009-03-24 13:53:21 +00:00
perry
a24e0ba1bb The Makefile and main.c arranged to put "netbsd-${DATE}" into the
executable. Remove this so that different compiles can be binary
compared. rcsid's for all files are already embedded in the executable
so versions can be easily distinguished. (I didn't catch this on
previous passes because I did my builds on the same day.)

Note: there's a special rule for main.o in Makefile with a purpose I
can't actually discern -- I think it isn't needed, and I've flagged it
with a comment.
2009-03-20 20:48:00 +00:00
christos
0efea3414c use progname instead of getprogname() for portability. 2009-03-18 22:02:49 +00:00
christos
20ad44cb97 use siginfo to report on the directory we are working on if available. 2009-03-01 01:49:17 +00:00
sno
6adead3ca0 replace c++ style comment by a c-style one 2009-02-25 21:17:21 +00:00
dholland
1fc98979b6 Use pid_t for the result of fork and wait. PR 38031 from Ryan Stutsman. 2009-02-22 07:33:00 +00:00
christos
a5e73ebace adjust patch to current. 2009-02-18 21:06:47 +00:00
christos
ca9294c412 CID 5044: Protect against NULL deref. 2009-02-18 20:08:32 +00:00
sjg
55d9c66506 Update expected results to match recent changes! 2009-02-03 23:11:12 +00:00
dsl
efe788379e Rename all the members of 'enum Token' to TOK_FOO.
Makes it rather more obvious wherethey belong - especially since
two of them were 'True' and 'False' (and not 1 and 0 either).
2009-01-30 23:07:17 +00:00
dsl
9c773fc1c6 Treat .ifdef ${foo} as .if defined(${foo}) not .if "${foo}" != "".
(and similarly for the other .ifxxx).
Do comparison against "" or 0 for .if "foo" and .if <numeric> directly
instead of faking up the operator string.
Rename error: to done: and use it for more exit paths.
Elucidate and correct some comments.

Fixes problems with makefiles that do:
.for var in var_1 var_2
.ifdef ${var}
...
which used to check whether var_1 was defined - because the .ifdef saw the
literal var_1, not a variable expansion due to the way .for loop variables
were substituted.
2009-01-30 22:35:10 +00:00
dholland
7f999162b5 Fix flagrantly wrong printf formats in compat strftime. 2009-01-29 09:03:04 +00:00
enami
ca3f8e6df1 Avoid infinite loop. 2009-01-29 07:48:39 +00:00
dsl
530cac2556 Allow for () in the argument to .ifdef et al.
Save/restore current values of global data across expression evaluation
to give ${foo:? ...} a change of working inside another .if.
2009-01-28 21:38:12 +00:00
dsl
b294f6c2a3 Fix sense of MAKE_NATICE test. 2009-01-24 23:19:50 +00:00
dsl
4802ea584f Add #ifndef MAKE_NATIVE around __RCSID 2009-01-24 23:07:48 +00:00
dsl
97347d2cbb Fixes to includes of make_malloc.h to that it actually builds when
USE_EMALLOC is undefined.
Fixes earlier fixes :-)
2009-01-24 14:43:28 +00:00
cegger
9fde1a673e buildfixes for OSX:
- include <sys/types> for size_t
- progname is undeclared
- include <string.h> for string functions like strlen()
- include <errno.h> for errno
2009-01-24 13:06:16 +00:00
wiz
6942778bea Sort sections. Fix typo (last line). 2009-01-24 13:02:33 +00:00
cegger
e6227c556c buildfix: remove RCSID. It conflicts with the definition in the .c files. 2009-01-24 12:59:51 +00:00
dsl
4fb693c12c Move the bmake_malloc() functions into their own .c and .h files.
Include instead of make.h in a few places.
2009-01-24 11:59:39 +00:00
dsl
5d04927c08 Correct the definition of the :? modifier - in particular the modifier
applies to the variable name, not its value!
Remove the set of examples that were recently added that failed to
explain why some worked and some didn't.
Add a not to the compatability section about the change in .for loop
substitution post 5.0.
Add a BUGS section.
XXX the BUGS section needs more entries :-)
2009-01-24 11:56:41 +00:00
dsl
a1e84ff783 Don't cast 'time_t' to 'void *' and back it will lose precision. 2009-01-24 10:59:09 +00:00
dsl
86df0d691f Sprinkle some const.
In particular for Lst_Find() and Lst_FindFrom().
Remove some unneeded casts and some now-undeeded UNCONST().
2009-01-23 21:58:27 +00:00