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