956e45f6fb
Lots of new unit-tests increase code coverage. Lots of refactoring, cleanup and simlpification to reduce code size. Fixes for Bug 223564 and 245807 Updates to dirdeps.mk and meta2deps.py
24 lines
622 B
Makefile
24 lines
622 B
Makefile
# $NetBSD: varname-dot-newline.mk,v 1.4 2020/10/24 08:46:08 rillig Exp $
|
|
#
|
|
# Tests for the special .newline variable.
|
|
#
|
|
# Contrary to the special variable named "" that is used in expressions like
|
|
# ${:Usome-value}, the variable ".newline" is not protected against
|
|
# modification. Nobody exploits that though.
|
|
|
|
NEWLINE:= ${.newline}
|
|
|
|
.newline= overwritten
|
|
|
|
.if ${.newline} == ${NEWLINE}
|
|
. info The .newline variable cannot be overwritten. Good.
|
|
.else
|
|
. info The .newline variable can be overwritten. Just don't do that.
|
|
.endif
|
|
|
|
# Restore the original value.
|
|
.newline= ${NEWLINE}
|
|
|
|
all:
|
|
@echo 'first${.newline}second'
|