Annotation of mandoc/Makefile, Revision 1.217
1.213 kristaps 1: .SUFFIXES: .html .xml .sgml .1 .3 .7 .md5 .tar.gz .1.html .3.html .7.html
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.215 kristaps 12: VERSION = 1.9.5
13: VDATE = 21 September 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: CFLAGS += $(VFLAGS)
1.182 kristaps 18: LINTFLAGS += $(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 \
1.187 kristaps 22: lib.ln att.ln arch.ln vol.ln msec.ln st.ln \
23: mandoc.ln
1.165 kristaps 24: MDOCOBJS = mdoc_macro.o mdoc.o mdoc_hash.o mdoc_strings.o \
1.163 kristaps 25: mdoc_argv.o mdoc_validate.o mdoc_action.o lib.o att.o \
1.187 kristaps 26: arch.o vol.o msec.o st.o mandoc.o
1.165 kristaps 27: MDOCSRCS = mdoc_macro.c mdoc.c mdoc_hash.c mdoc_strings.c \
1.163 kristaps 28: mdoc_argv.c mdoc_validate.c mdoc_action.c lib.c att.c \
1.187 kristaps 29: arch.c vol.c msec.c st.c mandoc.c
1.148 kristaps 30:
1.156 kristaps 31: MANLNS = man_macro.ln man.ln man_hash.ln man_validate.ln \
1.203 kristaps 32: man_action.ln mandoc.ln man_argv.ln
1.156 kristaps 33: MANOBJS = man_macro.o man.o man_hash.o man_validate.o \
1.203 kristaps 34: man_action.o mandoc.o man_argv.o
1.156 kristaps 35: MANSRCS = man_macro.c man.c man_hash.c man_validate.c \
1.203 kristaps 36: man_action.c mandoc.c man_argv.c
1.132 kristaps 37:
1.210 kristaps 38: MAINLNS = main.ln mdoc_term.ln chars.ln term.ln tree.ln \
1.214 kristaps 39: compat.ln man_term.ln html.ln mdoc_html.ln \
40: man_html.ln
1.210 kristaps 41: MAINOBJS = main.o mdoc_term.o chars.o term.o tree.o compat.o \
1.214 kristaps 42: man_term.o html.o mdoc_html.o man_html.o
1.210 kristaps 43: MAINSRCS = main.c mdoc_term.c chars.c term.c tree.c compat.c \
1.214 kristaps 44: man_term.c html.c mdoc_html.c man_html.c
1.132 kristaps 45:
1.148 kristaps 46: LLNS = llib-llibmdoc.ln llib-llibman.ln llib-lmandoc.ln
1.157 kristaps 47: LNS = $(MAINLNS) $(MDOCLNS) $(MANLNS)
1.148 kristaps 48: LIBS = libmdoc.a libman.a
1.158 kristaps 49: OBJS = $(MDOCOBJS) $(MAINOBJS) $(MANOBJS)
1.150 kristaps 50: SRCS = $(MDOCSRCS) $(MAINSRCS) $(MANSRCS)
1.217 ! kristaps 51: DATAS = arch.in att.in lib.in msec.in st.in \
! 52: vol.in chars.in
! 53: HEADS = mdoc.h libmdoc.h man.h libman.h term.h \
! 54: libmandoc.h html.h chars.h
1.142 kristaps 55: SGMLS = index.sgml
1.193 kristaps 56: XSLS = ChangeLog.xsl
1.212 kristaps 57: HTMLS = index.html ChangeLog.html mandoc.1.html mdoc.3.html \
58: man.3.html mdoc.7.html man.7.html mandoc_char.7.html \
59: manuals.7.html
1.216 kristaps 60: EXAMPLES = example.style.css
1.193 kristaps 61: XMLS = ChangeLog.xml
1.213 kristaps 62: STATICS = index.css style.css external.png
1.195 kristaps 63: MD5S = mdocml-$(VERSION).md5
64: TARGZS = mdocml-$(VERSION).tar.gz
1.168 kristaps 65: MANS = mandoc.1 mdoc.3 mdoc.7 manuals.7 mandoc_char.7 \
66: man.7 man.3
1.132 kristaps 67: BINS = mandoc
1.168 kristaps 68: CLEAN = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS) $(HTMLS) \
1.213 kristaps 69: $(TARGZS) tags $(MD5S) $(XMLS)
1.198 kristaps 70: INSTALL = $(SRCS) $(HEADS) Makefile $(MANS) $(SGMLS) $(STATICS) \
1.216 kristaps 71: $(DATAS) $(XSLS) $(EXAMPLES)
1.81 kristaps 72:
1.50 kristaps 73: all: $(BINS)
1.32 kristaps 74:
1.50 kristaps 75: lint: $(LLNS)
1.42 kristaps 76:
1.1 kristaps 77: clean:
78: rm -f $(CLEAN)
79:
1.89 kristaps 80: cleanlint:
81: rm -f $(LNS) $(LLNS)
82:
1.60 kristaps 83: dist: mdocml-$(VERSION).tar.gz
1.59 kristaps 84:
1.213 kristaps 85: www: all $(HTMLS) $(MD5S) $(TARGZS)
1.79 kristaps 86:
1.80 kristaps 87: installwww: www
1.213 kristaps 88: install -m 0444 $(HTMLS) $(STATICS) $(PREFIX)/
1.81 kristaps 89: install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/
1.186 kristaps 90: install -m 0444 mdocml-$(VERSION).md5 $(PREFIX)/snapshots/
1.91 kristaps 91: install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/mdocml.tar.gz
1.186 kristaps 92: install -m 0444 mdocml-$(VERSION).md5 $(PREFIX)/snapshots/mdocml.md5
1.80 kristaps 93:
1.60 kristaps 94: install:
1.101 kristaps 95: mkdir -p $(BINDIR)
96: mkdir -p $(MANDIR)/man1
1.131 kristaps 97: mkdir -p $(MANDIR)/man7
1.132 kristaps 98: $(INSTALL_PROGRAM) mandoc $(BINDIR)
99: $(INSTALL_MAN) mandoc.1 $(MANDIR)/man1
1.131 kristaps 100: $(INSTALL_MAN) mdoc.7 $(MANDIR)/man7
1.60 kristaps 101:
102: uninstall:
1.132 kristaps 103: rm -f $(BINDIR)/mandoc
104: rm -f $(MANDIR)/man1/mandoc.1
1.131 kristaps 105: rm -f $(MANDIR)/man7/mdoc.7
1.20 kristaps 106:
1.148 kristaps 107: man_macro.ln: man_macro.c libman.h
108: man_macro.o: man_macro.c libman.h
1.108 kristaps 109:
1.148 kristaps 110: lib.ln: lib.c lib.in libmdoc.h
111: lib.o: lib.c lib.in libmdoc.h
1.108 kristaps 112:
1.148 kristaps 113: att.ln: att.c att.in libmdoc.h
114: att.o: att.c att.in libmdoc.h
1.108 kristaps 115:
1.148 kristaps 116: arch.ln: arch.c arch.in libmdoc.h
117: arch.o: arch.c arch.in libmdoc.h
118:
119: vol.ln: vol.c vol.in libmdoc.h
120: vol.o: vol.c vol.in libmdoc.h
1.108 kristaps 121:
1.210 kristaps 122: chars.ln: chars.c chars.in chars.h
123: chars.o: chars.c chars.in chars.h
1.108 kristaps 124:
1.148 kristaps 125: msec.ln: msec.c msec.in libmdoc.h
126: msec.o: msec.c msec.in libmdoc.h
1.108 kristaps 127:
1.148 kristaps 128: st.ln: st.c st.in libmdoc.h
129: st.o: st.c st.in libmdoc.h
1.108 kristaps 130:
1.148 kristaps 131: mdoc_macro.ln: mdoc_macro.c libmdoc.h
132: mdoc_macro.o: mdoc_macro.c libmdoc.h
1.21 kristaps 133:
1.160 kristaps 134: mdoc_term.ln: mdoc_term.c term.h mdoc.h
135: mdoc_term.o: mdoc_term.c term.h mdoc.h
1.74 kristaps 136:
1.165 kristaps 137: mdoc_strings.ln: mdoc_strings.c libmdoc.h
138: mdoc_strings.o: mdoc_strings.c libmdoc.h
1.148 kristaps 139:
140: man_hash.ln: man_hash.c libman.h
141: man_hash.o: man_hash.c libman.h
142:
143: mdoc_hash.ln: mdoc_hash.c libmdoc.h
144: mdoc_hash.o: mdoc_hash.c libmdoc.h
1.52 kristaps 145:
1.148 kristaps 146: mdoc.ln: mdoc.c libmdoc.h
147: mdoc.o: mdoc.c libmdoc.h
1.21 kristaps 148:
1.148 kristaps 149: man.ln: man.c libman.h
150: man.o: man.c libman.h
1.47 kristaps 151:
1.132 kristaps 152: main.ln: main.c mdoc.h
153: main.o: main.c mdoc.h
154:
1.173 kristaps 155: compat.ln: compat.c
156: compat.o: compat.c
157:
1.214 kristaps 158: term.ln: term.c term.h man.h mdoc.h chars.h
159: term.o: term.c term.h man.h mdoc.h chars.h
1.53 kristaps 160:
1.214 kristaps 161: html.ln: html.c html.h chars.h
162: html.o: html.c html.h chars.h
163:
164: mdoc_html.ln: mdoc_html.c html.h mdoc.h
165: mdoc_html.o: mdoc_html.c html.h mdoc.h
166:
167: man_html.ln: man_html.c html.h man.h
168: man_html.o: man_html.c html.h man.h
1.209 kristaps 169:
1.207 kristaps 170: tree.ln: tree.c man.h mdoc.h
171: tree.o: tree.c man.h mdoc.h
172:
1.163 kristaps 173: mdoc_argv.ln: mdoc_argv.c libmdoc.h
174: mdoc_argv.o: mdoc_argv.c libmdoc.h
1.53 kristaps 175:
1.203 kristaps 176: man_argv.ln: man_argv.c libman.h
177: man_argv.o: man_argv.c libman.h
178:
1.155 kristaps 179: man_validate.ln: man_validate.c libman.h
180: man_validate.o: man_validate.c libman.h
181:
182: mdoc_validate.ln: mdoc_validate.c libmdoc.h
183: mdoc_validate.o: mdoc_validate.c libmdoc.h
1.54 kristaps 184:
1.156 kristaps 185: mdoc_action.ln: mdoc_action.c libmdoc.h
186: mdoc_action.o: mdoc_action.c libmdoc.h
1.56 kristaps 187:
1.148 kristaps 188: libmdoc.h: mdoc.h
1.39 kristaps 189:
1.193 kristaps 190: ChangeLog.xml:
1.196 kristaps 191: cvs2cl --xml --xml-encoding iso-8859-15 -t --noxmlns -f $@
1.193 kristaps 192:
1.194 kristaps 193: ChangeLog.html: ChangeLog.xml ChangeLog.xsl
1.193 kristaps 194: xsltproc -o $@ ChangeLog.xsl ChangeLog.xml
1.175 kristaps 195:
1.60 kristaps 196: mdocml-$(VERSION).tar.gz: $(INSTALL)
197: mkdir -p .dist/mdocml/mdocml-$(VERSION)/
1.208 kristaps 198: cp -f $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
1.60 kristaps 199: ( cd .dist/mdocml/ && tar zcf ../../$@ mdocml-$(VERSION)/ )
200: rm -rf .dist/
201:
1.148 kristaps 202: llib-llibmdoc.ln: $(MDOCLNS)
1.181 kristaps 203: $(LINT) -Clibmdoc $(MDOCLNS)
1.148 kristaps 204:
205: llib-llibman.ln: $(MANLNS)
1.181 kristaps 206: $(LINT) -Clibman $(MANLNS)
1.60 kristaps 207:
1.132 kristaps 208: llib-lmandoc.ln: $(MAINLNS) llib-llibmdoc.ln
1.181 kristaps 209: $(LINT) -Cmandoc $(MAINLNS) llib-llibmdoc.ln
1.60 kristaps 210:
1.148 kristaps 211: libmdoc.a: $(MDOCOBJS)
212: $(AR) rs $@ $(MDOCOBJS)
213:
214: libman.a: $(MANOBJS)
215: $(AR) rs $@ $(MANOBJS)
1.60 kristaps 216:
1.148 kristaps 217: mandoc: $(MAINOBJS) libmdoc.a libman.a
218: $(CC) $(CFLAGS) -o $@ $(MAINOBJS) libmdoc.a libman.a
1.75 kristaps 219:
1.79 kristaps 220: .sgml.html:
221: validate $<
1.85 kristaps 222: sed -e "s!@VERSION@!$(VERSION)!" -e "s!@VDATE@!$(VDATE)!" $< > $@
1.168 kristaps 223:
224: .1.1.txt:
1.183 kristaps 225: ./mandoc -Wall,error -fstrict $< | col -b > $@
1.168 kristaps 226:
1.212 kristaps 227: .1.1.html:
228: ./mandoc -Thtml -ostyle=style.css -Wall,error -fstrict $< > $@
229:
1.168 kristaps 230: .3.3.txt:
1.183 kristaps 231: ./mandoc -Wall,error -fstrict $< | col -b > $@
1.168 kristaps 232:
1.212 kristaps 233: .3.3.html:
234: ./mandoc -Thtml -ostyle=style.css -Wall,error -fstrict $< > $@
235:
1.168 kristaps 236: .7.7.txt:
1.183 kristaps 237: ./mandoc -Wall,error -fstrict $< | col -b > $@
1.185 kristaps 238:
1.212 kristaps 239: .7.7.html:
240: ./mandoc -Thtml -ostyle=style.css -Wall,error -fstrict $< > $@
241:
1.185 kristaps 242: .tar.gz.md5:
1.186 kristaps 243: md5 $< > $@
CVSweb