2022-01-23 00:50:41 +03:00
|
|
|
# $NetBSD: deptgt-error.mk,v 1.4 2022/01/22 21:50:41 rillig Exp $
|
2020-08-16 15:07:50 +03:00
|
|
|
#
|
2020-11-15 23:20:58 +03:00
|
|
|
# Tests for the special target .ERROR in dependency declarations, which
|
2022-01-23 00:50:41 +03:00
|
|
|
# is made when another target fails.
|
2020-08-16 15:07:50 +03:00
|
|
|
|
2022-01-23 00:50:41 +03:00
|
|
|
all: .PHONY
|
|
|
|
false fails
|
2020-08-16 15:07:50 +03:00
|
|
|
|
2022-01-23 00:50:41 +03: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'.
|