CVS log for src/usr.bin/make/unit-tests/varmod-edge.exp
Up to [cvs.NetBSD.org] / src / usr.bin / make / unit-tests
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.33: download - view: text, markup, annotated - select for diffs
Sun Mar 30 09:51:51 2025 UTC (3 weeks, 5 days ago) by rillig
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +6 -6
lines
make: use '"filename" line 123' for locations instead of 'filename:123'
The format 'filename:123' is commonly used for identifying a location in
a file. Text editors recognize it and allow quick navigation through it.
The previous format was specific to make and would have required custom
support in editors.
The new format was already used in stack traces, except for the first
line. Now all lines use the same format.
Revision 1.32: download - view: text, markup, annotated - select for diffs
Sat Mar 29 19:08:52 2025 UTC (3 weeks, 6 days ago) by rillig
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +2 -2
lines
make: add ":" to error message about unknown modifier
In the manual page, the modifiers are listed with a preceding ":", so
use the same pattern in the error message. This removes an inconsistency
between the error messages "Unknown modifier" and "Bad modifier".
Revision 1.31: download - view: text, markup, annotated - select for diffs
Sat Mar 29 16:44:14 2025 UTC (3 weeks, 6 days ago) by rillig
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +3 -6
lines
make: stop parsing after seeing an unknown modifier in an expression
Previously, after an expression such as ${VAR:Z::::}, make detected the
unknown modifier ":Z" and then continued parsing, which produced
unnecessary follow-up error messages. It was also necessary to
distinguish the error cases when logging the result of an applied
modifier in -dv mode.
Unify the error handling cases of a syntax error, an evaluation error
and an unknown modifier, to avoid the unnecessary follow-up error
messages.
The test in varmod-edge.mk now produces ":}" from the erroneous
expression, which may be misleading and thus will be looked at in a
follow-up commit.
The general idea of this patch was reviewed by sjg, I made a few
nonsubstantial changes after the review.
Revision 1.30: download - view: text, markup, annotated - select for diffs
Sat Mar 29 11:51:54 2025 UTC (3 weeks, 6 days ago) by rillig
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +2 -2
lines
make: add more details to error message about unfinished modifier
These details allow to quickly see the place where the syntax error is,
based on the surrounding lines from the stack trace.
Revision 1.29: download - view: text, markup, annotated - select for diffs
Sat Jan 11 20:54:45 2025 UTC (3 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +2 -4
lines
make: omit redundant follow-up message "Malformed conditional"
If there is a parse error or an evaluation error during the conditional,
the conditional is already mentioned in the "while evaluating condition"
line, so there's no reason to repeat it once again.
Same for the "Bad condition" message from the '?:' modifier.
Revision 1.28: download - view: text, markup, annotated - select for diffs
Thu Aug 29 20:20:36 2024 UTC (7 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +20 -7
lines
make: reduce line length in error messages
The error messages for deeply nested parse errors were hard to decipher,
due to the large amount of text. Split these messages into individual
lines, just as in the backtrace for .include files and .for loops. This
unified backtrace makes the output more uniform.
Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue Aug 6 18:00:17 2024 UTC (8 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +2 -2
lines
make: in error message about conditionals, use single quotes
Single quotes are used less often in the conditionals themselves, which
leads to fewer confusions.
Revision 1.26: download - view: text, markup, annotated - select for diffs
Tue Jul 9 17:07:23 2024 UTC (9 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +1 -1
lines
make: error out on syntax errors in ':M' and ':N' modifiers
More than a year ago, the warning has been added. Now it has been
promoted to an error.
Revision 1.25: download - view: text, markup, annotated - select for diffs
Sat Jul 6 10:36:23 2024 UTC (9 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +1 -0
lines
make: error out on a matching malformed matching pattern '[['
Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat Jul 6 10:14:35 2024 UTC (9 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +9 -29
lines
tests/make: clean up tests
Prefer "expect+X" directives to be above the code generating them,
instead of "expect-X" directives below the code.
In varmod-edge.mk, separate the tests, as the common loop does not pull
its weight.
Revision 1.23: download - view: text, markup, annotated - select for diffs
Fri Jul 5 19:47:22 2024 UTC (9 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +3 -3
lines
make: in error messages for anonymous variables, log the value
Revision 1.22: download - view: text, markup, annotated - select for diffs
Fri Jul 5 18:59:33 2024 UTC (9 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +2 -1
lines
make: error out on unclosed expressions during parse time
In exchange, this adds location information.
For unnamed expressions, the value is no longer printed. This will be
added back in a follow-up commit.
Revision 1.21: download - view: text, markup, annotated - select for diffs
Fri Jul 5 17:41:50 2024 UTC (9 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +20 -20
lines
tests/make: add expected messages for "Unclosed expression"
Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu Jul 4 20:18:40 2024 UTC (9 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +1 -1
lines
make: on error, print the targets to be made
This helps to understand situations with several nested sub-makes in
varying directories.
Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Jul 4 17:47:54 2024 UTC (9 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +6 -3
lines
make: add more context information to error messages
In case of a parse error or evaluation error, print the variable value
in addition to the variable name, to see the effects of previous
expression modifiers.
In nested make calls, print the current directory at the bottom of a
stack trace, as that information is otherwise hard to get in a parallel
build spanning multiple directories.
Revision 1.17.2.1: download - view: text, markup, annotated - select for diffs
Mon Jul 1 01:01:15 2024 UTC (9 months, 3 weeks ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17: +23 -23
lines
Sync with HEAD.
Revision 1.18: download - view: text, markup, annotated - select for diffs
Sun Jun 30 15:21:24 2024 UTC (9 months, 3 weeks ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +23 -23
lines
make: error out on some more syntax errors
Previously, these errors only produced a message on stderr. They only
affected make's exit status when they were evaluated at parse time, but
not when evaluating the commands for a specific target right before
executing them.
The affected syntax errors are:
* invalid regular expressions in the ':C' modifier
* out-of-range references to regex groups in the ':C' modifier
* unfinished modifiers
Revision 1.17: download - view: text, markup, annotated - select for diffs
Sat Apr 20 10:18:55 2024 UTC (12 months ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base
Branch point for: perseant-exfatfs
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +3 -3
lines
make: provide more context information for parse/evaluate errors
Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Nov 19 22:06:15 2023 UTC (17 months ago) by rillig
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +1 -1
lines
make: replace 'variable expression' with 'expression' in diagnostics
Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu Jun 1 20:56:35 2023 UTC (22 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +21 -21
lines
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.14: download - view: text, markup, annotated - select for diffs
Tue Feb 23 15:56:30 2021 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
CVS tags: netbsd-10-base,
netbsd-10-1-RELEASE,
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
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +1 -1
lines
make: improve error message for unclosed modifier
Replace "variable specification" with the more modern "variable
expression", reduce the number of parentheses, output more than a single
character for modifiers, make it obvious that in expressions such as
${:Serror}, the "" means a variable name.
Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue Feb 23 15:19:41 2021 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +3 -3
lines
make: improve error message for unknown modifier
Back in 1995, the modifiers were all single-character, and it made sense
to print only the first character. Nowadays, with ':S', ':@var@...@',
'::=' and several others, a little more context is useful to see where
the exact error is. The actual modifier is still guessed, and the guess
may be wrong as soon as backslashes get involved, but it is still better
than before.
Revision 1.12: download - view: text, markup, annotated - select for diffs
Tue Feb 23 00:04:48 2021 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -3
lines
make: add quotes around variable name in an error message
Revision 1.11: download - view: text, markup, annotated - select for diffs
Mon Feb 22 23:59:43 2021 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +4 -0
lines
make: add test for confusing double space in error message
Revision 1.10: download - view: text, markup, annotated - select for diffs
Sun Dec 20 19:47:34 2020 UTC (4 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +5 -4
lines
make(1): error out on unknown variable modifiers at parse time
Before, make printed an "error message" that did not include the word
error and thus was not easily identified as such. This "error message"
also did not influence the exit status in the default mode but only in
-dL mode. The error message also didn't include any line number
information and was thus rude.
Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Dec 20 19:37:23 2020 UTC (4 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +16 -16
lines
make(1): include line numbers in output of test varmod-edge.mk
Suppressing the line numbers does not provide much benefit, given that
the test file doesn't change often.
Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat Aug 8 13:27:42 2020 UTC (4 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +1 -1
lines
make(1): improve error message in case of unfinished modifiers
The previous error message "Unclosed substitution" was wrong for several
reasons.
It is not about "unclosed", but about "unfinished" since in the
:@var@...@ modifier the missing '@' does not really close anything.
The word "substitution" may have originated in a time where :S and
:from=to were the only modifiers, and these were indeed substitutions,
but several other modifiers aren't.
The :S and :C modifiers allow an arbitrary delimiter, therefore it is
helpful to enclose the delimiter in quotes, just in case someone chooses
')' or '{' or even ' ' as delimiter.
Revision 1.7: download - view: text, markup, annotated - select for diffs
Sat Aug 1 15:28:28 2020 UTC (4 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +17 -16
lines
make(1): improve output grouping in varmod-edge test
The generated error messages are now closer to the test cases that
produce them. To keep the expected output stable, the line numbers are
omitted from the .info directives.
Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Aug 1 15:16:15 2020 UTC (4 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -0
lines
make(1): add test for ${VAR::::}
It's a bit unrealistic, but at least there are good diagnostics.
Revision 1.5: download - view: text, markup, annotated - select for diffs
Sat Aug 1 15:13:45 2020 UTC (4 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +1 -0
lines
make(1): add test for empty modifier list after colon
This is a good candidate for becoming an error in strict mode.
Either write ${VAR} or write ${VAR:modifiers}, but not half-baked.
Revision 1.4.4.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:09:17 2020 UTC (5 years ago) by martin
Branches: phil-wifi
Diff to: previous 1.4.4.1: preferred, colored; branchpoint 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4.4.1: +17 -0
lines
Merge changes from current as of 20200406
Revision 1.4.4.1
Mon Dec 2 01:01:08 2019 UTC (5 years, 4 months ago) by martin
Branches: phil-wifi
FILE REMOVED
Changes since revision 1.4: +0 -17
lines
file varmod-edge.exp was added on branch phil-wifi on 2020-04-08 14:09:17 +0000
Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Dec 2 01:01:08 2019 UTC (5 years, 4 months ago) by rillig
Branches: MAIN
CVS tags: phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
is-mlppp-base,
is-mlppp
Branch point for: phil-wifi
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +6 -0
lines
Add more tests for variable modifiers in make.
Revision 1.3: download - view: text, markup, annotated - select for diffs
Sat Nov 30 03:53:45 2019 UTC (5 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -0
lines
Demonstrate some more edge cases for the :M modifier
Revision 1.2: download - view: text, markup, annotated - select for diffs
Sat Nov 30 02:31:19 2019 UTC (5 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +1 -0
lines
Add another unit test for the :M modifier
Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Nov 30 00:38:51 2019 UTC (5 years, 4 months ago) by rillig
Branches: MAIN
Add unit tests for variable modifiers like :M and :N
CVSweb <webmaster@jp.NetBSD.org>