6 CFLAGS += -W -Wall -Wno-unused-parameter -g -DDEBUG
8 LINTFLAGS += -c -e -f -u
10 LNS = mdocml.ln html.ln xml.ln libmdocml.ln roff.ln ml.ln mlg.ln \
11 compat.ln tokens.ln literals.ln
13 LLNS = llib-lmdocml.ln
17 OBJS = mdocml.o html.o xml.o libmdocml.o roff.o ml.o mlg.o \
18 compat.o tokens.o literals.o
20 SRCS = mdocml.c html.c xml.c libmdocml.c roff.c ml.c mlg.c \
21 compat.c tokens.c literals.c
23 HEADS = libmdocml.h private.h ml.h roff.h
25 MANS = mdocml.1 index.7
27 HTML = index.html mdocml.html
31 CLEAN = mdocml mdocml.tgz $(LLNS) $(LNS) $(OBJS) $(LIBS) $(HTML) \
34 INSTALL = Makefile $(HEADS) $(SRCS) $(MANS)
36 FAIL = test.0 test.1 test.2 test.3 test.4 test.5 test.6 \
37 test.15 test.20 test.22 test.24 test.26 test.27 test.30 \
38 test.36 test.37 test.40 test.50 test.61
40 SUCCEED = test.7 test.8 test.9 test.10 test.11 test.12 test.13 \
41 test.14 test.16 test.17 test.18 test.19 test.21 test.23 \
42 test.25 test.28 test.29 test.31 test.32 test.33 test.34 \
43 test.35 test.38 test.39 test.41 test.42 test.43 test.44 \
44 test.45 test.46 test.47 test.48 test.49 test.51 test.52 \
45 test.54 test.55 test.56 test.57 test.58 test.59 test.60 \
57 @for f in $(FAIL); do \
58 echo "./mdocml $$f" ; \
59 ./mdocml $$f 1>/dev/null 2>/dev/null || continue ; \
61 @for f in $(SUCCEED); do \
62 echo "./mdocml $$f" ; \
63 ./mdocml $$f 1>/dev/null || exit 1 ; \
66 mdocml: mdocml.o libmdocml.a
67 $(CC) $(CFLAGS) -o $@ mdocml.o libmdocml.a
72 index.html: index.7 mdocml.css
73 ./mdocml -W -fhtml -e -o $@ index.7
75 index.xml: index.7 mdocml.css
76 ./mdocml -W -o $@ index.7
78 mdocml.html: mdocml.1 mdocml.css
79 ./mdocml -W -fhtml -e -o $@ mdocml.1
82 install -m 0644 mdocml.tgz $(PREFIX)/mdocml-$(VERSION).tgz
83 install -m 0644 mdocml.tgz $(PREFIX)/mdocml.tgz
84 install -m 0644 $(HTML) $(XML) $(PREFIX)/
86 mdocml.tgz: $(INSTALL)
87 mkdir -p .dist/mdocml/mdocml-$(VERSION)/
88 install -m 0644 $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
89 ( cd .dist/mdocml/ && tar zcf ../../mdocml.tgz mdocml-$(VERSION)/ )
92 llib-lmdocml.ln: mdocml.ln libmdocml.ln html.ln xml.ln roff.ln ml.ln mlg.ln compat.ln tokens.ln literals.ln
93 $(LINT) $(LINTFLAGS) -Cmdocml mdocml.ln libmdocml.ln html.ln xml.ln roff.ln ml.ln mlg.ln compat.ln tokens.ln literals.ln
95 mdocml.ln: mdocml.c libmdocml.h
97 mdocml.o: mdocml.c libmdocml.h
99 libmdocml.a: libmdocml.o html.o xml.o roff.o ml.o mlg.o compat.o tokens.o literals.o
100 $(AR) rs $@ libmdocml.o html.o xml.o roff.o ml.o mlg.o compat.o tokens.o literals.o
102 xml.ln: xml.c private.h libmdocml.h ml.h
104 xml.o: xml.c private.h libmdocml.h ml.h
106 html.ln: html.c private.h libmdocml.h
108 html.o: html.c private.h libmdocml.h
110 roff.ln: roff.c private.h roff.h libmdocml.h
112 roff.o: roff.c private.h roff.h libmdocml.h
114 libmdocml.ln: libmdocml.c private.h libmdocml.h
116 libmdocml.o: libmdocml.c private.h libmdocml.h
118 ml.ln: ml.c private.h libmdocml.h ml.h
120 ml.o: ml.c private.h libmdocml.h ml.h
122 mlg.ln: mlg.c private.h libmdocml.h ml.h
124 mlg.o: mlg.c private.h libmdocml.h ml.h