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

Annotation of mandoc/Makefile, Revision 1.249

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.248     kristaps   13: VERSION           = 1.9.15-pre2
                     14: VDATE     = 02 January 2010
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.249   ! kristaps  130: $(LNS): config.h
        !           131:
1.148     kristaps  132: man_macro.ln: man_macro.c libman.h
                    133: man_macro.o: man_macro.c libman.h
1.108     kristaps  134:
1.148     kristaps  135: lib.ln: lib.c lib.in libmdoc.h
                    136: lib.o: lib.c lib.in libmdoc.h
1.108     kristaps  137:
1.148     kristaps  138: att.ln: att.c att.in libmdoc.h
                    139: att.o: att.c att.in libmdoc.h
1.108     kristaps  140:
1.148     kristaps  141: arch.ln: arch.c arch.in libmdoc.h
                    142: arch.o: arch.c arch.in libmdoc.h
                    143:
                    144: vol.ln: vol.c vol.in libmdoc.h
                    145: vol.o: vol.c vol.in libmdoc.h
1.108     kristaps  146:
1.210     kristaps  147: chars.ln: chars.c chars.in chars.h
                    148: chars.o: chars.c chars.in chars.h
1.108     kristaps  149:
1.148     kristaps  150: msec.ln: msec.c msec.in libmdoc.h
                    151: msec.o: msec.c msec.in libmdoc.h
1.108     kristaps  152:
1.148     kristaps  153: st.ln: st.c st.in libmdoc.h
                    154: st.o: st.c st.in libmdoc.h
1.108     kristaps  155:
1.148     kristaps  156: mdoc_macro.ln: mdoc_macro.c libmdoc.h
                    157: mdoc_macro.o: mdoc_macro.c libmdoc.h
1.21      kristaps  158:
1.160     kristaps  159: mdoc_term.ln: mdoc_term.c term.h mdoc.h
                    160: mdoc_term.o: mdoc_term.c term.h mdoc.h
1.74      kristaps  161:
1.165     kristaps  162: mdoc_strings.ln: mdoc_strings.c libmdoc.h
                    163: mdoc_strings.o: mdoc_strings.c libmdoc.h
1.148     kristaps  164:
                    165: man_hash.ln: man_hash.c libman.h
                    166: man_hash.o: man_hash.c libman.h
                    167:
                    168: mdoc_hash.ln: mdoc_hash.c libmdoc.h
                    169: mdoc_hash.o: mdoc_hash.c libmdoc.h
1.52      kristaps  170:
1.148     kristaps  171: mdoc.ln: mdoc.c libmdoc.h
                    172: mdoc.o: mdoc.c libmdoc.h
1.21      kristaps  173:
1.148     kristaps  174: man.ln: man.c libman.h
                    175: man.o: man.c libman.h
1.47      kristaps  176:
1.132     kristaps  177: main.ln: main.c mdoc.h
                    178: main.o: main.c mdoc.h
                    179:
1.173     kristaps  180: compat.ln: compat.c
                    181: compat.o: compat.c
                    182:
1.214     kristaps  183: term.ln: term.c term.h man.h mdoc.h chars.h
                    184: term.o: term.c term.h man.h mdoc.h chars.h
1.53      kristaps  185:
1.214     kristaps  186: html.ln: html.c html.h chars.h
                    187: html.o: html.c html.h chars.h
                    188:
                    189: mdoc_html.ln: mdoc_html.c html.h mdoc.h
                    190: mdoc_html.o: mdoc_html.c html.h mdoc.h
                    191:
1.223     kristaps  192: man_html.ln: man_html.c html.h man.h out.h
                    193: man_html.o: man_html.c html.h man.h out.h
                    194:
                    195: out.ln: out.c out.h
                    196: out.o: out.c out.h
1.209     kristaps  197:
1.207     kristaps  198: tree.ln: tree.c man.h mdoc.h
                    199: tree.o: tree.c man.h mdoc.h
                    200:
1.163     kristaps  201: mdoc_argv.ln: mdoc_argv.c libmdoc.h
                    202: mdoc_argv.o: mdoc_argv.c libmdoc.h
1.53      kristaps  203:
1.203     kristaps  204: man_argv.ln: man_argv.c libman.h
                    205: man_argv.o: man_argv.c libman.h
                    206:
