Annotation of mandoc/Makefile, Revision 1.93
1.79 kristaps 1: .SUFFIXES: .html .sgml
2:
1.93 ! kristaps 3: VERSION = 1.3.9
1.92 kristaps 4: VDATE = 28 February 2009
1.31 kristaps 5:
1.73 kristaps 6: CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -g
1.7 kristaps 7:
1.60 kristaps 8: LIBLNS = macro.ln mdoc.ln hash.ln strings.ln xstd.ln argv.ln \
1.69 kristaps 9: validate.ln action.ln
1.60 kristaps 10:
1.77 kristaps 11: TREELNS = mdoctree.ln mmain.ln
1.60 kristaps 12:
1.77 kristaps 13: TERMLNS = mdoctree.ln mmain.ln term.ln
1.4 kristaps 14:
1.78 kristaps 15: LINTLNS = mdoclint.ln mmain.ln
16:
1.75 kristaps 17: LNS = $(LIBLNS) $(TREELNS) $(TERMLNS)
18:
19: LLNS = llib-llibmdoc.ln llib-lmdoctree.ln llib-lmdocterm.ln
1.4 kristaps 20:
1.50 kristaps 21: LIBS = libmdoc.a
1.4 kristaps 22:
1.60 kristaps 23: LIBOBJS = macro.o mdoc.o hash.o strings.o xstd.o argv.o \
1.75 kristaps 24: validate.o action.o
25:
1.77 kristaps 26: TERMOBJS= mdocterm.o mmain.o term.o
1.60 kristaps 27:
1.77 kristaps 28: TREEOBJS= mdoctree.o mmain.o
1.60 kristaps 29:
1.78 kristaps 30: LINTOBJS= mdoclint.o mmain.o
31:
1.75 kristaps 32: OBJS = $(LIBOBJS) $(TERMOBJS) $(TREEOBJS)
1.4 kristaps 33:
1.75 kristaps 34: SRCS = macro.c mdoc.c hash.c strings.c xstd.c argv.c validate.c \
1.78 kristaps 35: action.c term.c mdoctree.c mdocterm.c mmain.c mdoclint.c
1.4 kristaps 36:
1.76 kristaps 37: HEADS = mdoc.h private.h term.h mmain.h
1.1 kristaps 38:
1.79 kristaps 39: SGMLS = index.sgml
40:
41: HTMLS = index.html
42:
43: STATICS = style.css external.png
44:
1.91 kristaps 45: TARGZS = mdocml-$(VERSION).tar.gz mdocml-oport-$(VERSION).tar.gz \
46: mdocml-nport-$(VERSION).tar.gz
1.81 kristaps 47:
48: MANS = mdoctree.1 mdocterm.1 mdoclint.1 mdoc.3
1.63 kristaps 49:
1.78 kristaps 50: BINS = mdocterm mdoctree mdoclint
1.4 kristaps 51:
1.81 kristaps 52: CLEAN = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS) $(HTMLS) \
53: $(TARGZS)
1.29 kristaps 54:
1.90 kristaps 55: INSTALL = $(SRCS) $(HEADS) Makefile DESCR $(MANS) $(SGMLS) \
56: $(STATICS) Makefile.netbsd Makefile.openbsd
1.59 kristaps 57:
1.64 kristaps 58: FAIL = regress/test.empty \
59: regress/test.prologue.00 \
60: regress/test.prologue.01 \
61: regress/test.prologue.02 \
62: regress/test.prologue.03 \
63: regress/test.prologue.04 \
64: regress/test.prologue.06 \
65: regress/test.prologue.13 \
66: regress/test.prologue.15 \
67: regress/test.prologue.16 \
68: regress/test.prologue.18 \
69: regress/test.prologue.19 \
70: regress/test.prologue.21 \
71: regress/test.prologue.22 \
72: regress/test.prologue.23 \
1.65 kristaps 73: regress/test.prologue.24 \
74: regress/test.prologue.25 \
75: regress/test.prologue.26 \
76: regress/test.prologue.27 \
77: regress/test.prologue.28 \
78: regress/test.prologue.29 \
79: regress/test.prologue.30 \
80: regress/test.prologue.31 \
81: regress/test.prologue.32 \
82: regress/test.prologue.33 \
1.83 kristaps 83: regress/test.sh.03 \
84: regress/test.escape.01 \
85: regress/test.escape.02 \
86: regress/test.escape.03 \
1.84 kristaps 87: regress/test.escape.04 \
88: regress/test.escape.06 \
89: regress/test.escape.07 \
90: regress/test.escape.08 \
1.87 kristaps 91: regress/test.escape.09 \
92: regress/test.escape.11 \
93: regress/test.escape.12
1.64 kristaps 94:
95: SUCCEED = regress/test.prologue.05 \
96: regress/test.prologue.07 \
97: regress/test.prologue.08 \
98: regress/test.prologue.09 \
99: regress/test.prologue.10 \
100: regress/test.prologue.11 \
101: regress/test.prologue.12 \
102: regress/test.prologue.14 \
103: regress/test.prologue.17 \
1.65 kristaps 104: regress/test.prologue.20 \
105: regress/test.sh.00 \
1.66 kristaps 106: regress/test.name.00 \
1.78 kristaps 107: regress/test.name.01 \
108: regress/test.name.02 \
109: regress/test.name.03 \
1.66 kristaps 110: regress/test.list.00 \
111: regress/test.list.01 \
112: regress/test.list.02 \
113: regress/test.list.03 \
1.67 kristaps 114: regress/test.list.04 \
115: regress/test.list.05 \
1.83 kristaps 116: regress/test.list.06 \
117: regress/test.sh.01 \
118: regress/test.sh.02 \
1.84 kristaps 119: regress/test.escape.00 \
1.87 kristaps 120: regress/test.escape.05 \
121: regress/test.escape.10
1.64 kristaps 122:
1.81 kristaps 123: REGRESS = $(FAIL) $(SUCCEED)
124:
1.50 kristaps 125: all: $(BINS)
1.32 kristaps 126:
1.50 kristaps 127: lint: $(LLNS)
1.42 kristaps 128:
1.1 kristaps 129: clean:
130: rm -f $(CLEAN)
131:
1.89 kristaps 132: cleanlint:
133: rm -f $(LNS) $(LLNS)
134:
1.60 kristaps 135: dist: mdocml-$(VERSION).tar.gz
1.59 kristaps 136:
1.90 kristaps 137: port: mdocml-oport-$(VERSION).tar.gz mdocml-nport-$(VERSION).tar.gz
1.20 kristaps 138:
1.81 kristaps 139: www: $(HTMLS) $(TARGZS)
1.79 kristaps 140:
1.80 kristaps 141: installwww: www
142: install -m 0444 $(HTMLS) $(STATICS) $(PREFIX)/
1.81 kristaps 143: install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/
1.91 kristaps 144: install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/mdocml.tar.gz
1.81 kristaps 145: install -m 0444 mdocml-oport-$(VERSION).tar.gz $(PREFIX)/ports-openbsd/
146: install -m 0444 mdocml-oport-$(VERSION).tar.gz $(PREFIX)/ports-openbsd/mdocml.tar.gz
1.91 kristaps 147: install -m 0444 mdocml-nport-$(VERSION).tar.gz $(PREFIX)/ports-netbsd/
148: install -m 0444 mdocml-nport-$(VERSION).tar.gz $(PREFIX)/ports-netbsd/mdocml.tar.gz
1.80 kristaps 149:
1.89 kristaps 150: regress: mdoclint
1.64 kristaps 151: @for f in $(FAIL); do \
1.78 kristaps 152: echo "./mdoclint $$f" ; \
153: ./mdoclint $$f 2>/dev/null || continue ; exit 1 ; done
1.64 kristaps 154: @for f in $(SUCCEED); do \
1.78 kristaps 155: echo "./mdoclint $$f" ; \
156: ./mdoclint $$f 2>/dev/null || exit 1 ; done
1.64 kristaps 157:
1.60 kristaps 158: install:
159: mkdir -p $(PREFIX)/bin/
160: mkdir -p $(PREFIX)/include/mdoc/
161: mkdir -p $(PREFIX)/lib/
162: mkdir -p $(PREFIX)/man/man1/
1.75 kristaps 163: install -m 0755 mdocterm $(PREFIX)/bin/
164: install -m 0755 mdoctree $(PREFIX)/bin/
1.81 kristaps 165: install -m 0755 mdoclint $(PREFIX)/bin/
1.75 kristaps 166: install -m 0444 mdocterm.1 $(PREFIX)/man/man1/
1.81 kristaps 167: install -m 0444 mdoctree.1 $(PREFIX)/man/man1/
168: install -m 0444 mdoclint.1 $(PREFIX)/man/man1/
1.60 kristaps 169: install -m 0444 mdoc.3 $(PREFIX)/man/man3/
170: install -m 0644 libmdoc.a $(PREFIX)/lib/
171: install -m 0444 mdoc.h $(PREFIX)/include/
172:
173: uninstall:
1.75 kristaps 174: rm -f $(PREFIX)/bin/mdocterm
175: rm -f $(PREFIX)/bin/mdoctree
1.81 kristaps 176: rm -f $(PREFIX)/bin/mdoclint
1.75 kristaps 177: rm -f $(PREFIX)/man/man1/mdocterm.1
178: rm -f $(PREFIX)/man/man1/mdoctree.1
1.81 kristaps 179: rm -f $(PREFIX)/man/man1/mdoclint.1
1.60 kristaps 180: rm -f $(PREFIX)/man/man3/mdoc.3
181: rm -f $(PREFIX)/lib/libmdoc.a
182: rm -f $(PREFIX)/include/mdoc.h
1.20 kristaps 183:
1.50 kristaps 184: macro.ln: macro.c private.h
185: macro.o: macro.c private.h
1.21 kristaps 186:
1.74 kristaps 187: term.ln: term.c term.h
188: term.o: term.c term.h
189:
1.52 kristaps 190: strings.ln: strings.c private.h
191: strings.o: strings.c private.h
192:
1.50 kristaps 193: hash.ln: hash.c private.h
194: hash.o: hash.c private.h
1.21 kristaps 195:
1.50 kristaps 196: mdoc.ln: mdoc.c private.h
197: mdoc.o: mdoc.c private.h
1.47 kristaps 198:
1.76 kristaps 199: mdocterm.ln: mdocterm.c mmain.h
200: mdocterm.o: mdocterm.c mmain.h
1.47 kristaps 201:
1.78 kristaps 202: mdoclint.ln: mdoclint.c mmain.h
203: mdoclint.o: mdoclint.c mmain.h
204:
1.76 kristaps 205: mdoctree.ln: mdoctree.c mmain.h
206: mdoctree.o: mdoctree.c mmain.h
1.39 kristaps 207:
1.53 kristaps 208: xstd.ln: xstd.c private.h
209: xstd.o: xstd.c private.h
210:
211: argv.ln: argv.c private.h
212: argv.o: argv.c private.h
213:
1.54 kristaps 214: validate.ln: validate.c private.h
215: validate.o: validate.c private.h
216:
1.56 kristaps 217: action.ln: action.c private.h
1.76 kristaps 218: action.o: action.c private.h
1.56 kristaps 219:
1.76 kristaps 220: mmain.ln: mmain.c mmain.h
221: mmain.o: mmain.c mmain.h
1.56 kristaps 222:
1.50 kristaps 223: private.h: mdoc.h
1.39 kristaps 224:
1.76 kristaps 225: mmain.h: mdoc.h
226:
227: term.h: mdoc.h
228:
1.90 kristaps 229: mdocml-nport-$(VERSION).tar.gz: mdocml-$(VERSION).tar.gz Makefile.netbsd DESCR
230: mkdir -p .dist/mdocml/
231: sed -e "s!@VERSION@!$(VERSION)!" Makefile.netbsd > \
232: .dist/mdocml/Makefile
233: md5 mdocml-$(VERSION).tar.gz > .dist/mdocml/distinfo
234: rmd160 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
235: sha1 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
236: install -m 0644 DESCR .dist/mdocml/
237: echo @comment $$NetBSD$$ > .dist/mdocml/PLIST
238: echo bin/mdocterm >> .dist/mdocml/PLIST
239: echo bin/mdoctree >> .dist/mdocml/PLIST
240: echo bin/mdoclint >> .dist/mdocml/PLIST
241: echo lib/libmdoc.a >> .dist/mdocml/PLIST
242: echo include/mdoc.h >> .dist/mdocml/PLIST
243: echo man/man1/mdoctree.1 >> .dist/mdocml/PLIST
244: echo man/man1/mdocterm.1 >> .dist/mdocml/PLIST
245: echo man/man1/mdoclint.1 >> .dist/mdocml/PLIST
246: echo man/man3/mdoc.3 >> .dist/mdocml/PLIST
247: ( cd .dist/ && tar zcf ../$@ mdocml/ )
248: rm -rf .dist/
249:
250: mdocml-oport-$(VERSION).tar.gz: mdocml-$(VERSION).tar.gz Makefile.openbsd DESCR
1.60 kristaps 251: mkdir -p .dist/mdocml/pkg
1.90 kristaps 252: sed -e "s!@VERSION@!$(VERSION)!" Makefile.openbsd > \
1.81 kristaps 253: .dist/mdocml/Makefile
1.60 kristaps 254: md5 mdocml-$(VERSION).tar.gz > .dist/mdocml/distinfo
255: rmd160 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
256: sha1 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
257: install -m 0644 DESCR .dist/mdocml/pkg/DESCR
258: echo @comment $$OpenBSD$$ > .dist/mdocml/pkg/PLIST
1.75 kristaps 259: echo bin/mdocterm >> .dist/mdocml/pkg/PLIST
260: echo bin/mdoctree >> .dist/mdocml/pkg/PLIST
1.78 kristaps 261: echo bin/mdoclint >> .dist/mdocml/pkg/PLIST
1.60 kristaps 262: echo lib/libmdoc.a >> .dist/mdocml/pkg/PLIST
263: echo include/mdoc.h >> .dist/mdocml/pkg/PLIST
1.75 kristaps 264: echo @man man/man1/mdoctree.1 >> .dist/mdocml/pkg/PLIST
265: echo @man man/man1/mdocterm.1 >> .dist/mdocml/pkg/PLIST
1.78 kristaps 266: echo @man man/man1/mdoclint.1 >> .dist/mdocml/pkg/PLIST
1.60 kristaps 267: echo @man man/man3/mdoc.3 >> .dist/mdocml/pkg/PLIST
268: ( cd .dist/ && tar zcf ../$@ mdocml/ )
269: rm -rf .dist/
270:
271: mdocml-$(VERSION).tar.gz: $(INSTALL)
272: mkdir -p .dist/mdocml/mdocml-$(VERSION)/
1.81 kristaps 273: mkdir -p .dist/mdocml/mdocml-$(VERSION)/regress/
1.60 kristaps 274: install -m 0644 $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
1.81 kristaps 275: install -m 0644 $(REGRESS) .dist/mdocml/mdocml-$(VERSION)/regress/
1.60 kristaps 276: ( cd .dist/mdocml/ && tar zcf ../../$@ mdocml-$(VERSION)/ )
277: rm -rf .dist/
278:
279: llib-llibmdoc.ln: $(LIBLNS)
280: $(LINT) $(LINTFLAGS) -Clibmdoc $(LIBLNS)
281:
1.75 kristaps 282: llib-lmdoctree.ln: $(TREELNS) llib-llibmdoc.ln
283: $(LINT) $(LINTFLAGS) -Cmdoctree $(TREELNS) llib-llibmdoc.ln
284:
285: llib-lmdocterm.ln: $(TERMLNS) llib-llibmdoc.ln
286: $(LINT) $(LINTFLAGS) -Cmdocterm $(TERMLNS) llib-llibmdoc.ln
1.60 kristaps 287:
288: libmdoc.a: $(LIBOBJS)
289: $(AR) rs $@ $(LIBOBJS)
290:
1.75 kristaps 291: mdocterm: $(TERMOBJS) libmdoc.a
292: $(CC) $(CFLAGS) -o $@ $(TERMOBJS) libmdoc.a
293:
294: mdoctree: $(TREEOBJS) libmdoc.a
295: $(CC) $(CFLAGS) -o $@ $(TREEOBJS) libmdoc.a
1.39 kristaps 296:
1.78 kristaps 297: mdoclint: $(LINTOBJS) libmdoc.a
298: $(CC) $(CFLAGS) -o $@ $(LINTOBJS) libmdoc.a
1.79 kristaps 299:
300: .sgml.html:
301: validate $<
1.85 kristaps 302: sed -e "s!@VERSION@!$(VERSION)!" -e "s!@VDATE@!$(VDATE)!" $< > $@
303:
CVSweb