1*9f45a3c8SSimon J. Gerraty# $NetBSD: varname-dot-make-pid.mk,v 1.3 2022/01/23 21:48:59 rillig Exp $ 22c3632d1SSimon J. Gerraty# 3*9f45a3c8SSimon J. Gerraty# Tests for the special .MAKE.PID variable, which contains the process ID of 4*9f45a3c8SSimon J. Gerraty# the make process itself. 52c3632d1SSimon J. Gerraty 6*9f45a3c8SSimon J. Gerraty# The process ID must be a positive integer. 7*9f45a3c8SSimon J. Gerraty.if ${.MAKE.PID:C,[0-9],,g} != "" 8*9f45a3c8SSimon J. Gerraty. error 9*9f45a3c8SSimon J. Gerraty.elif !(${.MAKE.PID} > 0) 10*9f45a3c8SSimon J. Gerraty. error 11*9f45a3c8SSimon J. Gerraty.endif 122c3632d1SSimon J. Gerraty 13*9f45a3c8SSimon J. Gerraty# Ensure that the process exists. 14*9f45a3c8SSimon J. Gerraty_!= kill -0 ${.MAKE.PID} 15*9f45a3c8SSimon J. Gerraty 16*9f45a3c8SSimon J. Gerratyall: .PHONY 17