head	1.20;
access;
symbols
	netbsd-11-0-RC4:1.20
	netbsd-11-0-RC3:1.20
	netbsd-11-0-RC2:1.20
	netbsd-11-0-RC1:1.20
	perseant-exfatfs-base-20250801:1.20
	netbsd-11:1.20.0.2
	netbsd-11-base:1.20
	netbsd-10-1-RELEASE:1.5
	perseant-exfatfs-base-20240630:1.9
	perseant-exfatfs:1.9.0.2
	perseant-exfatfs-base:1.9
	netbsd-10-0-RELEASE:1.5
	netbsd-10-0-RC6:1.5
	netbsd-10-0-RC5:1.5
	netbsd-10-0-RC4:1.5
	netbsd-10-0-RC3:1.5
	netbsd-10-0-RC2:1.5
	netbsd-10-0-RC1:1.5
	netbsd-10:1.5.0.2
	netbsd-10-base:1.5
	cjep_sun2x-base1:1.3
	cjep_sun2x:1.3.0.4
	cjep_sun2x-base:1.3
	cjep_staticlib_x-base1:1.3
	cjep_staticlib_x:1.3.0.2
	cjep_staticlib_x-base:1.3;
locks; strict;
comment	@# @;


1.20
date	2025.06.28.22.39.29;	author rillig;	state Exp;
branches;
next	1.19;
commitid	CDDpACH2g2jV3I0G;

1.19
date	2025.03.30.09.51.51;	author rillig;	state Exp;
branches;
next	1.18;
commitid	veGmSzVhPiW2G4PF;

1.18
date	2025.03.29.23.50.07;	author rillig;	state Exp;
branches;
next	1.17;
commitid	Ev93dfuVFJsbm1PF;

1.17
date	2025.01.11.20.54.46;	author rillig;	state Exp;
branches;
next	1.16;
commitid	v92duHXtj62ZR6FF;

1.16
date	2024.08.29.20.20.36;	author rillig;	state Exp;
branches;
next	1.15;
commitid	EaMgk7FrF8mB1LnF;

1.15
date	2024.08.06.18.00.17;	author rillig;	state Exp;
branches;
next	1.14;
commitid	1R0ZDok3menTZMkF;

1.14
date	2024.07.20.08.54.19;	author rillig;	state Exp;
branches;
next	1.13;
commitid	LxRHKpgnkLfGwyiF;

1.13
date	2024.07.05.18.59.33;	author rillig;	state Exp;
branches;
next	1.12;
commitid	GYmxMWv9KnPylGgF;

1.12
date	2024.07.05.17.41.50;	author rillig;	state Exp;
branches;
next	1.11;
commitid	lfqKvytUToJwVFgF;

1.11
date	2024.07.04.20.18.40;	author rillig;	state Exp;
branches;
next	1.10;
commitid	75IS4XOhTa8VOygF;

1.10
date	2024.07.04.18.53.37;	author rillig;	state Exp;
branches;
next	1.9;
commitid	7qUZd0dIKoMjlygF;

1.9
date	2023.11.19.22.06.15;	author rillig;	state Exp;
branches
	1.9.2.1;
next	1.8;
commitid	orhWVt8YK9haKgNE;

1.8
date	2023.06.01.20.56.35;	author rillig;	state Exp;
branches;
next	1.7;
commitid	j3tIvMRlxolKQhrE;

1.7
date	2023.02.27.08.29.36;	author rillig;	state Exp;
branches;
next	1.6;
commitid	NtEwQzVCXSQqK8fE;

1.6
date	2023.02.26.06.08.06;	author rillig;	state Exp;
branches;
next	1.5;
commitid	pKPGr9H6IIE200fE;

1.5
date	2021.08.03.04.46.49;	author rillig;	state Exp;
branches;
next	1.4;
commitid	eEqw0MzBEQEpSt3D;

1.4
date	2021.07.31.20.55.46;	author rillig;	state Exp;
branches;
next	1.3;
commitid	dDP41kUtguNXnb3D;

1.3
date	2021.02.23.16.07.14;	author rillig;	state Exp;
branches;
next	1.2;
commitid	hJeSMmQyXyb4SQIC;

1.2
date	2020.08.16.20.43.01;	author rillig;	state Exp;
branches;
next	1.1;
commitid	3Dm6xh4uIH1cwkkC;

1.1
date	2020.08.16.12.07.51;	author rillig;	state Exp;
branches;
next	;
commitid	coEgPk3hgfeYGhkC;

1.9.2.1
date	2025.08.02.05.58.39;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;


desc
@@


1.20
log
@make: consistently use double quotes in error messages

Previously, some error messages used single quotes, very few used
backticks or parentheses, most already used double quotes.

While here, reword a few error messages to be clearer or more consistent
with related error messages.
@
text
@make: varmod-order.mk:14: Unknown modifier ":OX"
	while evaluating variable "WORDS" with value "one two three four five six seven eight nine ten"
make: varmod-order.mk:17: Unknown modifier ":OxXX"
	while evaluating variable "WORDS" with value "one two three four five six seven eight nine ten"
make: varmod-order.mk:20: Unclosed expression, expecting "}" for modifier "O"
	while evaluating variable "WORDS" with value "eight five four nine one seven six ten three two"
make: varmod-order.mk:22: Unclosed expression, expecting "}" for modifier "On"
	while evaluating variable "NUMBERS" with value "1 2 3 4 5 6 7 8 9 10"
make: varmod-order.mk:24: Unclosed expression, expecting "}" for modifier "Onr"
	while evaluating variable "NUMBERS" with value "10 9 8 7 6 5 4 3 2 1"
make: varmod-order.mk:30: Unknown modifier ":Oxn"
	while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2"
make: varmod-order.mk:39: Unknown modifier ":On_typo"
	while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2"
make: varmod-order.mk:48: Unknown modifier ":Onr_typo"
	while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2"
make: varmod-order.mk:57: Unknown modifier ":Orn_typo"
	while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2"
make: varmod-order.mk:68: Unknown modifier ":Onn"
	while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2"
make: varmod-order.mk:77: Unknown modifier ":Onrr"
	while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2"
make: varmod-order.mk:86: Unknown modifier ":Orrn"
	while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2"
make: Fatal errors encountered -- cannot continue
make: stopped making "all" in unit-tests
exit status 1
@


1.19
log
@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.
@
text
@d5 1
a5 1
make: varmod-order.mk:20: Unclosed expression, expecting '}' for modifier "O"
d7 1
a7 1
make: varmod-order.mk:22: Unclosed expression, expecting '}' for modifier "On"
d9 1
a9 1
make: varmod-order.mk:24: Unclosed expression, expecting '}' for modifier "Onr"
@


1.18
log
@make: let unknown ":O" modifiers fall back to the ":from=to" modifier

Inspired by https://bugs.freebsd.org/285726, which concerns the ":t"
modifier instead.

This means that future extensions to the ":O" modifier must not contain
a "=" anywhere, otherwise they may break existing code.
@
text
@d1 1
a1 1
make: "varmod-order.mk" line 14: Unknown modifier ":OX"
d3 1
a3 1
make: "varmod-order.mk" line 17: Unknown modifier ":OxXX"
d5 1
a5 1
make: "varmod-order.mk" line 20: Unclosed expression, expecting '}' for modifier "O"
d7 1
a7 1
make: "varmod-order.mk" line 22: Unclosed expression, expecting '}' for modifier "On"
d9 1
a9 1
make: "varmod-order.mk" line 24: Unclosed expression, expecting '}' for modifier "Onr"
d11 1
a11 1
make: "varmod-order.mk" line 30: Unknown modifier ":Oxn"
d13 1
a13 1
make: "varmod-order.mk" line 39: Unknown modifier ":On_typo"
d15 1
a15 1
make: "varmod-order.mk" line 48: Unknown modifier ":Onr_typo"
d17 1
a17 1
make: "varmod-order.mk" line 57: Unknown modifier ":Orn_typo"
d19 1
a19 1
make: "varmod-order.mk" line 68: Unknown modifier ":Onn"
d21 1
a21 1
make: "varmod-order.mk" line 77: Unknown modifier ":Onrr"
d23 1
a23 1
make: "varmod-order.mk" line 86: Unknown modifier ":Orrn"
@


