[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / man / man0

File: [cvs.NetBSD.org] / src / share / man / man0 / Makefile (download)

Revision 1.17, Tue Feb 7 19:13:31 2012 UTC (8 years, 9 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb8-mediatek-base, matt-nb8-mediatek, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, localcount-20160914, is-mlppp-base, is-mlppp, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, agc-symver-base, agc-symver, HEAD
Changes since 1.16: +2 -2 lines

Import the new apropos/whatis.

This code has been developed by Abhinav Upadhyay as part of Google's Summer
of Code 2011. It uses libmandoc to parse man pages and builds a Full
Text Index in a SQLite database. The combination of indexing the full
manual page, filtering out stop words and ranking individual matches
based on the section gives a much improved user experience.

The old makewhatis and friends are kept under MKMAKEMANDB=no for now.

#	from: @(#)Makefile	5.9 (Berkeley) 7/1/91
#	$NetBSD: Makefile,v 1.17 2012/02/07 19:13:31 joerg Exp $

NOOBJ=		# defined

.include <bsd.own.mk>

.if ${MKSHARE} != "no" && ${MKMAKEMANDB} == "no"
FILES=		makewhatis.sed
FILESDIR=	/usr/share/man
.endif

CLEANFILES+=	man?
CLEANFILES+=	man?pages.tmp
CLEANFILES+=	man?pages.ps
CLEANFILES+=	man?pages.pdf
CLEANFILES+=	toc? tocx?

SECTIONS?=	1 2 3 4 5 6 7 8 9

# Takes out some fluff from the PostScript files created by
# grops which does some VM saving/restoring that bloats the
# PDF file pdf2ps generates.              By uwe@NetBSD.org.
OPTIMIZE_PDF?=	\
			-e '/^\/level0 0 def/d' 		\
			-e '/^\/level0 save/d' 			\
			-e '/^level0 restore/d' 		

all: man man.ps man.pdf

man: 
	${HOST_SH} mkman

man.ps: 
	for i in ${SECTIONS} ; 					\
	do							\
		for f in `grep "$${i}\$$" intros` `cat man$${i}` ; \
		do						\
			if [ ! -f $${f} ]; then 		\
				continue ; 			\
			fi ;					\
			if grep -q ^\\.TS back ;		\
			then					\
				echo >&2 $${f} ; 			\
				cat $${f} | tbl | troff -msafer -man -Tps ; \
			else 					\
				echo >&2 $${f} "(tbl)" ;	\
				cat $${f} | troff -msafer -man -Tps ; \
			fi ; 					\
		done >man$${i}pages.tmp ;			\
		cat man$${i}pages.tmp				\
		| grep -v '^x stop' 				\
		| grops >man$${i}pages.ps ;			\
		rm man$${i}pages.tmp ; 		\
	done

man.pdf: 
	for i in ${SECTIONS} ; 					\
	do							\
		echo Chewing on man$${i}pages.pdf ;		\
		${TOOL_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 ; 			\
	done

man.tgz:
	tar plzvcf manpages-ps.tgz man?pages.ps
	tar plzvcf manpages-pdf.tgz man?pages.pdf

.include <bsd.prog.mk>