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

Annotation of mandoc/Makefile, Revision 1.245

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.233     kristaps   16: VFLAGS     = -DVERSION="\"$(VERSION)\""
1.226     kristaps   17: CFLAGS    += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings -g
1.113     kristaps   18: CFLAGS    += $(VFLAGS)
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.168     kristaps   77: CLEAN     = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS) $(HTMLS) \
1.241     kristaps   78:             $(TARGZS) tags $(MD5S) $(XMLS) $(TEXTS) $(GSGMLS) \
                     79:             $(GHTMLS)
1.198     kristaps   80: INSTALL           = $(SRCS) $(HEADS) Makefile $(MANS) $(SGMLS) $(STATICS) \
1.216     kristaps   81:             $(DATAS) $(XSLS) $(EXAMPLES)
1.81      kristaps   82:
1.50      kristaps   83: all:   $(BINS)
1.32      kristaps   84:
1.50      kristaps   85: lint:  $(LLNS)
1.42      kristaps   86:
1.1       kristaps   87: clean:
                     88:        rm -f $(CLEAN)
                     89:
1.89      kristaps   90: cleanlint:
                     91:        rm -f $(LNS) $(LLNS)
                     92:
1.237     kristaps   93: cleanhtml:
1.241     kristaps   94:        rm -f $(HTMLS) $(GSGMLS) $(GHTMLS)
1.237     kristaps   95:
1.60      kristaps   96: dist:  mdocml-$(VERSION).tar.gz
1.59      kristaps   97:
1.241     kristaps   98: www:   all $(GSGMLS) $(GHTMLS) $(HTMLS) $(TEXTS) $(MD5S) $(TARGZS)
                     99:
                    100: htmls: all $(GSGMLS) $(GHTMLS)
1.79      kristaps  101:
1.80      kristaps  102: installwww: www
1.241     kristaps  103:        install -m 0444 $(GHTMLS) $(HTMLS) $(TEXTS) $(STATICS) $(PREFIX)/
1.81      kristaps  104:        install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/
1.186     kristaps  105:        install -m 0444 mdocml-$(VERSION).md5 $(PREFIX)/snapshots/
1.91      kristaps  106:        install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/mdocml.tar.gz
1.186     kristaps  107:        install -m 0444 mdocml-$(VERSION).md5 $(PREFIX)/snapshots/mdocml.md5
1.80      kristaps  108:
1.60      kristaps  109: install:
1.101     kristaps  110:        mkdir -p $(BINDIR)
1.245   ! kristaps  111:        mkdir -p $(EXAMPLEDIR)
1.101     kristaps  112:        mkdir -p $(MANDIR)/man1
1.131     kristaps  113:        mkdir -p $(MANDIR)/man7
1.132     kristaps  114:        $(INSTALL_PROGRAM) mandoc $(BINDIR)
                    115:        $(INSTALL_MAN) mandoc.1 $(MANDIR)/man1
1.245   ! kristaps  116:        $(INSTALL_MAN) man.7 mdoc.7 $(MANDIR)/man7
1.243     kristaps  117:        $(INSTALL_DATA) example.style.css $(EXAMPLEDIR)
1.60      kristaps  118:
                    119: uninstall:
1.132     kristaps  120:        rm -f $(BINDIR)/mandoc
                    121:        rm -f $(MANDIR)/man1/mandoc.1
1.131     kristaps  122:        rm -f $(MANDIR)/man7/mdoc.7
1.245   ! kristaps  123:        rm -f $(MANDIR)/man7/man.7
        !           124:        rm -f $(EXAMPLEDIR)/example.style.css
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.210     kristaps  141: chars.ln: chars.c chars.in chars.h
                    142: chars.o: chars.c chars.in chars.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.214     kristaps  177: term.ln: term.c term.h man.h mdoc.h chars.h
                    178: term.o: term.c term.h man.h mdoc.h chars.h
1.53      kristaps  179:
1.214     kristaps  180: html.ln: html.c html.h chars.h
                    181: html.o: html.c html.h chars.h
                    182:
                    183: mdoc_html.ln: mdoc_html.c html.h mdoc.h
                    184: mdoc_html.o: mdoc_html.c html.h mdoc.h
                    185:
