Annotation of mandoc/Makefile, Revision 1.140
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.140 ! kristaps 12: VERSION = 1.6.7
1.138 kristaps 13: VDATE = 21 March 2009
1.7 kristaps 14:
1.131 kristaps 15: VFLAGS = -DVERSION=\"$(VERSION)\"
16: CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -g
1.113 kristaps 17: LINTFLAGS += $(VFLAGS)
18: CFLAGS += $(VFLAGS)
1.132 kristaps 19:
1.131 kristaps 20: LIBLNS = macro.ln mdoc.ln hash.ln strings.ln xstd.ln argv.ln \
21: validate.ln action.ln lib.ln att.ln arch.ln vol.ln \
22: msec.ln st.ln
23: LIBOBJS = macro.o mdoc.o hash.o strings.o xstd.o argv.o validate.o \
24: action.o lib.o att.o arch.o vol.o msec.o st.o
1.132 kristaps 25: LIBSRCS = macro.c mdoc.c hash.c strings.c xstd.c argv.c validate.c \
26: action.c lib.c att.c arch.c vol.c msec.c st.c
27:
1.134 kristaps 28: MAINLNS = main.ln term.ln ascii.ln terminal.ln tree.ln compat.ln
29: MAINOBJS = main.o term.o ascii.o terminal.o tree.o compat.o
30: MAINSRCS = main.c term.c ascii.c terminal.c tree.c compat.c
1.132 kristaps 31:
32: LLNS = llib-llibmdoc.ln llib-lmandoc.ln
33: LNS = $(MAINLNS) $(LIBLNS)
1.131 kristaps 34: LIBS = libmdoc.a
1.132 kristaps 35: OBJS = $(LIBOBJS) $(MAINOBJS)
36: SRCS = $(LIBSRCS) $(MAINSRCS)
1.131 kristaps 37: DATAS = arch.in att.in lib.in msec.in st.in vol.in ascii.in
38: HEADS = mdoc.h private.h term.h
39: SGMLS = index.sgml
40: HTMLS = index.html
41: STATICS = style.css external.png
1.132 kristaps 42: TARGZS = mdocml-$(VERSION).tar.gz \
43: mdocml-oport-$(VERSION).tar.gz \
1.131 kristaps 44: mdocml-nport-$(VERSION).tar.gz
1.132 kristaps 45: MANS = mandoc.1 mdoc.3 mdoc.7
46: BINS = mandoc
1.131 kristaps 47: CLEAN = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS) $(HTMLS) $(TARGZS)
48: INSTALL = $(SRCS) $(HEADS) Makefile DESCR $(MANS) $(SGMLS) \
49: $(STATICS) Makefile.netbsd Makefile.openbsd $(DATAS)
1.81 kristaps 50:
1.50 kristaps 51: all: $(BINS)
1.32 kristaps 52:
1.50 kristaps 53: lint: $(LLNS)
1.42 kristaps 54:
1.1 kristaps 55: clean:
56: rm -f $(CLEAN)
57:
1.89 kristaps 58: cleanlint:
59: rm -f $(LNS) $(LLNS)
60:
1.60 kristaps 61: dist: mdocml-$(VERSION).tar.gz
1.59 kristaps 62:
1.90 kristaps 63: port: mdocml-oport-$(VERSION).tar.gz mdocml-nport-$(VERSION).tar.gz
1.20 kristaps 64:
1.81 kristaps 65: www: $(HTMLS) $(TARGZS)
1.79 kristaps 66:
1.80 kristaps 67: installwww: www
68: install -m 0444 $(HTMLS) $(STATICS) $(PREFIX)/
1.81 kristaps 69: install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/
1.91 kristaps 70: install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/mdocml.tar.gz
1.81 kristaps 71: install -m 0444 mdocml-oport-$(VERSION).tar.gz $(PREFIX)/ports-openbsd/
72: install -m 0444 mdocml-oport-$(VERSION).tar.gz $(PREFIX)/ports-openbsd/mdocml.tar.gz
1.91 kristaps 73: install -m 0444 mdocml-nport-$(VERSION).tar.gz $(PREFIX)/ports-netbsd/
74: install -m 0444 mdocml-nport-$(VERSION).tar.gz $(PREFIX)/ports-netbsd/mdocml.tar.gz
1.80 kristaps 75:
1.60 kristaps 76: install:
1.101 kristaps 77: mkdir -p $(BINDIR)
78: mkdir -p $(MANDIR)/man1
1.131 kristaps 79: mkdir -p $(MANDIR)/man7
1.132 kristaps 80: $(INSTALL_PROGRAM) mandoc $(BINDIR)
81: $(INSTALL_MAN) mandoc.1 $(MANDIR)/man1
1.131 kristaps 82: $(INSTALL_MAN) mdoc.7 $(MANDIR)/man7
1.60 kristaps 83:
84: uninstall:
1.132 kristaps 85: rm -f $(BINDIR)/mandoc
86: rm -f $(MANDIR)/man1/mandoc.1
1.131 kristaps 87: rm -f $(MANDIR)/man7/mdoc.7
1.20 kristaps 88:
1.127 kristaps 89: lib.ln: lib.c lib.in private.h
90: lib.o: lib.c lib.in private.h
1.108 kristaps 91:
1.127 kristaps 92: att.ln: att.c att.in private.h
93: att.o: att.c att.in private.h
1.108 kristaps 94:
1.127 kristaps 95: arch.ln: arch.c arch.in private.h
96: arch.o: arch.c arch.in private.h
1.108 kristaps 97:
1.127 kristaps 98: vol.ln: vol.c vol.in private.h
99: vol.o: vol.c vol.in private.h
1.108 kristaps 100:
1.127 kristaps 101: ascii.ln: ascii.c ascii.in term.h
102: ascii.o: ascii.c ascii.in term.h
1.108 kristaps 103:
1.127 kristaps 104: msec.ln: msec.c msec.in private.h
105: msec.o: msec.c msec.in private.h
1.108 kristaps 106:
1.127 kristaps 107: st.ln: st.c st.in private.h
108: st.o: st.c st.in private.h
1.108 kristaps 109:
1.50 kristaps 110: macro.ln: macro.c private.h
111: macro.o: macro.c private.h
1.21 kristaps 112:
1.74 kristaps 113: term.ln: term.c term.h
114: term.o: term.c term.h
115:
1.52 kristaps 116: strings.ln: strings.c private.h
117: strings.o: strings.c private.h
118:
1.50 kristaps 119: hash.ln: hash.c private.h
120: hash.o: hash.c private.h
1.21 kristaps 121:
1.50 kristaps 122: mdoc.ln: mdoc.c private.h
123: mdoc.o: mdoc.c private.h
1.47 kristaps 124:
1.132 kristaps 125: main.ln: main.c mdoc.h
126: main.o: main.c mdoc.h
127:
128: terminal.ln: terminal.c term.h
129: terminal.o: terminal.c term.h
1.39 kristaps 130:
1.53 kristaps 131: xstd.ln: xstd.c private.h
132: xstd.o: xstd.c private.h
133:
134: argv.ln: argv.c private.h
135: argv.o: argv.c private.h
136:
1.54 kristaps 137: validate.ln: validate.c private.h
138: validate.o: validate.c private.h
139:
1.56 kristaps 140: action.ln: action.c private.h
1.76 kristaps 141: action.o: action.c private.h
1.56 kristaps 142:
1.50 kristaps 143: private.h: mdoc.h
1.39 kristaps 144:
1.76 kristaps 145: term.h: mdoc.h
146:
1.90 kristaps 147: mdocml-nport-$(VERSION).tar.gz: mdocml-$(VERSION).tar.gz Makefile.netbsd DESCR
148: mkdir -p .dist/mdocml/
149: sed -e "s!@VERSION@!$(VERSION)!" Makefile.netbsd > \
150: .dist/mdocml/Makefile
151: md5 mdocml-$(VERSION).tar.gz > .dist/mdocml/distinfo
152: rmd160 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
153: sha1 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
154: install -m 0644 DESCR .dist/mdocml/
155: echo @comment $$NetBSD$$ > .dist/mdocml/PLIST
1.132 kristaps 156: echo bin/mandoc >> .dist/mdocml/PLIST
157: echo man/man1/mandoc.1 >> .dist/mdocml/PLIST
158: echo man/man7/mdoc.7 >> .dist/mdocml/PLIST
1.90 kristaps 159: ( cd .dist/ && tar zcf ../$@ mdocml/ )
160: rm -rf .dist/
161:
162: mdocml-oport-$(VERSION).tar.gz: mdocml-$(VERSION).tar.gz Makefile.openbsd DESCR
1.60 kristaps 163: mkdir -p .dist/mdocml/pkg
1.90 kristaps 164: sed -e "s!@VERSION@!$(VERSION)!" Makefile.openbsd > \
1.81 kristaps 165: .dist/mdocml/Makefile
1.60 kristaps 166: md5 mdocml-$(VERSION).tar.gz > .dist/mdocml/distinfo
167: rmd160 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
168: sha1 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
169: install -m 0644 DESCR .dist/mdocml/pkg/DESCR
170: echo @comment $$OpenBSD$$ > .dist/mdocml/pkg/PLIST
1.132 kristaps 171: echo bin/mandoc >> .dist/mdocml/pkg/PLIST
172: echo @man man/man1/mandoc.1 >> .dist/mdocml/pkg/PLIST
173: echo @man man/man7/mdoc.7 >> .dist/mdocml/pkg/PLIST
1.60 kristaps 174: ( cd .dist/ && tar zcf ../$@ mdocml/ )
175: rm -rf .dist/
176:
177: mdocml-$(VERSION).tar.gz: $(INSTALL)
178: mkdir -p .dist/mdocml/mdocml-$(VERSION)/
179: install -m 0644 $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
180: ( cd .dist/mdocml/ && tar zcf ../../$@ mdocml-$(VERSION)/ )
181: rm -rf .dist/
182:
183: llib-llibmdoc.ln: $(LIBLNS)
184: $(LINT) $(LINTFLAGS) -Clibmdoc $(LIBLNS)
185:
1.132 kristaps 186: llib-lmandoc.ln: $(MAINLNS) llib-llibmdoc.ln
187: $(LINT) $(LINTFLAGS) -Cmandoc $(MAINLNS) llib-llibmdoc.ln
1.60 kristaps 188:
189: libmdoc.a: $(LIBOBJS)
190: $(AR) rs $@ $(LIBOBJS)
191:
1.132 kristaps 192: mandoc: $(MAINOBJS) libmdoc.a
193: $(CC) $(CFLAGS) -o $@ $(MAINOBJS) libmdoc.a
1.75 kristaps 194:
1.79 kristaps 195: .sgml.html:
196: validate $<
1.85 kristaps 197: sed -e "s!@VERSION@!$(VERSION)!" -e "s!@VDATE@!$(VDATE)!" $< > $@
CVSweb