summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-05-30 17:41:37 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-05-30 17:41:37 +0000
commit8faa40d1a0ff1956fe7c3d857bf5bcba2272a9d1 (patch)
treee1acd6b92dd5579ff70cbe33a2e9d5c34def606a
parentb1621f22b3de227d332ebd27d7905d2f6483fa0e (diff)
downloadsrc-test2-8faa40d1a0ff1956fe7c3d857bf5bcba2272a9d1.tar.gz
src-test2-8faa40d1a0ff1956fe7c3d857bf5bcba2272a9d1.zip
Switch to mandoc's version of makewhatis(8), whatis(1), apropos(1) utilities.
This change among other things improve search capabilities over the manpages allowing fine grain query. A new build option WITHOUT_MANDOCDB has been added to keep the ancient version of the database and the tools. The plan is to entirely remove this option before 11.0-RELEASE. Differential Revision: https://reviews.freebsd.org/D2603
Notes
Notes: svn path=/head/; revision=283777
-rw-r--r--Makefile.inc112
-rw-r--r--share/mk/src.opts.mk1
-rw-r--r--tools/build/options/WITHOUT_MANDOCDB6
-rw-r--r--usr.bin/Makefile2
-rw-r--r--usr.bin/man/Makefile14
-rw-r--r--usr.bin/mandoc/Makefile11
6 files changed, 40 insertions, 6 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index e315e2284b9d..1cd019bd8801 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1363,6 +1363,16 @@ _kerberos5_bootstrap_tools= \
.ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g}
.endif
+.if ${MK_MANDOCDB} != "no"
+_makewhatis= lib/libohash \
+ lib/libsqlite3 \
+ lib/libmandoc \
+ usr.bin/mandoc
+${_bt}-usr.bin/mandoc: ${_bt}-lib/libohash ${_bt}-lib/libsqlite3
+.else
+_makewhatis=usr.bin/makewhatis
+.endif
+
# Rebuild up-to-date libmd for xinstall
${_bt}-usr.bin/xinstall: ${_bt}-lib/libmd
@@ -1383,7 +1393,7 @@ bootstrap-tools: .PHONY
${_awk} \
${_cat} \
usr.bin/lorder \
- usr.bin/makewhatis \
+ ${_makewhatis} \
usr.bin/rpcgen \
${_sed} \
${_yacc} \
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
index 6e188747c002..ed03a783bfbb 100644
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -126,6 +126,7 @@ __DEFAULT_YES_OPTIONS = \
MAIL \
MAILWRAPPER \
MAKE \
+ MANDOCDB \
NDIS \
NETCAT \
NETGRAPH \
diff --git a/tools/build/options/WITHOUT_MANDOCDB b/tools/build/options/WITHOUT_MANDOCDB
new file mode 100644
index 000000000000..7d7ec2148a29
--- /dev/null
+++ b/tools/build/options/WITHOUT_MANDOCDB
@@ -0,0 +1,6 @@
+.\" $FreeBSD$
+Use the
+.Xr mandoc 1
+version of
+.Xr makewhatis 8
+database and utilities.
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
index af9b471d2348..c77f89a80f69 100644
--- a/usr.bin/Makefile
+++ b/usr.bin/Makefile
@@ -317,7 +317,9 @@ SUBDIR+= bmake
.if ${MK_MAN_UTILS} != "no"
SUBDIR+= catman
+.if ${MK_MANDOCDB} == "no"
_makewhatis= makewhatis
+.endif
_man= man
.endif
diff --git a/usr.bin/man/Makefile b/usr.bin/man/Makefile
index 3e37b596ef64..7057b2e70ddb 100644
--- a/usr.bin/man/Makefile
+++ b/usr.bin/man/Makefile
@@ -1,11 +1,17 @@
# $FreeBSD$
+.include <src.opts.mk>
+
SCRIPTS= man.sh
-LINKS= ${BINDIR}/man ${BINDIR}/apropos \
- ${BINDIR}/man ${BINDIR}/manpath \
- ${BINDIR}/man ${BINDIR}/whatis
+LINKS= ${BINDIR}/man ${BINDIR}/manpath
-MAN= man.1 manpath.1 apropos.1 man.conf.5
+MAN= man.1 manpath.1 man.conf.5
+
+.if ${MK_MANDOCDB} == no
+LINKS+= ${BINDIR}/man ${BINDIR}/apropos \
+ ${BINDIR}/man ${BINDIR}/whatis
+MAN+= apropos.1
MLINKS= apropos.1 whatis.1
+.endif
.include <bsd.prog.mk>
diff --git a/usr.bin/mandoc/Makefile b/usr.bin/mandoc/Makefile
index cdb512b71071..e2c59cf5e29e 100644
--- a/usr.bin/mandoc/Makefile
+++ b/usr.bin/mandoc/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <src.opts.mk>
+
MDOCMLDIR= ${.CURDIR}/../../contrib/mdocml
.PATH: ${MDOCMLDIR}
@@ -7,7 +9,14 @@ PROG= mandoc
FILES= example.style.css style.css
FILESDIR= ${SHAREDIR}/mdocml
MAN= mandoc.1 eqn.7 mandoc_char.7 tbl.7 man.7 mdoc.7 # roff.7
-MLINKS= mandoc.1 mdocml.1
+MLINKS= mandoc.1 mdocml.1
+.if ${MK_MANDOCDB} != no
+MAN+= apropos.1 makewhatis.8
+MLINKS+= apropos.1 whatis.1
+LINKS= ${BINDIR}/mandoc ${BINDIR}/whatis \
+ ${BINDIR}/mandoc ${BINDIR}/makewhatis \
+ ${BINDIR}/mandoc ${BINDIR}/apropos
+.endif
LIBMAN_SRCS= man.c \
man_hash.c \