summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authortv <tv@NetBSD.org>2001-11-01 15:03:07 +0000
committertv <tv@NetBSD.org>2001-11-01 15:03:07 +0000
commitb6499748aef71ac3bfaa464ce1df51a403bb33ff (patch)
treeb17b5765c59d0183378f41bb282fe23e8af9ef7b /include
parent7a726f828b2cdefe5eca0fa473e10d3cfc55eaa7 (diff)
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 !=.
Diffstat (limited to 'include')
-rw-r--r--include/rpc/Makefile10
1 files changed, 8 insertions, 2 deletions
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 <bsd.prog.mk>
-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}