1 1.1 rillig # $NetBSD: opt-debug-errors-jobs.mk,v 1.1 2021/04/27 16:20:06 rillig Exp $ 2 1.1 rillig # 3 1.1 rillig # Tests for the -de command line option, which adds debug logging for 4 1.1 rillig # failed commands and targets; since 2021-04-27 also in jobs mode. 5 1.1 rillig 6 1.1 rillig .MAKEFLAGS: -de -j1 7 1.1 rillig 8 1.1 rillig all: fail-spaces 9 1.1 rillig all: fail-escaped-space 10 1.1 rillig all: fail-newline 11 1.1 rillig all: fail-multiline 12 1.1 rillig all: fail-multiline-intention 13 1.1 rillig 14 1.1 rillig fail-spaces: 15 1.1 rillig echo '3 spaces'; false 16 1.1 rillig 17 1.1 rillig fail-escaped-space: 18 1.1 rillig echo \ indented; false 19 1.1 rillig 20 1.1 rillig fail-newline: 21 1.1 rillig echo 'line1${.newline}line2'; false 22 1.1 rillig 23 1.1 rillig # The line continuations in multiline commands are turned into an ordinary 24 1.1 rillig # space before the command is actually run. 25 1.1 rillig fail-multiline: 26 1.1 rillig echo 'line1\ 27 1.1 rillig line2'; false 28 1.1 rillig 29 1.1 rillig # It is a common style to align the continuation backslashes at the right 30 1.1 rillig # of the lines, usually at column 73. All spaces before the continuation 31 1.1 rillig # backslash are preserved and are usually outside a shell word and thus 32 1.1 rillig # irrelevant. Since "usually" is not "always", these space characters are 33 1.1 rillig # not merged into a single space. 34 1.1 rillig fail-multiline-intention: 35 1.1 rillig echo 'word1' \ 36 1.1 rillig 'word2'; false 37