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

Annotation of mandoc/Makefile, Revision 1.246

1.219     kristaps    1: .SUFFIXES:     .html .xml .sgml .1 .3 .7 .md5 .tar.gz .1.txt .3.txt .7.txt .1.sgml .3.sgml .7.sgml
1.79      kristaps    2:
1.99      kristaps    3: BINDIR         = $(PREFIX)/bin
                      4: INCLUDEDIR     = $(PREFIX)/include
                      5: LIBDIR         = $(PREFIX)/lib
                      6: MANDIR         = $(PREFIX)/man
1.243     kristaps    7: EXAMPLEDIR     = $(PREFIX)/share/examples/mandoc
1.99      kristaps    8: INSTALL_PROGRAM        = install -m 0755
                      9: INSTALL_DATA   = install -m 0444
                     10: INSTALL_LIB    = install -m 0644
                     11: INSTALL_MAN    = $(INSTALL_DATA)
                     12:
1.244     kristaps   13: VERSION           = 1.9.14
                     14: VDATE     = 16 November 2009
1.7       kristaps   15:
1.246   ! kristaps   16: VFLAGS     = -DVERSION="\"$(VERSION)\"" -DHAVE_CONFIG_H
        !            17: WFLAGS     = -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
        !            18: CFLAGS    += -g $(VFLAGS) $(WFLAGS)
1.233     kristaps   19: #CFLAGS          += -DOSNAME="\"OpenBSD 4.5\""
1.182     kristaps   20: LINTFLAGS += $(VFLAGS)
1.132     kristaps   21:
1.231     kristaps   22: MANDOCFLAGS = -Wall -fstrict
1.234     kristaps   23: MANDOCHTML = -Thtml -Ostyle=style.css,man=%N.%S.html,includes=%I.html
1.222     kristaps   24:
1.165     kristaps   25: MDOCLNS           = mdoc_macro.ln mdoc.ln mdoc_hash.ln mdoc_strings.ln \
                     26:             mdoc_argv.ln mdoc_validate.ln mdoc_action.ln \
1.187     kristaps   27:             lib.ln att.ln arch.ln vol.ln msec.ln st.ln \
                     28:             mandoc.ln
1.165     kristaps   29: MDOCOBJS   = mdoc_macro.o mdoc.o mdoc_hash.o mdoc_strings.o \
1.163     kristaps   30:             mdoc_argv.o mdoc_validate.o mdoc_action.o lib.o att.o \
1.187     kristaps   31:             arch.o vol.o msec.o st.o mandoc.o
1.165     kristaps   32: MDOCSRCS   = mdoc_macro.c mdoc.c mdoc_hash.c mdoc_strings.c \
1.163     kristaps   33:             mdoc_argv.c mdoc_validate.c mdoc_action.c lib.c att.c \
1.187     kristaps   34:             arch.c vol.c msec.c st.c mandoc.c
1.148     kristaps   35:
1.156     kristaps   36: MANLNS    = man_macro.ln man.ln man_hash.ln man_validate.ln \
1.203     kristaps   37:             man_action.ln mandoc.ln man_argv.ln
1.156     kristaps   38: MANOBJS           = man_macro.o man.o man_hash.o man_validate.o \
1.203     kristaps   39:             man_action.o mandoc.o man_argv.o
1.156     kristaps   40: MANSRCS           = man_macro.c man.c man_hash.c man_validate.c \
1.203     kristaps   41:             man_action.c mandoc.c man_argv.c
1.132     kristaps   42:
1.210     kristaps   43: MAINLNS           = main.ln mdoc_term.ln chars.ln term.ln tree.ln \
1.214     kristaps   44:             compat.ln man_term.ln html.ln mdoc_html.ln \
1.223     kristaps   45:             man_html.ln out.ln
1.210     kristaps   46: MAINOBJS   = main.o mdoc_term.o chars.o term.o tree.o compat.o \
1.223     kristaps   47:             man_term.o html.o mdoc_html.o man_html.o out.o
1.210     kristaps   48: MAINSRCS   = main.c mdoc_term.c chars.c term.c tree.c compat.c \
1.223     kristaps   49:             man_term.c html.c mdoc_html.c man_html.c out.c
1.132     kristaps   50:
1.148     kristaps   51: LLNS      = llib-llibmdoc.ln llib-llibman.ln llib-lmandoc.ln
1.157     kristaps   52: LNS       = $(MAINLNS) $(MDOCLNS) $(MANLNS)
1.148     kristaps   53: LIBS      = libmdoc.a libman.a
1.158     kristaps   54: OBJS      = $(MDOCOBJS) $(MAINOBJS) $(MANOBJS)
1.150     kristaps   55: SRCS      = $(MDOCSRCS) $(MAINSRCS) $(MANSRCS)
1.217     kristaps   56: DATAS     = arch.in att.in lib.in msec.in st.in \
                     57:             vol.in chars.in
                     58: HEADS     = mdoc.h libmdoc.h man.h libman.h term.h \