1.155     kristaps  207: man_validate.ln: man_validate.c libman.h
                    208: man_validate.o: man_validate.c libman.h
                    209:
                    210: mdoc_validate.ln: mdoc_validate.c libmdoc.h
                    211: mdoc_validate.o: mdoc_validate.c libmdoc.h
1.54      kristaps  212:
1.156     kristaps  213: mdoc_action.ln: mdoc_action.c libmdoc.h
                    214: mdoc_action.o: mdoc_action.c libmdoc.h
1.56      kristaps  215:
1.148     kristaps  216: libmdoc.h: mdoc.h
1.39      kristaps  217:
1.193     kristaps  218: ChangeLog.xml:
1.196     kristaps  219:        cvs2cl --xml --xml-encoding iso-8859-15 -t --noxmlns -f $@
1.193     kristaps  220:
1.221     kristaps  221: ChangeLog.txt:
                    222:        cvs2cl -t -f $@
                    223:
1.194     kristaps  224: ChangeLog.html: ChangeLog.xml ChangeLog.xsl
1.193     kristaps  225:        xsltproc -o $@ ChangeLog.xsl ChangeLog.xml
1.175     kristaps  226:
1.60      kristaps  227: mdocml-$(VERSION).tar.gz: $(INSTALL)
                    228:        mkdir -p .dist/mdocml/mdocml-$(VERSION)/
1.208     kristaps  229:        cp -f $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
1.60      kristaps  230:        ( cd .dist/mdocml/ && tar zcf ../../$@ mdocml-$(VERSION)/ )
                    231:        rm -rf .dist/
                    232:
1.148     kristaps  233: llib-llibmdoc.ln: $(MDOCLNS)
1.181     kristaps  234:        $(LINT) -Clibmdoc $(MDOCLNS)
1.148     kristaps  235:
                    236: llib-llibman.ln: $(MANLNS)
1.181     kristaps  237:        $(LINT) -Clibman $(MANLNS)
1.60      kristaps  238:
1.132     kristaps  239: llib-lmandoc.ln: $(MAINLNS) llib-llibmdoc.ln
1.181     kristaps  240:        $(LINT) -Cmandoc $(MAINLNS) llib-llibmdoc.ln
1.60      kristaps  241:
1.148     kristaps  242: libmdoc.a: $(MDOCOBJS)
                    243:        $(AR) rs $@ $(MDOCOBJS)
                    244:
                    245: libman.a: $(MANOBJS)
                    246:        $(AR) rs $@ $(MANOBJS)
1.60      kristaps  247:
1.148     kristaps  248: mandoc: $(MAINOBJS) libmdoc.a libman.a
                    249:        $(CC) $(CFLAGS) -o $@ $(MAINOBJS) libmdoc.a libman.a
1.75      kristaps  250:
1.79      kristaps  251: .sgml.html:
1.238     kristaps  252:        validate --warn $<
1.85      kristaps  253:        sed -e "s!@VERSION@!$(VERSION)!" -e "s!@VDATE@!$(VDATE)!" $< > $@
1.168     kristaps  254:
1.228     kristaps  255: .1.1.txt .3.3.txt .7.7.txt:
1.222     kristaps  256:        ./mandoc $(MANDOCFLAGS) $< | col -b > $@
1.168     kristaps  257:
1.230     kristaps  258: .1.1.sgml .3.3.sgml .7.7.sgml:
1.222     kristaps  259:        ./mandoc $(MANDOCFLAGS) $(MANDOCHTML) $< > $@
1.212     kristaps  260:
1.185     kristaps  261: .tar.gz.md5:
1.186     kristaps  262:        md5 $< > $@
1.246     kristaps  263:
                    264: config.h: config.h.pre config.h.post
                    265:        rm -f config.log
                    266:        ( cat config.h.pre; \
                    267:        echo; \
1.247     kristaps  268:        if $(CC) $(CFLAGS) -Werror -c test-strlcat.c >> config.log 2>&1; then \
1.246     kristaps  269:                echo '#define HAVE_STRLCAT'; \
                    270:                rm test-strlcat.o; \
                    271:        fi; \
1.247     kristaps  272:        if $(CC) $(CFLAGS) -Werror -c test-strlcpy.c >> config.log 2>&1; then \
1.246     kristaps  273:                echo '#define HAVE_STRLCPY'; \
                    274:                rm test-strlcpy.o; \
                    275:        fi; \
                    276:        echo; \
                    277:        cat config.h.post \
                    278:        ) > $@

CVSweb