summaryrefslogtreecommitdiffstats
path: root/share/mk
diff options
context:
space:
mode:
authorwosch <wosch@FreeBSD.org>1997-05-25 12:43:06 +0000
committerwosch <wosch@FreeBSD.org>1997-05-25 12:43:06 +0000
commite5a710386c043e73b2595218f08665bc1dac1c7f (patch)
tree21eb86518203cb69f1247e826c7ec1400cf27618 /share/mk
parent1a09a08af98165c92cecddbb94b18714d1ac9b44 (diff)
downloadFreeBSD-src-e5a710386c043e73b2595218f08665bc1dac1c7f.zip
FreeBSD-src-e5a710386c043e73b2595218f08665bc1dac1c7f.tar.gz
Add a `strip' target which remove the ^H from plain text files.
Diffstat (limited to 'share/mk')
-rw-r--r--share/mk/bsd.sgml.mk25
1 files changed, 18 insertions, 7 deletions
diff --git a/share/mk/bsd.sgml.mk b/share/mk/bsd.sgml.mk
index 2bb7f4f..7961b86 100644
--- a/share/mk/bsd.sgml.mk
+++ b/share/mk/bsd.sgml.mk
@@ -1,7 +1,7 @@
# bsd.sgml.mk - 8 Sep 1995 John Fieber
# This file is in the public domain.
#
-# $Id: bsd.sgml.mk,v 1.17 1997/05/02 05:07:45 ache Exp $
+# $Id: bsd.sgml.mk,v 1.18 1997/05/11 00:32:14 wosch Exp $
#
# The include file <bsd.sgml.mk> handles installing sgml documents.
# <bsd.prog.mk> includes the file named "../Makefile.inc" if it exists,
@@ -13,7 +13,8 @@
# DISTRIBUTION Name of distribution. [doc]
#
# FORMATS Indicates which output formats will be generated
-# (ascii, html, latex, latin1, nroff). [html latin1 ascii]
+# (ascii, html, koi8-r, latex, latin1, ps, roff).
+# [html latin1 ascii]
#
# LPR Printer command. [lpr]
#
@@ -80,15 +81,25 @@ SCOMPRESS_EXT?= ${COMPRESS_EXT}
.endif
_docs=
-.for _xformat in ${FORMATS}
-__xformat=${_xformat}
-.if ${__xformat} == "html"
-_docs+= ${DOC}.${_xformat}
+_strip=
+.for _f in ${FORMATS}
+__f=${_f}
+.if ${__f} == "html"
+_docs+= ${DOC}.${_f}
.else
-_docs+= ${DOC}.${_xformat}${SCOMPRESS_EXT}
+_docs+= ${DOC}.${_f}${SCOMPRESS_EXT}
+.if ${__f} == "ascii" || ${__f} == "latin1" || ${__f} == "koi8-r"
+_strip+= ${DOC}.${_f}
+CLEANFILES+=${DOC}.${_f}.bak
+.endif
.endif
.endfor
+strip: ${_strip}
+.if !empty(_strip)
+ perl -i.bak -npe 's/.\010//g' ${_strip}
+.endif
+
.MAIN: all
all: ${_docs}
OpenPOWER on IntegriCloud