1.227     kristaps   59:             libmandoc.h html.h chars.h out.h main.h
1.219     kristaps   60: GSGMLS    = mandoc.1.sgml mdoc.3.sgml mdoc.7.sgml manuals.7.sgml \
                     61:             mandoc_char.7.sgml man.7.sgml man.3.sgml
1.240     kristaps   62: SGMLS     = index.sgml
1.241     kristaps   63: HTMLS     = ChangeLog.html index.html
1.193     kristaps   64: XSLS      = ChangeLog.xsl
1.241     kristaps   65: GHTMLS    = mandoc.1.html mdoc.3.html man.3.html mdoc.7.html \
                     66:             man.7.html mandoc_char.7.html manuals.7.html
1.218     kristaps   67: TEXTS     = mandoc.1.txt mdoc.3.txt man.3.txt mdoc.7.txt man.7.txt \
1.221     kristaps   68:             mandoc_char.7.txt manuals.7.txt ChangeLog.txt
1.216     kristaps   69: EXAMPLES   = example.style.css
1.193     kristaps   70: XMLS      = ChangeLog.xml
1.213     kristaps   71: STATICS           = index.css style.css external.png
1.195     kristaps   72: MD5S      = mdocml-$(VERSION).md5
                     73: TARGZS    = mdocml-$(VERSION).tar.gz
1.168     kristaps   74: MANS      = mandoc.1 mdoc.3 mdoc.7 manuals.7 mandoc_char.7 \
                     75:             man.7 man.3
1.132     kristaps   76: BINS      = mandoc
1.246   ! kristaps   77: TESTS     = test-strlcat.c test-strlcpy.c
        !            78: CONFIGS           = config.h.pre config.h.post
1.168     kristaps   79: CLEAN     = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS) $(HTMLS) \
1.241     kristaps   80:             $(TARGZS) tags $(MD5S) $(XMLS) $(TEXTS) $(GSGMLS) \
1.246   ! kristaps   81:             $(GHTMLS) config.h config.log
1.198     kristaps   82: INSTALL           = $(SRCS) $(HEADS) Makefile $(MANS) $(SGMLS) $(STATICS) \
1.246   ! kristaps   83:             $(DATAS) $(XSLS) $(EXAMPLES) $(TESTS) $(CONFIGS)
1.81      kristaps   84:
1.50      kristaps   85: all:   $(BINS)
1.32      kristaps   86:
1.50      kristaps   87: lint:  $(LLNS)
1.42      kristaps   88:
1.1       kristaps   89: clean:
                     90:        rm -f $(CLEAN)
                     91:
1.89      kristaps   92: cleanlint:
                     93:        rm -f $(LNS) $(LLNS)
                     94:
1.237     kristaps   95: cleanhtml:
1.241     kristaps   96:        rm -f $(HTMLS) $(GSGMLS) $(GHTMLS)
1.237     kristaps   97:
1.60      kristaps   98: dist:  mdocml-$(VERSION).tar.gz
1.59      kristaps   99:
1.241     kristaps  100: www:   all $(GSGMLS) $(GHTMLS) $(HTMLS) $(TEXTS) $(MD5S) $(TARGZS)
                    101:
                    102: htmls: all $(GSGMLS) $(GHTMLS)
1.79      kristaps  103:
1.80      kristaps  104: installwww: www
1.241     kristaps  105:        install -m 0444 $(GHTMLS) $(HTMLS) $(TEXTS) $(STATICS) $(PREFIX)/
1.81      kristaps  106:        install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/
1.186     kristaps  107:        install -m 0444 mdocml-$(VERSION).md5 $(PREFIX)/snapshots/
1.91      kristaps  108:        install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/mdocml.tar.gz
1.186     kristaps  109:        install -m 0444 mdocml-$(VERSION).md5 $(PREFIX)/snapshots/mdocml.md5
1.80      kristaps  110:
1.60      kristaps  111: install:
1.101     kristaps  112:        mkdir -p $(BINDIR)
1.245     kristaps  113:        mkdir -p $(EXAMPLEDIR)
1.101     kristaps  114:        mkdir -p $(MANDIR)/man1
1.131     kristaps  115:        mkdir -p $(MANDIR)/man7
1.132     kristaps  116:        $(INSTALL_PROGRAM) mandoc $(BINDIR)
                    117:        $(INSTALL_MAN) mandoc.1 $(MANDIR)/man1
