3 CFLAGS += -W -Wall -Wno-unused-parameter -g -DDEBUG
5 LINTFLAGS += -c -e -f -u
7 LNS = mdocml.ln html.ln xml.ln libmdocml.ln roff.ln ml.ln mlg.ln compat.ln tokens.ln
13 OBJS = mdocml.o html.o xml.o libmdocml.o roff.o ml.o mlg.o compat.o tokens.o
15 SRCS = mdocml.c html.c xml.c libmdocml.c roff.c ml.c mlg.c compat.c tokens.c
17 HEADS = libmdocml.h private.h ml.h roff.h
23 CLEAN = mdocml mdocml.tgz $(LLNS) $(LNS) $(OBJS) $(LIBS) $(HTML)
25 INSTALL = Makefile $(HEADS) $(SRCS) $(MANS)
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
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
47 @for f in $(FAIL); do \
48 echo "./mdocml $$f" ; \
49 ./mdocml $$f 1>/dev/null 2>/dev/null || continue ; \
51 @for f in $(SUCCEED); do \
52 echo "./mdocml $$f" ; \
53 ./mdocml $$f 1>/dev/null || exit 1 ; \
56 mdocml: mdocml.o libmdocml.a
57 $(CC) $(CFLAGS) -o $@ mdocml.o libmdocml.a
62 index.html: index.7 mdocml.css
63 ./mdocml -W -fhtml -e -o $@ $<
65 mdocml.tgz: $(INSTALL)
66 mkdir -p .dist/mdocml/
67 install -m 0644 $(INSTALL) .dist/mdocml/
68 ( cd .dist/ && tar zcf ../mdocml.tgz mdocml/ )
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
74 mdocml.ln: mdocml.c libmdocml.h
76 mdocml.o: mdocml.c libmdocml.h
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
81 xml.ln: xml.c private.h libmdocml.h ml.h
83 xml.o: xml.c private.h libmdocml.h ml.h
85 html.ln: html.c private.h libmdocml.h
87 html.o: html.c private.h libmdocml.h
89 roff.ln: roff.c private.h roff.h libmdocml.h
91 roff.o: roff.c private.h roff.h libmdocml.h
93 libmdocml.ln: libmdocml.c private.h libmdocml.h
95 libmdocml.o: libmdocml.c private.h libmdocml.h
97 ml.ln: ml.c private.h libmdocml.h ml.h
99 ml.o: ml.c private.h libmdocml.h ml.h
101 mlg.ln: mlg.c private.h libmdocml.h ml.h
103 mlg.o: mlg.c private.h libmdocml.h ml.h