The NetBSD Project

CVS log for src/usr.bin/make/unit-tests/

[BACK] Up to [] / src / usr.bin / make / unit-tests

Request diff between arbitrary revisions

Default branch: MAIN

Revision 1.4 / (download) - annotate - [select for diffs], Sun Nov 19 21:47:52 2023 UTC (4 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

tests/make: replace 'variable expression' with 'expression'

Each expression is based on a variable, there's no need for the
verbosity.  The wording in make's diagnostics will be changed in a
follow-up commit.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jun 1 20:56:35 2023 UTC (10 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.2: +13 -1 lines
Diff to previous 1.2 (colored)

tests/make: force line-based diagnostics to be listed in the tests

This way, contradictions between the intended output and the actual
output are closer together and have a better chance of being spotted.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Nov 4 04:49:33 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.1: +6 -6 lines
Diff to previous 1.1 (colored)

make(1): negate discardUndefined to preserveUndefined

Revision 1.1 / (download) - annotate - [select for diffs], Wed Nov 4 04:24:57 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN

make(1): add test for undefined variables in command line arguments

The variable discardUndefined has an implicit negation in its name,
which makes it hard to understand.  Plus, most of the time it is true.
It's better to have a flag that is false most of the time and has a
positive name.

On the first attempt of inverting that variable, I stumbled upon
MainParseArgs, which initially leaves discardUndefined == FALSE, and
after handling the dashed options, sets it to TRUE.  This would make a
difference when more command line arguments would be added later via the
.MAKEFLAGS special target.

Upon further inspection, the only place where discardUndefined is used
is in VarAssign_EvalSubst in parse.c, and that place is not reachable
from any of the dashed options.  Therefore, discardUndefined could
already be set at the very beginning of MainParseArgs or even when
initializing the global variable itself, without any observable

Not even the ::= variable modifier could do anything about this since it
is not reachable from the dashed command line options as well, and in
addition, it expands its right-hand side in any case, always discarding
undefined variables.  Oh, these little inconsistencies everywhere.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

CVSweb <>