xref: /freebsd/contrib/mandoc/Makefile (revision d34048812292b714a0bf99967270d18fe3097c62)
1# $Id: Makefile,v 1.519 2018/07/31 15:34:00 schwarze Exp $
2#
3# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
4# Copyright (c) 2011, 2013-2018 Ingo Schwarze <schwarze@openbsd.org>
5#
6# Permission to use, copy, modify, and distribute this software for any
7# purpose with or without fee is hereby granted, provided that the above
8# copyright notice and this permission notice appear in all copies.
9#
10# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
18VERSION = 1.14.4
19
20# === LIST OF FILES ====================================================
21
22TESTSRCS	 = test-be32toh.c \
23		   test-cmsg.c \
24		   test-dirent-namlen.c \
25		   test-EFTYPE.c \
26		   test-err.c \
27		   test-fts.c \
28		   test-getline.c \
29		   test-getsubopt.c \
30		   test-isblank.c \
31		   test-mkdtemp.c \
32		   test-nanosleep.c \
33		   test-noop.c \
34		   test-ntohl.c \
35		   test-O_DIRECTORY.c \
36		   test-ohash.c \
37		   test-PATH_MAX.c \
38		   test-pledge.c \
39		   test-progname.c \
40		   test-recvmsg.c \
41		   test-reallocarray.c \
42		   test-recallocarray.c \
43		   test-rewb-bsd.c \
44		   test-rewb-sysv.c \
45		   test-sandbox_init.c \
46		   test-strcasestr.c \
47		   test-stringlist.c \
48		   test-strlcat.c \
49		   test-strlcpy.c \
50		   test-strndup.c \
51		   test-strptime.c \
52		   test-strsep.c \
53		   test-strtonum.c \
54		   test-vasprintf.c \
55		   test-wchar.c
56
57SRCS		 = att.c \
58		   catman.c \
59		   cgi.c \
60		   chars.c \
61		   compat_err.c \
62		   compat_fts.c \
63		   compat_getline.c \
64		   compat_getsubopt.c \
65		   compat_isblank.c \
66		   compat_mkdtemp.c \
67		   compat_ohash.c \
68		   compat_progname.c \
69		   compat_reallocarray.c \
70		   compat_recallocarray.c \
71		   compat_strcasestr.c \
72		   compat_stringlist.c \
73		   compat_strlcat.c \
74		   compat_strlcpy.c \
75		   compat_strndup.c \
76		   compat_strsep.c \
77		   compat_strtonum.c \
78		   compat_vasprintf.c \
79		   dba.c \
80		   dba_array.c \
81		   dba_read.c \
82		   dba_write.c \
83		   dbm.c \
84		   dbm_map.c \
85		   demandoc.c \
86		   eqn.c \
87		   eqn_html.c \
88		   eqn_term.c \
89		   html.c \
90		   lib.c \
91		   main.c \
92		   man.c \
93		   man_html.c \
94		   man_macro.c \
95		   man_term.c \
96		   man_validate.c \
97		   mandoc.c \
98		   mandoc_aux.c \
99		   mandoc_ohash.c \
100		   mandoc_xr.c \
101		   mandocd.c \
102		   mandocdb.c \
103		   manpath.c \
104		   mansearch.c \
105		   mdoc.c \
106		   mdoc_argv.c \
107		   mdoc_html.c \
108		   mdoc_macro.c \
109		   mdoc_man.c \
110		   mdoc_markdown.c \
111		   mdoc_state.c \
112		   mdoc_term.c \
113		   mdoc_validate.c \
114		   msec.c \
115		   out.c \
116		   preconv.c \
117		   read.c \
118		   roff.c \
119		   roff_html.c \
120		   roff_term.c \
121		   roff_validate.c \
122		   soelim.c \
123		   st.c \
124		   tag.c \
125		   tbl.c \
126		   tbl_data.c \
127		   tbl_html.c \
128		   tbl_layout.c \
129		   tbl_opts.c \
130		   tbl_term.c \
131		   term.c \
132		   term_ascii.c \
133		   term_ps.c \
134		   term_tab.c \
135		   tree.c
136
137DISTFILES	 = INSTALL \
138		   LICENSE \
139		   Makefile \
140		   Makefile.depend \
141		   NEWS \
142		   TODO \
143		   apropos.1 \
144		   catman.8 \
145		   cgi.h.example \
146		   compat_fts.h \
147		   compat_ohash.h \
148		   compat_stringlist.h \
149		   configure \
150		   configure.local.example \
151		   dba.h \
152		   dba_array.h \
153		   dba_write.h \
154		   dbm.h \
155		   dbm_map.h \
156		   demandoc.1 \
157		   eqn.7 \
158		   gmdiff \
159		   html.h \
160		   lib.in \
161		   libman.h \
162		   libmandoc.h \
163		   libmdoc.h \
164		   libroff.h \
165		   main.h \
166		   makewhatis.8 \
167		   man.1 \
168		   man.7 \
169		   man.cgi.3 \
170		   man.cgi.8 \
171		   man.conf.5 \
172		   man.h \
173		   man.options.1 \
174		   manconf.h \
175		   mandoc.1 \
176		   mandoc.3 \
177		   mandoc.css \
178		   mandoc.db.5 \
179		   mandoc.h \
180		   mandoc_aux.h \
181		   mandoc_char.7 \
182		   mandoc_escape.3 \
183		   mandoc_headers.3 \
184		   mandoc_html.3 \
185		   mandoc_malloc.3 \
186		   mandoc_ohash.h \
187		   mandoc_xr.h \
188		   mandocd.8 \
189		   mansearch.3 \
190		   mansearch.h \
191		   mchars_alloc.3 \
192		   mdoc.7 \
193		   mdoc.h \
194		   msec.in \
195		   out.h \
196		   predefs.in \
197		   roff.7 \
198		   roff.h \
199		   roff_int.h \
200		   soelim.1 \
201		   st.in \
202		   tag.h \
203		   tbl.3 \
204		   tbl.7 \
205		   term.h \
206		   $(SRCS) \
207		   $(TESTSRCS)
208
209LIBMAN_OBJS	 = man.o \
210		   man_macro.o \
211		   man_validate.o
212
213LIBMDOC_OBJS	 = att.o \
214		   lib.o \
215		   mdoc.o \
216		   mdoc_argv.o \
217		   mdoc_macro.o \
218		   mdoc_state.o \
219		   mdoc_validate.o \
220		   st.o
221
222LIBROFF_OBJS	 = eqn.o \
223		   roff.o \
224		   roff_validate.o \
225		   tbl.o \
226		   tbl_data.o \
227		   tbl_layout.o \
228		   tbl_opts.o
229
230LIBMANDOC_OBJS	 = $(LIBMAN_OBJS) \
231		   $(LIBMDOC_OBJS) \
232		   $(LIBROFF_OBJS) \
233		   chars.o \
234		   mandoc.o \
235		   mandoc_aux.o \
236		   mandoc_ohash.o \
237		   mandoc_xr.o \
238		   msec.o \
239		   preconv.o \
240		   read.o
241
242COMPAT_OBJS	 = compat_err.o \
243		   compat_fts.o \
244		   compat_getline.o \
245		   compat_getsubopt.o \
246		   compat_isblank.o \
247		   compat_mkdtemp.o \
248		   compat_ohash.o \
249		   compat_progname.o \
250		   compat_reallocarray.o \
251		   compat_recallocarray.o \
252		   compat_strcasestr.o \
253		   compat_strlcat.o \
254		   compat_strlcpy.o \
255		   compat_strndup.o \
256		   compat_strsep.o \
257		   compat_strtonum.o \
258		   compat_vasprintf.o
259
260MANDOC_HTML_OBJS = eqn_html.o \
261		   html.o \
262		   man_html.o \
263		   mdoc_html.o \
264		   roff_html.o \
265		   tbl_html.o
266
267MANDOC_TERM_OBJS = eqn_term.o \
268		   man_term.o \
269		   mdoc_term.o \
270		   roff_term.o \
271		   term.o \
272		   term_ascii.o \
273		   term_ps.o \
274		   term_tab.o \
275		   tbl_term.o
276
277DBM_OBJS	 = dbm.o \
278		   dbm_map.o \
279		   mansearch.o
280
281DBA_OBJS	 = dba.o \
282		   dba_array.o \
283		   dba_read.o \
284		   dba_write.o \
285		   mandocdb.o
286
287MAIN_OBJS	 = $(MANDOC_HTML_OBJS) \
288		   $(MANDOC_MAN_OBJS) \
289		   $(MANDOC_TERM_OBJS) \
290		   $(DBM_OBJS) \
291		   $(DBA_OBJS) \
292		   main.o \
293		   manpath.o \
294		   mdoc_man.o \
295		   mdoc_markdown.o \
296		   out.o \
297		   tag.o \
298		   tree.o
299
300CGI_OBJS	 = $(MANDOC_HTML_OBJS) \
301		   $(DBM_OBJS) \
302		   cgi.o \
303		   out.o
304
305MANDOCD_OBJS	 = $(MANDOC_HTML_OBJS) \
306		   $(MANDOC_TERM_OBJS) \
307		   mandocd.o \
308		   out.o \
309		   tag.o
310
311DEMANDOC_OBJS	 = demandoc.o
312
313SOELIM_OBJS	 = soelim.o \
314		   compat_err.o \
315		   compat_getline.o \
316		   compat_progname.o \
317		   compat_reallocarray.o \
318		   compat_stringlist.o
319
320WWW_MANS	 = apropos.1.html \
321		   demandoc.1.html \
322		   man.1.html \
323		   mandoc.1.html \
324		   soelim.1.html \
325		   man.cgi.3.html \
326		   mandoc.3.html \
327		   mandoc_escape.3.html \
328		   mandoc_headers.3.html \
329		   mandoc_html.3.html \
330		   mandoc_malloc.3.html \
331		   mansearch.3.html \
332		   mchars_alloc.3.html \
333		   tbl.3.html \
334		   man.conf.5.html \
335		   mandoc.db.5.html \
336		   eqn.7.html \
337		   man.7.html \
338		   mandoc_char.7.html \
339		   mandocd.8.html \
340		   mdoc.7.html \
341		   roff.7.html \
342		   tbl.7.html \
343		   catman.8.html \
344		   makewhatis.8.html \
345		   man.cgi.8.html \
346		   man.h.html \
347		   manconf.h.html \
348		   mandoc.h.html \
349		   mandoc_aux.h.html \
350		   mansearch.h.html \
351		   mdoc.h.html \
352		   roff.h.html
353
354# === USER CONFIGURATION ===============================================
355
356include Makefile.local
357
358# === DEPENDENCY HANDLING ==============================================
359
360all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local
361
362install: base-install $(INSTALL_TARGETS)
363
364www: $(WWW_MANS)
365
366$(WWW_MANS): mandoc
367
368.PHONY: base-install cgi-install install www-install
369.PHONY: clean distclean depend
370
371include Makefile.depend
372
373# === TARGETS CONTAINING SHELL COMMANDS ================================
374
375distclean: clean
376	rm -f Makefile.local config.h config.h.old config.log config.log.old
377
378clean:
379	rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS)
380	rm -f mandoc $(MAIN_OBJS)
381	rm -f man.cgi $(CGI_OBJS)
382	rm -f mandocd catman catman.o $(MANDOCD_OBJS)
383	rm -f demandoc $(DEMANDOC_OBJS)
384	rm -f soelim $(SOELIM_OBJS)
385	rm -f $(WWW_MANS) mandoc.tar.gz mandoc.sha256
386	rm -rf *.dSYM
387
388base-install: mandoc demandoc soelim
389	mkdir -p $(DESTDIR)$(BINDIR)
390	mkdir -p $(DESTDIR)$(SBINDIR)
391	mkdir -p $(DESTDIR)$(MANDIR)/man1
392	mkdir -p $(DESTDIR)$(MANDIR)/man5
393	mkdir -p $(DESTDIR)$(MANDIR)/man7
394	mkdir -p $(DESTDIR)$(MANDIR)/man8
395	$(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR)
396	$(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
397	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_MAN)
398	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_APROPOS)
399	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_WHATIS)
400	cd $(DESTDIR)$(SBINDIR) && \
401		$(LN) ${BIN_FROM_SBIN}/mandoc $(BINM_MAKEWHATIS)
402	$(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1
403	$(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
404	$(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
405	$(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
406	cd $(DESTDIR)$(MANDIR)/man1 && $(LN) $(BINM_APROPOS).1 $(BINM_WHATIS).1
407	$(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5
408	$(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5
409	$(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7
410	$(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7
411	$(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7
412	$(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7
413	$(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7
414	$(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
415	$(INSTALL_MAN) makewhatis.8 \
416		$(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
417
418lib-install: libmandoc.a
419	mkdir -p $(DESTDIR)$(LIBDIR)
420	mkdir -p $(DESTDIR)$(INCLUDEDIR)
421	mkdir -p $(DESTDIR)$(MANDIR)/man3
422	$(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
423	$(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \
424		$(DESTDIR)$(INCLUDEDIR)
425	$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
426		mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
427
428cgi-install: man.cgi
429	mkdir -p $(DESTDIR)$(CGIBINDIR)
430	mkdir -p $(DESTDIR)$(HTDOCDIR)
431	$(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR)
432	$(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR)
433
434catman-install: mandocd catman
435	mkdir -p $(DESTDIR)$(SBINDIR)
436	mkdir -p $(DESTDIR)$(MANDIR)/man8
437	$(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR)
438	$(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN)
439	$(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8
440	$(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8
441
442uninstall:
443	rm -f $(DESTDIR)$(BINDIR)/mandoc
444	rm -f $(DESTDIR)$(BINDIR)/demandoc
445	rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
446	rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN)
447	rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
448	rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
449	rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
450	rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1
451	rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1
452	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
453	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
454	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
455	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
456	rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5
457	rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5
458	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7
459	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7
460	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7
461	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7
462	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7
463	rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7
464	rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
465	rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi
466	rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css
467	rm -f $(DESTDIR)$(SBINDIR)/mandocd
468	rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN)
469	rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8
470	rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8
471	rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a
472	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3
473	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3
474	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3
475	rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3
476	rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3
477	rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3
478	rm -f $(DESTDIR)$(INCLUDEDIR)/man.h
479	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h
480	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h
481	rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h
482	rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h
483	[ ! -e $(DESTDIR)$(INCLUDEDIR) ] || rmdir $(DESTDIR)$(INCLUDEDIR)
484
485regress: all
486	cd regress && ./regress.pl
487
488regress-clean:
489	cd regress && ./regress.pl . clean
490
491Makefile.local config.h: configure $(TESTSRCS)
492	@echo "$@ is out of date; please run ./configure"
493	@exit 1
494
495libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
496	ar rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
497
498mandoc: $(MAIN_OBJS) libmandoc.a
499	$(CC) -o $@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD)
500
501man.cgi: $(CGI_OBJS) libmandoc.a
502	$(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD)
503
504mandocd: $(MANDOCD_OBJS) libmandoc.a
505	$(CC) -o $@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD)
506
507catman: catman.o libmandoc.a
508	$(CC) -o $@ $(LDFLAGS) catman.o libmandoc.a $(LDADD)
509
510demandoc: $(DEMANDOC_OBJS) libmandoc.a
511	$(CC) -o $@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD)
512
513soelim: $(SOELIM_OBJS)
514	$(CC) -o $@ $(LDFLAGS) $(SOELIM_OBJS)
515
516# --- maintainer targets ---
517
518www-install: www
519	$(INSTALL_DATA) $(WWW_MANS) mandoc.css $(HTDOCDIR)
520
521depend: config.h
522	mkdep -f Makefile.depend $(CFLAGS) $(SRCS)
523	perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \
524		s|\\\n||g; s|  +| |g; s| $$||mg; print;' \
525		Makefile.depend > Makefile.tmp
526	mv Makefile.tmp Makefile.depend
527
528regress-distclean:
529	@find regress \
530		-name '.#*' -o \
531		-name '*.orig' -o \
532		-name '*.rej' -o \
533		-name '*.core' \
534		-exec rm -i {} \;
535
536regress-distcheck:
537	@find regress ! -type d ! -type f
538	@find regress -type f \
539		! -path '*/CVS/*' \
540		! -name Makefile \
541		! -name Makefile.inc \
542		! -name '*.in' \
543		! -name '*.out_ascii' \
544		! -name '*.out_utf8' \
545		! -name '*.out_html' \
546		! -name '*.out_markdown' \
547		! -name '*.out_lint' \
548		! -path regress/regress.pl \
549		! -path regress/regress.pl.1
550
551dist: mandoc-$(VERSION).sha256
552
553mandoc-$(VERSION).sha256: mandoc-$(VERSION).tar.gz
554	sha256 mandoc-$(VERSION).tar.gz > $@
555
556mandoc-$(VERSION).tar.gz: $(DISTFILES)
557	ls regress/*/*/*.mandoc_* && exit 1 || true
558	mkdir -p .dist/mandoc-$(VERSION)/
559	$(INSTALL) -m 0644 $(DISTFILES) .dist/mandoc-$(VERSION)
560	cp -pR regress .dist/mandoc-$(VERSION)
561	find .dist/mandoc-$(VERSION)/regress \
562	    -type d -name CVS -print0 | xargs -0 rm -rf
563	chmod 755 .dist/mandoc-$(VERSION)/configure
564	( cd .dist/ && tar zcf ../$@ mandoc-$(VERSION) )
565	rm -rf .dist/
566
567# === SUFFIX RULES =====================================================
568
569.SUFFIXES:	 .1       .3       .5       .7       .8       .h
570.SUFFIXES:	 .1.html  .3.html  .5.html  .7.html  .8.html  .h.html
571
572.h.h.html:
573	highlight -I $< > $@
574
575.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: mandoc
576	./mandoc -Thtml -Wall,stop \
577		-Ostyle=mandoc.css,man=%N.%S.html,includes=%I.html $< > $@
578