1.17
log
@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.
@
text
@d1 1
a1 1
make: "varmod-order.mk" line 14: Bad modifier ":OX"
d3 1
a3 1
make: "varmod-order.mk" line 17: Bad modifier ":OxXX"
d11 1
a11 1
make: "varmod-order.mk" line 30: Bad modifier ":Oxn"
d13 1
a13 1
make: "varmod-order.mk" line 39: Bad modifier ":On_typo"
d15 1
a15 1
make: "varmod-order.mk" line 48: Bad modifier ":Onr_typo"
d17 1
a17 1
make: "varmod-order.mk" line 57: Bad modifier ":Orn_typo"
d19 1
a19 1
make: "varmod-order.mk" line 68: Bad modifier ":Onn"
d21 1
a21 1
make: "varmod-order.mk" line 77: Bad modifier ":Onrr"
d23 1
a23 1
make: "varmod-order.mk" line 86: Bad modifier ":Orrn"
a24 2
make: "varmod-order.mk" line 100: Bad modifier ":On=Off"
	while evaluating variable "SWITCH" with value "On"
@


1.16
log
@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.
@
text
@d11 1
a11 1
make: "varmod-order.mk" line 31: Bad modifier ":Oxn"
d13 1
a13 2
make: "varmod-order.mk" line 31: Malformed conditional '${NUMBERS:Oxn}'
make: "varmod-order.mk" line 41: Bad modifier ":On_typo"
d15 1
a15 2
make: "varmod-order.mk" line 41: Malformed conditional '${NUMBERS:On_typo}'
make: "varmod-order.mk" line 51: Bad modifier ":Onr_typo"
d17 1
a17 2
make: "varmod-order.mk" line 51: Malformed conditional '${NUMBERS:Onr_typo}'
make: "varmod-order.mk" line 61: Bad modifier ":Orn_typo"
d19 1
a19 2
make: "varmod-order.mk" line 61: Malformed conditional '${NUMBERS:Orn_typo}'
make: "varmod-order.mk" line 73: Bad modifier ":Onn"
d21 1
a21 2
make: "varmod-order.mk" line 73: Malformed conditional '${NUMBERS:Onn}'
make: "varmod-order.mk" line 83: Bad modifier ":Onrr"
d23 1
a23 2
make: "varmod-order.mk" line 83: Malformed conditional '${NUMBERS:Onrr}'
make: "varmod-order.mk" line 93: Bad modifier ":Orrn"
d25 1
a25 2
make: "varmod-order.mk" line 93: Malformed conditional '${NUMBERS:Orrn}'
make: "varmod-order.mk" line 108: Bad modifier ":On=Off"
a26 1
make: "varmod-order.mk" line 108: Malformed conditional '${SWITCH:On=Off} != "Off"'
@


1.15
log
@make: in error message about conditionals, use single quotes

