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