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 test.64 test.65 \
41 SUCCEED = test.7 test.8 test.9 test.10 test.11 test.12 test.13 \
42 test.14 test.16 test.17 test.18 test.19 test.21 test.23 \
43 test.25 test.28 test.29 test.31 test.32 test.33 test.34 \
44 test.35 test.38 test.39 test.41 test.42 test.43 test.44 \
45 test.45 test.46 test.47 test.48 test.49 test.51 test.52 \
46 test.54 test.55 test.56 test.57 test.58 test.59 test.60 \
47 test.62 test.63 test.67
58 @for f in $(FAIL); do \
59 echo "./mdocml $$f" ; \
60 ./mdocml $$f 1>/dev/null 2>/dev/null || continue ; \
62 @for f in $(SUCCEED); do \
63 echo "./mdocml $$f" ; \
64 ./mdocml $$f 1>/dev/null || exit 1 ; \
67 mdocml: mdocml.o libmdocml.a
68 $(CC) $(CFLAGS) -o $@ mdocml.o libmdocml.a
73 index.html: index.7 mdocml.css
74 ./mdocml -W -fhtml -e -o $@ index.7
76 index.xml: index.7 mdocml.css
77 ./mdocml -W -o $@ index.7
79 mdocml.html: mdocml.1 mdocml.css
80 ./mdocml -W -fhtml -e -o $@ mdocml.1
83 install -m 0644 mdocml.tgz $(PREFIX)/mdocml-$(VERSION).tgz
84 install -m 0644 mdocml.tgz $(PREFIX)/mdocml.tgz
85 install -m 0644 $(HTML) $(XML) $(PREFIX)/
87 mdocml.tgz: $(INSTALL)
88 mkdir -p .dist/mdocml/mdocml-$(VERSION)/
89 install -m 0644 $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
90 ( cd .dist/mdocml/ && tar zcf ../../mdocml.tgz mdocml-$(VERSION)/ )
93 llib-lmdocml.ln: mdocml.ln libmdocml.ln html.ln xml.ln roff.ln ml.ln mlg.ln compat.ln tokens.ln literals.ln
94 $(LINT) $(LINTFLAGS) -Cmdocml mdocml.ln libmdocml.ln html.ln xml.ln roff.ln ml.ln mlg.ln compat.ln tokens.ln literals.ln
96 mdocml.ln: mdocml.c libmdocml.h
98 mdocml.o: mdocml.c libmdocml.h
100 libmdocml.a: libmdocml.o html.o xml.o roff.o ml.o mlg.o compat.o tokens.o literals.o
101 $(AR) rs $@ libmdocml.o html.o xml.o roff.o ml.o mlg.o compat.o tokens.o literals.o
103 xml.ln: xml.c private.h libmdocml.h ml.h
105 xml.o: xml.c private.h libmdocml.h ml.h
107 html.ln: html.c private.h libmdocml.h
109 html.o: html.c private.h libmdocml.h
111 roff.ln: roff.c private.h roff.h libmdocml.h
113 roff.o: roff.c private.h roff.h libmdocml.h
115 libmdocml.ln: libmdocml.c private.h libmdocml.h
117 libmdocml.o: libmdocml.c private.h libmdocml.h
119 ml.ln: ml.c private.h libmdocml.h ml.h
121 ml.o: ml.c private.h libmdocml.h ml.h
123 mlg.ln: mlg.c private.h libmdocml.h ml.h
125 mlg.o: mlg.c private.h libmdocml.h ml.h