The value of the variable is passed to stat(2)
and st_mtime is new value.
An optional arg can be used if stat(2) fails, otherwise
the current time is used.
See varmod-mtime.mk for usage examples.
For at least 20 years, the setting of .PREFIX in make
has not matched the documentation.
Since the documented behavior does not match reality or
POSIX make, fix the documentation.
In FindDepsRegularPath str_basename is applied to .PREFIX
this is wrong, but I was unable to verify fixing it
was benign in NetBSD build - my NetBSD box (7.2)
was unable to build known-good src with or without any patches.
For now just document the behavior more accurately.
In a code example, replace the deprecated `pwd` with the preferred form
$$(pwd).
Shorten the paragraph about escaping a dollar in modifiers, as the
various escaping mechanisms are described in the section 'Expansion of
variables'.
Summarize the previously many cases of the ':from=to' modifier to be
simpler to understand, actually mention what the pattern matching
character '%' can match.
Describe the syntax of function call expressions in conditionals.
Previously, only the function names had been documented.
Directives such as .error or .undef are not conditionals. Having these
directives mixed in a single list made it more difficult to see how the
directives relate.
Most changes are editorial. Notable exceptions are:
The ':Q' in MAKE_PRINT_VAR_ON_ERROR was wrongly added in the previous
commit. As that variable does not produce a shell command, there is no
point in quoting the characters.
Since 2012.10.07.19.17.31, make doesn't complain anymore if a shell
command in compat mode expands to an empty string, which removes the
need to "keep make happy".
String literals in quotes are never interpreted as numbers.
The operators '<', '<=', '>', '>=' are only allowed in numeric
comparisons.
Avoid the term 'C relational operators' since in C, the relational
operators exclude '==' and '!=', which are called equality operators
instead.
Move For_Break further up, as the functions in that file are sorted from
small to big. The cast from size_t to unsigned int is required by lint.
In parse.c, move the code into a separate function to keep
ParseDirective small. Its only job is to parse the directive and then
delegate to another function doing the actual work.
In the manual page, remove empty lines.
In the test, ensure that .break stops processing of the .for loop
immediately; anything after the .break is not processed anymore.
Replace ':=' with '=', as there is no need to evaluate '$i' early.
Check the expected value in the .mk file instead of the .exp file, to
keep the reading scope as small as possible.
When .break is encountered within a .for loop
it causes immediate termination.
Outside of a .for loop .break causes a parse error.
Reviewed by: christos