Single quotes are used less often in the conditionals themselves, which
leads to fewer confusions.
@
text
@d1 12
a12 6
make: "varmod-order.mk" line 14: while evaluating variable "WORDS" with value "one two three four five six seven eight nine ten": Bad modifier ":OX"
make: "varmod-order.mk" line 17: while evaluating variable "WORDS" with value "one two three four five six seven eight nine ten": Bad modifier ":OxXX"
make: "varmod-order.mk" line 20: while evaluating variable "WORDS" with value "eight five four nine one seven six ten three two": Unclosed expression, expecting '}' for modifier "O"
make: "varmod-order.mk" line 22: while evaluating variable "NUMBERS" with value "1 2 3 4 5 6 7 8 9 10": Unclosed expression, expecting '}' for modifier "On"
make: "varmod-order.mk" line 24: while evaluating variable "NUMBERS" with value "10 9 8 7 6 5 4 3 2 1": Unclosed expression, expecting '}' for modifier "Onr"
make: "varmod-order.mk" line 31: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Oxn"
d14 2
a15 1
make: "varmod-order.mk" line 41: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":On_typo"
d17 2
a18 1
make: "varmod-order.mk" line 51: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Onr_typo"
d20 2
a21 1
make: "varmod-order.mk" line 61: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Orn_typo"
d23 2
a24 1
make: "varmod-order.mk" line 73: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Onn"
d26 2
a27 1
make: "varmod-order.mk" line 83: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Onrr"
d29 2
a30 1
make: "varmod-order.mk" line 93: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Orrn"
d32 2
a33 1
make: "varmod-order.mk" line 108: while evaluating variable "SWITCH" with value "On": Bad modifier ":On=Off"
@


1.14
log
@make: remove wrong error message about an undefined variable
@
text
@d7 1
a7 1
make: "varmod-order.mk" line 31: Malformed conditional (${NUMBERS:Oxn})
d9 1
a9 1
make: "varmod-order.mk" line 41: Malformed conditional (${NUMBERS:On_typo})
d11 1
a11 1
make: "varmod-order.mk" line 51: Malformed conditional (${NUMBERS:Onr_typo})
d13 1
a13 1
make: "varmod-order.mk" line 61: Malformed conditional (${NUMBERS:Orn_typo})
d15 1
a15 1
make: "varmod-order.mk" line 73: Malformed conditional (${NUMBERS:Onn})
d17 1
a17 1
make: "varmod-order.mk" line 83: Malformed conditional (${NUMBERS:Onrr})
d19 1
a19 1
make: "varmod-order.mk" line 93: Malformed conditional (${NUMBERS:Orrn})
d21 1
a21 1
make: "varmod-order.mk" line 108: Malformed conditional (${SWITCH:On=Off} != "Off")
@


1.13
log
@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.
@
text
@d1 21
a21 23
make: "varmod-order.mk" line 17: while evaluating variable "WORDS" with value "one two three four five six seven eight nine ten": Bad modifier ":OX"
make: "varmod-order.mk" line 17: Undefined variable "${WORDS:OX"
make: "varmod-order.mk" line 23: while evaluating variable "WORDS" with value "one two three four five six seven eight nine ten": Bad modifier ":OxXX"
make: "varmod-order.mk" line 23: Undefined variable "${WORDS:Ox"
make: "varmod-order.mk" line 27: while evaluating variable "WORDS" with value "eight five four nine one seven six ten three two": Unclosed expression, expecting '}' for modifier "O"
make: "varmod-order.mk" line 29: while evaluating variable "NUMBERS" with value "1 2 3 4 5 6 7 8 9 10": Unclosed expression, expecting '}' for modifier "On"
make: "varmod-order.mk" line 31: while evaluating variable "NUMBERS" with value "10 9 8 7 6 5 4 3 2 1": Unclosed expression, expecting '}' for modifier "Onr"
make: "varmod-order.mk" line 38: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Oxn"
make: "varmod-order.mk" line 38: Malformed conditional (${NUMBERS:Oxn})
make: "varmod-order.mk" line 48: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":On_typo"
make: "varmod-order.mk" line 48: Malformed conditional (${NUMBERS:On_typo})
make: "varmod-order.mk" line 58: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Onr_typo"
make: "varmod-order.mk" line 58: Malformed conditional (${NUMBERS:Onr_typo})
make: "varmod-order.mk" line 68: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Orn_typo"
make: "varmod-order.mk" line 68: Malformed conditional (${NUMBERS:Orn_typo})
make: "varmod-order.mk" line 80: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Onn"
make: "varmod-order.mk" line 80: Malformed conditional (${NUMBERS:Onn})
make: "varmod-order.mk" line 90: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Onrr"
make: "varmod-order.mk" line 90: Malformed conditional (${NUMBERS:Onrr})
make: "varmod-order.mk" line 100: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Orrn"
make: "varmod-order.mk" line 100: Malformed conditional (${NUMBERS:Orrn})
make: "varmod-order.mk" line 115: while evaluating variable "SWITCH" with value "On": Bad modifier ":On=Off"
make: "varmod-order.mk" line 115: Malformed conditional (${SWITCH:On=Off} != "Off")
@


