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

Annotation of mandoc/Makefile, Revision 1.193

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

CVSweb