head	1.11;
access;
symbols
	netbsd-11-0-RC4:1.10
	netbsd-11-0-RC3:1.10
	netbsd-11-0-RC2:1.10
	netbsd-11-0-RC1:1.10
	perseant-exfatfs-base-20250801:1.10
	netbsd-11:1.10.0.2
	netbsd-11-base:1.10
	netbsd-10-1-RELEASE:1.3
	perseant-exfatfs-base-20240630:1.4
	perseant-exfatfs:1.4.0.2
	perseant-exfatfs-base:1.4
	netbsd-10-0-RELEASE:1.3
	netbsd-10-0-RC6:1.3
	netbsd-10-0-RC5:1.3
	netbsd-10-0-RC4:1.3
	netbsd-10-0-RC3:1.3
	netbsd-10-0-RC2:1.3
	netbsd-10-0-RC1:1.3
	netbsd-10:1.3.0.6
	netbsd-10-base:1.3
	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.11
date	2026.02.01.16.42.35;	author rillig;	state Exp;
branches;
next	1.10;
commitid	QDTzAMUxdyOj5HsG;

1.10
date	2025.03.29.19.08.52;	author rillig;	state Exp;
branches;
next	1.9;
commitid	y95n9TsA04p0PZOF;

1.9
date	2025.03.29.10.39.49;	author rillig;	state Exp;
branches;
next	1.8;
commitid	22Yp9aLGm4mSZWOF;

1.8
date	2024.08.29.20.20.36;	author rillig;	state Exp;
branches;
next	1.7;
commitid	EaMgk7FrF8mB1LnF;

1.7
date	2024.07.20.11.05.12;	author rillig;	state Exp;
branches;
next	1.6;
commitid	Bey1UaNE0WVGeziF;

1.6
date	2024.07.09.19.43.01;	author rillig;	state Exp;
branches;
next	1.5;
commitid	qrdgBafp1onZqchF;

1.5
date	2024.07.04.17.47.54;	author rillig;	state Exp;
branches;
next	1.4;
commitid	mjDGVMgldk7QYxgF;

1.4
date	2024.04.20.10.18.55;	author rillig;	state Exp;
branches
	1.4.2.1;
next	1.3;
commitid	2fCjOO5HMlf2VR6F;

1.3
date	2021.02.23.15.19.41;	author rillig;	state Exp;
branches;
next	1.2;
commitid	wGJlKlrQTIQeBQIC;

1.2
date	2020.08.23.15.13.21;	author rillig;	state Exp;
branches;
next	1.1;
commitid	ZRXUa0Z7hEKBuclC;

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

1.4.2.1
date	2025.08.02.05.58.38;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;


desc
@@


1.11
log
@make: in stack traces, add location information for targets
@
text
@make: Unknown modifier ":has"
	while evaluating variable "12345" with value "12345"
	in command "@@echo ${12345:L:has}			# modifier name too short"
	in target "step-1" from varmod-hash.mk:61
26bb0f5f
12345
make: Unknown modifier ":hasX"
	while evaluating variable "12345" with value "12345"
	in command "@@echo ${12345:L:hasX}			# misspelled"
	in target "step-4" from varmod-hash.mk:67
make: Unknown modifier ":hashed"
	while evaluating variable "12345" with value "12345"
	in command "@@echo ${12345:L:hashed}			# modifier name too long"
	in target "step-5" from varmod-hash.mk:69
exit status 2
@


1.10
log
@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".
@
text
@d4 1
a4 1
	in target "step-1"
d10 1
a10 1
	in target "step-4"
d14 1
a14 1
	in target "step-5"
@


1.9
log
@make: in stack traces from target commands, add the command level

A target can contain several commands, and these commands are likely to
contain the same expressions. To distinguish them, add one more line to
the stack trace, to narrow down the source of the error.
@
text
@d1 1
a1 1
make: Unknown modifier "has"
d7 1
a7 1
make: Unknown modifier "hasX"
d11 1
a11 1
make: Unknown modifier "hashed"
@


1.8
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
@d3 1
d9 1
d13 1
@


1.7
log
@make: don't run erroneous commands in compat mode

When there is a parse or evaluation error in an expression that becomes
part of the command, don't run that command, as the result of the failed
evaluation typically contains garbage characters. Skip the remaining
commands from that target as well, as they may depend on the erroneous
command.
@
text
@d1 3
a3 1
make: in target "step-1": while evaluating variable "12345" with value "12345": Unknown modifier "has"
d6 6
a11 2
make: in target "step-4": while evaluating variable "12345" with value "12345": Unknown modifier "hasX"
make: in target "step-5": while evaluating variable "12345" with value "12345": Unknown modifier "hashed"
@


1.6
log
@make: error out on parse/evaluation errors in shell commands

The expression ${VAR:X} has an unknown modifier ':X'.  Previously, this
expression errored out when the expression was evaluated at parse time,
but not when the expression was evaluated when generating the commands
to bring a target up to date.  The errors were previously reported, they
didn't affect the exit status, though.

Now, errors in expressions are handled in the same way, regardless of
the time at which they are evaluated.
@
text
@d1 1
a1 2
make: in target "all": while evaluating variable "12345" with value "12345": Unknown modifier "has"

d4 2
a5 4
make: in target "all": while evaluating variable "12345" with value "12345": Unknown modifier "hasX"

make: in target "all": while evaluating variable "12345" with value "12345": Unknown modifier "hashed"

@


1.5
log
@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.
@
text
@d9 1
a9 1
exit status 0
@


1.4
log
@make: provide more context information for parse/evaluate errors
@
text
@d1 1
a1 1
make: in target "all": while evaluating variable "12345": Unknown modifier "has"
d5 1
a5 1
make: in target "all": while evaluating variable "12345": Unknown modifier "hasX"
d7 1
a7 1
make: in target "all": while evaluating variable "12345": Unknown modifier "hashed"
@


1.4.2.1
log
@Sync with HEAD
@
text
@d1 2
a2 4
make: Unknown modifier ":has"
	while evaluating variable "12345" with value "12345"
	in command "@@echo ${12345:L:has}			# modifier name too short"
	in target "step-1"
d5 5
a9 9
make: Unknown modifier ":hasX"
	while evaluating variable "12345" with value "12345"
	in command "@@echo ${12345:L:hasX}			# misspelled"
	in target "step-4"
make: Unknown modifier ":hashed"
	while evaluating variable "12345" with value "12345"
	in command "@@echo ${12345:L:hashed}			# modifier name too long"
	in target "step-5"
exit status 2
@


1.3
log
@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.
@
text
@d1 1
a1 1
make: Unknown modifier "has"
d5 1
a5 1
make: Unknown modifier "hasX"
d7 1
a7 1
make: Unknown modifier "hashed"
@


1.2
log
@make(1): move tests for :hash :range :localtime into separate files
@
text
@d1 1
a1 1
make: Unknown modifier 'h'
d5 1
a5 1
make: Unknown modifier 'h'
d7 1
a7 1
make: Unknown modifier 'h'
@


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 8
@

