diff options
author | jlam <jlam@pkgsrc.org> | 2004-07-21 19:55:11 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-07-21 19:55:11 +0000 |
commit | cac0c549c0fe944eeade844e770018573b1e0983 (patch) | |
tree | f3c94692f5f55aab969d7252fae579f6634ed374 /mk/tools.mk | |
parent | c2dbace2b69bbd21052d73afc07088b9c4901f3a (diff) | |
download | pkgsrc-cac0c549c0fe944eeade844e770018573b1e0983.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 |