1.12
log
@tests/make: add expected messages for "Unclosed expression"
@
text
@d5 3
a7 3
make: Unclosed expression, expecting '}' for modifier "O" of variable "WORDS" with value "eight five four nine one seven six ten three two"
make: Unclosed expression, expecting '}' for modifier "On" of variable "NUMBERS" with value "1 2 3 4 5 6 7 8 9 10"
make: Unclosed expression, expecting '}' for modifier "Onr" of variable "NUMBERS" with value "10 9 8 7 6 5 4 3 2 1"
@


1.11
log
@make: on error, print the targets to be made

This helps to understand situations with several nested sub-makes in
varying directories.
@
text
@d8 16
a23 16
make: "varmod-order.mk" line 35: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Oxn"
make: "varmod-order.mk" line 35: Malformed conditional (${NUMBERS:Oxn})
make: "varmod-order.mk" line 45: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":On_typo"
make: "varmod-order.mk" line 45: Malformed conditional (${NUMBERS:On_typo})
make: "varmod-order.mk" line 55: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Onr_typo"
make: "varmod-order.mk" line 55: Malformed conditional (${NUMBERS:Onr_typo})
make: "varmod-order.mk" line 65: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Orn_typo"
make: "varmod-order.mk" line 65: Malformed conditional (${NUMBERS:Orn_typo})
make: "varmod-order.mk" line 77: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Onn"
make: "varmod-order.mk" line 77: Malformed conditional (${NUMBERS:Onn})
make: "varmod-order.mk" line 87: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Onrr"
make: "varmod-order.mk" line 87: Malformed conditional (${NUMBERS:Onrr})
make: "varmod-order.mk" line 97: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Orrn"
make: "varmod-order.mk" line 97: Malformed conditional (${NUMBERS:Orrn})
make: "varmod-order.mk" line 112: while evaluating variable "SWITCH" with value "On": Bad modifier ":On=Off"
make: "varmod-order.mk" line 112: Malformed conditional (${SWITCH:On=Off} != "Off")
@


1.10
log
@make: error out on the "Bad modifier" error message

Previously, the "Bad modifier" error message did not affect make's exit
status.  As a side effect, this kind of error now gets more context
information.
@
text
@d25 1
a25 1
make: stopped in unit-tests
@


1.9
log
@make: replace 'variable expression' with 'expression' in diagnostics
@
text
@d1 4
a4 4
make: Bad modifier ":OX" for variable "WORDS"
make: "varmod-order.mk" line 16: Undefined variable "${WORDS:OX"
make: Bad modifier ":OxXX" for variable "WORDS"
make: "varmod-order.mk" line 21: Undefined variable "${WORDS:Ox"
d8 16
a23 16
make: Bad modifier ":Oxn" for variable "NUMBERS"
make: "varmod-order.mk" line 33: Malformed conditional (${NUMBERS:Oxn})
make: Bad modifier ":On_typo" for variable "NUMBERS"
make: "varmod-order.mk" line 44: Malformed conditional (${NUMBERS:On_typo})
make: Bad modifier ":Onr_typo" for variable "NUMBERS"
make: "varmod-order.mk" line 54: Malformed conditional (${NUMBERS:Onr_typo})
make: Bad modifier ":Orn_typo" for variable "NUMBERS"
make: "varmod-order.mk" line 64: Malformed conditional (${NUMBERS:Orn_typo})
make: Bad modifier ":Onn" for variable "NUMBERS"
make: "varmod-order.mk" line 76: Malformed conditional (${NUMBERS:Onn})
make: Bad modifier ":Onrr" for variable "NUMBERS"
make: "varmod-order.mk" line 86: Malformed conditional (${NUMBERS:Onrr})
make: Bad modifier ":Orrn" for variable "NUMBERS"
make: "varmod-order.mk" line 96: Malformed conditional (${NUMBERS:Orrn})
make: Bad modifier ":On=Off" for variable "SWITCH"
make: "varmod-order.mk" line 111: Malformed conditional (${SWITCH:On=Off} != "Off")
@


