| Age | Commit message (Collapse) | Author |
|
This style is used by FreeBSD, among others.
|
|
|
|
|
|
|
|
Most of the tests from forloop.mk were already in directive-for.mk.
|
|
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.
|
|
Since /tmp and /var/tmp are always part of .MAKE.META.IGNORE_PATHS
the varname-dot-make-meta-ignore_* tests will not work
if TMPDIR is either (or subdir) of those.
|
|
These unit-tests should only be run if TEST_MAKE
has a valid .MAKE.PATH_FILEMON to indicate that filemon is
supported.
All three tests use the same meta-ignore.inc
which runs three sub-makes
one to initialize the target .meta file
two to ignore a file using .MAKE.META.IGNORE_{PATHS,PATTERNS,FILTER}
three to verify that without .MAKE.META.IGNORE_* the target is out of date.
Fix the order of _SED_CMDS to avoid errors when ${MAKE:T} appears in
.OBJDIR
|
|
.SYSPATH: with no sources will clear sysIncPath
otherwise sources are added
Reviewed by: rillig
|
|
Reviewed by: rillig
|
|
|
|
|
|
|
|
|
|
|
|
sync-mi: use CVS/Entries to ensure we only update
distrib/sets/lists/tests/mi with files known to CVS.
Reviewed by: rillig
|
|
Also ensure MAKE_VERSION is ignored.
|
|
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
|
|
|
|
A modifier in an expression ends not only at the next ':' or at the
closing '}' or ')', but also at the end of the string.
Previously, testing for the end of the string had been done separately,
which was error-prone since 2006-05-11, when indirect modifiers were
introduced. Since then, it was possible that the string terminator '\0'
was accidentally skipped in cases where the loop condition only tested
for the ending character. When parsing indirect modifiers, the ending
character is indeed '\0', but when parsing direct modifiers, it is '}'
or ')'.
A welcome side effect is that in the case of unclosed expressions such
as '${VAR:Modifier', the amount of error messages is reduced from 2 or 3
to only 1. The removed error messages were wrong and thus confusing
anyway.
|
|
Prevent makeing opt-m-include-dir.tmp in src tree.
Reviewed by: rillig
|
|
|
|
LGTM from Roland
|
|
PR bin/43821 describes the inconsistency that in a '.for i' loop, the
condition '.if ${i:M*.c}' works since 2009 while the seemingly
equivalent condition '.if !empty(i:M*.c)' does not access the variable
'i' from the .for loop but instead the global 'i'.
Resolving this situation in a backwards-compatible and non-surprising
way is hard, as make has grown several features during the last 20 years
that interact in various edge cases. For now, document the most obvious
pitfalls.
|
|
The test varmod-quote-dollar covers the same topic.
|
|
The tests in cond1 were a mixture of "everything related to conditions",
and the test cases were heavily dependent on each other, which made them
hard to understand. Move each test case to its corresponding
special-purpose test.
|
|
In complex dependency structures, when a build fails, a probable cause
is a missing dependency declaration between some files. In compat mode,
the build order is deterministic, in jobs mode, it is somewhat
deterministic. To explore more edge cases, add the line ".MAKE.MODE +=
randomize-targets" somewhere in the makefile.
Fixes PR bin/45226 by riastradh. Reviewed by christos.
|
|
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html
says that in order to make a makefile POSIX-conforming, its first
non-comment line must be the special dependency line '.POSIX:' without
any source dependencies.
Previously, make switched to POSIX mode even if such a line occurred
anywhere else, which was allowed by POSIX but was deep in the
"unspecified behavior" area. For NetBSD make, there is no big
difference since it doesn't ship any <posix.mk> file, this change mainly
affects the bmake distribution.
Previously, makefiles that contain '.POSIX:' somewhere in the middle
could fail due to <posix.mk> resetting .SUFFIXES, among other things.
Suggested by Simon J. Gerraty, who also reviewed an earlier version of
this change.
|
|
|
|
|
|
Reported in PR#49720 in 2015, fixed independently in compat.c 1.199 from
2020-12-07.
|
|
Reported 2011 in PR#45356.
|
|
Before main.c 1.231 from 2014-09-09, a variable assignment using the
operator '!=' generated a warning "Couldn't read shell's output" if the
output of the command was empty. The simplest way to suppress this
wrong warning was to add an empty 'echo' to the command. This hack is
no longer needed.
|
|
No binary change for -DNDEBUG.
|
|
For consistency with the other warnings.
|
|
|
|
Reported in 2003 in PR toolchain/20993. Linking a transformation rule
with .USE or .USEBEFORE node makes the transformation rule fail.
|
|
|
|
|
|
|
|
There is no such concept as a "variable class" in make, these tests
focus on the variable scope instead.
|
|
The tests from envfirst.mk are now in opt-env.mk.
The tests from modword.mk are now in varmod-select-words.mk.
|
|
|
|
When a target has multiple places where commands are defined, the
diagnostics mixed up the filename in some cases.
|
|
When the file for the debug log cannot be opened, make exits
immediately. This doesn't give the test a chance to clean up the
temporary log file.
Instead of trying to treat a regular file as a directory and create a
file in it, assume that the directory /nonexistent-$uuid is actually
nonexistent. This leads to the same kind of error message, independent
of strerror(3).
|
|
When run via 'cd usr.bin/make/unit-tests && make test', the tests are in
the current directory. When run via ATF, the tests are in
/usr/tests/usr.bin/make/unit-tests, while the current directory is a
temporary directory. Allow both variants, plus others that may occur in
the bmake distribution.
|
|
|
|
Found while trying to make the error messages from Cmd_Exec more
detailed.
|
|
|
|
At the point where ParseDependencyOp is called, cp is guaranteed to
point to either ':' or '!'.
No functional change.
|