bf988a5d2f
This makes it easier to track down where a warning or an error originated from. This information could be further enriched for .for loops, to also include the variable names and their values. For now, it's good enough to replace the large comment describing how a stack trace _could_ be generated with actual code that implements that idea. The syntax of the locations is <filename>:<lineno>, which intentionally differs from the traditional "<filename>" line <lineno>, since the former is more widely supported by editors and IDEs. Having this stacktrace information is especially intended for complicated systems built upon make, such as pkgsrc.
10 lines
222 B
Makefile
10 lines
222 B
Makefile
# $NetBSD: include-subsub.mk,v 1.4 2021/01/26 23:44:56 rillig Exp $
|
|
|
|
.if ${.INCLUDEDFROMFILE} == "include-sub.mk"
|
|
.MAKEFLAGS: -dp
|
|
. info subsub-ok
|
|
.MAKEFLAGS: -d0
|
|
.else
|
|
. warning subsub-fail(${.INCLUDEDFROMFILE})
|
|
.endif
|