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

Annotation of mandoc/Makefile, Revision 1.312

1.293     kristaps    1: .SUFFIXES:     .html .xml .sgml .1 .3 .7 .md5 .tar.gz
                      2: .SUFFIXES:     .1.txt .3.txt .7.txt
1.297     kristaps    3: .SUFFIXES:     .1.xhtml .3.xhtml .7.xhtml
1.293     kristaps    4: .SUFFIXES:     .1.sgml .3.sgml .7.sgml
                      5: .SUFFIXES:     .h .h.html
                      6: .SUFFIXES:     .1.ps .3.ps .7.ps
                      7: .SUFFIXES:     .1.pdf .3.pdf .7.pdf
1.79      kristaps    8:
1.270     joerg       9: PREFIX         = /usr/local
1.99      kristaps   10: BINDIR         = $(PREFIX)/bin
                     11: INCLUDEDIR     = $(PREFIX)/include
                     12: LIBDIR         = $(PREFIX)/lib
                     13: MANDIR         = $(PREFIX)/man
1.243     kristaps   14: EXAMPLEDIR     = $(PREFIX)/share/examples/mandoc
1.266     kristaps   15: INSTALL                = install
1.263     kristaps   16: INSTALL_PROGRAM        = $(INSTALL) -m 0755
                     17: INSTALL_DATA   = $(INSTALL) -m 0444
                     18: INSTALL_LIB    = $(INSTALL) -m 0644
1.99      kristaps   19: INSTALL_MAN    = $(INSTALL_DATA)
                     20:
1.308     kristaps   21: VERSION           = 1.10.9
1.309     kristaps   22: VDATE     = 07 January 2011
1.7       kristaps   23:
1.259     kristaps   24: VFLAGS    = -DVERSION="\"$(VERSION)\""
1.246     kristaps   25: WFLAGS     = -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
1.259     kristaps   26: CFLAGS    += -g $(WFLAGS) $(VFLAGS) -DHAVE_CONFIG_H
                     27:
                     28: # Specify this if you want to hard-code the operating system to appear
                     29: # in the lower-left hand corner of -mdoc manuals.
                     30: # CFLAGS += -DOSNAME="\"OpenBSD 4.5\""
                     31:
1.182     kristaps   32: LINTFLAGS += $(VFLAGS)
1.132     kristaps   33:
1.310     kristaps   34: ROFFLNS    = roff.ln tbl.ln tbl_opts.ln tbl_layout.ln tbl_data.ln eqn.ln
1.269     kristaps   35:
1.310     kristaps   36: ROFFSRCS   = roff.c tbl.c tbl_opts.c tbl_layout.c tbl_data.c eqn.c
1.269     kristaps   37:
1.310     kristaps   38: ROFFOBJS   = roff.o tbl.o tbl_opts.o tbl_layout.o tbl_data.o eqn.o
1.269     kristaps   39:
1.286     kristaps   40: MANDOCLNS  = mandoc.ln
1.268     kristaps   41:
1.286     kristaps   42: MANDOCSRCS = mandoc.c
1.268     kristaps   43:
1.286     kristaps   44: MANDOCOBJS = mandoc.o
1.268     kristaps   45:
1.165     kristaps   46: MDOCLNS           = mdoc_macro.ln mdoc.ln mdoc_hash.ln mdoc_strings.ln \
1.294     kristaps   47:             mdoc_argv.ln mdoc_validate.ln \
1.268     kristaps   48:             lib.ln att.ln arch.ln vol.ln msec.ln st.ln
                     49:
1.165     kristaps   50: MDOCOBJS   = mdoc_macro.o mdoc.o mdoc_hash.o mdoc_strings.o \
1.294     kristaps   51:             mdoc_argv.o mdoc_validate.o lib.o att.o \
1.268     kristaps   52:             arch.o vol.o msec.o st.o
                     53:
1.165     kristaps   54: MDOCSRCS   = mdoc_macro.c mdoc.c mdoc_hash.c mdoc_strings.c \
1.294     kristaps   55:             mdoc_argv.c mdoc_validate.c lib.c att.c \
1.268     kristaps   56:             arch.c vol.c msec.c st.c
1.148     kristaps   57:
1.156     kristaps   58: MANLNS    = man_macro.ln man.ln man_hash.ln man_validate.ln \
1.295     kristaps   59:             man_argv.ln
1.268     kristaps   60:
1.156     kristaps   61: MANOBJS           = man_macro.o man.o man_hash.o man_validate.o \
1.295     kristaps   62:             man_argv.o
1.156     kristaps   63: MANSRCS           = man_macro.c man.c man_hash.c man_validate.c \
1.295     kristaps   64:             man_argv.c
1.132     kristaps   65:
1.210     kristaps   66: MAINLNS           = main.ln mdoc_term.ln chars.ln term.ln tree.ln \
1.214     kristaps   67:             compat.ln man_term.ln html.ln mdoc_html.ln \
1.305     kristaps   68:             man_html.ln out.ln term_ps.ln term_ascii.ln \
1.306     kristaps   69:             tbl_term.ln tbl_html.ln
1.268     kristaps   70:
1.210     kristaps   71: MAINOBJS   = main.o mdoc_term.o chars.o term.o tree.o compat.o \
1.278     kristaps   72:             man_term.o html.o mdoc_html.o man_html.o out.o \
1.306     kristaps   73:             term_ps.o term_ascii.o tbl_term.o tbl_html.o
1.268     kristaps   74:
1.210     kristaps   75: MAINSRCS   = main.c mdoc_term.c chars.c term.c tree.c compat.c \
1.278     kristaps   76:             man_term.c html.c mdoc_html.c man_html.c out.c \
1.306     kristaps   77:             term_ps.c term_ascii.c tbl_term.c tbl_html.c
1.132     kristaps   78:
1.268     kristaps   79: LLNS      = llib-llibmdoc.ln llib-llibman.ln llib-lmandoc.ln \
1.269     kristaps   80:             llib-llibmandoc.ln llib-llibroff.ln
1.268     kristaps   81:
1.269     kristaps   82: LNS       = $(MAINLNS) $(MDOCLNS) $(MANLNS) \
                     83:             $(MANDOCLNS) $(ROFFLNS)
1.268     kristaps   84:
1.269     kristaps   85: LIBS      = libmdoc.a libman.a libmandoc.a libroff.a
1.268     kristaps   86:
1.269     kristaps   87: OBJS      = $(MDOCOBJS) $(MAINOBJS) $(MANOBJS) \
                     88:             $(MANDOCOBJS) $(ROFFOBJS)
1.268     kristaps   89:
1.269     kristaps   90: SRCS      = $(MDOCSRCS) $(MAINSRCS) $(MANSRCS) \
                     91:             $(MANDOCSRCS) $(ROFFSRCS)
1.268     kristaps   92:
1.217     kristaps   93: DATAS     = arch.in att.in lib.in msec.in st.in \
                     94:             vol.in chars.in
1.268     kristaps   95:
1.217     kristaps   96: HEADS     = mdoc.h libmdoc.h man.h libman.h term.h \
1.272     kristaps   97:             libmandoc.h html.h chars.h out.h main.h roff.h \
1.301     kristaps   98:             mandoc.h libroff.h
1.268     kristaps   99:
1.275     kristaps  100: GSGMLS    = mandoc.1.sgml mdoc.3.sgml mdoc.7.sgml \
1.272     kristaps  101:             mandoc_char.7.sgml man.7.sgml man.3.sgml roff.7.sgml \
1.311     kristaps  102:             roff.3.sgml tbl.7.sgml eqn.7.sgml
1.268     kristaps  103:
1.240     kristaps  104: SGMLS     = index.sgml
1.268     kristaps  105:
1.300     kristaps  106: XHTMLS    = mandoc.1.xhtml mdoc.3.xhtml \
                    107:             man.3.xhtml mdoc.7.xhtml man.7.xhtml mandoc_char.7.xhtml \