1.245     kristaps  118:        $(INSTALL_MAN) man.7 mdoc.7 $(MANDIR)/man7
1.243     kristaps  119:        $(INSTALL_DATA) example.style.css $(EXAMPLEDIR)
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.245     kristaps  125:        rm -f $(MANDIR)/man7/man.7
                    126:        rm -f $(EXAMPLEDIR)/example.style.css
1.20      kristaps  127:
1.246   ! kristaps  128: $(OBJS): config.h
        !           129:
1.148     kristaps  130: man_macro.ln: man_macro.c libman.h
                    131: man_macro.o: man_macro.c libman.h
1.108     kristaps  132:
1.148     kristaps  133: lib.ln: lib.c lib.in libmdoc.h
                    134: lib.o: lib.c lib.in libmdoc.h
1.108     kristaps  135:
1.148     kristaps  136: att.ln: att.c att.in libmdoc.h
                    137: att.o: att.c att.in libmdoc.h
1.108     kristaps  138:
1.148     kristaps  139: arch.ln: arch.c arch.in libmdoc.h
                    140: arch.o: arch.c arch.in libmdoc.h
                    141:
                    142: vol.ln: vol.c vol.in libmdoc.h
                    143: vol.o: vol.c vol.in libmdoc.h
1.108     kristaps  144:
1.210     kristaps  145: chars.ln: chars.c chars.in chars.h
                    146: chars.o: chars.c chars.in chars.h
1.108     kristaps  147:
1.148     kristaps  148: msec.ln: msec.c msec.in libmdoc.h
                    149: msec.o: msec.c msec.in libmdoc.h
1.108     kristaps  150:
1.148     kristaps  151: st.ln: st.c st.in libmdoc.h
                    152: st.o: st.c st.in libmdoc.h
1.108     kristaps  153:
1.148     kristaps  154: mdoc_macro.ln: mdoc_macro.c libmdoc.h
                    155: mdoc_macro.o: mdoc_macro.c libmdoc.h
1.21      kristaps  156:
1.160     kristaps  157: mdoc_term.ln: mdoc_term.c term.h mdoc.h
                    158: mdoc_term.o: mdoc_term.c term.h mdoc.h
1.74      kristaps  159:
1.165     kristaps  160: mdoc_strings.ln: mdoc_strings.c libmdoc.h
                    161: mdoc_strings.o: mdoc_strings.c libmdoc.h
1.148     kristaps  162:
                    163: man_hash.ln: man_hash.c libman.h
                    164: man_hash.o: man_hash.c libman.h
                    165:
                    166: mdoc_hash.ln: mdoc_hash.c libmdoc.h
                    167: mdoc_hash.o: mdoc_hash.c libmdoc.h
1.52      kristaps  168:
1.148     kristaps  169: mdoc.ln: mdoc.c libmdoc.h
                    170: mdoc.o: mdoc.c libmdoc.h
1.21      kristaps  171:
1.148     kristaps  172: man.ln: man.c libman.h
                    173: man.o: man.c libman.h
1.47      kristaps  174:
1.132     kristaps  175: main.ln: main.c mdoc.h
                    176: main.o: main.c mdoc.h
                    177:
1.173     kristaps  178: compat.ln: compat.c
                    179: compat.o: compat.c
                    180:
1.214     kristaps  181: term.ln: term.c term.h man.h mdoc.h chars.h
                    182: term.o: term.c term.h man.h mdoc.h chars.h
1.53      kristaps  183:
1.214     kristaps  184: html.ln: html.c html.h chars.h
                    185: html.o: html.c html.h chars.h
                    186:
                    187: mdoc_html.ln: mdoc_html.c html.h mdoc.h
                    188: mdoc_html.o: mdoc_html.c html.h mdoc.h
                    189:
1.223     kristaps  190: man_html.ln: man_html.c html.h man.h out.h
                    191: man_html.o: man_html.c html.h man.h out.h
                    192:
                    193: out.ln: out.c out.h
                    194: out.o: out.c out.h
1.209     kristaps  195:
1.207     kristaps  196: tree.ln: tree.c man.h mdoc.h
                    197: tree.o: tree.c man.h mdoc.h
                    198:
1.163     kristaps  199: mdoc_argv.ln: mdoc_argv.c libmdoc.h
                    200: mdoc_argv.o: mdoc_argv.c libmdoc.h
