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