2022-02-05 20:03:50 +00:00
|
|
|
# $NetBSD: varname-dot-make-pid.mk,v 1.3 2022/01/23 21:48:59 rillig Exp $
|
2020-09-05 16:11:04 +00:00
|
|
|
#
|
2022-02-05 20:03:50 +00:00
|
|
|
# Tests for the special .MAKE.PID variable, which contains the process ID of
|
|
|
|
# the make process itself.
|
2020-09-05 16:11:04 +00:00
|
|
|
|
2022-02-05 20:03:50 +00:00
|
|
|
# The process ID must be a positive integer.
|
|
|
|
.if ${.MAKE.PID:C,[0-9],,g} != ""
|
|
|
|
. error
|
|
|
|
.elif !(${.MAKE.PID} > 0)
|
|
|
|
. error
|
|
|
|
.endif
|
2020-09-05 16:11:04 +00:00
|
|
|
|
2022-02-05 20:03:50 +00:00
|
|
|
# Ensure that the process exists.
|
|
|
|
_!= kill -0 ${.MAKE.PID}
|
|
|
|
|
|
|
|
all: .PHONY
|