"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "unit-tests/escape.mk" between
bmake-20201101.tar.gz and bmake-20201117.tar.gz

About: bmake a BSD make tool (derived from NetBSD’s make).

escape.mk  (bmake-20201101):escape.mk  (bmake-20201117)
# $NetBSD: escape.mk,v 1.13 2020/10/24 08:50:17 rillig Exp $ # $NetBSD: escape.mk,v 1.14 2020/11/03 17:38:45 rillig Exp $
# #
# Test backslash escaping. # Test backslash escaping.
# Extracts from the POSIX 2008 specification # Extracts from the POSIX 2008 specification
# <http://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html>: # <http://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html>:
# #
# Comments start with a <number-sign> ( '#' ) and continue until an # Comments start with a <number-sign> ( '#' ) and continue until an
# unescaped <newline> is reached. # unescaped <newline> is reached.
# #
# When an escaped <newline> (one preceded by a <backslash>) is found # When an escaped <newline> (one preceded by a <backslash>) is found
skipping to change at line 190 skipping to change at line 190
many spaces and tabs [ ] on second line many spaces and tabs [ ] on second line
all: var-1bsnl-space all: var-1bsnl-space
var-1bsnl-space: .PHONY __printvars \ var-1bsnl-space: .PHONY __printvars \
VAR1BSNL00 VAR1BSNL0 VAR1BSNLs VAR1BSNLss VAR1BSNLt VAR1BSNLtt \ VAR1BSNL00 VAR1BSNL0 VAR1BSNLs VAR1BSNLss VAR1BSNLt VAR1BSNLtt \
VAR1BSNLxx VAR1BSNLxx
# Backslash-newline in a command is retained. # Backslash-newline in a command is retained.
# #
# The "#" in "# second line without space" makes it a comment instead # The "#" in "# second line without space" makes it a comment instead
# of a syntax error if the preceding line is parsed incorretly. # of a syntax error if the preceding line is parsed incorrectly.
# The ":" in "third line':" makes it look like the start of a # The ":" in "third line':" makes it look like the start of a
# target instead of a syntax error if the first line is parsed incorrectly. # target instead of a syntax error if the first line is parsed incorrectly.
# #
all: cmd-1bsnl all: cmd-1bsnl
cmd-1bsnl: .PHONY cmd-1bsnl: .PHONY
@echo ${.TARGET} @echo ${.TARGET}
echo :'first line\ echo :'first line\
#second line without space\ #second line without space\
third line': third line':
echo :'first line\ echo :'first line\
skipping to change at line 223 skipping to change at line 223
@echo ${.TARGET} @echo ${.TARGET}
echo :'command ending with backslash-newline'; \ echo :'command ending with backslash-newline'; \
# above line must be blank # above line must be blank
# Double-backslash-newline in a command. # Double-backslash-newline in a command.
# Both backslashes are retained, but the newline is not escaped. # Both backslashes are retained, but the newline is not escaped.
# XXX: This may differ from POSIX, but matches gmake. # XXX: This may differ from POSIX, but matches gmake.
# #
# When make passes two backslashes to the shell, the shell will pass one # When make passes two backslashes to the shell, the shell will pass one
# backslash to the echo commant. # backslash to the echo command.
# #
all: cmd-2bsnl all: cmd-2bsnl
cmd-2bsnl: .PHONY cmd-2bsnl: .PHONY
@echo ${.TARGET} @echo ${.TARGET}
echo take one\\ echo take one\\
# this should be a comment # this should be a comment
echo take two\\ echo take two\\
echo take three\\ echo take three\\
# Triple-backslash-newline in a command is retained. # Triple-backslash-newline in a command is retained.
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)