[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Annotation of mandoc/Makefile, Revision 1.183

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.183   ! kristaps   12: VERSION           = 1.7.19
        !            13: VDATE     = 17 June 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 \
                     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) \
1.175     kristaps   64:             $(TARGZS) tags $(TEXTS) ChangeLog
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.175     kristaps   86: www:   all $(HTMLS) $(TARGZS) $(TEXTS) ChangeLog
1.79      kristaps   87:
1.80      kristaps   88: installwww: www
1.169     kristaps   89:        install -m 0444 $(TEXTS) $(HTMLS) $(STATICS) $(PREFIX)/
1.175     kristaps   90:        install -m 0444 ChangeLog $(PREFIX)/snapshots/
1.81      kristaps   91:        install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/
1.91      kristaps   92:        install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/mdocml.tar.gz
1.81      kristaps   93:        install -m 0444 mdocml-oport-$(VERSION).tar.gz $(PREFIX)/ports-openbsd/
                     94:        install -m 0444 mdocml-oport-$(VERSION).tar.gz $(PREFIX)/ports-openbsd/mdocml.tar.gz
1.91      kristaps   95:        install -m 0444 mdocml-nport-$(VERSION).tar.gz $(PREFIX)/ports-netbsd/
                     96:        install -m 0444 mdocml-nport-$(VERSION).tar.gz $(PREFIX)/ports-netbsd/mdocml.tar.gz
1.152     kristaps   97:        install -m 0444 mdocml-fport-$(VERSION).tar.gz $(PREFIX)/ports-freebsd/
                     98:        install -m 0444 mdocml-fport-$(VERSION).tar.gz $(PREFIX)/ports-freebsd/mdocml.tar.gz
1.80      kristaps   99:
1.60      kristaps  100: install:
1.101     kristaps  101:        mkdir -p $(BINDIR)
                    102:        mkdir -p $(MANDIR)/man1
1.131     kristaps  103:        mkdir -p $(MANDIR)/man7
1.132     kristaps  104:        $(INSTALL_PROGRAM) mandoc $(BINDIR)
                    105:        $(INSTALL_MAN) mandoc.1 $(MANDIR)/man1
1.131     kristaps  106:        $(INSTALL_MAN) mdoc.7 $(MANDIR)/man7
1.60      kristaps  107:
                    108: uninstall:
1.132     kristaps  109:        rm -f $(BINDIR)/mandoc
                    110:        rm -f $(MANDIR)/man1/mandoc.1
1.131     kristaps  111:        rm -f $(MANDIR)/man7/mdoc.7
1.20      kristaps  112:
1.148     kristaps  113: man_macro.ln: man_macro.c libman.h
                    114: man_macro.o: man_macro.c libman.h
1.108     kristaps  115:
1.148     kristaps  116: lib.ln: lib.c lib.in libmdoc.h
                    117: lib.o: lib.c lib.in libmdoc.h
1.108     kristaps  118:
1.148     kristaps  119: att.ln: att.c att.in libmdoc.h
                    120: att.o: att.c att.in libmdoc.h
1.108     kristaps  121:
1.148     kristaps  122: arch.ln: arch.c arch.in libmdoc.h
                    123: arch.o: arch.c arch.in libmdoc.h
                    124:
                    125: vol.ln: vol.c vol.in libmdoc.h
                    126: vol.o: vol.c vol.in libmdoc.h
1.108     kristaps  127:
1.127     kristaps  128: ascii.ln: ascii.c ascii.in term.h
                    129: ascii.o: ascii.c ascii.in term.h
1.108     kristaps  130:
1.148     kristaps  131: msec.ln: msec.c msec.in libmdoc.h
                    132: msec.o: msec.c msec.in libmdoc.h
1.108     kristaps  133:
1.148     kristaps  134: st.ln: st.c st.in libmdoc.h
                    135: st.o: st.c st.in libmdoc.h
1.108     kristaps  136:
1.148     kristaps  137: mdoc_macro.ln: mdoc_macro.c libmdoc.h
                    138: mdoc_macro.o: mdoc_macro.c libmdoc.h
