Makefile revision 1.17
11.1Smycroft# from: @(#)Makefile 5.9 (Berkeley) 7/1/91 21.17Sjoerg# $NetBSD: Makefile,v 1.17 2012/02/07 19:13:31 joerg Exp $ 31.10Slukem 41.10SlukemNOOBJ= # defined 51.1Smycroft 61.4Slukem.include <bsd.own.mk> 71.4Slukem 81.17Sjoerg.if ${MKSHARE} != "no" && ${MKMAKEMANDB} == "no" 91.14ShubertfFILES= makewhatis.sed 101.1SmycroftFILESDIR= /usr/share/man 111.3Slukem.endif 121.5Shubertf 131.5ShubertfCLEANFILES+= man? 141.5ShubertfCLEANFILES+= man?pages.tmp 151.5ShubertfCLEANFILES+= man?pages.ps 161.8ShubertfCLEANFILES+= man?pages.pdf 171.5ShubertfCLEANFILES+= toc? tocx? 181.5Shubertf 191.8ShubertfSECTIONS?= 1 2 3 4 5 6 7 8 9 201.8Shubertf 211.13Swiz# Takes out some fluff from the PostScript files created by 221.8Shubertf# grops which does some VM saving/restoring that bloats the 231.11Sgrant# PDF file pdf2ps generates. By uwe@NetBSD.org. 241.8ShubertfOPTIMIZE_PDF?= \ 251.8Shubertf -e '/^\/level0 0 def/d' \ 261.8Shubertf -e '/^\/level0 save/d' \ 271.8Shubertf -e '/^level0 restore/d' 281.8Shubertf 291.15Shubertfall: man man.ps man.pdf 301.15Shubertf 311.15Shubertfman: 321.12Slukem ${HOST_SH} mkman 331.5Shubertf 341.15Shubertfman.ps: 351.8Shubertf for i in ${SECTIONS} ; \ 361.5Shubertf do \ 371.6Shubertf for f in `grep "$${i}\$$" intros` `cat man$${i}` ; \ 381.5Shubertf do \ 391.6Shubertf if [ ! -f $${f} ]; then \ 401.6Shubertf continue ; \ 411.6Shubertf fi ; \ 421.6Shubertf if grep -q ^\\.TS back ; \ 431.6Shubertf then \ 441.6Shubertf echo >&2 $${f} ; \ 451.15Shubertf cat $${f} | tbl | troff -msafer -man -Tps ; \ 461.6Shubertf else \ 471.6Shubertf echo >&2 $${f} "(tbl)" ; \ 481.15Shubertf cat $${f} | troff -msafer -man -Tps ; \ 491.6Shubertf fi ; \ 501.5Shubertf done >man$${i}pages.tmp ; \ 511.15Shubertf cat man$${i}pages.tmp \ 521.15Shubertf | grep -v '^x stop' \ 531.15Shubertf | grops >man$${i}pages.ps ; \ 541.8Shubertf rm man$${i}pages.tmp ; \ 551.7Shubertf done 561.7Shubertf 571.15Shubertfman.pdf: 581.8Shubertf for i in ${SECTIONS} ; \ 591.7Shubertf do \ 601.7Shubertf echo Chewing on man$${i}pages.pdf ; \ 611.16Sapb ${TOOL_SED} \ 621.8Shubertf ${OPTIMIZE_PDF} \ 631.8Shubertf <man$${i}pages.ps >man$${i}pages.ps.tmp ; \ 641.8Shubertf ps2pdf man$${i}pages.ps.tmp man$${i}pages.pdf ; \ 651.8Shubertf rm man$${i}pages.ps.tmp ; \ 661.5Shubertf done 671.8Shubertf 681.8Shubertfman.tgz: 691.8Shubertf tar plzvcf manpages-ps.tgz man?pages.ps 701.8Shubertf tar plzvcf manpages-pdf.tgz man?pages.pdf 711.1Smycroft 721.1Smycroft.include <bsd.prog.mk> 73