1.311     kristaps  108:             roff.7.xhtml roff.3.xhtml tbl.7.xhtml eqn.7.xhtml
1.300     kristaps  109:
1.272     kristaps  110: HTMLS     = ChangeLog.html index.html man.h.html mdoc.h.html \
                    111:             mandoc.h.html roff.h.html mandoc.1.html mdoc.3.html \
                    112:             man.3.html mdoc.7.html man.7.html mandoc_char.7.html \
1.311     kristaps  113:             roff.7.html roff.3.html tbl.7.html eqn.7.html
1.268     kristaps  114:
1.277     kristaps  115: PSS       = mandoc.1.ps mdoc.3.ps man.3.ps mdoc.7.ps man.7.ps \
1.311     kristaps  116:             mandoc_char.7.ps roff.7.ps roff.3.ps tbl.7.ps eqn.7.ps
1.277     kristaps  117:
1.290     kristaps  118: PDFS      = mandoc.1.pdf mdoc.3.pdf man.3.pdf mdoc.7.pdf man.7.pdf \
1.311     kristaps  119:             mandoc_char.7.pdf roff.7.pdf roff.3.pdf tbl.7.pdf eqn.7.pdf
1.290     kristaps  120:
1.193     kristaps  121: XSLS      = ChangeLog.xsl
1.268     kristaps  122:
1.218     kristaps  123: TEXTS     = mandoc.1.txt mdoc.3.txt man.3.txt mdoc.7.txt man.7.txt \
1.275     kristaps  124:             mandoc_char.7.txt ChangeLog.txt \
1.311     kristaps  125:             roff.7.txt roff.3.txt tbl.7.txt eqn.7.txt
1.268     kristaps  126:
1.216     kristaps  127: EXAMPLES   = example.style.css
1.268     kristaps  128:
1.193     kristaps  129: XMLS      = ChangeLog.xml
1.268     kristaps  130:
1.213     kristaps  131: STATICS           = index.css style.css external.png
1.268     kristaps  132:
1.195     kristaps  133: MD5S      = mdocml-$(VERSION).md5
1.268     kristaps  134:
1.195     kristaps  135: TARGZS    = mdocml-$(VERSION).tar.gz
1.268     kristaps  136:
1.275     kristaps  137: MANS      = mandoc.1 mdoc.3 mdoc.7 mandoc_char.7 man.7 \
1.311     kristaps  138:             man.3 roff.7 roff.3 tbl.7 eqn.7
1.268     kristaps  139:
1.132     kristaps  140: BINS      = mandoc
1.268     kristaps  141:
1.246     kristaps  142: TESTS     = test-strlcat.c test-strlcpy.c
1.268     kristaps  143:
1.246     kristaps  144: CONFIGS           = config.h.pre config.h.post
1.268     kristaps  145:
1.263     kristaps  146: DOCLEAN           = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS) $(HTMLS) \
1.241     kristaps  147:             $(TARGZS) tags $(MD5S) $(XMLS) $(TEXTS) $(GSGMLS) \
1.300     kristaps  148:             config.h config.log $(PSS) $(PDFS) $(XHTMLS)
1.268     kristaps  149:
1.263     kristaps  150: DOINSTALL  = $(SRCS) $(HEADS) Makefile $(MANS) $(SGMLS) $(STATICS) \
1.246     kristaps  151:             $(DATAS) $(XSLS) $(EXAMPLES) $(TESTS) $(CONFIGS)
1.81      kristaps  152:
1.50      kristaps  153: all:   $(BINS)
1.32      kristaps  154:
1.50      kristaps  155: lint:  $(LLNS)
1.42      kristaps  156:
1.1       kristaps  157: clean:
1.263     kristaps  158:        rm -f $(DOCLEAN)
1.1       kristaps  159:
1.277     kristaps  160: dist:  mdocml-$(VERSION).tar.gz
1.89      kristaps  161:
1.300     kristaps  162: www:   all $(GSGMLS) $(HTMLS) $(XHTMLS) $(TEXTS) $(MD5S) $(TARGZS) $(PSS) $(PDFS)
1.237     kristaps  163:
1.277     kristaps  164: ps:    $(PSS)
1.79      kristaps  165:
1.290     kristaps  166: pdf:   $(PDFS)
                    167:
