Sun Dec 6 19:00:48 2020 UTC ()
make(1): test parsing a makefile that ends in a backslash


(rillig)
diff -r1.1 -r1.2 src/usr.bin/make/unit-tests/opt-file.exp
diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/opt-file.mk

cvs diff -r1.1 -r1.2 src/usr.bin/make/unit-tests/opt-file.exp (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/opt-file.exp 2020/08/16 12:07:51 1.1
+++ src/usr.bin/make/unit-tests/opt-file.exp 2020/12/06 19:00:48 1.2

cvs diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/opt-file.mk (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/opt-file.mk 2020/08/16 14:25:16 1.2
+++ src/usr.bin/make/unit-tests/opt-file.mk 2020/12/06 19:00:48 1.3
@@ -1,8 +1,17 @@ @@ -1,8 +1,17 @@
1# $NetBSD: opt-file.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $ 1# $NetBSD: opt-file.mk,v 1.3 2020/12/06 19:00:48 rillig Exp $
2# 2#
3# Tests for the -f command line option. 3# Tests for the -f command line option.
4 4
5# TODO: Implementation 5# TODO: Implementation
6 6
 7all: .PHONY file-ending-in-backslash
 8
 9# Passing '-' as the filename reads from stdin. This is unusual but possible.
 10#
 11# In the unlikely case where a file ends in a backslash instead of a newline,
 12# that backslash is trimmed. See ParseGetLine.
 13file-ending-in-backslash: .PHONY
 14 @printf '%s' 'VAR=value\' | ${MAKE} -r -f - -v VAR
 15
7all: 16all:
8 @:; 17 @:;