From 591744f2a0ef5fa95af29f9de51a6d4dbf874947 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 9 Dec 2014 07:29:42 +0000 Subject: Integrate the makewhatis binary into the mandoc binary just like we do it on OpenBSD. Smaller and neater. While here, let ./configure set INSTALL_TARGETS. --- main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index d55a5e8e..7416321f 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.202 2014/12/05 21:55:04 schwarze Exp $ */ +/* $Id: main.c,v 1.203 2014/12/09 07:29:42 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2011, 2012, 2014 Ingo Schwarze @@ -83,6 +83,9 @@ struct curparse { }; static int koptions(int *, char *); +#if HAVE_SQLITE3 +int mandocdb(int, char**); +#endif static int moptions(int *, char *); static void mmsg(enum mandocerr, enum mandoclevel, const char *, int, int, const char *); @@ -130,6 +133,12 @@ main(int argc, char *argv[]) else ++progname; +#if HAVE_SQLITE3 + if (0 == strncmp(progname, "mandocdb", 8) || + 0 == strncmp(progname, "makewhatis", 10)) + return(mandocdb(argc, argv)); +#endif + /* Search options. */ memset(&paths, 0, sizeof(struct manpaths)); -- cgit v1.2.3