1.80      kristaps  168: installwww: www
1.300     kristaps  169:        $(INSTALL_DATA) $(HTMLS) $(XHTMLS) $(PSS) $(PDFS) $(TEXTS) $(STATICS) $(DESTDIR)$(PREFIX)/
1.270     joerg     170:        $(INSTALL_DATA) mdocml-$(VERSION).tar.gz $(DESTDIR)$(PREFIX)/snapshots/
                    171:        $(INSTALL_DATA) mdocml-$(VERSION).md5 $(DESTDIR)$(PREFIX)/snapshots/
                    172:        $(INSTALL_DATA) mdocml-$(VERSION).tar.gz $(DESTDIR)$(PREFIX)/snapshots/mdocml.tar.gz
                    173:        $(INSTALL_DATA) mdocml-$(VERSION).md5 $(DESTDIR)$(PREFIX)/snapshots/mdocml.md5
1.80      kristaps  174:
1.60      kristaps  175: install:
1.270     joerg     176:        mkdir -p $(DESTDIR)$(BINDIR)
                    177:        mkdir -p $(DESTDIR)$(EXAMPLEDIR)
                    178:        mkdir -p $(DESTDIR)$(MANDIR)/man1
                    179:        mkdir -p $(DESTDIR)$(MANDIR)/man7
                    180:        $(INSTALL_PROGRAM) mandoc $(DESTDIR)$(BINDIR)
                    181:        $(INSTALL_MAN) mandoc.1 $(DESTDIR)$(MANDIR)/man1
1.311     kristaps  182:        $(INSTALL_MAN) man.7 mdoc.7 roff.7 eqn.7 tbl.7 mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
1.270     joerg     183:        $(INSTALL_DATA) example.style.css $(DESTDIR)$(EXAMPLEDIR)
1.60      kristaps  184:
                    185: uninstall:
1.270     joerg     186:        rm -f $(DESTDIR)$(BINDIR)/mandoc
                    187:        rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1
                    188:        rm -f $(DESTDIR)$(MANDIR)/man7/mdoc.7
1.271     kristaps  189:        rm -f $(DESTDIR)$(MANDIR)/man7/roff.7
1.311     kristaps  190:        rm -f $(DESTDIR)$(MANDIR)/man7/eqn.7
1.307     kristaps  191:        rm -f $(DESTDIR)$(MANDIR)/man7/tbl.7
1.270     joerg     192:        rm -f $(DESTDIR)$(MANDIR)/man7/man.7
                    193:        rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7
                    194:        rm -f $(DESTDIR)$(EXAMPLEDIR)/example.style.css
1.20      kristaps  195:
1.246     kristaps  196: $(OBJS): config.h
                    197:
1.249     kristaps  198: $(LNS): config.h
                    199:
1.251     kristaps  200: man_macro.ln man_macro.o: man_macro.c libman.h
1.108     kristaps  201:
1.251     kristaps  202: lib.ln lib.o: lib.c lib.in libmdoc.h
1.108     kristaps  203:
1.251     kristaps  204: att.ln att.o: att.c att.in libmdoc.h
1.108     kristaps  205:
1.251     kristaps  206: arch.ln arch.o: arch.c arch.in libmdoc.h
1.148     kristaps  207:
1.251     kristaps  208: vol.ln vol.o: vol.c vol.in libmdoc.h
1.108     kristaps  209:
1.251     kristaps  210: chars.ln chars.o: chars.c chars.in chars.h
1.108     kristaps  211:
1.251     kristaps  212: msec.ln msec.o: msec.c msec.in libmdoc.h
1.108     kristaps  213:
1.251     kristaps  214: st.ln st.o: st.c st.in libmdoc.h
1.108     kristaps  215:
1.251     kristaps  216: mdoc_macro.ln mdoc_macro.o: mdoc_macro.c libmdoc.h
1.21      kristaps  217:
1.251     kristaps  218: mdoc_term.ln mdoc_term.o: mdoc_term.c term.h mdoc.h
1.74      kristaps  219:
1.251     kristaps  220: mdoc_strings.ln mdoc_strings.o: mdoc_strings.c libmdoc.h
1.148     kristaps  221:
1.251     kristaps  222: man_hash.ln man_hash.o: man_hash.c libman.h
1.148     kristaps  223:
1.251     kristaps  224: mdoc_hash.ln mdoc_hash.o: mdoc_hash.c libmdoc.h
1.52      kristaps  225:
1.251     kristaps  226: mdoc.ln mdoc.o: mdoc.c libmdoc.h
1.21      kristaps  227:
1.251     kristaps  228: man.ln man.o: man.c libman.h
1.47      kristaps  229:
1.269     kristaps  230: main.ln main.o: main.c mdoc.h man.h roff.h
1.132     kristaps  231:
1.251     kristaps  232: compat.ln compat.o: compat.c
1.173     kristaps  233:
1.251     kristaps  234: term.ln term.o: term.c term.h man.h mdoc.h chars.h
1.278     kristaps  235:
                    236: term_ps.ln term_ps.o: term_ps.c term.h main.h
