]> git.cameronkatri.com Git - mandoc.git/blob - Makefile
In man(7), when no explicit volume name is given, use the default
[mandoc.git] / Makefile
1 .PHONY: clean install installwww
2 .SUFFIXES: .sgml .html .md5 .h .h.html
3 .SUFFIXES: .1 .3 .7 .8
4 .SUFFIXES: .1.txt .3.txt .7.txt .8.txt
5 .SUFFIXES: .1.pdf .3.pdf .7.pdf .8.pdf
6 .SUFFIXES: .1.ps .3.ps .7.ps .8.ps
7 .SUFFIXES: .1.html .3.html .7.html .8.html
8 .SUFFIXES: .1.xhtml .3.xhtml .7.xhtml .8.xhtml
9
10 # Specify this if you want to hard-code the operating system to appear
11 # in the lower-left hand corner of -mdoc manuals.
12 #
13 # CFLAGS += -DOSNAME="\"OpenBSD 4.5\""
14
15 VERSION = 1.12.0
16 VDATE = 8 October 2011
17
18 # IFF your system supports multi-byte functions (setlocale(), wcwidth(),
19 # putwchar()) AND has __STDC_ISO_10646__ (that is, wchar_t is simply a
20 # UCS-4 value) should you define USE_WCHAR. If you define it and your
21 # system DOESN'T support this, -Tlocale will produce garbage.
22 # If you don't define it, -Tlocale is a synonym for -Tacsii.
23 #
24 CFLAGS += -DUSE_WCHAR
25
26 # If your system has manpath(1), uncomment this. This is most any
27 # system that's not OpenBSD or NetBSD. If uncommented, apropos(1),
28 # mandocdb(8), and man.cgi will popen(3) manpath(1) to get the MANPATH
29 # variable.
30 #CFLAGS += -DUSE_MANPATH
31
32 # If your system supports static binaries only, uncomment this.
33 #STATIC = -static
34
35 CFLAGS += -g -DHAVE_CONFIG_H -DVERSION="\"$(VERSION)\""
36 CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
37 PREFIX = /usr/local
38 BINDIR = $(PREFIX)/bin
39 INCLUDEDIR = $(PREFIX)/include/mandoc
40 LIBDIR = $(PREFIX)/lib/mandoc
41 MANDIR = $(PREFIX)/man
42 EXAMPLEDIR = $(PREFIX)/share/examples/mandoc
43 INSTALL = install
44 INSTALL_PROGRAM = $(INSTALL) -m 0755
45 INSTALL_DATA = $(INSTALL) -m 0444
46 INSTALL_LIB = $(INSTALL) -m 0644
47 INSTALL_SOURCE = $(INSTALL) -m 0644
48 INSTALL_MAN = $(INSTALL_DATA)
49
50 # Non-BSD systems (Linux, etc.) need -ldb to compile mandocdb and
51 # apropos.
52 # However, if you don't have -ldb at all (or it's not native), then
53 # comment out apropos and mandocdb.
54 #
55 #DBLIB = -ldb
56 DBBIN = apropos mandocdb man.cgi catman whatis
57 DBLN = llib-lapropos.ln llib-lmandocdb.ln llib-lman.cgi.ln llib-lcatman.ln
58
59 all: mandoc preconv demandoc $(DBBIN)
60
61 SRCS = Makefile \
62 apropos.1 \
63 apropos.c \
64 arch.c \
65 arch.in \
66 att.c \
67 att.in \
68 chars.c \
69 chars.in \
70 compat_getsubopt.c \
71 compat_strlcat.c \
72 compat_strlcpy.c \
73 config.h.post \
74 config.h.pre \
75 demandoc.c \
76 demandoc.1 \
77 eqn.7 \
78 eqn.c \
79 eqn_html.c \
80 eqn_term.c \
81 example.style.css \
82 external.png \
83 html.c \
84 html.h \
85 index.css \
86 index.sgml \
87 lib.c \
88 lib.in \
89 libman.h \
90 libmandoc.h \
91 libmdoc.h \
92 libroff.h \
93 main.c \
94 main.h \
95 man.h \
96 man.7 \
97 man.c \
98 man.cgi.7 \
99 man_hash.c \
100 man_html.c \
101 man_macro.c \
102 man_term.c \
103 man_validate.c \
104 mandoc.1 \
105 mandoc.3 \
106 mandoc.c \
107 mandoc.h \
108 mandocdb.8 \
109 mandocdb.c \
110 mandocdb.h \
111 mandoc_char.7 \
112 manpath.c \
113 manpath.h \
114 catman.c \
115 catman.8 \
116 mdoc.h \
117 mdoc.7 \
118 mdoc.c \
119 mdoc_argv.c \
120 mdoc_hash.c \
121 mdoc_html.c \
122 mdoc_macro.c \
123 mdoc_man.c \
124 mdoc_term.c \
125 mdoc_validate.c \
126 msec.c \
127 msec.in \
128 out.c \
129 out.h \
130 preconv.1 \
131 preconv.c \
132 predefs.in \
133 read.c \
134 roff.7 \
135 roff.c \
136 st.c \
137 st.in \
138 style.css \
139 tbl.7 \
140 tbl.c \
141 tbl_data.c \
142 tbl_html.c \
143 tbl_layout.c \
144 tbl_opts.c \
145 tbl_term.c \
146 term.c \
147 term.h \
148 term_ascii.c \
149 term_ps.c \
150 test-getsubopt.c \
151 test-mmap.c \
152 test-strlcat.c \
153 test-strlcpy.c \
154 test-strptime.c \
155 tree.c \
156 vol.c \
157 vol.in
158
159 LIBMAN_OBJS = man.o \
160 man_hash.o \
161 man_macro.o \
162 man_validate.o
163 LIBMAN_LNS = man.ln \
164 man_hash.ln \
165 man_macro.ln \
166 man_validate.ln
167
168 LIBMDOC_OBJS = arch.o \
169 att.o \
170 lib.o \
171 mdoc.o \
172 mdoc_argv.o \
173 mdoc_hash.o \
174 mdoc_macro.o \
175 mdoc_validate.o \
176 st.o \
177 vol.o
178 LIBMDOC_LNS = arch.ln \
179 att.ln \
180 lib.ln \
181 mdoc.ln \
182 mdoc_argv.ln \
183 mdoc_hash.ln \
184 mdoc_macro.ln \
185 mdoc_validate.ln \
186 st.ln \
187 vol.ln
188
189 LIBROFF_OBJS = eqn.o \
190 roff.o \
191 tbl.o \
192 tbl_data.o \
193 tbl_layout.o \
194 tbl_opts.o
195 LIBROFF_LNS = eqn.ln \
196 roff.ln \
197 tbl.ln \
198 tbl_data.ln \
199 tbl_layout.ln \
200 tbl_opts.ln
201
202 LIBMANDOC_OBJS = $(LIBMAN_OBJS) \
203 $(LIBMDOC_OBJS) \
204 $(LIBROFF_OBJS) \
205 chars.o \
206 mandoc.o \
207 msec.o \
208 read.o
209 LIBMANDOC_LNS = $(LIBMAN_LNS) \
210 $(LIBMDOC_LNS) \
211 $(LIBROFF_LNS) \
212 chars.ln \
213 mandoc.ln \
214 msec.ln \
215 read.ln
216
217 COMPAT_OBJS = compat_getsubopt.o \
218 compat_strlcat.o \
219 compat_strlcpy.o
220 COMPAT_LNS = compat_getsubopt.ln \
221 compat_strlcat.ln \
222 compat_strlcpy.ln
223
224 arch.o arch.ln: arch.in
225 att.o att.ln: att.in
226 chars.o chars.ln: chars.in
227 lib.o lib.ln: lib.in
228 msec.o msec.ln: msec.in
229 roff.o roff.ln: predefs.in
230 st.o st.ln: st.in
231 vol.o vol.ln: vol.in
232
233 $(LIBMAN_OBJS) $(LIBMAN_LNS): libman.h
234 $(LIBMDOC_OBJS) $(LIBMDOC_LNS): libmdoc.h
235 $(LIBROFF_OBJS) $(LIBROFF_LNS): libroff.h
236 $(LIBMANDOC_OBJS) $(LIBMANDOC_LNS): mandoc.h mdoc.h man.h libmandoc.h config.h
237
238 $(COMPAT_OBJS) $(COMPAT_LNS): config.h
239
240 MANDOC_HTML_OBJS = eqn_html.o \
241 html.o \
242 man_html.o \
243 mdoc_html.o \
244 tbl_html.o
245 MANDOC_HTML_LNS = eqn_html.ln \
246 html.ln \
247 man_html.ln \
248 mdoc_html.ln \
249 tbl_html.ln
250
251 MANDOC_MAN_OBJS = mdoc_man.o
252 MANDOC_MAN_LNS = mdoc_man.ln
253
254 MANDOC_TERM_OBJS = eqn_term.o \
255 man_term.o \
256 mdoc_term.o \
257 term.o \
258 term_ascii.o \
259 term_ps.o \
260 tbl_term.o
261 MANDOC_TERM_LNS = eqn_term.ln \
262 man_term.ln \
263 mdoc_term.ln \
264 term.ln \
265 term_ascii.ln \
266 term_ps.ln \
267 tbl_term.ln
268
269 MANDOC_OBJS = $(MANDOC_HTML_OBJS) \
270 $(MANDOC_MAN_OBJS) \
271 $(MANDOC_TERM_OBJS) \
272 main.o \
273 out.o \
274 tree.o
275 MANDOC_LNS = $(MANDOC_HTML_LNS) \
276 $(MANDOC_MAN_LNS) \
277 $(MANDOC_TERM_LNS) \
278 main.ln \
279 out.ln \
280 tree.ln
281
282 $(MANDOC_HTML_OBJS) $(MANDOC_HTML_LNS): html.h
283 $(MANDOC_TERM_OBJS) $(MANDOC_TERM_LNS): term.h
284 $(MANDOC_OBJS) $(MANDOC_LNS): main.h mandoc.h mdoc.h man.h config.h out.h
285
286 MANDOCDB_OBJS = mandocdb.o manpath.o
287 MANDOCDB_LNS = mandocdb.ln manpath.ln
288
289 $(MANDOCDB_OBJS) $(MANDOCDB_LNS): mandocdb.h mandoc.h mdoc.h man.h config.h manpath.h
290
291 PRECONV_OBJS = preconv.o
292 PRECONV_LNS = preconv.ln
293
294 $(PRECONV_OBJS) $(PRECONV_LNS): config.h
295
296 APROPOS_OBJS = apropos.o apropos_db.o manpath.o
297 APROPOS_LNS = apropos.ln apropos_db.ln manpath.ln
298
299 $(APROPOS_OBJS) $(APROPOS_LNS): config.h mandoc.h apropos_db.h manpath.h mandocdb.h
300
301 CGI_OBJS = $(MANDOC_HTML_OBJS) \
302 $(MANDOC_MAN_OBJS) \
303 $(MANDOC_TERM_OBJS) \
304 cgi.o \
305 apropos_db.o \
306 manpath.o \
307 out.o \
308 tree.o
309
310 CGI_LNS = $(MANDOC_HTML_LNS) \
311 $(MANDOC_MAN_LNS) \
312 $(MANDOC_TERM_LNS) \
313 cgi.ln \
314 apropos_db.ln \
315 manpath.ln \
316 out.ln \
317 tree.ln
318
319 $(CGI_OBJS) $(CGI_LNS): main.h mdoc.h man.h out.h config.h mandoc.h apropos_db.h manpath.h mandocdb.h
320
321 CATMAN_OBJS = catman.o manpath.o
322 CATMAN_LNS = catman.ln manpath.ln
323
324 $(CATMAN_OBJS) $(CATMAN_LNS): config.h mandoc.h manpath.h
325
326 DEMANDOC_OBJS = demandoc.o
327 DEMANDOC_LNS = demandoc.ln
328
329 $(DEMANDOC_OBJS) $(DEMANDOC_LNS): config.h
330
331 INDEX_MANS = apropos.1.html \
332 apropos.1.xhtml \
333 apropos.1.ps \
334 apropos.1.pdf \
335 apropos.1.txt \
336 demandoc.1.html \
337 demandoc.1.xhtml \
338 demandoc.1.ps \
339 demandoc.1.pdf \
340 demandoc.1.txt \
341 mandoc.1.html \
342 mandoc.1.xhtml \
343 mandoc.1.ps \
344 mandoc.1.pdf \
345 mandoc.1.txt \
346 mandoc.3.html \
347 mandoc.3.xhtml \
348 mandoc.3.ps \
349 mandoc.3.pdf \
350 mandoc.3.txt \
351 eqn.7.html \
352 eqn.7.xhtml \
353 eqn.7.ps \
354 eqn.7.pdf \
355 eqn.7.txt \
356 man.7.html \
357 man.7.xhtml \
358 man.7.ps \
359 man.7.pdf \
360 man.7.txt \
361 mandoc_char.7.html \
362 mandoc_char.7.xhtml \
363 mandoc_char.7.ps \
364 mandoc_char.7.pdf \
365 mandoc_char.7.txt \
366 mdoc.7.html \
367 mdoc.7.xhtml \
368 mdoc.7.ps \
369 mdoc.7.pdf \
370 mdoc.7.txt \
371 preconv.1.html \
372 preconv.1.xhtml \
373 preconv.1.ps \
374 preconv.1.pdf \
375 preconv.1.txt \
376 roff.7.html \
377 roff.7.xhtml \
378 roff.7.ps \
379 roff.7.pdf \
380 roff.7.txt \
381 tbl.7.html \
382 tbl.7.xhtml \
383 tbl.7.ps \
384 tbl.7.pdf \
385 tbl.7.txt \
386 mandocdb.8.html \
387 mandocdb.8.xhtml \
388 mandocdb.8.ps \
389 mandocdb.8.pdf \
390 mandocdb.8.txt
391
392 $(INDEX_MANS): mandoc
393
394 INDEX_OBJS = $(INDEX_MANS) \
395 man.h.html \
396 mandoc.h.html \
397 mdoc.h.html \
398 mdocml.tar.gz \
399 mdocml.md5
400
401 www: index.html
402
403 lint: llib-lmandoc.ln llib-lpreconv.ln llib-ldemandoc.ln $(DBLN)
404
405 clean:
406 rm -f libmandoc.a $(LIBMANDOC_OBJS)
407 rm -f llib-llibmandoc.ln $(LIBMANDOC_LNS)
408 rm -f mandocdb $(MANDOCDB_OBJS)
409 rm -f llib-lmandocdb.ln $(MANDOCDB_LNS)
410 rm -f preconv $(PRECONV_OBJS)
411 rm -f llib-lpreconv.ln $(PRECONV_LNS)
412 rm -f apropos $(APROPOS_OBJS)
413 rm -f llib-lapropos.ln $(APROPOS_LNS)
414 rm -f man.cgi $(CGI_OBJS)
415 rm -f llib-lman.cgi.ln $(CGI_LNS)
416 rm -f catman $(CATMAN_OBJS)
417 rm -f llib-lcatman.ln $(CATMAN_LNS)
418 rm -f demandoc $(DEMANDOC_OBJS)
419 rm -f llib-ldemandoc.ln $(DEMANDOC_LNS)
420 rm -f mandoc $(MANDOC_OBJS)
421 rm -f llib-lmandoc.ln $(MANDOC_LNS)
422 rm -f config.h config.log $(COMPAT_OBJS) $(COMPAT_LNS)
423 rm -f mdocml.tar.gz mdocml-win32.zip mdocml-win64.zip mdocml-macosx.zip
424 rm -f index.html $(INDEX_OBJS)
425 rm -rf test-strlcpy.DSYM
426 rm -rf test-strlcat.DSYM
427 rm -rf test-strptime.DSYM
428 rm -rf test-mmap.DSYM
429 rm -rf test-getsubopt.DSYM
430
431 install: all
432 mkdir -p $(DESTDIR)$(BINDIR)
433 mkdir -p $(DESTDIR)$(EXAMPLEDIR)
434 mkdir -p $(DESTDIR)$(LIBDIR)
435 mkdir -p $(DESTDIR)$(INCLUDEDIR)
436 mkdir -p $(DESTDIR)$(MANDIR)/man1
437 mkdir -p $(DESTDIR)$(MANDIR)/man3
438 mkdir -p $(DESTDIR)$(MANDIR)/man7
439 mkdir -p $(DESTDIR)$(MANDIR)/man8
440 $(INSTALL_PROGRAM) mandoc preconv demandoc $(DESTDIR)$(BINDIR)
441 $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
442 $(INSTALL_LIB) man.h mdoc.h mandoc.h $(DESTDIR)$(INCLUDEDIR)
443 $(INSTALL_MAN) mandoc.1 preconv.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1
444 $(INSTALL_MAN) mandoc.3 $(DESTDIR)$(MANDIR)/man3
445 $(INSTALL_MAN) man.7 mdoc.7 roff.7 eqn.7 tbl.7 mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
446 $(INSTALL_DATA) example.style.css $(DESTDIR)$(EXAMPLEDIR)
447
448 installwww: www
449 mkdir -p $(PREFIX)/snapshots
450 mkdir -p $(PREFIX)/binaries
451 $(INSTALL_DATA) index.html external.png index.css $(PREFIX)
452 $(INSTALL_DATA) $(INDEX_MANS) style.css $(PREFIX)
453 $(INSTALL_DATA) mandoc.h.html man.h.html mdoc.h.html $(PREFIX)
454 $(INSTALL_DATA) mdocml.tar.gz $(PREFIX)/snapshots
455 $(INSTALL_DATA) mdocml.md5 $(PREFIX)/snapshots
456 $(INSTALL_DATA) mdocml.tar.gz $(PREFIX)/snapshots/mdocml-$(VERSION).tar.gz
457 $(INSTALL_DATA) mdocml.md5 $(PREFIX)/snapshots/mdocml-$(VERSION).md5
458
459 libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
460 $(AR) rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
461
462 llib-llibmandoc.ln: $(COMPAT_LNS) $(LIBMANDOC_LNS)
463 $(LINT) $(LINTFLAGS) -Clibmandoc $(COMPAT_LNS) $(LIBMANDOC_LNS)
464
465 mandoc: $(MANDOC_OBJS) libmandoc.a
466 $(CC) $(LDFLAGS) -o $@ $(MANDOC_OBJS) libmandoc.a
467
468 llib-lmandoc.ln: $(MANDOC_LNS) llib-llibmandoc.ln
469 $(LINT) $(LINTFLAGS) -Cmandoc $(MANDOC_LNS) llib-llibmandoc.ln
470
471 mandocdb: $(MANDOCDB_OBJS) libmandoc.a
472 $(CC) $(LDFLAGS) -o $@ $(MANDOCDB_OBJS) libmandoc.a $(DBLIB)
473
474 llib-lmandocdb.ln: $(MANDOCDB_LNS) llib-llibmandoc.ln
475 $(LINT) $(LINTFLAGS) -Cmandocdb $(MANDOCDB_LNS) llib-llibmandoc.ln
476
477 preconv: $(PRECONV_OBJS)
478 $(CC) $(LDFLAGS) -o $@ $(PRECONV_OBJS)
479
480 llib-lpreconv.ln: $(PRECONV_LNS) llib-llibmandoc.ln
481 $(LINT) $(LINTFLAGS) -Cpreconv $(PRECONV_LNS) llib-llibmandoc.ln
482
483 whatis: apropos
484 cp -f apropos whatis
485
486 apropos: $(APROPOS_OBJS) libmandoc.a
487 $(CC) $(LDFLAGS) -o $@ $(APROPOS_OBJS) libmandoc.a $(DBLIB)
488
489 llib-lapropos.ln: $(APROPOS_LNS) llib-llibmandoc.ln
490 $(LINT) $(LINTFLAGS) -Capropos $(APROPOS_LNS) llib-llibmandoc.ln
491
492 catman: $(CATMAN_OBJS) libmandoc.a
493 $(CC) $(LDFLAGS) -o $@ $(CATMAN_OBJS) libmandoc.a $(DBLIB)
494
495 llib-lcatman.ln: $(CATMAN_LNS) llib-llibmandoc.ln
496 $(LINT) $(LINTFLAGS) -Ccatman $(CATMAN_LNS) llib-llibmandoc.ln
497
498 man.cgi: $(CGI_OBJS) libmandoc.a
499 $(CC) $(LDFLAGS) $(STATIC) -o $@ $(CGI_OBJS) libmandoc.a $(DBLIB)
500
501 llib-lman.cgi.ln: $(CGI_LNS) llib-llibmandoc.ln
502 $(LINT) $(LINTFLAGS) -Cman.cgi $(CGI_LNS) llib-llibmandoc.ln
503
504 demandoc: $(DEMANDOC_OBJS) libmandoc.a
505 $(CC) $(LDFLAGS) -o $@ $(DEMANDOC_OBJS) libmandoc.a
506
507 llib-ldemandoc.ln: $(DEMANDOC_LNS) llib-llibmandoc.ln
508 $(LINT) $(LINTFLAGS) -Cdemandoc $(DEMANDOC_LNS) llib-llibmandoc.ln
509
510 mdocml.md5: mdocml.tar.gz
511 md5 mdocml.tar.gz >$@
512
513 mdocml.tar.gz: $(SRCS)
514 mkdir -p .dist/mdocml-$(VERSION)/
515 $(INSTALL_SOURCE) $(SRCS) .dist/mdocml-$(VERSION)
516 ( cd .dist/ && tar zcf ../$@ ./ )
517 rm -rf .dist/
518
519 mdocml-win32.zip: $(SRCS)
520 mkdir -p .win32/mdocml-$(VERSION)/
521 $(INSTALL_SOURCE) $(SRCS) .win32
522 cp .win32/Makefile .win32/Makefile.old
523 egrep -v -e DUSE_WCHAR -e ^DBBIN .win32/Makefile.old >.win32/Makefile
524 ( cd .win32; \
525 CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar CFLAGS='-DOSNAME=\"Windows\"' make; \
526 make install PREFIX=mdocml-$(VERSION) ; \
527 zip -r ../$@ mdocml-$(VERSION) )
528 rm -rf .win32
529
530 mdocml-win64.zip: $(SRCS)
531 mkdir -p .win64/mdocml-$(VERSION)/
532 $(INSTALL_SOURCE) $(SRCS) .win64
533 cp .win64/Makefile .win64/Makefile.old
534 egrep -v -e DUSE_WCHAR -e ^DBBIN .win64/Makefile.old >.win64/Makefile
535 ( cd .win64; \
536 CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar CFLAGS='-DOSNAME=\"Windows\"' make; \
537 make install PREFIX=mdocml-$(VERSION) ; \
538 zip -r ../$@ mdocml-$(VERSION) )
539 rm -rf .win64
540
541 mdocml-macosx.zip: $(SRCS)
542 mkdir -p .macosx/mdocml-$(VERSION)/
543 $(INSTALL_SOURCE) $(SRCS) .macosx
544 ( cd .macosx; \
545 CFLAGS="-arch i386 -arch x86_64 -arch ppc" LDFLAGS="-arch i386 -arch x86_64 -arch ppc" make; \
546 make install PREFIX=mdocml-$(VERSION) ; \
547 zip -r ../$@ mdocml-$(VERSION) )
548 rm -rf .macosx
549
550 index.html: $(INDEX_OBJS)
551
552 config.h: config.h.pre config.h.post
553 rm -f config.log
554 ( cat config.h.pre; \
555 echo; \
556 if $(CC) $(CFLAGS) -Werror -o test-strptime test-strptime.c >> config.log 2>&1; then \
557 echo '#define HAVE_STRPTIME'; \
558 rm test-strptime; \
559 fi; \
560 if $(CC) $(CFLAGS) -Werror -o test-getsubopt test-getsubopt.c >> config.log 2>&1; then \
561 echo '#define HAVE_GETSUBOPT'; \
562 rm test-getsubopt; \
563 fi; \
564 if $(CC) $(CFLAGS) -Werror -o test-strlcat test-strlcat.c >> config.log 2>&1; then \
565 echo '#define HAVE_STRLCAT'; \
566 rm test-strlcat; \
567 fi; \
568 if $(CC) $(CFLAGS) -Werror -o test-mmap test-mmap.c >> config.log 2>&1; then \
569 echo '#define HAVE_MMAP'; \
570 rm test-mmap; \
571 fi; \
572 if $(CC) $(CFLAGS) -Werror -o test-strlcpy test-strlcpy.c >> config.log 2>&1; then \
573 echo '#define HAVE_STRLCPY'; \
574 rm test-strlcpy; \
575 fi; \
576 echo; \
577 cat config.h.post \
578 ) > $@
579
580 .h.h.html:
581 highlight -I $< >$@
582
583 .1.1.txt .3.3.txt .7.7.txt .8.8.txt:
584 ./mandoc -Tascii -Wall,stop $< | col -b >$@
585
586 .1.1.html .3.3.html .7.7.html .8.8.html:
587 ./mandoc -Thtml -Wall,stop -Ostyle=style.css,man=%N.%S.html,includes=%I.html $< >$@
588
589 .1.1.ps .3.3.ps .7.7.ps .8.8.ps:
590 ./mandoc -Tps -Wall,stop $< >$@
591
592 .1.1.xhtml .3.3.xhtml .7.7.xhtml .8.8.xhtml:
593 ./mandoc -Txhtml -Wall,stop -Ostyle=style.css,man=%N.%S.xhtml,includes=%I.html $< >$@
594
595 .1.1.pdf .3.3.pdf .7.7.pdf .8.8.pdf:
596 ./mandoc -Tpdf -Wall,stop $< >$@
597
598 .sgml.html:
599 validate --warn $<
600 sed -e "s!@VERSION@!$(VERSION)!" -e "s!@VDATE@!$(VDATE)!" $< >$@