=================================================================== RCS file: /cvs/mandoc/Makefile,v retrieving revision 1.491 retrieving revision 1.496 diff -u -p -r1.491 -r1.496 --- mandoc/Makefile 2016/08/02 11:09:46 1.491 +++ mandoc/Makefile 2017/02/06 19:04:21 1.496 @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.491 2016/08/02 11:09:46 schwarze Exp $ +# $Id: Makefile,v 1.496 2017/02/06 19:04:21 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons # Copyright (c) 2011, 2013-2016 Ingo Schwarze @@ -19,7 +19,8 @@ VERSION = 1.14.0 # === LIST OF FILES ==================================================== -TESTSRCS = test-dirent-namlen.c \ +TESTSRCS = test-be32toh.c \ + test-dirent-namlen.c \ test-EFTYPE.c \ test-err.c \ test-fts.c \ @@ -28,6 +29,7 @@ TESTSRCS = test-dirent-namlen.c \ test-isblank.c \ test-mkdtemp.c \ test-nanosleep.c \ + test-ntohl.c \ test-ohash.c \ test-PATH_MAX.c \ test-pledge.c \ @@ -47,6 +49,7 @@ TESTSRCS = test-dirent-namlen.c \ test-wchar.c SRCS = att.c \ + catman.c \ cgi.c \ chars.c \ compat_err.c \ @@ -87,6 +90,7 @@ SRCS = att.c \ mandoc.c \ mandoc_aux.c \ mandoc_ohash.c \ + mandocd.c \ mandocdb.c \ manpage.c \ manpath.c \ @@ -126,6 +130,7 @@ DISTFILES = INSTALL \ NEWS \ TODO \ apropos.1 \ + catman.8 \ cgi.h.example \ compat_fts.h \ compat_ohash.h \ @@ -154,6 +159,7 @@ DISTFILES = INSTALL \ man.cgi.8 \ man.conf.5 \ man.h \ + man.options.1 \ manconf.h \ mandoc.1 \ mandoc.3 \ @@ -167,6 +173,7 @@ DISTFILES = INSTALL \ mandoc_html.3 \ mandoc_malloc.3 \ mandoc_ohash.h \ + mandocd.8 \ mansearch.3 \ mansearch.h \ mchars_alloc.3 \ @@ -278,6 +285,12 @@ CGI_OBJS = $(MANDOC_HTML_OBJS) \ cgi.o \ out.o +MANDOCD_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_TERM_OBJS) \ + mandocd.o \ + out.o \ + tag.o + MANPAGE_OBJS = $(DBM_OBJS) \ manpage.o \ manpath.o @@ -296,6 +309,7 @@ WWW_MANS = apropos.1.html \ man.1.html \ mandoc.1.html \ soelim.1.html \ + man.cgi.3.html \ mandoc.3.html \ mandoc_escape.3.html \ mandoc_headers.3.html \ @@ -309,11 +323,12 @@ WWW_MANS = apropos.1.html \ eqn.7.html \ man.7.html \ mandoc_char.7.html \ + mandocd.8.html \ mdoc.7.html \ roff.7.html \ tbl.7.html \ + catman.8.html \ makewhatis.8.html \ - man.cgi.3.html \ man.cgi.8.html \ man.h.html \ manconf.h.html \ @@ -332,12 +347,8 @@ include Makefile.local # === DEPENDENCY HANDLING ============================================== -all: base-build $(BUILD_TARGETS) Makefile.local +all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local -base-build: mandoc demandoc soelim - -cgi-build: man.cgi - install: base-install $(INSTALL_TARGETS) www: $(WWW_OBJS) $(WWW_MANS) @@ -358,19 +369,17 @@ clean: rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) rm -f mandoc $(MAIN_OBJS) rm -f man.cgi $(CGI_OBJS) + rm -f mandocd catman $(MANDOCD_OBJS) rm -f manpage $(MANPAGE_OBJS) rm -f demandoc $(DEMANDOC_OBJS) rm -f soelim $(SOELIM_OBJS) rm -f $(WWW_MANS) $(WWW_OBJS) rm -rf *.dSYM -base-install: base-build +base-install: mandoc demandoc soelim mkdir -p $(DESTDIR)$(BINDIR) mkdir -p $(DESTDIR)$(SBINDIR) - mkdir -p $(DESTDIR)$(LIBDIR) - mkdir -p $(DESTDIR)$(INCLUDEDIR) mkdir -p $(DESTDIR)$(MANDIR)/man1 - mkdir -p $(DESTDIR)$(MANDIR)/man3 mkdir -p $(DESTDIR)$(MANDIR)/man5 mkdir -p $(DESTDIR)$(MANDIR)/man7 mkdir -p $(DESTDIR)$(MANDIR)/man8 @@ -381,17 +390,12 @@ base-install: base-build ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) ln -f $(DESTDIR)$(BINDIR)/mandoc \ $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) - $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) - $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \ - $(DESTDIR)$(INCLUDEDIR) $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 $(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \ $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 - $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ - mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 $(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/${MANM_MANCONF}.5 $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MAN}.7 @@ -403,12 +407,28 @@ base-install: base-build $(INSTALL_MAN) makewhatis.8 \ $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 -cgi-install: cgi-build +lib-install: libmandoc.a + mkdir -p $(DESTDIR)$(LIBDIR) + mkdir -p $(DESTDIR)$(INCLUDEDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man3 + $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) + $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \ + $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ + mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 + +cgi-install: man.cgi mkdir -p $(DESTDIR)$(CGIBINDIR) mkdir -p $(DESTDIR)$(HTDOCDIR) $(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR) $(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR) +catman-install: mandocd catman + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_PROGRAM) mandocd catman $(DESTDIR)$(SBINDIR) + $(INSTALL_MAN) mandocd.8 catman.8 $(DESTDIR)$(MANDIR)/man8 + Makefile.local config.h: configure ${TESTSRCS} @echo "$@ is out of date; please run ./configure" @exit 1 @@ -424,6 +444,12 @@ manpage: $(MANPAGE_OBJS) libmandoc.a man.cgi: $(CGI_OBJS) libmandoc.a $(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD) + +mandocd: $(MANDOCD_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD) + +catman: catman.o + $(CC) -o $@ $(LDFLAGS) catman.o demandoc: $(DEMANDOC_OBJS) libmandoc.a $(CC) -o $@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD)