From 8c2df82728badd2404bb51007002d857b03bb2e5 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Thu, 24 Nov 2011 10:33:38 +0000 Subject: Add manup(8). This runs through mandocdb(8) databases (in the same way that apropos(1) does so) and updates an HTML fragment cache for use by man.cgi. Right now man.cgi is "online" in that it requires mandoc(1) in its path, but this doesn't work for, say, OpenBSD's apache chroot(1). This allows a cache to be maintained. --- Makefile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8423e0dd..089831bc 100644 --- a/Makefile +++ b/Makefile @@ -50,8 +50,8 @@ INSTALL_MAN = $(INSTALL_DATA) # comment out apropos and mandocdb. # #DBLIB = -ldb -DBBIN = apropos mandocdb man.cgi -DBLN = llib-lapropos.ln llib-lmandocdb.ln llib-lman.cgi.ln +DBBIN = apropos mandocdb man.cgi manup +DBLN = llib-lapropos.ln llib-lmandocdb.ln llib-lman.cgi.ln llib-lmanup.ln all: mandoc preconv demandoc $(DBBIN) @@ -107,6 +107,8 @@ SRCS = Makefile \ mandoc_char.7 \ manpath.c \ manpath.h \ + manup.c \ + manup.8 \ mdoc.h \ mdoc.7 \ mdoc.c \ @@ -297,6 +299,11 @@ CGI_LNS = cgi.ln apropos_db.ln manpath.ln $(CGI_OBJS) $(CGI_LNS): config.h mandoc.h apropos_db.h manpath.h mandocdb.h +MANUP_OBJS = manup.o manpath.o +MANUP_LNS = manup.ln manpath.ln + +$(MANUP_OBJS) $(MANUP_LNS): config.h mandoc.h manpath.h + DEMANDOC_OBJS = demandoc.o DEMANDOC_LNS = demandoc.ln @@ -387,6 +394,8 @@ clean: rm -f llib-lapropos.ln $(APROPOS_LNS) rm -f man.cgi $(CGI_OBJS) rm -f llib-lman.cgi.ln $(CGI_LNS) + rm -f manup $(MANUP_OBJS) + rm -f llib-lmanup.ln $(MANUP_LNS) rm -f demandoc $(DEMANDOC_OBJS) rm -f llib-ldemandoc.ln $(DEMANDOC_LNS) rm -f mandoc $(MANDOC_OBJS) @@ -458,6 +467,12 @@ apropos: $(APROPOS_OBJS) libmandoc.a llib-lapropos.ln: $(APROPOS_LNS) llib-llibmandoc.ln $(LINT) $(LINTFLAGS) -Capropos $(APROPOS_LNS) llib-llibmandoc.ln +manup: $(MANUP_OBJS) libmandoc.a + $(CC) $(LDFLAGS) -o $@ $(MANUP_OBJS) libmandoc.a $(DBLIB) + +llib-lmanup.ln: $(MANUP_LNS) llib-llibmandoc.ln + $(LINT) $(LINTFLAGS) -Cmanup $(MANUP_LNS) llib-llibmandoc.ln + man.cgi: $(CGI_OBJS) libmandoc.a $(CC) $(LDFLAGS) -static -o $@ $(CGI_OBJS) libmandoc.a $(DBLIB) -- cgit