1.53      kristaps  201:
1.203     kristaps  202: man_argv.ln: man_argv.c libman.h
                    203: man_argv.o: man_argv.c libman.h
                    204:
1.155     kristaps  205: man_validate.ln: man_validate.c libman.h
                    206: man_validate.o: man_validate.c libman.h
                    207:
                    208: mdoc_validate.ln: mdoc_validate.c libmdoc.h
                    209: mdoc_validate.o: mdoc_validate.c libmdoc.h
1.54      kristaps  210:
1.156     kristaps  211: mdoc_action.ln: mdoc_action.c libmdoc.h
                    212: mdoc_action.o: mdoc_action.c libmdoc.h
1.56      kristaps  213:
1.148     kristaps  214: libmdoc.h: mdoc.h
1.39      kristaps  215:
1.193     kristaps  216: ChangeLog.xml:
1.196     kristaps  217:        cvs2cl --xml --xml-encoding iso-8859-15 -t --noxmlns -f $@
1.193     kristaps  218:
1.221     kristaps  219: ChangeLog.txt:
                    220:        cvs2cl -t -f $@
                    221:
1.194     kristaps  222: ChangeLog.html: ChangeLog.xml ChangeLog.xsl
1.193     kristaps  223:        xsltproc -o $@ ChangeLog.xsl ChangeLog.xml
1.175     kristaps  224:
1.60      kristaps  225: mdocml-$(VERSION).tar.gz: $(INSTALL)
                    226:        mkdir -p .dist/mdocml/mdocml-$(VERSION)/
1.208     kristaps  227:        cp -f $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
1.60      kristaps  228:        ( cd .dist/mdocml/ && tar zcf ../../$@ mdocml-$(VERSION)/ )
                    229:        rm -rf .dist/
                    230:
1.148     kristaps  231: llib-llibmdoc.ln: $(MDOCLNS)
1.181     kristaps  232:        $(LINT) -Clibmdoc $(MDOCLNS)
1.148     kristaps  233:
                    234: llib-llibman.ln: $(MANLNS)
1.181     kristaps  235:        $(LINT) -Clibman $(MANLNS)
1.60      kristaps  236:
1.132     kristaps  237: llib-lmandoc.ln: $(MAINLNS) llib-llibmdoc.ln
1.181     kristaps  238:        $(LINT) -Cmandoc $(MAINLNS) llib-llibmdoc.ln
1.60      kristaps  239:
1.148     kristaps  240: libmdoc.a: $(MDOCOBJS)
                    241:        $(AR) rs $@ $(MDOCOBJS)
                    242:
                    243: libman.a: $(MANOBJS)
                    244:        $(AR) rs $@ $(MANOBJS)
1.60      kristaps  245:
1.148     kristaps  246: mandoc: $(MAINOBJS) libmdoc.a libman.a
                    247:        $(CC) $(CFLAGS) -o $@ $(MAINOBJS) libmdoc.a libman.a
1.75      kristaps  248:
1.79      kristaps  249: .sgml.html:
1.238     kristaps  250:        validate --warn $<
1.85      kristaps  251:        sed -e "s!@VERSION@!$(VERSION)!" -e "s!@VDATE@!$(VDATE)!" $< > $@
1.168     kristaps  252:
1.228     kristaps  253: .1.1.txt .3.3.txt .7.7.txt:
1.222     kristaps  254:        ./mandoc $(MANDOCFLAGS) $< | col -b > $@
1.168     kristaps  255:
1.230     kristaps  256: .1.1.sgml .3.3.sgml .7.7.sgml:
1.222     kristaps  257:        ./mandoc $(MANDOCFLAGS) $(MANDOCHTML) $< > $@
1.212     kristaps  258:
1.185     kristaps  259: .tar.gz.md5:
1.186     kristaps  260:        md5 $< > $@
1.246   ! kristaps  261:
        !           262: config.h: config.h.pre config.h.post
        !           263:        rm -f config.log
        !           264:        ( cat config.h.pre; \
        !           265:        echo; \
        !           266:        if $(CC) $(CFLAGS) -c test-strlcat.c >> config.log 2>&1; then \
        !           267:                echo '#define HAVE_STRLCAT'; \
        !           268:                rm test-strlcat.o; \
        !           269:        fi; \
        !           270:        if $(CC) $(CFLAGS) -c test-strlcpy.c >> config.log 2>&1; then \
        !           271:                echo '#define HAVE_STRLCPY'; \
        !           272:                rm test-strlcpy.o; \
        !           273:        fi; \
        !           274:        echo; \
        !           275:        cat config.h.post \
        !           276:        ) > $@

CVSweb