aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-07-13 09:39:32 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-07-13 09:39:32 +0000
commit76c11ac76bacd43c9f5088017ce45c83f50520b6 (patch)
tree2e2f7d497fc7564023332bf75d78d05e6156b252
parent8eb0cfe199b90872bf8e9411ce6d59e3de0b9418 (diff)
downloadmandoc-76c11ac76bacd43c9f5088017ce45c83f50520b6.tar.gz
mandoc-76c11ac76bacd43c9f5088017ce45c83f50520b6.tar.zst
mandoc-76c11ac76bacd43c9f5088017ce45c83f50520b6.zip
Install the manuals of the web interface below the same directory
as manpath.conf, such that we do not need to mix our own documentation into the documentation we are serving, which may not even be possible if the latter is updated automatically. Based on an idea by beck@.
-rw-r--r--Makefile6
-rw-r--r--cgi.c10
-rw-r--r--man.cgi.86
3 files changed, 15 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index b61be914..6e5238d5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.423 2014/07/12 18:32:47 schwarze Exp $
+# $Id: Makefile,v 1.424 2014/07/13 09:39:32 schwarze Exp $
#
# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
# Copyright (c) 2011, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -376,9 +376,13 @@ install: all
installcgi: all
mkdir -p $(DESTDIR)$(CGIBINDIR)
mkdir -p $(DESTDIR)$(HTDOCDIR)
+ mkdir -p $(DESTDIR)$(WWWPREFIX)/man/mandoc/man1
+ mkdir -p $(DESTDIR)$(WWWPREFIX)/man/mandoc/man8
$(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR)
$(INSTALL_DATA) example.style.css $(DESTDIR)$(HTDOCDIR)/man.css
$(INSTALL_DATA) man-cgi.css $(DESTDIR)$(HTDOCDIR)
+ $(INSTALL_MAN) apropos.1 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man1/
+ $(INSTALL_MAN) man.cgi.8 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man8/
installwww: www
mkdir -p $(DESTDIR)$(HTDOCDIR)/snapshots
diff --git a/cgi.c b/cgi.c
index b6859b3d..54ac9145 100644
--- a/cgi.c
+++ b/cgi.c
@@ -1,4 +1,4 @@
-/* $Id: cgi.c,v 1.68 2014/07/12 23:46:44 schwarze Exp $ */
+/* $Id: cgi.c,v 1.69 2014/07/13 09:39:32 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@usta.de>
@@ -463,10 +463,10 @@ resp_index(const struct req *req)
resp_searchform(req);
printf("<P>\n"
"This web interface is documented in the "
- "<A HREF=\"%s?query=man.cgi&amp;sec=8\">"
- "man.cgi</A> manual, and the "
- "<A HREF=\"%s?query=apropos&amp;sec=1\">"
- "apropos</A> manual explains the query syntax.\n"
+ "<A HREF=\"%s/mandoc/man8/man.cgi.8\">man.cgi</A> "
+ "manual, and the "
+ "<A HREF=\"%s/mandoc/man1/apropos.1\">apropos</A> "
+ "manual explains the query syntax.\n"
"</P>\n",
scriptname, scriptname);
resp_end_html();
diff --git a/man.cgi.8 b/man.cgi.8
index 77b00aeb..e42f00eb 100644
--- a/man.cgi.8
+++ b/man.cgi.8
@@ -1,4 +1,4 @@
-.\" $Id: man.cgi.8,v 1.4 2014/07/13 00:19:51 schwarze Exp $
+.\" $Id: man.cgi.8,v 1.5 2014/07/13 09:39:32 schwarze Exp $
.\"
.\" Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
.\"
@@ -270,6 +270,10 @@ Default
data directory containing all the manual trees.
Can be overridden by
.Ev MAN_DIR .
+.It Pa /man/mandoc/man1/apropos.1 , /man/mandoc/man8/man.cgi.8
+Manual pages documenting
+.Nm
+itself, linked from the index page.
.It Pa /man/manpath.conf
The list of available manpaths, one per line.
.It Pa /man/OpenBSD-current/man1/mandoc.1