1 # from: @(#)Makefile 5.9 (Berkeley) 7/1/91
2 # $NetBSD: Makefile,v 1.15 2006/08/29 14:32:45 hubertf Exp $
10 FILESDIR
= /usr
/share
/man
14 CLEANFILES
+= man?pages.tmp
15 CLEANFILES
+= man?pages.ps
16 CLEANFILES
+= man?pages.pdf
17 CLEANFILES
+= toc? tocx?
19 SECTIONS?
= 1 2 3 4 5 6 7 8 9
21 # Takes out some fluff from the PostScript files created by
22 # grops which does some VM saving/restoring that bloats the
23 # PDF file pdf2ps generates. By uwe@NetBSD.org.
25 -e
'/^\/level0 0 def/d' \
26 -e
'/^\/level0 save/d' \
27 -e
'/^level0 restore/d'
29 all: man man.ps man.pdf
35 for i in
${SECTIONS} ; \
37 for f in
`grep "$${i}\$$" intros` `cat man$${i}` ; \
39 if
[ ! -f
$${f} ]; then \
42 if grep
-q ^
\\.TS back
; \
45 cat
$${f} | tbl | troff
-msafer
-man
-Tps
; \
47 echo
>&2 $${f} "(tbl)" ; \
48 cat
$${f} | troff
-msafer
-man
-Tps
; \
50 done
>man
$${i}pages.tmp
; \
51 cat man
$${i}pages.tmp \
53 | grops
>man
$${i}pages.ps
; \
54 rm man
$${i}pages.tmp
; \
58 for i in
${SECTIONS} ; \
60 echo Chewing on man
$${i}pages.pdf
; \
63 <man
$${i}pages.ps
>man
$${i}pages.ps.tmp
; \
64 ps2pdf man
$${i}pages.ps.tmp man
$${i}pages.pdf
; \
65 rm man
$${i}pages.ps.tmp
; \
69 tar plzvcf manpages-ps.tgz man?pages.ps
70 tar plzvcf manpages-pdf.tgz man?pages.pdf
72 .
include <bsd.prog.mk
>