1.9.2.1
log
@Sync with HEAD
@
text
@d1 23
a23 24
make: varmod-order.mk:14: Unknown modifier ":OX"
	while evaluating variable "WORDS" with value "one two three four five six seven eight nine ten"
make: varmod-order.mk:17: Unknown modifier ":OxXX"
	while evaluating variable "WORDS" with value "one two three four five six seven eight nine ten"
make: varmod-order.mk:20: Unclosed expression, expecting "}" for modifier "O"
	while evaluating variable "WORDS" with value "eight five four nine one seven six ten three two"
make: varmod-order.mk:22: Unclosed expression, expecting "}" for modifier "On"
	while evaluating variable "NUMBERS" with value "1 2 3 4 5 6 7 8 9 10"
make: varmod-order.mk:24: Unclosed expression, expecting "}" for modifier "Onr"
	while evaluating variable "NUMBERS" with value "10 9 8 7 6 5 4 3 2 1"
make: varmod-order.mk:30: Unknown modifier ":Oxn"
	while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2"
make: varmod-order.mk:39: Unknown modifier ":On_typo"
	while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2"
make: varmod-order.mk:48: Unknown modifier ":Onr_typo"
	while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2"
make: varmod-order.mk:57: Unknown modifier ":Orn_typo"
	while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2"
make: varmod-order.mk:68: Unknown modifier ":Onn"
	while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2"
make: varmod-order.mk:77: Unknown modifier ":Onrr"
	while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2"
make: varmod-order.mk:86: Unknown modifier ":Orrn"
	while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2"
d25 1
a25 1
make: stopped making "all" in unit-tests
@


1.8
log
@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.
@
text
@d5 3
a7 3
make: Unclosed variable expression, expecting '}' for modifier "O" of variable "WORDS" with value "eight five four nine one seven six ten three two"
make: Unclosed variable expression, expecting '}' for modifier "On" of variable "NUMBERS" with value "1 2 3 4 5 6 7 8 9 10"
make: Unclosed variable expression, expecting '}' for modifier "Onr" of variable "NUMBERS" with value "10 9 8 7 6 5 4 3 2 1"
@


1.7
log
@tests/make: describe the absent fallback for ':O' modifiers more clearly
@
text
@d2 1
a2 1
make: "varmod-order.mk" line 14: Undefined variable "${WORDS:OX"
d4 1
a4 1
make: "varmod-order.mk" line 17: Undefined variable "${WORDS:Ox"
d9 1
a9 1
make: "varmod-order.mk" line 29: Malformed conditional (${NUMBERS:Oxn})
d11 1
a11 1
make: "varmod-order.mk" line 39: Malformed conditional (${NUMBERS:On_typo})
d13 1
a13 1
make: "varmod-order.mk" line 48: Malformed conditional (${NUMBERS:Onr_typo})
d15 1
a15 1
make: "varmod-order.mk" line 57: Malformed conditional (${NUMBERS:Orn_typo})
d17 1
a17 1
make: "varmod-order.mk" line 68: Malformed conditional (${NUMBERS:Onn})
d19 1
a19 1
make: "varmod-order.mk" line 77: Malformed conditional (${NUMBERS:Onrr})
d21 1
a21 1
make: "varmod-order.mk" line 86: Malformed conditional (${NUMBERS:Orrn})
d23 1
a23 1
make: "varmod-order.mk" line 100: Malformed conditional (${SWITCH:On=Off} != "Off")
@


