head	1.6;
access;
symbols
	netbsd-11-0-RC6:1.6
	netbsd-11-0-RC5:1.6
	netbsd-11-0-RC4:1.6
	netbsd-11-0-RC3:1.6
	netbsd-11-0-RC2:1.6
	netbsd-11-0-RC1:1.6
	perseant-exfatfs-base-20250801:1.6
	netbsd-11:1.6.0.2
	netbsd-11-base:1.6
	netbsd-10-1-RELEASE:1.3
	perseant-exfatfs-base-20240630:1.3
	perseant-exfatfs:1.3.0.4
	perseant-exfatfs-base:1.3
	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.2
	netbsd-10-base:1.3
	cjep_sun2x-base1:1.1
	cjep_sun2x:1.1.0.4
	cjep_sun2x-base:1.1
	cjep_staticlib_x-base1:1.1
	cjep_staticlib_x:1.1.0.2
	cjep_staticlib_x-base:1.1;
locks; strict;
comment	@# @;


1.6
date	2025.03.30.09.51.50;	author rillig;	state Exp;
branches;
next	1.5;
commitid	veGmSzVhPiW2G4PF;

1.5
date	2025.01.11.21.21.33;	author rillig;	state Exp;
branches;
next	1.4;
commitid	NtFvbDJHnW9G17FF;

1.4
date	2025.01.10.23.00.38;	author rillig;	state Exp;
branches;
next	1.3;
commitid	vECOnwAU0SdlAZEF;

1.3
date	2022.03.26.14.34.07;	author rillig;	state Exp;
branches
	1.3.4.1;
next	1.2;
commitid	bA2GMsf46REOCJxD;

1.2
date	2022.01.23.16.09.38;	author rillig;	state Exp;
branches;
next	1.1;
commitid	55UrqaZMiBo29MpD;

1.1
date	2020.09.05.06.20.51;	author rillig;	state Exp;
branches;
next	;
commitid	HozN7dA72dMV7PmC;

1.3.4.1
date	2025.08.02.05.58.36;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;


desc
@@


1.6
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
@Global: ASSIGNED = value
Global: SUBST = # (empty)
Global: SUBST = value
Var_Parse: y(ASSIGNED) (eval)
Var_Parse: $U (eval-defined-loud)
make: opt-debug-var.mk:34: Variable "U" is undefined
Var_Parse: $< (eval-defined-loud)
make: opt-debug-var.mk:40: Variable "<" is undefined
Global: .MAKEFLAGS =  -r -k -d v -d
Global: .MAKEFLAGS =  -r -k -d v -d 0
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
@


1.5
log
@make: replace "Malformed conditional" with "Variable is undefined"

Evaluating a conditional such as ".if ${UNDEF}" produced a "Malformed
conditional" error, even though the form of the conditional was correct,
it was the content of the variable that was wrong.

Replace this message with the more accurate "Variable is undefined",
revealing which of the possibly many variables is actually undefined.
@
text
@d6 1
a6 1
make: "opt-debug-var.mk" line 34: Variable "U" is undefined
d8 1
a8 1
make: "opt-debug-var.mk" line 40: Variable "<" is undefined
@


1.4
log
@tests/make: test expressions based on undefined variables

When an undefined variable is used in a conditional, make complains about
"Malformed conditional", which is wrong since the conditional is
well-formed but errors out during evaluation.

In order to fix this wrong error message and preserve the remaining
behavior, cover the places in which an expression is evaluated with
undefined expressions being an error (VARE_EVAL_DEFINED), but with
neither producing an error message nor handling errors.  This combination
results in the same behavior as evaluating the expressions in the mode
that allows undefined variables to be used in expressions.
@
text
@d5 4
a8 4
Var_Parse: $U (eval-defined)
make: "opt-debug-var.mk" line 35: Malformed conditional '$U'
Var_Parse: $< (eval-defined)
make: "opt-debug-var.mk" line 42: Malformed conditional '$<'
@


1.3
log
@make: avoid trailing whitespace in debug log for variables

Since trailing whitespace is invisible, describe the variable value in
words to make it visible.
@
text
@d5 4
d11 3
a13 1
exit status 0
@


1.3.4.1
log
@Sync with HEAD
@
text
@a4 4
Var_Parse: $U (eval-defined-loud)
make: opt-debug-var.mk:34: Variable "U" is undefined
Var_Parse: $< (eval-defined-loud)
make: opt-debug-var.mk:40: Variable "<" is undefined
d7 1
a7 3
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
@


1.2
log
@tests/make: extend test suite, move old tests to 2020 scheme

The tests from envfirst.mk are now in opt-env.mk.
The tests from modword.mk are now in varmod-select-words.mk.
@
text
@d2 1
a2 1
Global: SUBST = 
@


1.1
log
@make(1): add tests for each debug option
@
text
@d1 6
@

