]> git.cameronkatri.com Git - mandoc.git/blob - Makefile
*** empty log message ***
[mandoc.git] / Makefile
1 .SUFFIXES: .html .7
2
3 CFLAGS += -W -Wall -Wno-unused-parameter -g -DDEBUG
4
5 LINTFLAGS += -c -e -f -u
6
7 LNS = mdocml.ln html.ln xml.ln libmdocml.ln roff.ln ml.ln mlg.ln compat.ln tokens.ln
8
9 LLNS = llib-lmdocml.ln
10
11 LIBS = libmdocml.a
12
13 OBJS = mdocml.o html.o xml.o libmdocml.o roff.o ml.o mlg.o compat.o tokens.o
14
15 SRCS = mdocml.c html.c xml.c libmdocml.c roff.c ml.c mlg.c compat.c tokens.c
16
17 HEADS = libmdocml.h private.h ml.h roff.h
18
19 MANS = mdocml.1
20
21 HTML = index.html
22
23 CLEAN = mdocml mdocml.tgz $(LLNS) $(LNS) $(OBJS) $(LIBS) $(HTML)
24
25 INSTALL = Makefile $(HEADS) $(SRCS) $(MANS)
26
27 FAIL = test.0 test.1 test.2 test.3 test.4 test.5 test.6 \
28 test.15 test.20 test.22 test.24 test.26 test.27 test.30 \
29 test.36 test.37 test.40 test.50
30
31 SUCCEED = test.7 test.8 test.9 test.10 test.11 test.12 test.13 \
32 test.14 test.16 test.17 test.18 test.19 test.21 test.23 \
33 test.25 test.28 test.29 test.31 test.32 test.33 test.34 \
34 test.35 test.38 test.39 test.41 test.42 test.43 test.44 \
35 test.45 test.46 test.47 test.48 test.49 test.51 test.52
36
37
38 all: mdocml
39
40 lint: llib-lmdocml.ln
41
42 dist: mdocml.tgz
43
44 www: $(HTML)
45
46 regress: mdocml
47 @for f in $(FAIL); do \
48 echo "./mdocml $$f" ; \
49 ./mdocml $$f 1>/dev/null 2>/dev/null || continue ; \
50 done
51 @for f in $(SUCCEED); do \
52 echo "./mdocml $$f" ; \
53 ./mdocml $$f 1>/dev/null || exit 1 ; \
54 done
55
56 mdocml: mdocml.o libmdocml.a
57 $(CC) $(CFLAGS) -o $@ mdocml.o libmdocml.a
58
59 clean:
60 rm -f $(CLEAN)
61
62 index.html: index.7 mdocml.css
63 ./mdocml -W -fhtml -e -o $@ $<
64
65 mdocml.tgz: $(INSTALL)
66 mkdir -p .dist/mdocml/
67 install -m 0644 $(INSTALL) .dist/mdocml/
68 ( cd .dist/ && tar zcf ../mdocml.tgz mdocml/ )
69 rm -rf .dist/
70
71 llib-lmdocml.ln: mdocml.ln libmdocml.ln html.ln xml.ln roff.ln ml.ln mlg.ln compat.ln tokens.ln
72 $(LINT) $(LINTFLAGS) -Cmdocml mdocml.ln libmdocml.ln html.ln xml.ln roff.ln ml.ln mlg.ln compat.ln tokens.ln
73
74 mdocml.ln: mdocml.c libmdocml.h
75
76 mdocml.o: mdocml.c libmdocml.h
77
78 libmdocml.a: libmdocml.o html.o xml.o roff.o ml.o mlg.o compat.o tokens.o
79 $(AR) rs $@ libmdocml.o html.o xml.o roff.o ml.o mlg.o compat.o tokens.o
80
81 xml.ln: xml.c private.h libmdocml.h ml.h
82
83 xml.o: xml.c private.h libmdocml.h ml.h
84
85 html.ln: html.c private.h libmdocml.h
86
87 html.o: html.c private.h libmdocml.h
88
89 roff.ln: roff.c private.h roff.h libmdocml.h
90
91 roff.o: roff.c private.h roff.h libmdocml.h
92
93 libmdocml.ln: libmdocml.c private.h libmdocml.h
94
95 libmdocml.o: libmdocml.c private.h libmdocml.h
96
97 ml.ln: ml.c private.h libmdocml.h ml.h
98
99 ml.o: ml.c private.h libmdocml.h ml.h
100
101 mlg.ln: mlg.c private.h libmdocml.h ml.h
102
103 mlg.o: mlg.c private.h libmdocml.h ml.h
104
105 compat.ln: compat.c
106
107 compat.o: compat.c