This continues the previous commit, in which VAR_GLOBAL, VAR_INTERNAL
and VAR_CMDLINE were renamed.
Renaming the variable 'ctxt' was trivial since that word is used nowhere
else. In the comments though, each occurrence of the word 'context' had
to be checked individually since the word 'context' was not only used
for referring to a variable scope. It is also used to distinguish
different situations where characters are escaped in a certain way
('parsing context') and in a few other expressions.
Since make doesn't support variable names containing spaces, this edge
case is not enough reason to stop this feature. Having multiple
variable names as arguments nicely aligns with other directives such as
.for and .export.
For curdir and an explicit .OBJDIR target, we allow for
the directory to be read-only.
During InitObjdir we otherwise default to requiring objdir to be
writable - this can be controlled by env variable
MAKE_OBJDIR_CHECK_WRITABLE
Add unit-tests/objdir-writable
Reviewed by: christos rillig
When parsing variable assignments other than := and if
value contains '$' attempt Var_Subst the same as for :=,
if the value does not parse correctly, we get a fatal error
including file an line number.
This can greatly help with finding the cause of problems.
Reviewed by: christos
Allow tracking of max chain length, to see how well the hash
tables are working.
Pull the actual hash operation into a marco so it can be
easily changed - for experimenting.
The current hash, is pretty good.
Reviewed by: christos
make(1) has commands .include <file> and .include "file",
but the manpage was (inconsistently) rendering <file> with
angle-brackets (e.g. in UTF8 ) and "file" with curly-quotes
in HTML output (but not text).
This is an attempt to fix that and output only literal <file>
and "file" as is actually required in the makefile.fileoutput,
https://reviews.freebsd.org/D21470
Submitted by Mateusz Piotrowski (FreeBSD)
that passing variables to recursive makes with :q works as expected.
- Revert :Q to work as before.
- Adjust makefiles that use recursive make to use :q
Discussed on tech-toolchain@
XXX: pullup 8
:range replaces var value with an integer sequence one per word
in the current var value.
:_ stores the current var value in $_ so that it can be referred to
later in the modifier series.
Reviewed by: christos
The filter is applied to paths Read or Excuted, and if it expands to
nothing, the entry is skipped.
For example; dirdeps.mk can set this to:
.MAKE.META.IGNORE_FILTER = M*/${.MAKE.DEPENDFILE_PREFIX}*
when checking if DIRDEPS_CACHE is up to date, where only Makefile.depend*
are of interest.
Both meta_create() and meta_oodate() now share meta_needed()
to indicate if a .meta file is needed.
This allows for deciding that missing .meta file is cause of out-of-date.
The new knob 'missing-meta' controlls this, and is off by default
since the side effect files of generators like yacc will typically need
.NOMETA to avoid problems.
This however makes it much easier for folk to switch back and forth
with meta mode (eg. FreeBSD's normal build can leverage meta mode for
improved reliablility without need to clean).
Also if .MAKE.MODE does not contain 'nofilemon', the knob
'missing-filemon' allows control as to whether missing filemon data
should cause the target to be out-of-date.
Again off by default.
Like .sinclude missing file will be ignored.
Like .depend stale dependencies will be ignored.
Allows better implementation of auto depend.
Reviewed by: christos
Requested by: Bryan Drewery at FreeBSD.