1.21      kristaps  139:
1.160     kristaps  140: mdoc_term.ln: mdoc_term.c term.h mdoc.h
                    141: mdoc_term.o: mdoc_term.c term.h mdoc.h
1.74      kristaps  142:
1.165     kristaps  143: mdoc_strings.ln: mdoc_strings.c libmdoc.h
                    144: mdoc_strings.o: mdoc_strings.c libmdoc.h
1.148     kristaps  145:
                    146: man_hash.ln: man_hash.c libman.h
                    147: man_hash.o: man_hash.c libman.h
                    148:
                    149: mdoc_hash.ln: mdoc_hash.c libmdoc.h
                    150: mdoc_hash.o: mdoc_hash.c libmdoc.h
1.52      kristaps  151:
1.148     kristaps  152: mdoc.ln: mdoc.c libmdoc.h
                    153: mdoc.o: mdoc.c libmdoc.h
1.21      kristaps  154:
1.148     kristaps  155: man.ln: man.c libman.h
                    156: man.o: man.c libman.h
1.47      kristaps  157:
1.132     kristaps  158: main.ln: main.c mdoc.h
                    159: main.o: main.c mdoc.h
                    160:
1.173     kristaps  161: compat.ln: compat.c
                    162: compat.o: compat.c
                    163:
1.165     kristaps  164: term.ln: term.c term.h man.h mdoc.h
                    165: term.o: term.c term.h man.h mdoc.h
1.53      kristaps  166:
1.163     kristaps  167: mdoc_argv.ln: mdoc_argv.c libmdoc.h
                    168: mdoc_argv.o: mdoc_argv.c libmdoc.h
1.53      kristaps  169:
1.155     kristaps  170: man_validate.ln: man_validate.c libman.h
                    171: man_validate.o: man_validate.c libman.h
                    172:
                    173: mdoc_validate.ln: mdoc_validate.c libmdoc.h
                    174: mdoc_validate.o: mdoc_validate.c libmdoc.h
1.54      kristaps  175:
1.156     kristaps  176: mdoc_action.ln: mdoc_action.c libmdoc.h
                    177: mdoc_action.o: mdoc_action.c libmdoc.h
1.56      kristaps  178:
1.148     kristaps  179: libmdoc.h: mdoc.h
1.39      kristaps  180:
1.175     kristaps  181: ChangeLog:
                    182:        cvs2cl -P -t --no-indent --FSF --no-times
                    183:
1.90      kristaps  184: mdocml-nport-$(VERSION).tar.gz: mdocml-$(VERSION).tar.gz Makefile.netbsd DESCR
                    185:        mkdir -p .dist/mdocml/
                    186:        sed -e "s!@VERSION@!$(VERSION)!" Makefile.netbsd > \
                    187:                .dist/mdocml/Makefile
                    188:        md5 mdocml-$(VERSION).tar.gz > .dist/mdocml/distinfo
                    189:        rmd160 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
                    190:        sha1 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
                    191:        install -m 0644 DESCR .dist/mdocml/
                    192:        echo @comment $$NetBSD$$ > .dist/mdocml/PLIST
1.132     kristaps  193:        echo bin/mandoc >> .dist/mdocml/PLIST
                    194:        echo man/man1/mandoc.1 >> .dist/mdocml/PLIST
                    195:        echo man/man7/mdoc.7 >> .dist/mdocml/PLIST
1.90      kristaps  196:        ( cd .dist/ && tar zcf ../$@ mdocml/ )
                    197:        rm -rf .dist/
                    198:
                    199: mdocml-oport-$(VERSION).tar.gz: mdocml-$(VERSION).tar.gz Makefile.openbsd DESCR
1.60      kristaps  200:        mkdir -p .dist/mdocml/pkg
1.90      kristaps  201:        sed -e "s!@VERSION@!$(VERSION)!" Makefile.openbsd > \
1.81      kristaps  202:                .dist/mdocml/Makefile
1.60      kristaps  203:        md5 mdocml-$(VERSION).tar.gz > .dist/mdocml/distinfo
                    204:        rmd160 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
                    205:        sha1 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
                    206:        install -m 0644 DESCR .dist/mdocml/pkg/DESCR
                    207:        echo @comment $$OpenBSD$$ > .dist/mdocml/pkg/PLIST