1.279     kristaps  237:
                    238: term_ascii.ln term_ascii.o: term_ascii.c term.h main.h
1.53      kristaps  239:
1.251     kristaps  240: html.ln html.o: html.c html.h chars.h
1.214     kristaps  241:
1.251     kristaps  242: mdoc_html.ln mdoc_html.o: mdoc_html.c html.h mdoc.h
1.214     kristaps  243:
1.251     kristaps  244: man_html.ln man_html.o: man_html.c html.h man.h out.h
1.223     kristaps  245:
1.251     kristaps  246: out.ln out.o: out.c out.h
1.209     kristaps  247:
1.286     kristaps  248: mandoc.ln mandoc.o: mandoc.c libmandoc.h
1.268     kristaps  249:
1.251     kristaps  250: tree.ln tree.o: tree.c man.h mdoc.h
1.207     kristaps  251:
1.251     kristaps  252: mdoc_argv.ln mdoc_argv.o: mdoc_argv.c libmdoc.h
1.53      kristaps  253:
1.251     kristaps  254: man_argv.ln man_argv.o: man_argv.c libman.h
1.203     kristaps  255:
1.251     kristaps  256: man_validate.ln man_validate.o: man_validate.c libman.h
1.155     kristaps  257:
1.251     kristaps  258: mdoc_validate.ln mdoc_validate.o: mdoc_validate.c libmdoc.h
1.56      kristaps  259:
1.148     kristaps  260: libmdoc.h: mdoc.h
1.39      kristaps  261:
1.193     kristaps  262: ChangeLog.xml:
1.196     kristaps  263:        cvs2cl --xml --xml-encoding iso-8859-15 -t --noxmlns -f $@
1.193     kristaps  264:
1.221     kristaps  265: ChangeLog.txt:
                    266:        cvs2cl -t -f $@
                    267:
1.194     kristaps  268: ChangeLog.html: ChangeLog.xml ChangeLog.xsl
1.193     kristaps  269:        xsltproc -o $@ ChangeLog.xsl ChangeLog.xml
1.175     kristaps  270:
1.263     kristaps  271: mdocml-$(VERSION).tar.gz: $(DOINSTALL)
1.60      kristaps  272:        mkdir -p .dist/mdocml/mdocml-$(VERSION)/
1.263     kristaps  273:        cp -f $(DOINSTALL) .dist/mdocml/mdocml-$(VERSION)/
1.60      kristaps  274:        ( cd .dist/mdocml/ && tar zcf ../../$@ mdocml-$(VERSION)/ )
                    275:        rm -rf .dist/
                    276:
1.148     kristaps  277: llib-llibmdoc.ln: $(MDOCLNS)
1.181     kristaps  278:        $(LINT) -Clibmdoc $(MDOCLNS)
1.148     kristaps  279:
                    280: llib-llibman.ln: $(MANLNS)
1.181     kristaps  281:        $(LINT) -Clibman $(MANLNS)
1.60      kristaps  282:
1.268     kristaps  283: llib-llibmandoc.ln: $(MANDOCLNS)
                    284:        $(LINT) -Clibmandoc $(MANDOCLNS)
                    285:
