Annotation of mandoc/Makefile, Revision 1.385
1.319 kristaps 1: .PHONY: clean install installwww
2: .SUFFIXES: .sgml .html .md5 .h .h.html
1.356 schwarze 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
1.259 kristaps 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.
1.375 kristaps 12: #
1.319 kristaps 13: # CFLAGS += -DOSNAME="\"OpenBSD 4.5\""
1.259 kristaps 14:
1.374 kristaps 15: VERSION = 1.12.0
16: VDATE = 8 October 2011
1.375 kristaps 17:
1.341 kristaps 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.
1.375 kristaps 23: #
1.362 kristaps 24: CFLAGS += -DUSE_WCHAR
1.375 kristaps 25:
1.380 kristaps 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.
1.384 schwarze 30: #CFLAGS += -DUSE_MANPATH
1.383 kristaps 31:
1.384 schwarze 32: # If your system supports static binaries only, uncomment this.
1.383 kristaps 33: #STATIC = -static
1.379 kristaps 34:
1.362 kristaps 35: CFLAGS += -g -DHAVE_CONFIG_H -DVERSION="\"$(VERSION)\""
1.319 kristaps 36: CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
37: PREFIX = /usr/local
38: BINDIR = $(PREFIX)/bin
1.321 kristaps 39: INCLUDEDIR = $(PREFIX)/include/mandoc
40: LIBDIR = $(PREFIX)/lib/mandoc
1.319 kristaps 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
1.353 kristaps 47: INSTALL_SOURCE = $(INSTALL) -m 0644
1.319 kristaps 48: INSTALL_MAN = $(INSTALL_DATA)
49:
1.375 kristaps 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: #
1.358 kristaps 55: #DBLIB = -ldb
1.383 kristaps 56: DBBIN = apropos mandocdb man.cgi catman whatis
57: DBLN = llib-lapropos.ln llib-lmandocdb.ln llib-lman.cgi.ln llib-lcatman.ln
1.358 kristaps 58:
1.375 kristaps 59: all: mandoc preconv demandoc $(DBBIN)
1.319 kristaps 60:
61: SRCS = Makefile \
1.372 kristaps 62: apropos.1 \
63: apropos.c \
1.319 kristaps 64: arch.c \
65: arch.in \
66: att.c \
67: att.in \
68: chars.c \
69: chars.in \
1.362 kristaps 70: compat_getsubopt.c \
71: compat_strlcat.c \
72: compat_strlcpy.c \
1.319 kristaps 73: config.h.post \
74: config.h.pre \
1.369 kristaps 75: demandoc.c \
76: demandoc.1 \
1.319 kristaps 77: eqn.7 \
78: eqn.c \
1.360 kristaps 79: eqn_html.c \
1.359 kristaps 80: eqn_term.c \
1.319 kristaps 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 \
1.331 kristaps 95: man.h \
1.319 kristaps 96: man.7 \
97: man.c \
1.382 kristaps 98: man.cgi.7 \
1.319 kristaps 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 \
1.356 schwarze 108: mandocdb.8 \
1.355 kristaps 109: mandocdb.c \
1.378 schwarze 110: mandocdb.h \
1.319 kristaps 111: mandoc_char.7 \
1.380 kristaps 112: manpath.c \
113: manpath.h \
1.383 kristaps 114: catman.c \
115: catman.8 \
1.331 kristaps 116: mdoc.h \
1.319 kristaps 117: mdoc.7 \
118: mdoc.c \
119: mdoc_argv.c \
120: mdoc_hash.c \
121: mdoc_html.c \
122: mdoc_macro.c \
1.371 schwarze 123: mdoc_man.c \
1.319 kristaps 124: mdoc_term.c \
125: mdoc_validate.c \
126: msec.c \
127: msec.in \
128: out.c \
129: out.h \
1.344 kristaps 130: preconv.1 \
131: preconv.c \
1.342 kristaps 132: predefs.in \
1.319 kristaps 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 \
1.365 kristaps 150: test-getsubopt.c \
1.347 kristaps 151: test-mmap.c \
1.319 kristaps 152: test-strlcat.c \
153: test-strlcpy.c \
1.365 kristaps 154: test-strptime.c \
1.319 kristaps 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
1.325 kristaps 163: LIBMAN_LNS = man.ln \
164: man_hash.ln \
165: man_macro.ln \
166: man_validate.ln
167:
1.319 kristaps 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
1.325 kristaps 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:
1.319 kristaps 189: LIBROFF_OBJS = eqn.o \
190: roff.o \
191: tbl.o \
192: tbl_data.o \
193: tbl_layout.o \
194: tbl_opts.o
1.325 kristaps 195: LIBROFF_LNS = eqn.ln \
196: roff.ln \
197: tbl.ln \
198: tbl_data.ln \
199: tbl_layout.ln \
200: tbl_opts.ln
201:
1.319 kristaps 202: LIBMANDOC_OBJS = $(LIBMAN_OBJS) \
203: $(LIBMDOC_OBJS) \
204: $(LIBROFF_OBJS) \
1.333 kristaps 205: chars.o \
1.319 kristaps 206: mandoc.o \
1.385 ! schwarze 207: msec.o \
1.319 kristaps 208: read.o
1.325 kristaps 209: LIBMANDOC_LNS = $(LIBMAN_LNS) \
210: $(LIBMDOC_LNS) \
211: $(LIBROFF_LNS) \
1.333 kristaps 212: chars.ln \
1.325 kristaps 213: mandoc.ln \
1.385 ! schwarze 214: msec.ln \
1.325 kristaps 215: read.ln
216:
1.362 kristaps 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:
1.325 kristaps 224: arch.o arch.ln: arch.in
225: att.o att.ln: att.in
1.333 kristaps 226: chars.o chars.ln: chars.in
1.325 kristaps 227: lib.o lib.ln: lib.in
228: msec.o msec.ln: msec.in
1.342 kristaps 229: roff.o roff.ln: predefs.in
1.325 kristaps 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
1.319 kristaps 237:
1.362 kristaps 238: $(COMPAT_OBJS) $(COMPAT_LNS): config.h
239:
1.360 kristaps 240: MANDOC_HTML_OBJS = eqn_html.o \
241: html.o \
1.319 kristaps 242: man_html.o \
243: mdoc_html.o \
244: tbl_html.o
1.360 kristaps 245: MANDOC_HTML_LNS = eqn_html.ln \
246: html.ln \
1.325 kristaps 247: man_html.ln \
248: mdoc_html.ln \
249: tbl_html.ln
250:
1.371 schwarze 251: MANDOC_MAN_OBJS = mdoc_man.o
252: MANDOC_MAN_LNS = mdoc_man.ln
253:
1.359 kristaps 254: MANDOC_TERM_OBJS = eqn_term.o \
255: man_term.o \
1.319 kristaps 256: mdoc_term.o \
257: term.o \
258: term_ascii.o \
259: term_ps.o \
260: tbl_term.o
1.359 kristaps 261: MANDOC_TERM_LNS = eqn_term.ln \
262: man_term.ln \
1.325 kristaps 263: mdoc_term.ln \
264: term.ln \
265: term_ascii.ln \
266: term_ps.ln \
267: tbl_term.ln
268:
1.319 kristaps 269: MANDOC_OBJS = $(MANDOC_HTML_OBJS) \
1.371 schwarze 270: $(MANDOC_MAN_OBJS) \
1.319 kristaps 271: $(MANDOC_TERM_OBJS) \
272: main.o \
273: out.o \
274: tree.o
1.325 kristaps 275: MANDOC_LNS = $(MANDOC_HTML_LNS) \
1.371 schwarze 276: $(MANDOC_MAN_LNS) \
1.325 kristaps 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
1.319 kristaps 285:
1.380 kristaps 286: MANDOCDB_OBJS = mandocdb.o manpath.o
287: MANDOCDB_LNS = mandocdb.ln manpath.ln
1.326 kristaps 288:
1.380 kristaps 289: $(MANDOCDB_OBJS) $(MANDOCDB_LNS): mandocdb.h mandoc.h mdoc.h man.h config.h manpath.h
1.326 kristaps 290:
1.343 kristaps 291: PRECONV_OBJS = preconv.o
292: PRECONV_LNS = preconv.ln
293:
294: $(PRECONV_OBJS) $(PRECONV_LNS): config.h
295:
1.380 kristaps 296: APROPOS_OBJS = apropos.o apropos_db.o manpath.o
297: APROPOS_LNS = apropos.ln apropos_db.ln manpath.ln
1.372 kristaps 298:
1.380 kristaps 299: $(APROPOS_OBJS) $(APROPOS_LNS): config.h mandoc.h apropos_db.h manpath.h mandocdb.h
1.376 kristaps 300:
1.383 kristaps 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
1.376 kristaps 309:
1.383 kristaps 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
1.372 kristaps 318:
1.383 kristaps 319: $(CGI_OBJS) $(CGI_LNS): main.h mdoc.h man.h out.h config.h mandoc.h apropos_db.h manpath.h mandocdb.h
1.381 kristaps 320:
1.383 kristaps 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
1.381 kristaps 325:
1.369 kristaps 326: DEMANDOC_OBJS = demandoc.o
327: DEMANDOC_LNS = demandoc.ln
328:
329: $(DEMANDOC_OBJS) $(DEMANDOC_LNS): config.h
330:
1.372 kristaps 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 \
1.369 kristaps 337: demandoc.1.xhtml \
338: demandoc.1.ps \
339: demandoc.1.pdf \
340: demandoc.1.txt \
341: mandoc.1.html \
1.319 kristaps 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 \
1.344 kristaps 371: preconv.1.html \
372: preconv.1.xhtml \
373: preconv.1.ps \
374: preconv.1.pdf \
375: preconv.1.txt \
1.319 kristaps 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 \
1.356 schwarze 385: tbl.7.txt \
386: mandocdb.8.html \
387: mandocdb.8.xhtml \
388: mandocdb.8.ps \
389: mandocdb.8.pdf \
390: mandocdb.8.txt
1.319 kristaps 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
1.132 kristaps 400:
1.319 kristaps 401: www: index.html
1.42 kristaps 402:
1.376 kristaps 403: lint: llib-lmandoc.ln llib-lpreconv.ln llib-ldemandoc.ln $(DBLN)
1.325 kristaps 404:
1.1 kristaps 405: clean:
1.319 kristaps 406: rm -f libmandoc.a $(LIBMANDOC_OBJS)
1.325 kristaps 407: rm -f llib-llibmandoc.ln $(LIBMANDOC_LNS)
1.355 kristaps 408: rm -f mandocdb $(MANDOCDB_OBJS)
409: rm -f llib-lmandocdb.ln $(MANDOCDB_LNS)
1.343 kristaps 410: rm -f preconv $(PRECONV_OBJS)
411: rm -f llib-lpreconv.ln $(PRECONV_LNS)
1.372 kristaps 412: rm -f apropos $(APROPOS_OBJS)
413: rm -f llib-lapropos.ln $(APROPOS_LNS)
1.376 kristaps 414: rm -f man.cgi $(CGI_OBJS)
415: rm -f llib-lman.cgi.ln $(CGI_LNS)
1.383 kristaps 416: rm -f catman $(CATMAN_OBJS)
417: rm -f llib-lcatman.ln $(CATMAN_LNS)
1.369 kristaps 418: rm -f demandoc $(DEMANDOC_OBJS)
419: rm -f llib-ldemandoc.ln $(DEMANDOC_LNS)
1.319 kristaps 420: rm -f mandoc $(MANDOC_OBJS)
1.325 kristaps 421: rm -f llib-lmandoc.ln $(MANDOC_LNS)
1.362 kristaps 422: rm -f config.h config.log $(COMPAT_OBJS) $(COMPAT_LNS)
1.368 kristaps 423: rm -f mdocml.tar.gz mdocml-win32.zip mdocml-win64.zip mdocml-macosx.zip
1.319 kristaps 424: rm -f index.html $(INDEX_OBJS)
1.364 kristaps 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
1.290 kristaps 430:
1.319 kristaps 431: install: all
1.270 joerg 432: mkdir -p $(DESTDIR)$(BINDIR)
433: mkdir -p $(DESTDIR)$(EXAMPLEDIR)
1.332 kristaps 434: mkdir -p $(DESTDIR)$(LIBDIR)
1.334 kristaps 435: mkdir -p $(DESTDIR)$(INCLUDEDIR)
1.270 joerg 436: mkdir -p $(DESTDIR)$(MANDIR)/man1
1.319 kristaps 437: mkdir -p $(DESTDIR)$(MANDIR)/man3
1.270 joerg 438: mkdir -p $(DESTDIR)$(MANDIR)/man7
1.356 schwarze 439: mkdir -p $(DESTDIR)$(MANDIR)/man8
1.369 kristaps 440: $(INSTALL_PROGRAM) mandoc preconv demandoc $(DESTDIR)$(BINDIR)
1.324 kristaps 441: $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
1.352 kristaps 442: $(INSTALL_LIB) man.h mdoc.h mandoc.h $(DESTDIR)$(INCLUDEDIR)
1.369 kristaps 443: $(INSTALL_MAN) mandoc.1 preconv.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1
1.319 kristaps 444: $(INSTALL_MAN) mandoc.3 $(DESTDIR)$(MANDIR)/man3
1.311 kristaps 445: $(INSTALL_MAN) man.7 mdoc.7 roff.7 eqn.7 tbl.7 mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
1.270 joerg 446: $(INSTALL_DATA) example.style.css $(DESTDIR)$(EXAMPLEDIR)
1.60 kristaps 447:
1.319 kristaps 448: installwww: www
449: mkdir -p $(PREFIX)/snapshots
1.363 kristaps 450: mkdir -p $(PREFIX)/binaries
1.320 kristaps 451: $(INSTALL_DATA) index.html external.png index.css $(PREFIX)
452: $(INSTALL_DATA) $(INDEX_MANS) style.css $(PREFIX)
1.319 kristaps 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:
1.362 kristaps 459: libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
460: $(AR) rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
1.319 kristaps 461:
1.362 kristaps 462: llib-llibmandoc.ln: $(COMPAT_LNS) $(LIBMANDOC_LNS)
463: $(LINT) $(LINTFLAGS) -Clibmandoc $(COMPAT_LNS) $(LIBMANDOC_LNS)
1.325 kristaps 464:
1.319 kristaps 465: mandoc: $(MANDOC_OBJS) libmandoc.a
1.368 kristaps 466: $(CC) $(LDFLAGS) -o $@ $(MANDOC_OBJS) libmandoc.a
1.325 kristaps 467:
1.376 kristaps 468: llib-lmandoc.ln: $(MANDOC_LNS) llib-llibmandoc.ln
469: $(LINT) $(LINTFLAGS) -Cmandoc $(MANDOC_LNS) llib-llibmandoc.ln
1.343 kristaps 470:
1.355 kristaps 471: mandocdb: $(MANDOCDB_OBJS) libmandoc.a
1.368 kristaps 472: $(CC) $(LDFLAGS) -o $@ $(MANDOCDB_OBJS) libmandoc.a $(DBLIB)
1.326 kristaps 473:
1.376 kristaps 474: llib-lmandocdb.ln: $(MANDOCDB_LNS) llib-llibmandoc.ln
475: $(LINT) $(LINTFLAGS) -Cmandocdb $(MANDOCDB_LNS) llib-llibmandoc.ln
1.343 kristaps 476:
477: preconv: $(PRECONV_OBJS)
1.368 kristaps 478: $(CC) $(LDFLAGS) -o $@ $(PRECONV_OBJS)
1.343 kristaps 479:
1.376 kristaps 480: llib-lpreconv.ln: $(PRECONV_LNS) llib-llibmandoc.ln
481: $(LINT) $(LINTFLAGS) -Cpreconv $(PRECONV_LNS) llib-llibmandoc.ln
1.372 kristaps 482:
1.383 kristaps 483: whatis: apropos
484: cp -f apropos whatis
485:
1.372 kristaps 486: apropos: $(APROPOS_OBJS) libmandoc.a
1.373 kristaps 487: $(CC) $(LDFLAGS) -o $@ $(APROPOS_OBJS) libmandoc.a $(DBLIB)
1.372 kristaps 488:
1.376 kristaps 489: llib-lapropos.ln: $(APROPOS_LNS) llib-llibmandoc.ln
490: $(LINT) $(LINTFLAGS) -Capropos $(APROPOS_LNS) llib-llibmandoc.ln
1.381 kristaps 491:
1.383 kristaps 492: catman: $(CATMAN_OBJS) libmandoc.a
493: $(CC) $(LDFLAGS) -o $@ $(CATMAN_OBJS) libmandoc.a $(DBLIB)
1.381 kristaps 494:
1.383 kristaps 495: llib-lcatman.ln: $(CATMAN_LNS) llib-llibmandoc.ln
496: $(LINT) $(LINTFLAGS) -Ccatman $(CATMAN_LNS) llib-llibmandoc.ln
1.376 kristaps 497:
498: man.cgi: $(CGI_OBJS) libmandoc.a
1.383 kristaps 499: $(CC) $(LDFLAGS) $(STATIC) -o $@ $(CGI_OBJS) libmandoc.a $(DBLIB)
1.376 kristaps 500:
501: llib-lman.cgi.ln: $(CGI_LNS) llib-llibmandoc.ln
502: $(LINT) $(LINTFLAGS) -Cman.cgi $(CGI_LNS) llib-llibmandoc.ln
1.369 kristaps 503:
504: demandoc: $(DEMANDOC_OBJS) libmandoc.a
505: $(CC) $(LDFLAGS) -o $@ $(DEMANDOC_OBJS) libmandoc.a
506:
1.376 kristaps 507: llib-ldemandoc.ln: $(DEMANDOC_LNS) llib-llibmandoc.ln
508: $(LINT) $(LINTFLAGS) -Cdemandoc $(DEMANDOC_LNS) llib-llibmandoc.ln
1.319 kristaps 509:
510: mdocml.md5: mdocml.tar.gz
511: md5 mdocml.tar.gz >$@
512:
513: mdocml.tar.gz: $(SRCS)
514: mkdir -p .dist/mdocml-$(VERSION)/
1.353 kristaps 515: $(INSTALL_SOURCE) $(SRCS) .dist/mdocml-$(VERSION)
1.319 kristaps 516: ( cd .dist/ && tar zcf ../$@ ./ )
1.60 kristaps 517: rm -rf .dist/
518:
1.363 kristaps 519: mdocml-win32.zip: $(SRCS)
1.362 kristaps 520: mkdir -p .win32/mdocml-$(VERSION)/
521: $(INSTALL_SOURCE) $(SRCS) .win32
522: cp .win32/Makefile .win32/Makefile.old
1.375 kristaps 523: egrep -v -e DUSE_WCHAR -e ^DBBIN .win32/Makefile.old >.win32/Makefile
1.368 kristaps 524: ( cd .win32; \
525: CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar CFLAGS='-DOSNAME=\"Windows\"' make; \
1.362 kristaps 526: make install PREFIX=mdocml-$(VERSION) ; \
527: zip -r ../$@ mdocml-$(VERSION) )
528: rm -rf .win32
1.366 kristaps 529:
530: mdocml-win64.zip: $(SRCS)
531: mkdir -p .win64/mdocml-$(VERSION)/
532: $(INSTALL_SOURCE) $(SRCS) .win64
533: cp .win64/Makefile .win64/Makefile.old
1.375 kristaps 534: egrep -v -e DUSE_WCHAR -e ^DBBIN .win64/Makefile.old >.win64/Makefile
1.368 kristaps 535: ( cd .win64; \
536: CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar CFLAGS='-DOSNAME=\"Windows\"' make; \
1.366 kristaps 537: make install PREFIX=mdocml-$(VERSION) ; \
538: zip -r ../$@ mdocml-$(VERSION) )
539: rm -rf .win64
540:
1.368 kristaps 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
1.362 kristaps 549:
1.319 kristaps 550: index.html: $(INDEX_OBJS)
1.148 kristaps 551:
1.319 kristaps 552: config.h: config.h.pre config.h.post
553: rm -f config.log
554: ( cat config.h.pre; \
555: echo; \
1.362 kristaps 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; \
1.319 kristaps 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; \
1.347 kristaps 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; \
1.319 kristaps 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: ) > $@
1.60 kristaps 579:
1.319 kristaps 580: .h.h.html:
581: highlight -I $< >$@
1.168 kristaps 582:
1.356 schwarze 583: .1.1.txt .3.3.txt .7.7.txt .8.8.txt:
1.319 kristaps 584: ./mandoc -Tascii -Wall,stop $< | col -b >$@
1.168 kristaps 585:
1.356 schwarze 586: .1.1.html .3.3.html .7.7.html .8.8.html:
1.319 kristaps 587: ./mandoc -Thtml -Wall,stop -Ostyle=style.css,man=%N.%S.html,includes=%I.html $< >$@
1.277 kristaps 588:
1.356 schwarze 589: .1.1.ps .3.3.ps .7.7.ps .8.8.ps:
1.319 kristaps 590: ./mandoc -Tps -Wall,stop $< >$@
1.297 kristaps 591:
1.356 schwarze 592: .1.1.xhtml .3.3.xhtml .7.7.xhtml .8.8.xhtml:
1.319 kristaps 593: ./mandoc -Txhtml -Wall,stop -Ostyle=style.css,man=%N.%S.xhtml,includes=%I.html $< >$@
1.290 kristaps 594:
1.356 schwarze 595: .1.1.pdf .3.3.pdf .7.7.pdf .8.8.pdf:
1.319 kristaps 596: ./mandoc -Tpdf -Wall,stop $< >$@
1.212 kristaps 597:
1.319 kristaps 598: .sgml.html:
599: validate --warn $<
600: sed -e "s!@VERSION@!$(VERSION)!" -e "s!@VDATE@!$(VDATE)!" $< >$@
CVSweb