4 CFLAGS += -W -Wall -Wno-unused-parameter -g -DDEBUG
6 LNS = mdocml.ln html.ln xml.ln libmdocml.ln roff.ln ml.ln mlg.ln \
7 compat.ln tokens.ln literals.ln tags.ln noop.ln
13 OBJS = mdocml.o html.o xml.o libmdocml.o roff.o ml.o mlg.o \
14 compat.o tokens.o literals.o tags.o noop.o
16 SRCS = mdocml.c html.c xml.c libmdocml.c roff.c ml.c mlg.c \
17 compat.c tokens.c literals.c tags.c noop.c
19 HEADS = libmdocml.h private.h ml.h roff.h html.h
21 MANS = mdocml.1 index.7
23 HTML = index.html mdocml.html
29 CLEAN = mdocml mdocml.tgz $(LLNS) $(LNS) $(OBJS) $(LIBS) $(HTML) \
32 INSTALL = Makefile $(HEADS) $(SRCS) $(MANS)
34 FAIL = test.0 test.1 test.2 test.3 test.4 test.5 test.6 \
35 test.15 test.20 test.22 test.24 test.26 test.27 test.30 \
36 test.36 test.37 test.40 test.50 test.61 test.64 test.65 \
37 test.66 test.69 test.70
39 SUCCEED = test.7 test.8 test.9 test.10 test.11 test.12 test.13 \
40 test.14 test.16 test.17 test.18 test.19 test.21 test.23 \
41 test.25 test.28 test.29 test.31 test.32 test.33 test.34 \
42 test.35 test.38 test.39 test.41 test.42 test.43 test.44 \
43 test.45 test.46 test.47 test.48 test.49 test.51 test.52 \
44 test.54 test.55 test.56 test.57 test.58 test.59 test.60 \
45 test.62 test.63 test.67 test.68 test.71 test.72 test.73
51 dist: mdocml.tgz mdocml-port.tgz
53 www: all $(HTML) $(XML) $(TEXT)
56 @for f in $(FAIL); do \
57 echo "./mdocml $$f" ; \
58 ./mdocml -v $$f 1>/dev/null 2>/dev/null || continue ; \
60 @for f in $(SUCCEED); do \
61 echo "./mdocml $$f" ; \
62 ./mdocml -v $$f 1>/dev/null || exit 1 ; \
65 mdocml: mdocml.o libmdocml.a
66 $(CC) $(CFLAGS) -o $@ mdocml.o libmdocml.a
71 index.html: index.7 mdocml.css
72 ./mdocml -Wall -fhtml -e -o $@ index.7
74 index.xml: index.7 mdocml.css
75 ./mdocml -Wall -o $@ index.7
78 cp -f index.7 index.txt
80 mdocml.html: mdocml.1 mdocml.css
81 ./mdocml -Wall -fhtml -e -o $@ mdocml.1
84 install -m 0644 mdocml.tgz $(PREFIX)/mdocml-$(VERSION).tgz
85 install -m 0644 mdocml.tgz $(PREFIX)/mdocml.tgz
86 install -m 0644 mdocml-port.tgz $(PREFIX)/mdocml-port-$(VERSION).tgz
87 install -m 0644 mdocml-port.tgz $(PREFIX)/mdocml-port.tgz
88 install -m 0644 $(HTML) $(XML) $(TEXT) $(PREFIX)/
90 mdocml.tgz: $(INSTALL)
91 mkdir -p .dist/mdocml/mdocml-$(VERSION)/
92 install -m 0644 $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
93 ( cd .dist/mdocml/ && tar zcf ../../$@ mdocml-$(VERSION)/ )
96 mdocml-port.tgz: $(INSTALL)
97 mkdir -p .dist/mdocml/pkg
98 sed -e "s!@VERSION@!$(VERSION)!" Makefile.port > .dist/mdocml/Makefile
99 md5 mdocml-$(VERSION).tgz > .dist/mdocml/distinfo
100 rmd160 mdocml-$(VERSION).tgz >> .dist/mdocml/distinfo
101 sha1 mdocml-$(VERSION).tgz >> .dist/mdocml/distinfo
102 install -m 0644 DESCR .dist/mdocml/pkg/DESCR
103 echo @comment $$OpenBSD$$ > .dist/mdocml/pkg/PLIST
104 echo bin/mdocml >> .dist/mdocml/pkg/PLIST
105 echo @man man/man1/mdocml.1 >> .dist/mdocml/pkg/PLIST
106 ( cd .dist/ && tar zcf ../$@ mdocml/ )
109 llib-lmdocml.ln: mdocml.ln libmdocml.ln html.ln xml.ln roff.ln ml.ln mlg.ln compat.ln tokens.ln literals.ln tags.ln noop.ln
110 $(LINT) $(LINTFLAGS) -Cmdocml mdocml.ln libmdocml.ln html.ln xml.ln roff.ln ml.ln mlg.ln compat.ln tokens.ln literals.ln tags.ln noop.ln
112 mdocml.ln: mdocml.c libmdocml.h
114 mdocml.o: mdocml.c libmdocml.h
116 libmdocml.a: libmdocml.o html.o xml.o roff.o ml.o mlg.o compat.o tokens.o literals.o tags.o noop.o
117 $(AR) rs $@ libmdocml.o html.o xml.o roff.o ml.o mlg.o compat.o tokens.o literals.o tags.o noop.o
123 html.ln: html.c private.h
125 html.o: html.c private.h
127 tags.ln: tags.c html.h
129 tags.o: tags.c html.h
131 roff.ln: roff.c private.h
133 roff.o: roff.c private.h
135 libmdocml.ln: libmdocml.c private.h
137 libmdocml.o: libmdocml.c private.h
151 noop.ln: noop.c private.h
153 noop.o: noop.c private.h
159 private.h: libmdocml.h