1.223     kristaps  186: man_html.ln: man_html.c html.h man.h out.h
                    187: man_html.o: man_html.c html.h man.h out.h
                    188:
                    189: out.ln: out.c out.h
                    190: out.o: out.c out.h
1.209     kristaps  191:
1.207     kristaps  192: tree.ln: tree.c man.h mdoc.h
                    193: tree.o: tree.c man.h mdoc.h
                    194:
1.163     kristaps  195: mdoc_argv.ln: mdoc_argv.c libmdoc.h
                    196: mdoc_argv.o: mdoc_argv.c libmdoc.h
1.53      kristaps  197:
1.203     kristaps  198: man_argv.ln: man_argv.c libman.h
                    199: man_argv.o: man_argv.c libman.h
                    200:
1.155     kristaps  201: man_validate.ln: man_validate.c libman.h
                    202: man_validate.o: man_validate.c libman.h
                    203:
                    204: mdoc_validate.ln: mdoc_validate.c libmdoc.h
                    205: mdoc_validate.o: mdoc_validate.c libmdoc.h
1.54      kristaps  206:
1.156     kristaps  207: mdoc_action.ln: mdoc_action.c libmdoc.h
                    208: mdoc_action.o: mdoc_action.c libmdoc.h
1.56      kristaps  209:
1.148     kristaps  210: libmdoc.h: mdoc.h
1.39      kristaps  211:
1.193     kristaps  212: ChangeLog.xml:
1.196     kristaps  213:        cvs2cl --xml --xml-encoding iso-8859-15 -t --noxmlns -f $@
1.193     kristaps  214:
1.221     kristaps  215: ChangeLog.txt:
                    216:        cvs2cl -t -f $@
                    217:
1.194     kristaps  218: ChangeLog.html: ChangeLog.xml ChangeLog.xsl
1.193     kristaps  219:        xsltproc -o $@ ChangeLog.xsl ChangeLog.xml
1.175     kristaps  220:
1.60      kristaps  221: mdocml-$(VERSION).tar.gz: $(INSTALL)
                    222:        mkdir -p .dist/mdocml/mdocml-$(VERSION)/
1.208     kristaps  223:        cp -f $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
1.60      kristaps  224:        ( cd .dist/mdocml/ && tar zcf ../../$@ mdocml-$(VERSION)/ )
                    225:        rm -rf .dist/
                    226:
1.148     kristaps  227: llib-llibmdoc.ln: $(MDOCLNS)
1.181     kristaps  228:        $(LINT) -Clibmdoc $(MDOCLNS)
1.148     kristaps  229:
                    230: llib-llibman.ln: $(MANLNS)
1.181     kristaps  231:        $(LINT) -Clibman $(MANLNS)
1.60      kristaps  232:
1.132     kristaps  233: llib-lmandoc.ln: $(MAINLNS) llib-llibmdoc.ln
1.181     kristaps  234:        $(LINT) -Cmandoc $(MAINLNS) llib-llibmdoc.ln
1.60      kristaps  235:
1.148     kristaps  236: libmdoc.a: $(MDOCOBJS)
                    237:        $(AR) rs $@ $(MDOCOBJS)
                    238:
                    239: libman.a: $(MANOBJS)
                    240:        $(AR) rs $@ $(MANOBJS)
1.60      kristaps  241:
1.148     kristaps  242: mandoc: $(MAINOBJS) libmdoc.a libman.a
                    243:        $(CC) $(CFLAGS) -o $@ $(MAINOBJS) libmdoc.a libman.a
1.75      kristaps  244:
1.79      kristaps  245: .sgml.html:
1.238     kristaps  246:        validate --warn $<
1.85      kristaps  247:        sed -e "s!@VERSION@!$(VERSION)!" -e "s!@VDATE@!$(VDATE)!" $< > $@
1.168     kristaps  248:
1.228     kristaps  249: .1.1.txt .3.3.txt .7.7.txt:
1.222     kristaps  250:        ./mandoc $(MANDOCFLAGS) $< | col -b > $@
1.168     kristaps  251:
1.230     kristaps  252: .1.1.sgml .3.3.sgml .7.7.sgml:
1.222     kristaps  253:        ./mandoc $(MANDOCFLAGS) $(MANDOCHTML) $< > $@
1.212     kristaps  254:
1.185     kristaps  255: .tar.gz.md5:
1.186     kristaps  256:        md5 $< > $@

CVSweb