Commit Graph

1058 Commits

Author SHA1 Message Date
sjg 2a4896f81a meta_oodate: rename ignoreOODATE to needOODATE.
if target uses ${.OODATE} in its script;
1. we canno compare commands
2. if we decide it is out-of-date .OODATE must not be empty.
   The only option is to set it to .ALLSRC
2013-01-19 04:23:37 +00:00
christos 7e4ddd095e include the variable name in debugging printfs. 2012-11-15 16:42:26 +00:00
sjg 15b27c94a1 Add a unit-test for .ORDER 2012-11-09 19:08:28 +00:00
sjg d6f9abca71 Do not stop looking for children, just because one has a .ORDER dependency. 2012-11-09 18:53:05 +00:00
christos 2ce34034e0 off-by-one 2012-11-03 13:59:27 +00:00
pgoyette 4d44b16846 Fix build break due to signed/unsigned comparison 2012-11-03 04:51:17 +00:00
sjg 484532a973 Allow cond_state[] to grow.
The need is rare, but real.

Reviewed by: christos
2012-11-03 02:25:13 +00:00
christos 4f166942a1 It is Sprite, not Sprint; pointed out by Todd Miller. 2012-10-08 15:09:48 +00:00
sjg 0afab3de7c Treat empty commands same as jobs mode 2012-10-07 19:17:31 +00:00
christos 6010f05a86 spelling 2012-09-17 02:10:46 +00:00
sjg cf6e63e419 Document the fact that lack of shell meta chars in a command
results in direct exec in compat mode.
2012-09-17 01:23:45 +00:00
sjg ea86d17992 Cast sizeof() to int, which is sufficent and consistent with other use
within make.
2012-08-31 07:00:36 +00:00
pgoyette 4e59942717 Cast sizeof() to (ssize_t) to avoid build errors. 2012-08-31 02:59:37 +00:00
wiz d5a95690ed Add an s. 2012-08-30 22:35:37 +00:00
sjg aede2a76f4 Add a knob to control whether -V fully expands a plain variable by default.
The default retains the traditional NetBSD behavior, but the knob
can be set so that FreeBSD can retain their expected behavior.
This is a compromise to be sure.

Add a debug flag -dV to override the above, so that regardless of
the knob setting, the raw value of a variable can be easily seen.
2012-08-30 22:09:58 +00:00
sjg 170700dd50 Add a knob to control whether -V fully expands a plain variable by default.
The default retains the traditional NetBSD behavior, but the knob
can be set so that FreeBSD can retain their expected behavior.
This is a compromise to be sure.

Add a debug flag -dV to override the above, so that regardless of
the knob setting, the raw value of a variable can be easily seen.
2012-08-30 21:17:05 +00:00
sjg 645c5e28e0 An X!= command, can cause Shell_Init() to be called before Job_ParseShell().
Job_ParseShell() should call Shell_Init() again if needed
to ensure shellPath is correct.
2012-07-03 21:03:40 +00:00
sjg 7f9f018fd1 gcc 4.2 doesn't like externs inside functions 2012-06-27 17:22:58 +00:00
sjg e47157f5d2 Do not include make_malloc.h or declare progname,
both are already done in make.h
2012-06-20 17:46:28 +00:00
sjg d912c0b39e Add unit-tests for .for 2012-06-19 23:25:53 +00:00
joerg b1e1b1d4c2 Replace __dead, __unused and the various printf format attributes
with versions prefixed by MAKE_ATTR_* to avoid modifying the
implementation namespace. Make sure they are available in all places
using nonints.h to fix bootstrap on Linux.
2012-06-12 19:21:50 +00:00
wiz 8e7413b140 Declare enomem __dead for clang. 2012-06-10 21:44:12 +00:00
wiz 459b76f867 Remove a __dead for an undead function (clang errors out otherwise). 2012-06-10 21:44:01 +00:00
sjg d8f6b5d3a6 kill(2) is more appropriate and more portable than raise(3) 2012-06-05 17:31:04 +00:00
sjg b711398c86 Re-raising SIGINT etc, after running .INTERRUPT
provides much more reliable shutdown on some systems.
Based on CompatInterrupt in FreeBSD's make.
2012-06-05 06:11:51 +00:00
sjg 5408a8dad9 Fix findenv() to fully match name 2012-06-04 22:45:05 +00:00
sjg 8d38755103 Var_UnExport() and setenv() can both realloc environ.
Use a common variable (savedEnv) to track that to avoid wasting memory.
Also, if providing setenv and unsetenv, do getenv too to ensure a consistent
set.
2012-06-04 20:34:20 +00:00
sjg 81320ffe8e Handle "quoted strings" as items in a .for list 2012-06-03 04:29:40 +00:00
sjg 4c3de88126 Don't pass debug flags etc. to unit-tests 2012-05-30 21:54:23 +00:00
sjg b420f1eb56 An empty command is quietly ignored in jobs mode, but causes a failure
in compat mode.  Just skip it.
2012-05-30 21:42:04 +00:00
sjg 26b0dda80a In meta mode, level 0 can legitimately see > 64 nested .if's 2012-05-21 06:30:02 +00:00
sjg 35fdcec3af Avoid nested extern declaration warnings 2012-05-18 02:28:16 +00:00
seanb 90cfd29599 - Use _exit() instead of exit() in signal handler since
the latter isn't signal safe.
2012-05-15 17:51:51 +00:00
christos 8a981eca3c Don't use the cache when building nodes that might have changed since the
last exec.
2012-05-10 19:53:26 +00:00
sjg f3251c8ae2 Fix handling of -dF+/tmp/file 2012-04-24 20:35:04 +00:00
sjg 26aa697a51 Var* are generally very liberal with memory, with the expectation
that none of it persists for long.
This isn't always true - for example a long running .for loop.

