summaryrefslogtreecommitdiff
path: root/mk/tools/rpcgen.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-04-24 04:34:34 +0000
committerjlam <jlam@pkgsrc.org>2005-04-24 04:34:34 +0000
commit1ce0bfab8015d023efe600a40f06d022067ef5af (patch)
tree2fe3f168f81351975060205a0130d8934dbd13e2 /mk/tools/rpcgen.mk
parentf11ddc9186354aaf3312b1190685934b9bbbf42e (diff)
downloadpkgsrc-1ce0bfab8015d023efe600a40f06d022067ef5af.tar.gz
Use bsd.tools.mk to generate the wrapper script. Also, TOOLS_EXECDIRS
is no more, so search for rpcgen in /bin, /sbin, /usr/bin, and /usr/sbin.
Diffstat (limited to 'mk/tools/rpcgen.mk')
-rw-r--r--mk/tools/rpcgen.mk26
1 files changed, 9 insertions, 17 deletions
diff --git a/mk/tools/rpcgen.mk b/mk/tools/rpcgen.mk
index 37228484d2e..8842f1ca73a 100644
--- a/mk/tools/rpcgen.mk
+++ b/mk/tools/rpcgen.mk
@@ -1,11 +1,12 @@
-# $NetBSD: rpcgen.mk,v 1.1 2005/04/15 00:00:21 jlam Exp $
+# $NetBSD: rpcgen.mk,v 1.2 2005/04/24 04:34:34 jlam Exp $
# Create an rpcgen script that correctly sets the CPP environment
# variable to a stat(2)able path to a C preprocessor, then invokes
# the real rpcgen.
#
+TOOLS_WRAP+= rpcgen
.if !defined(TOOLS_REAL_CMD.rpcgen)
-TOOLS_EXECDIRS.rpcgen?= ${TOOLS_EXECDIRS}
+TOOLS_EXECDIRS.rpcgen?= /bin /sbin /usr/bin /usr/sbin
. for _d_ in ${TOOLS_EXECDIRS.rpcgen}
. if exists(${_d_}/rpcgen)
TOOLS_REAL_CMD.rpcgen?= ${_d_}/rpcgen
@@ -18,19 +19,10 @@ TOOLS_CMD.rpcgen= ${TOOLS_DIR}/bin/rpcgen
.if ${OPSYS} == "NetBSD"
TOOLS_ARGS.rpcgen?= -b
.endif
-RPCGEN?= rpcgen
+TOOLS_REAL_CMDLINE.rpcgen= \
+ CPP=${WRAPPER_BINDIR:Q}/cpp ${TOOLS_REAL_CMD.rpcgen} ${TOOLS_ARGS.rpcgen}
-.if !target(${TOOLS_CMD.rpcgen})
-override-tools: ${TOOLS_CMD.rpcgen}
-${TOOLS_CMD.rpcgen}:
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG} \
- ( ${ECHO} '#!'${TOOLS_SHELL:Q}; \
- ${ECHO} 'wrapperlog="$${TOOLS_WRAPPER_LOG-'${_TOOLS_WRAP_LOG:Q}'}"'; \
- ${ECHO} 'CPP='${WRAPPER_BINDIR:Q}'/cpp"; export CPP'; \
- ${ECHO} '${ECHO} "[*] '${TOOLS_CMD.rpcgen:Q}' $$*" >> $$wrapperlog'; \
- ${ECHO} '${ECHO} "<.> '${TOOLS_REAL_CMD.rpcgen:Q} ${TOOLS_ARGS.rpcgen:Q}' $$*" >> $$wrapperlog'; \
- ${ECHO} ${TOOLS_REAL_CMD.rpcgen:Q} ${TOOLS_ARGS.rpcgen:Q} '"$$@"'; \
- ) > ${.TARGET}
- ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET}
-.endif
+# Make ${RPCGEN} call the "rpcgen" through the PATH, which should find
+# the rpcgen tool wrapper.
+#
+RPCGEN?= rpcgen