2022-02-05 20:03:50 +00:00
|
|
|
# $NetBSD: deptgt-error.mk,v 1.4 2022/01/22 21:50:41 rillig Exp $
|
2020-09-05 16:11:04 +00:00
|
|
|
#
|
2020-11-20 03:54:37 +00:00
|
|
|
# Tests for the special target .ERROR in dependency declarations, which
|
2022-02-05 20:03:50 +00:00
|
|
|
# is made when another target fails.
|
2020-09-05 16:11:04 +00:00
|
|
|
|
2022-02-05 20:03:50 +00:00
|
|
|
all: .PHONY
|
|
|
|
false fails
|
2020-09-05 16:11:04 +00:00
|
|
|
|
2022-02-05 20:03:50 +00:00
|
|
|
.ERROR:
|
|
|
|
@echo 'Making ${.TARGET} out of nothing.'
|
|
|
|
|
|
|
|
.ERROR: sub-error
|
|
|
|
sub-error: .PHONY
|
|
|
|
@echo 'Making ${.TARGET} as prerequisite.'
|
|
|
|
|
|
|
|
# Before making the '.ERROR' target, these variable values are printed.
|
|
|
|
MAKE_PRINT_VAR_ON_ERROR= ERROR_INFO
|
|
|
|
|
|
|
|
# Use single quotes to demonstrate that the output is only informational, it
|
|
|
|
# does not use any established escaping mechanism.
|
|
|
|
ERROR_INFO= This information is ${:Uprinted} on 'errors'.
|