diff options
author | jlam <jlam> | 2004-07-21 19:55:11 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-07-21 19:55:11 +0000 |
commit | 38a5601a02efa68903c62356bc3400967a010dab (patch) | |
tree | f3c94692f5f55aab969d7252fae579f6634ed374 /mk/tools.mk | |
parent | 1188fa5ab4433ece21541c1d8eedbff6610cec7f (diff) | |
download | pkgsrc-38a5601a02efa68903c62356bc3400967a010dab.tar.gz |
If a package Makefile sets USE_TBL to "yes", then add "tbl" to
${TOOLS_DIR}/bin. It will either point to /usr/bin/tbl or will depend
on groff otherwise.
This should allow removing dependencies on groff just for the sake of
forcing the existence of tbl.
Diffstat (limited to 'mk/tools.mk')
-rw-r--r-- | mk/tools.mk | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/mk/tools.mk b/mk/tools.mk index 9f885a0337c..c40d9b3177b 100644 --- a/mk/tools.mk +++ b/mk/tools.mk @@ -1,4 +1,4 @@ -# $NetBSD: tools.mk,v 1.35 2004/06/15 13:41:43 grant Exp $ +# $NetBSD: tools.mk,v 1.36 2004/07/21 19:55:11 jlam Exp $ # # This Makefile creates a ${TOOLS_DIR} directory and populates the bin # subdir with tools that hide the ones outside of ${TOOLS_DIR}. @@ -384,4 +384,25 @@ ${TOOLS_DIR}/bin/make: fi .endif +.if defined(USE_TBL) && !empty(USE_TBL:M[yY][eE][sS]) +. if exists(/usr/bin/tbl) +_TOOLS_PROGNAME.tbl= /usr/bin/tbl +. else +BUILD_DEPENDS+= groff>=1.19nb4:../../textproc/groff +_TOOLS_PROGNAME.tbl= ${LOCALBASE}/bin/tbl +. endif +. if exists(_TOOLS_PROGNAME.tbl) +TBL:= ${_TOOLS_PROGNAME.tbl} +. endif + +override-tools: ${TOOLS_DIR}/bin/tbl +${TOOLS_DIR}/bin/tbl: + ${_PKG_SILENT}${_PKG_DEBUG} \ + src="${_TOOLS_PROGNAME.tbl}"; \ + if [ -x $$src -a ! -f ${.TARGET} ]; then \ + ${MKDIR} ${.TARGET:H}; \ + ${LN} -sf $$src ${.TARGET}; \ + fi +.endif # USE_TBL + .endif # TOOLS_MK |