1997-05-09 18:31:24 +04:00
|
|
|
# from: @(#)Makefile 5.9 (Berkeley) 7/1/91
|
2005-10-22 10:04:57 +04:00
|
|
|
# $NetBSD: Makefile,v 1.14 2005/10/22 06:04:57 hubertf Exp $
|
2001-12-12 15:24:19 +03:00
|
|
|
|
|
|
|
NOOBJ= # defined
|
1997-05-09 18:31:24 +04:00
|
|
|
|
1999-02-13 05:54:17 +03:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
|
|
.if ${MKSHARE} != "no"
|
2005-10-22 10:04:57 +04:00
|
|
|
FILES= makewhatis.sed
|
1997-05-09 18:31:24 +04:00
|
|
|
FILESDIR= /usr/share/man
|
1998-09-27 21:22:03 +04:00
|
|
|
.endif
|
1997-05-09 18:31:24 +04:00
|
|
|
|
2001-06-26 06:26:06 +04:00
|
|
|
CLEANFILES+= man?
|
|
|
|
CLEANFILES+= man?pages.tmp
|
|
|
|
CLEANFILES+= man?pages.ps
|
2001-07-06 00:52:11 +04:00
|
|
|
CLEANFILES+= man?pages.pdf
|
2001-06-26 06:26:06 +04:00
|
|
|
CLEANFILES+= toc? tocx?
|
|
|
|
|
2001-07-06 00:52:11 +04:00
|
|
|
SECTIONS?= 1 2 3 4 5 6 7 8 9
|
|
|
|
|
2004-11-10 19:32:39 +03:00
|
|
|
# Takes out some fluff from the PostScript files created by
|
2001-07-06 00:52:11 +04:00
|
|
|
# grops which does some VM saving/restoring that bloats the
|
2003-02-14 18:20:17 +03:00
|
|
|
# PDF file pdf2ps generates. By uwe@NetBSD.org.
|
2001-07-06 00:52:11 +04:00
|
|
|
OPTIMIZE_PDF?= \
|
|
|
|
-e '/^\/level0 0 def/d' \
|
|
|
|
-e '/^\/level0 save/d' \
|
|
|
|
-e '/^level0 restore/d'
|
|
|
|
|
2001-06-26 06:26:06 +04:00
|
|
|
man:
|
2003-10-26 10:25:33 +03:00
|
|
|
${HOST_SH} mkman
|
2001-06-26 06:26:06 +04:00
|
|
|
|
|
|
|
man.ps:
|
2001-07-06 00:52:11 +04:00
|
|
|
for i in ${SECTIONS} ; \
|
2001-06-26 06:26:06 +04:00
|
|
|
do \
|
2001-06-30 04:19:25 +04:00
|
|
|
for f in `grep "$${i}\$$" intros` `cat man$${i}` ; \
|
2001-06-26 06:26:06 +04:00
|
|
|
do \
|
2001-06-30 04:19:25 +04:00
|
|
|
if [ ! -f $${f} ]; then \
|
|
|
|
continue ; \
|
|
|
|
fi ; \
|
|
|
|
if grep -q ^\\.TS back ; \
|
|
|
|
then \
|
|
|
|
echo >&2 $${f} ; \
|
|
|
|
cat $${f} | tbl | troff -msafer -man -Tps $${f} ; \
|
|
|
|
else \
|
|
|
|
echo >&2 $${f} "(tbl)" ; \
|
2001-07-06 00:52:11 +04:00
|
|
|
cat $${f} | troff -msafer -man -Tps $${f} ; \
|
2001-06-30 04:19:25 +04:00
|
|
|
fi ; \
|
2001-06-26 06:26:06 +04:00
|
|
|
done >man$${i}pages.tmp ; \
|
|
|
|
grops <man$${i}pages.tmp >man$${i}pages.ps ; \
|
2001-07-06 00:52:11 +04:00
|
|
|
rm man$${i}pages.tmp ; \
|
2001-06-26 06:26:06 +04:00
|
|
|
done
|
|
|
|
|
2001-06-30 05:25:00 +04:00
|
|
|
man.pdf:
|
2001-07-06 00:52:11 +04:00
|
|
|
for i in ${SECTIONS} ; \
|
2001-06-30 05:25:00 +04:00
|
|
|
do \
|
|
|
|
echo Chewing on man$${i}pages.pdf ; \
|
2001-07-06 00:52:11 +04:00
|
|
|
sed \
|
|
|
|
${OPTIMIZE_PDF} \
|
|
|
|
<man$${i}pages.ps >man$${i}pages.ps.tmp ; \
|
|
|
|
ps2pdf man$${i}pages.ps.tmp man$${i}pages.pdf ; \
|
|
|
|
rm man$${i}pages.ps.tmp ; \
|
2001-06-30 05:25:00 +04:00
|
|
|
done
|
|
|
|
|
2001-07-06 00:52:11 +04:00
|
|
|
man.tgz:
|
|
|
|
tar plzvcf manpages-ps.tgz man?pages.ps
|
|
|
|
tar plzvcf manpages-pdf.tgz man?pages.pdf
|
|
|
|
|
1997-05-09 18:31:24 +04:00
|
|
|
.include <bsd.prog.mk>
|