diff options
author | rillig <rillig@pkgsrc.org> | 2005-05-14 22:33:27 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-05-14 22:33:27 +0000 |
commit | 34a68c86671548add8f8cac469c1b4a518c42cf0 (patch) | |
tree | dbca8302e7f2932899d77e1c9f4e43f81d7f6aaa /doc | |
parent | 380f32d1554114a0659b48b6343c3dda24a2b629 (diff) | |
download | pkgsrc-34a68c86671548add8f8cac469c1b4a518c42cf0.tar.gz |
Added a "detab" target that replaces <tab> characters inside the
<programlisting> tag with an appropriate number of space characters.
This is needed for TeX.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/guide/Makefile | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/doc/guide/Makefile b/doc/guide/Makefile index da5ae687baf..66ba2e6394e 100644 --- a/doc/guide/Makefile +++ b/doc/guide/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2005/05/07 22:40:25 wiz Exp $ +# $NetBSD: Makefile,v 1.11 2005/05/14 22:33:27 rillig Exp $ # DISTNAME= htdocs-share-20050507 @@ -112,4 +112,20 @@ install-htdocs: build do-lint: cd ${WRKSRC} ; ${MAKE} lint +DETAB_PROGRAM= \ + if (/<programlisting>/ .. /<\/programlisting>/) { \ + while (/(.*?)\t(.*)/s) { \ + my $$filler = " " x (8 - (length($$1) % 8)); \ + $$_ = "$$1$$filler$$2"; \ + } \ + } + +# remove tabulators from the <programlisting> tags. +# TeX does not like them. +.PHONY: detab +detab: + cd ${FILESDIR}; \ + perl -p -i ".detab.tmp" -e '${DETAB_PROGRAM}' *.xml; \ + ${RM} -f *.xml.detab.tmp + .include "../../mk/bsd.pkg.mk" |