1.132     kristaps  208:        echo bin/mandoc >> .dist/mdocml/pkg/PLIST
                    209:        echo @man man/man1/mandoc.1 >> .dist/mdocml/pkg/PLIST
                    210:        echo @man man/man7/mdoc.7 >> .dist/mdocml/pkg/PLIST
1.60      kristaps  211:        ( cd .dist/ && tar zcf ../$@ mdocml/ )
                    212:        rm -rf .dist/
                    213:
1.152     kristaps  214: mdocml-fport-$(VERSION).tar.gz: mdocml-$(VERSION).tar.gz Makefile.freebsd DESCR
                    215:        mkdir -p .dist/mdocml
                    216:        sed -e "s!@VERSION@!$(VERSION)!" Makefile.freebsd > \
                    217:                .dist/mdocml/Makefile
                    218:        ( md5 mdocml-$(VERSION).tar.gz; \
1.154     kristaps  219:          cksum -a SHA256 mdocml-$(VERSION).tar.gz; \
1.152     kristaps  220:          echo -n "SIZE (mdocml-$(VERSION).tar.gz) = "; \
                    221:          ls -l mdocml-$(VERSION).tar.gz | awk '{print $$5}' \
                    222:          ) > .dist/mdocml/distinfo
                    223:        install -m 0644 DESCR .dist/mdocml/pkg-descr
                    224:        ( echo; echo "WWW: http://mdocml.bsd.lv/") >> .dist/mdocml/pkg-descr
                    225:        ( cd .dist/ && tar zcf ../$@ mdocml/ )
                    226:        rm -rf .dist/
                    227:
1.60      kristaps  228: mdocml-$(VERSION).tar.gz: $(INSTALL)
                    229:        mkdir -p .dist/mdocml/mdocml-$(VERSION)/
                    230:        install -m 0644 $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
                    231:        ( cd .dist/mdocml/ && tar zcf ../../$@ mdocml-$(VERSION)/ )
                    232:        rm -rf .dist/
                    233:
1.148     kristaps  234: llib-llibmdoc.ln: $(MDOCLNS)
1.181     kristaps  235:        $(LINT) -Clibmdoc $(MDOCLNS)
1.148     kristaps  236:
                    237: llib-llibman.ln: $(MANLNS)
1.181     kristaps  238:        $(LINT) -Clibman $(MANLNS)
1.60      kristaps  239:
1.132     kristaps  240: llib-lmandoc.ln: $(MAINLNS) llib-llibmdoc.ln
1.181     kristaps  241:        $(LINT) -Cmandoc $(MAINLNS) llib-llibmdoc.ln
1.60      kristaps  242:
1.148     kristaps  243: libmdoc.a: $(MDOCOBJS)
                    244:        $(AR) rs $@ $(MDOCOBJS)
                    245:
                    246: libman.a: $(MANOBJS)
                    247:        $(AR) rs $@ $(MANOBJS)
1.60      kristaps  248:
1.148     kristaps  249: mandoc: $(MAINOBJS) libmdoc.a libman.a
                    250:        $(CC) $(CFLAGS) -o $@ $(MAINOBJS) libmdoc.a libman.a
1.75      kristaps  251:
1.79      kristaps  252: .sgml.html:
                    253:        validate $<
1.85      kristaps  254:        sed -e "s!@VERSION@!$(VERSION)!" -e "s!@VDATE@!$(VDATE)!" $< > $@
1.168     kristaps  255:
                    256: .1.1.txt:
1.183   ! kristaps  257:        ./mandoc -Wall,error -fstrict $< | col -b > $@
1.168     kristaps  258:
                    259: .3.3.txt:
1.183   ! kristaps  260:        ./mandoc -Wall,error -fstrict $< | col -b > $@
1.168     kristaps  261:
                    262: .7.7.txt:
1.183   ! kristaps  263:        ./mandoc -Wall,error -fstrict $< | col -b > $@

CVSweb