]> git.cameronkatri.com Git - mandoc.git/blob - Makefile
e0b9a66b5b6b105b6bbe4a42cf6c50eeac12bbaf
[mandoc.git] / Makefile
1 # $Id: Makefile,v 1.531 2020/03/13 15:32:28 schwarze Exp $
2 #
3 # Copyright (c) 2011, 2013-2020 Ingo Schwarze <schwarze@openbsd.org>
4 # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
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
18 VERSION = 1.14.5
19
20 # === LIST OF FILES ====================================================
21
22 TESTSRCS = 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-reallocarray.c \
41 test-recallocarray.c \
42 test-recvmsg.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
57 SRCS = arch.c \
58 att.c \
59 catman.c \
60 cgi.c \
61 chars.c \
62 compat_err.c \
63 compat_fts.c \
64 compat_getline.c \
65 compat_getsubopt.c \
66 compat_isblank.c \
67 compat_mkdtemp.c \
68 compat_ohash.c \
69 compat_progname.c \
70 compat_reallocarray.c \
71 compat_recallocarray.c \
72 compat_strcasestr.c \
73 compat_stringlist.c \
74 compat_strlcat.c \
75 compat_strlcpy.c \
76 compat_strndup.c \
77 compat_strsep.c \
78 compat_strtonum.c \
79 compat_vasprintf.c \
80 dba.c \
81 dba_array.c \
82 dba_read.c \
83 dba_write.c \
84 dbm.c \
85 dbm_map.c \
86 demandoc.c \
87 eqn.c \
88 eqn_html.c \
89 eqn_term.c \
90 html.c \
91 lib.c \
92 main.c \
93 man.c \
94 man_html.c \
95 man_macro.c \
96 man_term.c \
97 man_validate.c \
98 mandoc.c \
99 mandoc_aux.c \
100 mandoc_msg.c \
101 mandoc_ohash.c \
102 mandoc_xr.c \
103 mandocd.c \
104 mandocdb.c \
105 manpath.c \
106 mansearch.c \
107 mdoc.c \
108 mdoc_argv.c \
109 mdoc_html.c \
110 mdoc_macro.c \
111 mdoc_man.c \
112 mdoc_markdown.c \
113 mdoc_state.c \
114 mdoc_term.c \
115 mdoc_validate.c \
116 msec.c \
117 out.c \
118 preconv.c \
119 read.c \
120 roff.c \
121 roff_html.c \
122 roff_term.c \
123 roff_validate.c \
124 soelim.c \
125 st.c \
126 tag.c \
127 tbl.c \
128 tbl_data.c \
129 tbl_html.c \
130 tbl_layout.c \
131 tbl_opts.c \
132 tbl_term.c \
133 term.c \
134 term_ascii.c \
135 term_ps.c \
136 term_tab.c \
137 term_tag.c \
138 tree.c
139
140 DISTFILES = INSTALL \
141 LICENSE \
142 Makefile \
143 Makefile.depend \
144 NEWS \
145 TODO \
146 apropos.1 \
147 catman.8 \
148 cgi.h.example \
149 compat_fts.h \
150 compat_ohash.h \
151 compat_stringlist.h \
152 configure \
153 configure.local.example \
154 dba.h \
155 dba_array.h \
156 dba_write.h \
157 dbm.h \
158 dbm_map.h \
159 demandoc.1 \
160 eqn.7 \
161 eqn.h \
162 eqn_parse.h \
163 gmdiff \
164 html.h \
165 lib.in \
166 libman.h \
167 libmandoc.h \
168 libmdoc.h \
169 main.h \
170 makewhatis.8 \
171 man.1 \
172 man.7 \
173 man.cgi.3 \
174 man.cgi.8 \
175 man.conf.5 \
176 man.h \
177 man.options.1 \
178 manconf.h \
179 mandoc.1 \
180 mandoc.3 \
181 mandoc.css \
182 mandoc.db.5 \
183 mandoc.h \
184 mandoc_aux.h \
185 mandoc_char.7 \
186 mandoc_escape.3 \
187 mandoc_headers.3 \
188 mandoc_html.3 \
189 mandoc_malloc.3 \
190 mandoc_ohash.h \
191 mandoc_parse.h \
192 mandoc_xr.h \
193 mandocd.8 \
194 mansearch.3 \
195 mansearch.h \
196 mchars_alloc.3 \
197 mdoc.7 \
198 mdoc.h \
199 msec.in \
200 out.h \
201 predefs.in \
202 roff.7 \
203 roff.h \
204 roff_int.h \
205 soelim.1 \
206 tag.h \
207 tbl.3 \
208 tbl.7 \
209 tbl.h \
210 tbl_int.h \
211 tbl_parse.h \
212 term.h \
213 term_tag.h \
214 $(SRCS) \
215 $(TESTSRCS)
216
217 LIBMAN_OBJS = man.o \
218 man_macro.o \
219 man_validate.o
220
221 LIBMDOC_OBJS = att.o \
222 lib.o \
223 mdoc.o \
224 mdoc_argv.o \
225 mdoc_macro.o \
226 mdoc_state.o \
227 mdoc_validate.o \
228 st.o
229
230 LIBROFF_OBJS = eqn.o \
231 roff.o \
232 roff_validate.o \
233 tbl.o \
234 tbl_data.o \
235 tbl_layout.o \
236 tbl_opts.o
237
238 LIBMANDOC_OBJS = $(LIBMAN_OBJS) \
239 $(LIBMDOC_OBJS) \
240 $(LIBROFF_OBJS) \
241 arch.o \
242 chars.o \
243 mandoc.o \
244 mandoc_aux.o \
245 mandoc_msg.o \
246 mandoc_ohash.o \
247 mandoc_xr.o \
248 msec.o \
249 preconv.o \
250 read.o \
251 tag.o
252
253 COMPAT_OBJS = compat_err.o \
254 compat_fts.o \
255 compat_getline.o \
256 compat_getsubopt.o \
257 compat_isblank.o \
258 compat_mkdtemp.o \
259 compat_ohash.o \
260 compat_progname.o \
261 compat_reallocarray.o \
262 compat_recallocarray.o \
263 compat_strcasestr.o \
264 compat_strlcat.o \
265 compat_strlcpy.o \
266 compat_strndup.o \
267 compat_strsep.o \
268 compat_strtonum.o \
269 compat_vasprintf.o
270
271 MANDOC_HTML_OBJS = eqn_html.o \
272 html.o \
273 man_html.o \
274 mdoc_html.o \
275 roff_html.o \
276 tbl_html.o
277
278 MANDOC_TERM_OBJS = eqn_term.o \
279 man_term.o \
280 mdoc_term.o \
281 roff_term.o \
282 term.o \
283 term_ascii.o \
284 term_ps.o \
285 term_tab.o \
286 term_tag.o \
287 tbl_term.o
288
289 DBM_OBJS = dbm.o \
290 dbm_map.o \
291 mansearch.o
292
293 DBA_OBJS = dba.o \
294 dba_array.o \
295 dba_read.o \
296 dba_write.o \
297 mandocdb.o
298
299 MAIN_OBJS = $(MANDOC_HTML_OBJS) \
300 $(MANDOC_MAN_OBJS) \
301 $(MANDOC_TERM_OBJS) \
302 $(DBM_OBJS) \
303 $(DBA_OBJS) \
304 main.o \
305 manpath.o \
306 mdoc_man.o \
307 mdoc_markdown.o \
308 out.o \
309 tree.o
310
311 CGI_OBJS = $(MANDOC_HTML_OBJS) \
312 $(DBM_OBJS) \
313 cgi.o \
314 out.o
315
316 MANDOCD_OBJS = $(MANDOC_HTML_OBJS) \
317 $(MANDOC_TERM_OBJS) \
318 mandocd.o \
319 out.o
320
321 DEMANDOC_OBJS = demandoc.o
322
323 SOELIM_OBJS = soelim.o \
324 compat_err.o \
325 compat_getline.o \
326 compat_progname.o \
327 compat_reallocarray.o \
328 compat_stringlist.o
329
330 WWW_MANS = apropos.1.html \
331 demandoc.1.html \
332 man.1.html \
333 man.options.1.html \
334 mandoc.1.html \
335 soelim.1.html \
336 man.cgi.3.html \
337 mandoc.3.html \
338 mandoc_escape.3.html \
339 mandoc_headers.3.html \
340 mandoc_html.3.html \
341 mandoc_malloc.3.html \
342 mansearch.3.html \
343 mchars_alloc.3.html \
344 tbl.3.html \
345 man.conf.5.html \
346 mandoc.db.5.html \
347 eqn.7.html \
348 man.7.html \
349 mandoc_char.7.html \
350 mdoc.7.html \
351 roff.7.html \
352 tbl.7.html \
353 catman.8.html \
354 makewhatis.8.html \
355 man.cgi.8.html \
356 mandocd.8.html
357
358 WWW_INCS = eqn.h.html \
359 html.h.html \
360 man.h.html \
361 manconf.h.html \
362 mandoc.h.html \
363 mandoc_aux.h.html \
364 mandoc_parse.h.html \
365 mansearch.h.html \
366 mdoc.h.html \
367 roff.h.html \
368 tbl.h.html \
369 tbl_int.h.html \
370 tbl_parse.h.html
371
372 # === USER CONFIGURATION ===============================================
373
374 include Makefile.local
375
376 # === DEPENDENCY HANDLING ==============================================
377
378 all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local
379
380 install: base-install $(INSTALL_TARGETS)
381
382 www: $(WWW_MANS) $(WWW_INCS)
383
384 $(WWW_MANS) $(WWW_INCS): mandoc
385
386 .PHONY: base-install cgi-install install www-install
387 .PHONY: clean distclean depend
388
389 include Makefile.depend
390
391 # === TARGETS CONTAINING SHELL COMMANDS ================================
392
393 distclean: clean
394 rm -f Makefile.local config.h config.h.old config.log config.log.old
395
396 clean:
397 rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS)
398 rm -f mandoc man $(MAIN_OBJS)
399 rm -f man.cgi $(CGI_OBJS)
400 rm -f mandocd catman catman.o $(MANDOCD_OBJS)
401 rm -f demandoc $(DEMANDOC_OBJS)
402 rm -f soelim $(SOELIM_OBJS)
403 rm -f $(WWW_MANS) $(WWW_INCS) mandoc*.tar.gz mandoc*.sha256
404 rm -rf *.dSYM
405
406 base-install: mandoc demandoc soelim
407 mkdir -p $(DESTDIR)$(BINDIR)
408 mkdir -p $(DESTDIR)$(SBINDIR)
409 mkdir -p $(DESTDIR)$(MANDIR)/man1
410 mkdir -p $(DESTDIR)$(MANDIR)/man5
411 mkdir -p $(DESTDIR)$(MANDIR)/man7
412 mkdir -p $(DESTDIR)$(MANDIR)/man8
413 $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR)
414 $(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
415 cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_MAN)
416 cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_APROPOS)
417 cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_WHATIS)
418 cd $(DESTDIR)$(SBINDIR) && \
419 $(LN) ${BIN_FROM_SBIN}/mandoc $(BINM_MAKEWHATIS)
420 $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1
421 $(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
422 $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
423 $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
424 cd $(DESTDIR)$(MANDIR)/man1 && $(LN) $(BINM_APROPOS).1 $(BINM_WHATIS).1
425 $(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5
426 $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5
427 $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7
428 $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7
429 $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7
430 $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7
431 $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7
432 $(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
433 $(INSTALL_MAN) makewhatis.8 \
434 $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
435
436 lib-install: libmandoc.a
437 mkdir -p $(DESTDIR)$(LIBDIR)
438 mkdir -p $(DESTDIR)$(INCLUDEDIR)
439 mkdir -p $(DESTDIR)$(MANDIR)/man3
440 $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
441 $(INSTALL_LIB) eqn.h man.h mandoc.h mandoc_aux.h mandoc_parse.h \
442 mdoc.h roff.h tbl.h $(DESTDIR)$(INCLUDEDIR)
443 $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
444 mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
445
446 cgi-install: man.cgi
447 mkdir -p $(DESTDIR)$(CGIBINDIR)
448 mkdir -p $(DESTDIR)$(HTDOCDIR)
449 $(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR)
450 $(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR)
451
452 catman-install: mandocd catman
453 mkdir -p $(DESTDIR)$(SBINDIR)
454 mkdir -p $(DESTDIR)$(MANDIR)/man8
455 $(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR)
456 $(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN)
457 $(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8
458 $(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8
459
460 uninstall:
461 rm -f $(DESTDIR)$(BINDIR)/mandoc
462 rm -f $(DESTDIR)$(BINDIR)/demandoc
463 rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
464 rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN)
465 rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
466 rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
467 rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
468 rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1
469 rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1
470 rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
471 rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
472 rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
473 rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
474 rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5
475 rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5
476 rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7
477 rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7
478 rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7
479 rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7
480 rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7
481 rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7
482 rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
483 rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi
484 rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css
485 rm -f $(DESTDIR)$(SBINDIR)/mandocd
486 rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN)
487 rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8
488 rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8
489 rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a
490 rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3
491 rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3
492 rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3
493 rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3
494 rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3
495 rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3
496 rm -f $(DESTDIR)$(INCLUDEDIR)/eqn.h
497 rm -f $(DESTDIR)$(INCLUDEDIR)/man.h
498 rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h
499 rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h
500 rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_parse.h
501 rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h
502 rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h
503 rm -f $(DESTDIR)$(INCLUDEDIR)/tbl.h
504 [ ! -e $(DESTDIR)$(INCLUDEDIR) ] || rmdir $(DESTDIR)$(INCLUDEDIR)
505
506 regress: all man
507 cd regress && ./regress.pl
508
509 regress-clean:
510 cd regress && ./regress.pl . clean
511
512 Makefile.local config.h: configure $(TESTSRCS)
513 @echo "$@ is out of date; please run ./configure"
514 @exit 1
515
516 libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
517 ar rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
518
519 mandoc: $(MAIN_OBJS) libmandoc.a
520 $(CC) -o $@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD)
521
522 man: mandoc
523 $(LN) mandoc man
524
525 man.cgi: $(CGI_OBJS) libmandoc.a
526 $(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD)
527
528 mandocd: $(MANDOCD_OBJS) libmandoc.a
529 $(CC) -o $@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD)
530
531 catman: catman.o libmandoc.a
532 $(CC) -o $@ $(LDFLAGS) catman.o libmandoc.a $(LDADD)
533
534 demandoc: $(DEMANDOC_OBJS) libmandoc.a
535 $(CC) -o $@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD)
536
537 soelim: $(SOELIM_OBJS)
538 $(CC) -o $@ $(LDFLAGS) $(SOELIM_OBJS)
539
540 # --- maintainer targets ---
541
542 www-install: www
543 $(INSTALL_DATA) mandoc.css $(HTDOCDIR)
544 $(INSTALL_DATA) $(WWW_MANS) $(HTDOCDIR)/man
545 $(INSTALL_DATA) $(WWW_INCS) $(HTDOCDIR)/includes
546
547 depend: config.h
548 mkdep -f Makefile.depend $(CFLAGS) $(SRCS)
549 perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \
550 s|\\\n||g; s| +| |g; s| $$||mg; print;' \
551 Makefile.depend > Makefile.tmp
552 mv Makefile.tmp Makefile.depend
553
554 regress-distclean:
555 @find regress \
556 -name '.#*' -o \
557 -name '*.orig' -o \
558 -name '*.rej' -o \
559 -name '*.core' \
560 -exec rm -i {} \;
561
562 regress-distcheck:
563 @find regress ! -type d ! -type f
564 @find regress -type f \
565 ! -path '*/CVS/*' \
566 ! -name Makefile \
567 ! -name Makefile.inc \
568 ! -name '*.in' \
569 ! -name '*.out_ascii' \
570 ! -name '*.out_utf8' \
571 ! -name '*.out_html' \
572 ! -name '*.out_markdown' \
573 ! -name '*.out_lint' \
574 ! -path regress/regress.pl \
575 ! -path regress/regress.pl.1
576
577 dist: mandoc-$(VERSION).sha256
578
579 mandoc-$(VERSION).sha256: mandoc-$(VERSION).tar.gz
580 sha256 mandoc-$(VERSION).tar.gz > $@
581
582 mandoc-$(VERSION).tar.gz: $(DISTFILES)
583 ls regress/*/*/*.mandoc_* && exit 1 || true
584 mkdir -p .dist/mandoc-$(VERSION)/
585 $(INSTALL) -m 0644 $(DISTFILES) .dist/mandoc-$(VERSION)
586 cp -pR regress .dist/mandoc-$(VERSION)
587 find .dist/mandoc-$(VERSION)/regress \
588 -type d -name CVS -print0 | xargs -0 rm -rf
589 chmod 755 .dist/mandoc-$(VERSION)/configure
590 ( cd .dist/ && tar zcf ../$@ mandoc-$(VERSION) )
591 rm -rf .dist/
592
593 dist-install: dist
594 $(INSTALL_DATA) mandoc-$(VERSION).tar.gz mandoc-$(VERSION).sha256 \
595 $(HTDOCDIR)/snapshots
596
597 # === SUFFIX RULES =====================================================
598
599 .SUFFIXES: .1 .3 .5 .7 .8 .h
600 .SUFFIXES: .1.html .3.html .5.html .7.html .8.html .h.html
601
602 .h.h.html:
603 highlight -I $< > $@
604
605 .1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: mandoc
606 mandoc -Thtml -Wwarning,stop \
607 -O 'style=/mandoc.css,man=/man/%N.%S.html;https://man.openbsd.org/%N.%S,includes=/includes/%I.html' \
608 $< > $@