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