1.269     kristaps  286: llib-llibroff.ln: $(ROFFLNS)
                    287:        $(LINT) -Clibroff $(ROFFLNS)
                    288:
                    289: llib-lmandoc.ln: $(MAINLNS) llib-llibmdoc.ln llib-llibman.ln llib-llibmandoc.ln llib-llibroff.ln
                    290:        $(LINT) -Cmandoc $(MAINLNS) llib-llibmdoc.ln llib-llibman.ln llib-llibmandoc.ln llib-llibroff.ln
1.60      kristaps  291:
1.148     kristaps  292: libmdoc.a: $(MDOCOBJS)
                    293:        $(AR) rs $@ $(MDOCOBJS)
                    294:
                    295: libman.a: $(MANOBJS)
                    296:        $(AR) rs $@ $(MANOBJS)
1.60      kristaps  297:
1.268     kristaps  298: libmandoc.a: $(MANDOCOBJS)
                    299:        $(AR) rs $@ $(MANDOCOBJS)
                    300:
1.269     kristaps  301: libroff.a: $(ROFFOBJS)
                    302:        $(AR) rs $@ $(ROFFOBJS)
                    303:
                    304: mandoc: $(MAINOBJS) libroff.a libmdoc.a libman.a libmandoc.a
                    305:        $(CC) $(CFLAGS) -o $@ $(MAINOBJS) libroff.a libmdoc.a libman.a libmandoc.a
1.75      kristaps  306:
1.79      kristaps  307: .sgml.html:
1.238     kristaps  308:        validate --warn $<
1.85      kristaps  309:        sed -e "s!@VERSION@!$(VERSION)!" -e "s!@VDATE@!$(VDATE)!" $< > $@
1.168     kristaps  310:
1.228     kristaps  311: .1.1.txt .3.3.txt .7.7.txt:
1.291     kristaps  312:        ./mandoc -Tascii -Wall,stop $< | col -b > $@
1.168     kristaps  313:
1.230     kristaps  314: .1.1.sgml .3.3.sgml .7.7.sgml:
1.291     kristaps  315:        ./mandoc -Thtml -Wall,stop -Ostyle=style.css,man=%N.%S.html,includes=%I.html $< > $@
1.277     kristaps  316:
                    317: .1.1.ps .3.3.ps .7.7.ps:
1.291     kristaps  318:        ./mandoc -Tps -Wall,stop $< > $@
1.297     kristaps  319:
                    320: .1.1.xhtml .3.3.xhtml .7.7.xhtml:
                    321:        ./mandoc -Txhtml -Wall,stop -Ostyle=style.css,man=%N.%S.xhtml,includes=%I.html $< > $@
1.290     kristaps  322:
                    323: .1.1.pdf .3.3.pdf .7.7.pdf:
1.291     kristaps  324:        ./mandoc -Tpdf -Wall,stop $< > $@
1.212     kristaps  325:
1.185     kristaps  326: .tar.gz.md5:
1.186     kristaps  327:        md5 $< > $@
1.260     kristaps  328:
                    329: .h.h.html:
                    330:        highlight -I $< >$@
1.246     kristaps  331:
                    332: config.h: config.h.pre config.h.post
                    333:        rm -f config.log
                    334:        ( cat config.h.pre; \
                    335:        echo; \
1.312   ! kristaps  336:        if $(CC) $(CFLAGS) -Werror -o test-strlcat test-strlcat.c >> config.log 2>&1; then \
1.246     kristaps  337:                echo '#define HAVE_STRLCAT'; \
1.312   ! kristaps  338:                rm test-strlcat; \
1.246     kristaps  339:        fi; \
1.312   ! kristaps  340:        if $(CC) $(CFLAGS) -Werror -o test-strlcpy test-strlcpy.c >> config.log 2>&1; then \
1.246     kristaps  341:                echo '#define HAVE_STRLCPY'; \
1.312   ! kristaps  342:                rm test-strlcpy; \
1.246     kristaps  343:        fi; \
                    344:        echo; \
                    345:        cat config.h.post \
                    346:        ) > $@

CVSweb