1 1.1 mycroft # from: @(#)Makefile 5.9 (Berkeley) 7/1/91 2 1.11 grant # $NetBSD: Makefile,v 1.11 2003/02/14 15:20:17 grant Exp $ 3 1.10 lukem 4 1.10 lukem NOOBJ= # defined 5 1.1 mycroft 6 1.4 lukem .include <bsd.own.mk> 7 1.4 lukem 8 1.4 lukem .if ${MKSHARE} != "no" 9 1.1 mycroft FILES= makewhatis.sed COPYRIGHT 10 1.1 mycroft FILESDIR= /usr/share/man 11 1.3 lukem .endif 12 1.5 hubertf 13 1.5 hubertf CLEANFILES+= man? 14 1.5 hubertf CLEANFILES+= man?pages.tmp 15 1.5 hubertf CLEANFILES+= man?pages.ps 16 1.8 hubertf CLEANFILES+= man?pages.pdf 17 1.5 hubertf CLEANFILES+= toc? tocx? 18 1.5 hubertf 19 1.8 hubertf SECTIONS?= 1 2 3 4 5 6 7 8 9 20 1.8 hubertf 21 1.8 hubertf # Takes out some fluff from the PostScript files created bye 22 1.8 hubertf # grops which does some VM saving/restoring that bloats the 23 1.11 grant # PDF file pdf2ps generates. By uwe (at] NetBSD.org. 24 1.8 hubertf OPTIMIZE_PDF?= \ 25 1.8 hubertf -e '/^\/level0 0 def/d' \ 26 1.8 hubertf -e '/^\/level0 save/d' \ 27 1.8 hubertf -e '/^level0 restore/d' 28 1.8 hubertf 29 1.5 hubertf man: 30 1.5 hubertf sh mkman 31 1.5 hubertf 32 1.5 hubertf man.ps: 33 1.8 hubertf for i in ${SECTIONS} ; \ 34 1.5 hubertf do \ 35 1.6 hubertf for f in `grep "$${i}\$$" intros` `cat man$${i}` ; \ 36 1.5 hubertf do \ 37 1.6 hubertf if [ ! -f $${f} ]; then \ 38 1.6 hubertf continue ; \ 39 1.6 hubertf fi ; \ 40 1.6 hubertf if grep -q ^\\.TS back ; \ 41 1.6 hubertf then \ 42 1.6 hubertf echo >&2 $${f} ; \ 43 1.6 hubertf cat $${f} | tbl | troff -msafer -man -Tps $${f} ; \ 44 1.6 hubertf else \ 45 1.6 hubertf echo >&2 $${f} "(tbl)" ; \ 46 1.8 hubertf cat $${f} | troff -msafer -man -Tps $${f} ; \ 47 1.6 hubertf fi ; \ 48 1.5 hubertf done >man$${i}pages.tmp ; \ 49 1.5 hubertf grops <man$${i}pages.tmp >man$${i}pages.ps ; \ 50 1.8 hubertf rm man$${i}pages.tmp ; \ 51 1.7 hubertf done 52 1.7 hubertf 53 1.7 hubertf man.pdf: 54 1.8 hubertf for i in ${SECTIONS} ; \ 55 1.7 hubertf do \ 56 1.7 hubertf echo Chewing on man$${i}pages.pdf ; \ 57 1.8 hubertf sed \ 58 1.8 hubertf ${OPTIMIZE_PDF} \ 59 1.8 hubertf <man$${i}pages.ps >man$${i}pages.ps.tmp ; \ 60 1.8 hubertf ps2pdf man$${i}pages.ps.tmp man$${i}pages.pdf ; \ 61 1.8 hubertf rm man$${i}pages.ps.tmp ; \ 62 1.5 hubertf done 63 1.8 hubertf 64 1.8 hubertf man.tgz: 65 1.8 hubertf tar plzvcf manpages-ps.tgz man?pages.ps 66 1.8 hubertf tar plzvcf manpages-pdf.tgz man?pages.pdf 67 1.1 mycroft 68 1.1 mycroft .include <bsd.prog.mk> 69