summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-12-09 07:29:42 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-12-09 07:29:42 +0000
commit2ff1f9b803f8b8b207c1186c94b6eabd5f9c6865 (patch)
tree2a0bfa9ff020e83ee1bd3e2657b10ed841daaefc /main.c
parent34905ea59644683368f5f16813c8f450fcd69d86 (diff)
downloadmandoc-2ff1f9b803f8b8b207c1186c94b6eabd5f9c6865.tar.gz
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.
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/main.c b/main.c
index 34a363b5..1cc1c70c 100644
--- a/main.c
+++ b/main.c
@@ -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));