Commit Graph

1049 Commits

Author SHA1 Message Date
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
sjg 123e6558cd Make sure .PHONY targets get .TARGET set.
This wasn't happening when a dependency of .END.
Set .PREFIX too and add a unit-test.

PR: 43534
2011-09-29 23:38:04 +00:00
christos 6f2c981e29 PR/45383: Henning Petersen: Swapped lseek args 2011-09-21 14:30:47 +00:00
joerg 84700a0331 Use __dead consistently. If it doesn't exist, define it away. 2011-09-16 15:38:03 +00:00
sjg b79c6e0ff9 meta_oodate should ignore makeDependfile 2011-09-02 16:26:21 +00:00
plunky 9f61b80465 NULL does not need a cast 2011-08-31 16:24:54 +00:00
sjg 09fee58e88 In meta mode, we create .meta files for most targets.
These capture all the interesting data - useful for debugging.
In such cases there is no need to replicate commands in the build log.
Rather than run the entire build .SILENT, allow meta mode to set that flag
per target iff a .meta file is created.
Normal behavior is retained for targets where no .meta file is created,
ensuring that no build data is lost.
2011-08-28 03:54:07 +00:00
sjg daf6508d3f Make some dashes em-dashes (based on patch from Andrew O. Shadoura).
Note behavior of .META flag wrt out-of-date.
2011-08-18 15:36:51 +00:00
sjg 4f95291ad9 Fix formatting of Notes to work with groff.
Patch from Andrew O. Shadoura.
2011-08-18 15:19:30 +00:00
sjg bbf6dc9998 If a target is explicitly flagged .META,
a missing .meta file means it is out-of-date.
2011-08-18 00:00:21 +00:00