varmod-sun-shell.mk revision 1.2
11.2Srillig# $NetBSD: varmod-sun-shell.mk,v 1.2 2022/01/10 20:32:29 rillig Exp $
21.1Srillig#
31.1Srillig# Tests for the :sh variable modifier, which runs the shell command
41.1Srillig# given by the variable value and returns its output.
51.1Srillig#
61.1Srillig# This modifier has been added on 1996-05-29.
71.1Srillig#
81.1Srillig# See also:
91.1Srillig#	ApplyModifier_SunShell
101.1Srillig
111.1Srillig.if ${echo word:L:sh} != "word"
121.1Srillig.  error
131.1Srillig.endif
141.1Srillig
151.1Srillig# If the command exits with non-zero, an error message is printed.
161.1Srillig# XXX: Processing continues as usual though.
171.1Srillig.if ${echo word; false:L:sh} != "word"
181.1Srillig.  error
191.1Srillig.endif
201.1Srillig
211.2Srillig
221.2Srillig.MAKEFLAGS: -dv			# to see the actual command
231.2Srillig_:=	${echo word; ${:Ufalse}:L:sh}
241.2Srillig.MAKEFLAGS: -d0
251.2Srillig
261.1Srilligall:
27