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.
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.
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 -
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.
- 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
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).
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