1.6
log
@tests/make: extend tests for expression modifiers, especially ':N'
@
text
@d23 1
a23 1
make: "varmod-order.mk" line 96: Malformed conditional (${SWITCH:UOn:On=Off} != "Off")
@


1.5
log
@tests/make: fix test for the variable modifier ':On'

The variable modifier ':On' sorts words numerically.  If these words are
not numeric at all, they get assigned the numeric value 0.  Internally,
':On' uses qsort for sorting the words.  Since qsort is not specified to
use a stable sorting algorithm, the test data must only use words that
either are written in the same way or that are numerically different.

The test varmod-order failed this requirement by trying to numerically
sort a list of non-numeric words.  This led to different results on BSD
and Ubuntu, as could be expected.

To fix the tests, distinguish between words and numbers in the tests.
While here, clean up the tests for all variants of the variable modifier
':O'.

Found by sjg on Ubuntu.
@
text
@d22 2
@


1.4
log
@tests/make: split tests for the variable modifier ':O'

The tests for parse errors are now in varmod-order, which lets the other
tests focus on the desired behavior of the modifiers.
@
text
@d1 7
a7 7
make: Bad modifier ":OX" for variable "NUMBERS"
make: "varmod-order.mk" line 13: Undefined variable "${NUMBERS:OX"
make: Bad modifier ":OxXX" for variable "NUMBERS"
make: "varmod-order.mk" line 16: Undefined variable "${NUMBERS:Ox"
make: Unclosed variable expression, expecting '}' for modifier "O" of variable "NUMBERS" with value "eight five four nine one seven six ten three two"
make: Unclosed variable expression, expecting '}' for modifier "On" of variable "NUMBERS" with value "ten two three four five six seven eight nine one"
make: Unclosed variable expression, expecting '}' for modifier "Onr" of variable "NUMBERS" with value "ten two three four five six seven eight nine one"
d9 1
a9 1
make: "varmod-order.mk" line 28: Malformed conditional (${NUMBERS:Oxn})
d11 1
a11 1
make: "varmod-order.mk" line 38: Malformed conditional (${NUMBERS:On_typo})
d13 1
a13 1
make: "varmod-order.mk" line 47: Malformed conditional (${NUMBERS:Onr_typo})
d15 1
a15 1
make: "varmod-order.mk" line 56: Malformed conditional (${NUMBERS:Orn_typo})
d17 1
a17 1
make: "varmod-order.mk" line 67: Malformed conditional (${NUMBERS:Onn})
d19 1
a19 1
make: "varmod-order.mk" line 76: Malformed conditional (${NUMBERS:Onrr})
d21 1
a21 1
make: "varmod-order.mk" line 85: Malformed conditional (${NUMBERS:Orrn})
@


1.3
log
@make: improve error message for bad modifier in variable expression

The improvement is especially noteable for variable expressions based on
the empty variable, see moderrs.exp:103.
@
text
@d5 17
@


1.2
log
@make(1): move tests for the :Ox modifier into separate file

The test has been extended by ensuring that the shuffled words are still
the same.  Comparing two shuffled lists is probabilistic, but comparing
their sorted results is not, therefore that's completely sensible to do.

When writing this test, by coincidence I discovered how to generate the
"Undefined variable" error message.  Unfortunately, the error message is
wrong since the variable NUMBERS is defined at that point.  In summary,
that error message is shown when it shouldn't, and when it should it is
not shown.  Still, I'm glad that I finally found it.
@
text
@d1 1
a1 1
make: Bad modifier `:OX' for NUMBERS
d3 1
a3 1
make: Bad modifier `:OxXX' for NUMBERS
@


1.1
log
@make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.
@
text
@d1 7
a7 1
exit status 0
@

