Annotation of mandoc/Makefile, Revision 1.169
1.168 kristaps 1: .SUFFIXES: .html .sgml .1.txt .3.txt .7.txt .1 .3 .7
1.79 kristaps 2:
1.99 kristaps 3: BINDIR = $(PREFIX)/bin
4: INCLUDEDIR = $(PREFIX)/include
5: LIBDIR = $(PREFIX)/lib
6: MANDIR = $(PREFIX)/man
7: INSTALL_PROGRAM = install -m 0755
8: INSTALL_DATA = install -m 0444
9: INSTALL_LIB = install -m 0644
10: INSTALL_MAN = $(INSTALL_DATA)
11:
1.168 kristaps 12: VERSION = 1.7.10
13: VDATE = 05 April 2009
1.7 kristaps 14:
1.131 kristaps 15: VFLAGS = -DVERSION=\"$(VERSION)\"
1.143 kristaps 16: CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -g
1.113 kristaps 17: LINTFLAGS += $(VFLAGS)
18: CFLAGS += $(VFLAGS)
1.132 kristaps 19:
1.165 kristaps 20: MDOCLNS = mdoc_macro.ln mdoc.ln mdoc_hash.ln mdoc_strings.ln \
21: mdoc_argv.ln mdoc_validate.ln mdoc_action.ln \
22: lib.ln att.ln arch.ln vol.ln msec.ln st.ln
23: MDOCOBJS = mdoc_macro.o mdoc.o mdoc_hash.o mdoc_strings.o \
1.163 kristaps 24: mdoc_argv.o mdoc_validate.o mdoc_action.o lib.o att.o \
25: arch.o vol.o msec.o st.o
1.165 kristaps 26: MDOCSRCS = mdoc_macro.c mdoc.c mdoc_hash.c mdoc_strings.c \
1.163 kristaps 27: mdoc_argv.c mdoc_validate.c mdoc_action.c lib.c att.c \
28: arch.c vol.c msec.c st.c
1.148 kristaps 29:
1.156 kristaps 30: MANLNS = man_macro.ln man.ln man_hash.ln man_validate.ln \
31: man_action.ln
32: MANOBJS = man_macro.o man.o man_hash.o man_validate.o \
33: man_action.o
34: MANSRCS = man_macro.c man.c man_hash.c man_validate.c \
35: man_action.c
1.132 kristaps 36:
1.165 kristaps 37: MAINLNS = main.ln mdoc_term.ln ascii.ln term.ln tree.ln \
1.160 kristaps 38: compat.ln man_term.ln
1.165 kristaps 39: MAINOBJS = main.o mdoc_term.o ascii.o term.o tree.o compat.o \
1.160 kristaps 40: man_term.o
1.165 kristaps 41: MAINSRCS = main.c mdoc_term.c ascii.c term.c tree.c compat.c \
1.160 kristaps 42: man_term.c
1.132 kristaps 43:
1.148 kristaps 44: LLNS = llib-llibmdoc.ln llib-llibman.ln llib-lmandoc.ln
1.157 kristaps 45: LNS = $(MAINLNS) $(MDOCLNS) $(MANLNS)
1.148 kristaps 46: LIBS = libmdoc.a libman.a
1.158 kristaps 47: OBJS = $(MDOCOBJS) $(MAINOBJS) $(MANOBJS)
1.150 kristaps 48: SRCS = $(MDOCSRCS) $(MAINSRCS) $(MANSRCS)
1.131 kristaps 49: DATAS = arch.in att.in lib.in msec.in st.in vol.in ascii.in
1.148 kristaps 50: HEADS = mdoc.h libmdoc.h man.h libman.h term.h
1.142 kristaps 51: SGMLS = index.sgml
1.131 kristaps 52: HTMLS = index.html
53: STATICS = style.css external.png
1.132 kristaps 54: TARGZS = mdocml-$(VERSION).tar.gz \
55: mdocml-oport-$(VERSION).tar.gz \
1.152 kristaps 56: mdocml-fport-$(VERSION).tar.gz \
1.131 kristaps 57: mdocml-nport-$(VERSION).tar.gz
1.168 kristaps 58: MANS = mandoc.1 mdoc.3 mdoc.7 manuals.7 mandoc_char.7 \
59: man.7 man.3
60: TEXTS = mandoc.1.txt mdoc.3.txt mdoc.7.txt manuals.7.txt \
61: mandoc_char.7.txt man.7.txt man.3.txt
1.132 kristaps 62: BINS = mandoc
1.168 kristaps 63: CLEAN = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS) $(HTMLS) \
64: $(TARGZS) tags $(TEXTS)
1.153 kristaps 65: MAKEFILES = Makefile.netbsd Makefile.openbsd Makefile.freebsd \
66: Makefile
67: INSTALL = $(SRCS) $(HEADS) $(MAKEFILES) DESCR $(MANS) $(SGMLS) \
68: $(STATICS) $(DATAS)
1.81 kristaps 69:
1.50 kristaps 70: all: $(BINS)
1.32 kristaps 71:
1.50 kristaps 72: lint: $(LLNS)
1.42 kristaps 73:
1.1 kristaps 74: clean:
75: rm -f $(CLEAN)
76:
1.89 kristaps 77: cleanlint:
78: rm -f $(LNS) $(LLNS)
79:
1.60 kristaps 80: dist: mdocml-$(VERSION).tar.gz
1.59 kristaps 81:
1.152 kristaps 82: port: mdocml-oport-$(VERSION).tar.gz \
83: mdocml-fport-$(VERSION).tar.gz \
84: mdocml-nport-$(VERSION).tar.gz
1.20 kristaps 85:
1.168 kristaps 86: www: all $(HTMLS) $(TARGZS) $(TEXTS)
1.79 kristaps 87:
1.80 kristaps 88: installwww: www
1.169 ! kristaps 89: install -m 0444 $(TEXTS) $(HTMLS) $(STATICS) $(PREFIX)/
1.81 kristaps 90: install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/
1.91 kristaps 91: install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/mdocml.tar.gz
1.81 kristaps 92: install -m 0444 mdocml-oport-$(VERSION).tar.gz $(PREFIX)/ports-openbsd/
93: install -m 0444 mdocml-oport-$(VERSION).tar.gz $(PREFIX)/ports-openbsd/mdocml.tar.gz
1.91 kristaps 94: install -m 0444 mdocml-nport-$(VERSION).tar.gz $(PREFIX)/ports-netbsd/
95: install -m 0444 mdocml-nport-$(VERSION).tar.gz $(PREFIX)/ports-netbsd/mdocml.tar.gz
1.152 kristaps 96: install -m 0444 mdocml-fport-$(VERSION).tar.gz $(PREFIX)/ports-freebsd/
97: install -m 0444 mdocml-fport-$(VERSION).tar.gz $(PREFIX)/ports-freebsd/mdocml.tar.gz
1.80 kristaps 98:
1.60 kristaps 99: install:
1.101 kristaps 100: mkdir -p $(BINDIR)
101: mkdir -p $(MANDIR)/man1
1.131 kristaps 102: mkdir -p $(MANDIR)/man7
1.132 kristaps 103: $(INSTALL_PROGRAM) mandoc $(BINDIR)
104: $(INSTALL_MAN) mandoc.1 $(MANDIR)/man1
1.131 kristaps 105: $(INSTALL_MAN) mdoc.7 $(MANDIR)/man7
1.60 kristaps 106:
107: uninstall:
1.132 kristaps 108: rm -f $(BINDIR)/mandoc
109: rm -f $(MANDIR)/man1/mandoc.1
1.131 kristaps 110: rm -f $(MANDIR)/man7/mdoc.7
1.20 kristaps 111:
1.148 kristaps 112: man_macro.ln: man_macro.c libman.h
113: man_macro.o: man_macro.c libman.h
1.108 kristaps 114:
1.148 kristaps 115: lib.ln: lib.c lib.in libmdoc.h
116: lib.o: lib.c lib.in libmdoc.h
1.108 kristaps 117:
1.148 kristaps 118: att.ln: att.c att.in libmdoc.h
119: att.o: att.c att.in libmdoc.h
1.108 kristaps 120:
1.148 kristaps 121: arch.ln: arch.c arch.in libmdoc.h
122: arch.o: arch.c arch.in libmdoc.h
123:
124: vol.ln: vol.c vol.in libmdoc.h
125: vol.o: vol.c vol.in libmdoc.h
1.108 kristaps 126:
1.127 kristaps 127: ascii.ln: ascii.c ascii.in term.h
128: ascii.o: ascii.c ascii.in term.h
1.108 kristaps 129:
1.148 kristaps 130: msec.ln: msec.c msec.in libmdoc.h
131: msec.o: msec.c msec.in libmdoc.h
1.108 kristaps 132:
1.148 kristaps 133: st.ln: st.c st.in libmdoc.h
134: st.o: st.c st.in libmdoc.h
1.108 kristaps 135:
1.148 kristaps 136: mdoc_macro.ln: mdoc_macro.c libmdoc.h
137: mdoc_macro.o: mdoc_macro.c libmdoc.h
1.21 kristaps 138:
1.160 kristaps 139: mdoc_term.ln: mdoc_term.c term.h mdoc.h
140: mdoc_term.o: mdoc_term.c term.h mdoc.h
1.74 kristaps 141:
1.165 kristaps 142: mdoc_strings.ln: mdoc_strings.c libmdoc.h
143: mdoc_strings.o: mdoc_strings.c libmdoc.h
1.148 kristaps 144:
145: man_hash.ln: man_hash.c libman.h
146: man_hash.o: man_hash.c libman.h
147:
148: mdoc_hash.ln: mdoc_hash.c libmdoc.h
149: mdoc_hash.o: mdoc_hash.c libmdoc.h
1.52 kristaps 150:
1.148 kristaps 151: mdoc.ln: mdoc.c libmdoc.h
152: mdoc.o: mdoc.c libmdoc.h
1.21 kristaps 153:
1.148 kristaps 154: man.ln: man.c libman.h
155: man.o: man.c libman.h
1.47 kristaps 156:
1.132 kristaps 157: main.ln: main.c mdoc.h
158: main.o: main.c mdoc.h
159:
1.165 kristaps 160: term.ln: term.c term.h man.h mdoc.h
161: term.o: term.c term.h man.h mdoc.h
1.53 kristaps 162:
1.163 kristaps 163: mdoc_argv.ln: mdoc_argv.c libmdoc.h
164: mdoc_argv.o: mdoc_argv.c libmdoc.h
1.53 kristaps 165:
1.155 kristaps 166: man_validate.ln: man_validate.c libman.h
167: man_validate.o: man_validate.c libman.h
168:
169: mdoc_validate.ln: mdoc_validate.c libmdoc.h
170: mdoc_validate.o: mdoc_validate.c libmdoc.h
1.54 kristaps 171:
1.156 kristaps 172: mdoc_action.ln: mdoc_action.c libmdoc.h
173: mdoc_action.o: mdoc_action.c libmdoc.h
1.56 kristaps 174:
1.148 kristaps 175: libmdoc.h: mdoc.h
1.39 kristaps 176:
1.90 kristaps 177: mdocml-nport-$(VERSION).tar.gz: mdocml-$(VERSION).tar.gz Makefile.netbsd DESCR
178: mkdir -p .dist/mdocml/
179: sed -e "s!@VERSION@!$(VERSION)!" Makefile.netbsd > \
180: .dist/mdocml/Makefile
181: md5 mdocml-$(VERSION).tar.gz > .dist/mdocml/distinfo
182: rmd160 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
183: sha1 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
184: install -m 0644 DESCR .dist/mdocml/
185: echo @comment $$NetBSD$$ > .dist/mdocml/PLIST
1.132 kristaps 186: echo bin/mandoc >> .dist/mdocml/PLIST
187: echo man/man1/mandoc.1 >> .dist/mdocml/PLIST
188: echo man/man7/mdoc.7 >> .dist/mdocml/PLIST
1.90 kristaps 189: ( cd .dist/ && tar zcf ../$@ mdocml/ )
190: rm -rf .dist/
191:
192: mdocml-oport-$(VERSION).tar.gz: mdocml-$(VERSION).tar.gz Makefile.openbsd DESCR
1.60 kristaps 193: mkdir -p .dist/mdocml/pkg
1.90 kristaps 194: sed -e "s!@VERSION@!$(VERSION)!" Makefile.openbsd > \
1.81 kristaps 195: .dist/mdocml/Makefile
1.60 kristaps 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.132 kristaps 201: echo bin/mandoc >> .dist/mdocml/pkg/PLIST
202: echo @man man/man1/mandoc.1 >> .dist/mdocml/pkg/PLIST
203: echo @man man/man7/mdoc.7 >> .dist/mdocml/pkg/PLIST
1.60 kristaps 204: ( cd .dist/ && tar zcf ../$@ mdocml/ )
205: rm -rf .dist/
206:
1.152 kristaps 207: mdocml-fport-$(VERSION).tar.gz: mdocml-$(VERSION).tar.gz Makefile.freebsd DESCR
208: mkdir -p .dist/mdocml
209: sed -e "s!@VERSION@!$(VERSION)!" Makefile.freebsd > \
210: .dist/mdocml/Makefile
211: ( md5 mdocml-$(VERSION).tar.gz; \
1.154 kristaps 212: cksum -a SHA256 mdocml-$(VERSION).tar.gz; \
1.152 kristaps 213: echo -n "SIZE (mdocml-$(VERSION).tar.gz) = "; \
214: ls -l mdocml-$(VERSION).tar.gz | awk '{print $$5}' \
215: ) > .dist/mdocml/distinfo
216: install -m 0644 DESCR .dist/mdocml/pkg-descr
217: ( echo; echo "WWW: http://mdocml.bsd.lv/") >> .dist/mdocml/pkg-descr
218: ( cd .dist/ && tar zcf ../$@ mdocml/ )
219: rm -rf .dist/
220:
1.60 kristaps 221: mdocml-$(VERSION).tar.gz: $(INSTALL)
222: mkdir -p .dist/mdocml/mdocml-$(VERSION)/
223: install -m 0644 $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
224: ( cd .dist/mdocml/ && tar zcf ../../$@ mdocml-$(VERSION)/ )
225: rm -rf .dist/
226:
1.148 kristaps 227: llib-llibmdoc.ln: $(MDOCLNS)
228: $(LINT) $(LINTFLAGS) -Clibmdoc $(MDOCLNS)
229:
230: llib-llibman.ln: $(MANLNS)
231: $(LINT) $(LINTFLAGS) -Clibman $(MANLNS)
1.60 kristaps 232:
1.132 kristaps 233: llib-lmandoc.ln: $(MAINLNS) llib-llibmdoc.ln
234: $(LINT) $(LINTFLAGS) -Cmandoc $(MAINLNS) llib-llibmdoc.ln
1.60 kristaps 235:
1.148 kristaps 236: libmdoc.a: $(MDOCOBJS)
237: $(AR) rs $@ $(MDOCOBJS)
238:
239: libman.a: $(MANOBJS)
240: $(AR) rs $@ $(MANOBJS)
1.60 kristaps 241:
1.148 kristaps 242: mandoc: $(MAINOBJS) libmdoc.a libman.a
243: $(CC) $(CFLAGS) -o $@ $(MAINOBJS) libmdoc.a libman.a
1.75 kristaps 244:
1.79 kristaps 245: .sgml.html:
246: validate $<
1.85 kristaps 247: sed -e "s!@VERSION@!$(VERSION)!" -e "s!@VDATE@!$(VDATE)!" $< > $@
1.168 kristaps 248:
249: .1.1.txt:
250: ./mandoc -Wall,error $< | col -b > $@
251:
252: .3.3.txt:
253: ./mandoc -Wall,error $< | col -b > $@
254:
255: .7.7.txt:
256: ./mandoc -Wall,error $< | col -b > $@
CVSweb