sjg
11a6c9d08b
From bmake: move decl of pwd nearer to where it is used so the whole
...
thing can be ifdef'd out without causing unused variable errors.
2013-07-18 15:31:49 +00:00
sjg
af0aba95fb
When a var is set in the CMD context, it prevents the same name
...
being set in GLOBAL context. We should also delete any such
variable in GLOBAL context, else make -V will show the wrong value.
2013-07-16 20:00:56 +00:00
sjg
7217d3f346
Fix unit-tests to cope with recent change to progname
2013-07-16 19:59:28 +00:00
christos
17cdc7e70d
use bmake_foo instead of efoo()
2013-07-16 14:22:13 +00:00
christos
4f413ffa5d
More gmake compatibility:
...
1. add -w flag to print Entering and Leaving directory name the the beginning
and the end of processing.
2. export MAKELEVEL=$((MAKELEVEL + 1)) only in the child environment.
3. when printing error messages, prefix them with the program name [$MAKELEVEL]
for $MAKELEVEL > 0
4. if $MAKEFLAGS consists only of letters assume it is a set of flags (as
allowed by posix), convert them to -f -l -a -g -s, so that they get parsed
properly.
With those fixes gmake -> bmake -> gmake -> bmake etc. works as expected.
2013-07-16 14:00:53 +00:00
christos
76db28c1cd
Make this work again like gmake. sjg: see the test program.
2013-07-15 20:33:11 +00:00
sjg
3eb72d30de
For .MAKE.LEVEL.ENV use VAR_CMD so updates are ignored
2013-07-09 18:44:41 +00:00
sjg
b834173368
Set .MAKE.LEVEL.ENV to the name of the env variable used to communicate
...
the recursion level to sub-makes.
2013-07-09 18:13:14 +00:00
sjg
58ba636624
If using gmake's MAKELEVEL; use it the same way
2013-07-06 18:19:17 +00:00
sjg
db7ba27731
If commandShell hasErrCtl is true, set shellErrFlag for use by
...
CompatRunCommand() so that behavior in jobs and compat mode
remains consistent.
2013-07-05 22:14:56 +00:00
christos
865e3e8f40
PR/47973: Justin Cormack: build uses <sys/signal.h> not in POSIX
2013-06-29 15:19:32 +00:00
agc
6a34c4426f
fix a typo
2013-06-26 20:20:36 +00:00
wiz
46ad464f12
Remove trailing whitespace.
2013-06-25 07:08:10 +00:00
sjg
adfd644b2f
Add .MAKE.META.IGNORE_PATHS to facilitate local additions to the paths
...
which should be ignored by meta_oodate().
2013-06-25 00:20:54 +00:00
sjg
8d830c54ea
Ignore any files in /proc/
2013-06-24 21:16:02 +00:00
sjg
8ae5585417
Use a #define for the variable name we put in environment to pass .MAKE.LEVEL
...
in case we don't want to use gmake's MAKELEVEL in a different way.
2013-06-18 20:06:09 +00:00
sjg
339d4acb06
Fix use after free bug.
...
Parse_SetInput:
curFile->fname was using the buffer passed to it - which ReadMakefile frees.
This change makes the comment in ParseEOF about leaking curFile->fname true.
2013-06-18 19:31:27 +00:00
christos
263238eca4
put back previous change
2013-06-10 20:24:58 +00:00
joerg
e2a82ef2e5
Revert last, it doesn't even build.
2013-06-10 19:07:09 +00:00
christos
8e6bfe4b71
1. Don't export .MAKE.LEVEL, because this is an illegal variable name for
...
some shells; export MAKELEVEL like gmake(1) does.
2. It is absurd for the environment variable to be one greater than the
make variable!?!?! To wit...
printf 'all:\n\t@echo ${.MAKE.LEVEL}; printenv .MAKE.LEVEL' | make -f -
2013-06-10 16:46:19 +00:00
sjg
c2bb7dcfaf
JobCreatePipe: do fcntl() *after* any fiddling of fd's
...
to avoid leaking descriptors.
Job_ServerStart: set closed on exec for jp_0 and jp_1.
2013-06-05 03:59:43 +00:00
sjg
f30350f125
Clean up some left overs
2013-05-29 00:23:31 +00:00
christos
e2bd819f6a
improve wording
2013-05-22 19:35:11 +00:00
christos
689b483c53
put a note on what FRC means.
2013-05-22 19:30:35 +00:00
sjg
2987902a0c
We cannot skip all Suff processing for .PHONY targets,
...
else, srcs which are wildcards do not get expanded as needed.
2013-05-18 13:13:34 +00:00
sjg
aea6f93e2d
Var_Delete: expand name if needed.
2013-05-18 13:12:45 +00:00
sjg
5410a37e87
New compiler doesn't like foo()
2013-05-16 21:56:56 +00:00
sjg
e570fc4070
Refine the effect of .OODATE on command comparison.
...
Rather than apply it to the whole script, just the current command line
is affected. This allows a trick like ${.OODATE:M.NOMETA_CMP}
to cause command comparison to be supressed for one command only.
2013-03-31 05:49:51 +00:00
sjg
dd4c105ae6
After removing an entry from missingFiles,
...
set ln=NULL after Lst_Remove() to make it clear we won't use it
after this point.
2013-03-23 23:39:47 +00:00
sjg
03ce90ebea
If built with filemon support, set .MAKE.PATH_FILEMON to _PATH_FILEMON
...
so that makefiles can test for it.
2013-03-23 05:31:29 +00:00
sjg
a577c98aa7
Add unit-test for export-env and gmake export
2013-03-22 16:36:46 +00:00
sjg
cb29a22065
ParseGmakeExport: terminate variable at '=', or setenv(3) will fail
...
on some systems.
2013-03-22 16:07:59 +00:00
christos
ed82ee44b4
Add a .STALE special target that gets invoked when dependency files contain
...
stail entries.
2013-03-05 22:01:43 +00:00
christos
a11ae36917
Keep track of the location where a dependency is defined, so we can report
...
about it.
2013-03-05 02:04:10 +00:00
christos
9208117e65
PR/45042: Thomas Cort: HAVE_foo for setrlimit(2) and setpgid(2)
2013-02-26 00:45:27 +00:00
dholland
21fc2b5d09
Fix obvious typo.
2013-02-25 01:57:14 +00:00
dholland
b3e2273034
typo in comment
2013-02-25 00:15:09 +00:00
christos
34b0d22580
While it is nice to have the same function do both the upper case and
...
lower case conversion, it ends up eating 4% of the total time we spend
in make calling tolower() while building libc.
2013-02-24 19:43:37 +00:00
christos
051dc4b05d
we need utsname all the time.
2013-02-16 02:39:27 +00:00
christos
3241ce1c02
Set .MAKE.OS to utsname.sysname so we can tell bogus OS's apart early in
...
the build process.
2013-02-16 02:11:11 +00:00
christos
c5e748dd3a
fix broken logic:
...
- poll can return EINTR, it is not restartable like read/write
- check poll return
- it does not make sense to check readyfd() is nready < 0
- check read return
- always call Job_CatchChildren, it is harmless
- short circuit scanning of the poll array if we got all the ready descriptors
2013-02-06 16:36:01 +00:00
christos
0b10d223d4
tools build is non-c-99
2013-02-02 15:24:08 +00:00
christos
74d93a2aa9
avoid the long shadow of i
2013-02-02 15:12:25 +00:00
christos
4b11b0a47f
Don't wait forever for output from a child job.
2013-02-02 15:11:48 +00:00
sjg
bd0907ac07
In SHELL COMMANDS section, provide some clues about different
...
behavior in jobs vs non-jobs mode.
Move the comment about when shell is skipped to this discussion
from COMPATABILITY.
Remove the incorrect statement about default mode being somehow
neither jobs mode or compat mode (it is compat mode).
2013-01-27 18:52:01 +00:00
christos
54e31e2d33
Check read and write errors to avoid warnings from linux.
...
XXX: Should we print an error and exit instead?
2013-01-26 15:52:59 +00:00
sjg
7a08ea2711
Remove Check_Cwd - it is no longer needed.
2013-01-25 02:01:10 +00:00
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