Buf_DestroyCompact() is used by Var_Subst(), rather than Buf_Destroy().
If it looks like we can save BUF_COMPACT_LIMIT (128) or more bytes,
call realloc.  This can reduce memory consumption by about 20%
Setting BUF_COMPACT_LIMIT to 0 dissables this.
2012-04-24 20:26:58 +00:00
sjg 845789be8d Restore previous behavior - supressing duplicate entries in
.MAKE.MAKEFILES - it is more efficient.
2012-04-24 20:12:16 +00:00
sjg 7a49f6a73f Fix some typos in/around ParseGmakeExport.
Remove the suppresssion of duplicate entries in .MAKE.MAKEFILES
2012-04-20 05:33:41 +00:00
wiz 1ac719d147 Remove unnecessary Bk/Ek pairs from SYNOPSIS.
No effective change except where I used the opportunity to sort options
and/or option descriptions.
2012-04-08 22:00:37 +00:00
christos 687e469719 Remove recheck hackery that caused extra stats, and explicitly ask for
recheck when needed. Before it used to be the case that we could only
use the cached entry once. Once the cached entry was used, we removed
it from the cache. Now it is kept forever.
2012-04-07 18:29:08 +00:00
christos f8c8cd087a document gmake export command 2012-03-31 14:46:16 +00:00
christos 3ba1aa3bc8 Add a gmake inspired export command 2012-03-31 00:12:24 +00:00
sjg 006e190034 Avoid the need to escape the # in :[#] when parsing conditionals. 2012-03-24 20:28:41 +00:00
dholland 62244ded10 Note in comment that Str_Match() does not detect or report invalid
patterns. This is not critical, since for the moment both possible
cases (unclosed [], and \ at the end of the string) are handled more
or less sanely.
2012-03-03 23:16:47 +00:00
sjg 367aa166aa Fix description of 'silent' in .MAKE.MODE
Also document 'env' in that context.
2012-02-03 21:39:25 +00:00
sjg 25e3dfbf18 Mention limits of :P 2011-12-23 05:01:59 +00:00
sjg 3a4494dc38 The :@ example gives the impression that we encourage the ODE
convention of naming loop variables like .LINK., when in fact
single char variables are far more common in NetBSD.
2011-12-17 04:43:45 +00:00
dholland 9851fd89b4 Fix xref to the PSD; PR 45568 from Petri Laakso. 2011-11-13 18:18:35 +00:00
christos e8514ab687 explain how to use .PARSEDIR and .PARSEFILE 2011-11-06 19:50:46 +00:00
christos f0528cf595 add debugging for parsedir and parsefile 2011-11-06 19:46:56 +00:00