Home | History | Annotate | Line # | Download | only in man0
Makefile revision 1.16
      1   1.1  mycroft #	from: @(#)Makefile	5.9 (Berkeley) 7/1/91
      2  1.16      apb #	$NetBSD: Makefile,v 1.16 2008/10/25 22:27:36 apb 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.14  hubertf FILES=		makewhatis.sed
     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.13      wiz # Takes out some fluff from the PostScript files created by
     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.15  hubertf all: man man.ps man.pdf
     30  1.15  hubertf 
     31  1.15  hubertf man: 
     32  1.12    lukem 	${HOST_SH} mkman
     33   1.5  hubertf 
     34  1.15  hubertf man.ps: 
     35   1.8  hubertf 	for i in ${SECTIONS} ; 					\
     36   1.5  hubertf 	do							\
     37   1.6  hubertf 		for f in `grep "$${i}\$$" intros` `cat man$${i}` ; \
     38   1.5  hubertf 		do						\
     39   1.6  hubertf 			if [ ! -f $${f} ]; then 		\
     40   1.6  hubertf 				continue ; 			\
     41   1.6  hubertf 			fi ;					\
     42   1.6  hubertf 			if grep -q ^\\.TS back ;		\
     43   1.6  hubertf 			then					\
     44   1.6  hubertf 				echo >&2 $${f} ; 			\
     45  1.15  hubertf 				cat $${f} | tbl | troff -msafer -man -Tps ; \
     46   1.6  hubertf 			else 					\
     47   1.6  hubertf 				echo >&2 $${f} "(tbl)" ;	\
     48  1.15  hubertf 				cat $${f} | troff -msafer -man -Tps ; \
     49   1.6  hubertf 			fi ; 					\
     50   1.5  hubertf 		done >man$${i}pages.tmp ;			\
     51  1.15  hubertf 		cat man$${i}pages.tmp				\
     52  1.15  hubertf 		| grep -v '^x stop' 				\
     53  1.15  hubertf 		| grops >man$${i}pages.ps ;			\
     54   1.8  hubertf 		rm man$${i}pages.tmp ; 		\
     55   1.7  hubertf 	done
     56   1.7  hubertf 
     57  1.15  hubertf man.pdf: 
     58   1.8  hubertf 	for i in ${SECTIONS} ; 					\
     59   1.7  hubertf 	do							\
     60   1.7  hubertf 		echo Chewing on man$${i}pages.pdf ;		\
     61  1.16      apb 		${TOOL_SED} 					\
     62   1.8  hubertf 			${OPTIMIZE_PDF} 			\
     63   1.8  hubertf 			<man$${i}pages.ps >man$${i}pages.ps.tmp ; \
     64   1.8  hubertf 		ps2pdf man$${i}pages.ps.tmp man$${i}pages.pdf ;	\
     65   1.8  hubertf 		rm man$${i}pages.ps.tmp ; 			\
     66   1.5  hubertf 	done
     67   1.8  hubertf 
     68   1.8  hubertf man.tgz:
     69   1.8  hubertf 	tar plzvcf manpages-ps.tgz man?pages.ps
     70   1.8  hubertf 	tar plzvcf manpages-pdf.tgz man?pages.pdf
     71   1.1  mycroft 
     72   1.1  mycroft .include <bsd.prog.mk>
     73