pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/tools Use bsd.tools.mk to generate the wrapper scri...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e873d521053a
branches:  trunk
changeset: 492975:e873d521053a
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sun Apr 24 04:34:34 2005 +0000

description:
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:

 mk/tools/rpcgen.mk |  26 +++++++++-----------------
 1 files changed, 9 insertions(+), 17 deletions(-)

diffs (44 lines):

diff -r 2877e0e7ce87 -r e873d521053a mk/tools/rpcgen.mk
--- a/mk/tools/rpcgen.mk        Sun Apr 24 03:59:44 2005 +0000
+++ b/mk/tools/rpcgen.mk        Sun Apr 24 04:34:34 2005 +0000
@@ -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 @@
 .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



Home | Main Index | Thread Index | Old Index