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