From b6499748aef71ac3bfaa464ce1df51a403bb33ff Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 1 Nov 2001 15:03:07 +0000 Subject: Be smarter about finding rpcgen's absolute path; only do it if ${RPCGEN} (when evaluated) does not start with a /. Also don't go through a make(1) recursion step; just use !=. --- include/rpc/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/rpc/Makefile b/include/rpc/Makefile index 86541946a34..02f8bf1674b 100644 --- a/include/rpc/Makefile +++ b/include/rpc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2001/10/31 20:58:28 tv Exp $ +# $NetBSD: Makefile,v 1.8 2001/11/01 15:03:08 tv Exp $ # INCS= auth.h auth_unix.h clnt.h clnt_soc.h nettype.h \ @@ -12,5 +12,11 @@ INCSDIR= /usr/include/rpc .include -rpcb_prot.h: rpcb_prot.x ${RPCGEN} +# Resolve rpcgen's path, to allow it to be a dependency. +_RPCGEN:= ${RPCGEN} +.if ${_RPCGEN:M/*} == "" +_RPCGEN!= type ${RPCGEN} | awk '{print $$NF}' +.endif + +rpcb_prot.h: rpcb_prot.x ${_RPCGEN} ${RPCGEN} -C -h ${.CURDIR}/rpcb_prot.x -o ${.TARGET} -- cgit