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

Annotation of mandoc/Makefile, Revision 1.89

1.79      kristaps    1: .SUFFIXES:     .html .sgml
                      2:
1.88      kristaps    3: VERSION        = 1.3.6
                      4: VDATE  = 27 February 2009
1.31      kristaps    5:
1.73      kristaps    6: CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -g
1.7       kristaps    7:
1.60      kristaps    8: LIBLNS = macro.ln mdoc.ln hash.ln strings.ln xstd.ln argv.ln \
1.69      kristaps    9:          validate.ln action.ln
1.60      kristaps   10:
1.77      kristaps   11: TREELNS        = mdoctree.ln mmain.ln
1.60      kristaps   12:
1.77      kristaps   13: TERMLNS        = mdoctree.ln mmain.ln term.ln
1.4       kristaps   14:
1.78      kristaps   15: LINTLNS        = mdoclint.ln mmain.ln
                     16:
1.75      kristaps   17: LNS    = $(LIBLNS) $(TREELNS) $(TERMLNS)
                     18:
                     19: LLNS   = llib-llibmdoc.ln llib-lmdoctree.ln llib-lmdocterm.ln
1.4       kristaps   20:
1.50      kristaps   21: LIBS   = libmdoc.a
1.4       kristaps   22:
1.60      kristaps   23: LIBOBJS        = macro.o mdoc.o hash.o strings.o xstd.o argv.o \
1.75      kristaps   24:          validate.o action.o
                     25:
1.77      kristaps   26: TERMOBJS= mdocterm.o mmain.o term.o
1.60      kristaps   27:
1.77      kristaps   28: TREEOBJS= mdoctree.o mmain.o
1.60      kristaps   29:
1.78      kristaps   30: LINTOBJS= mdoclint.o mmain.o
                     31:
1.75      kristaps   32: OBJS   = $(LIBOBJS) $(TERMOBJS) $(TREEOBJS)
1.4       kristaps   33:
1.75      kristaps   34: SRCS   = macro.c mdoc.c hash.c strings.c xstd.c argv.c validate.c \
1.78      kristaps   35:          action.c term.c mdoctree.c mdocterm.c mmain.c mdoclint.c
1.4       kristaps   36:
1.76      kristaps   37: HEADS  = mdoc.h private.h term.h mmain.h
1.1       kristaps   38:
1.79      kristaps   39: SGMLS  = index.sgml
                     40:
                     41: HTMLS  = index.html
                     42:
                     43: STATICS        = style.css external.png
                     44:
1.81      kristaps   45: TARGZS = mdocml-$(VERSION).tar.gz mdocml-oport-$(VERSION).tar.gz
                     46:
                     47: MANS   = mdoctree.1 mdocterm.1 mdoclint.1 mdoc.3
1.63      kristaps   48:
1.78      kristaps   49: BINS   = mdocterm mdoctree mdoclint
1.4       kristaps   50:
1.81      kristaps   51: CLEAN  = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS) $(HTMLS) \
                     52:          $(TARGZS)
1.29      kristaps   53:
1.79      kristaps   54: INSTALL        = $(SRCS) $(HEADS) Makefile Makefile.port DESCR $(MANS) \
                     55:          $(SGMLS) $(STATICS)
1.59      kristaps   56:
1.64      kristaps   57: FAIL   = regress/test.empty \
                     58:          regress/test.prologue.00 \
                     59:          regress/test.prologue.01 \
                     60:          regress/test.prologue.02 \
                     61:          regress/test.prologue.03 \
                     62:          regress/test.prologue.04 \
                     63:          regress/test.prologue.06 \
                     64:          regress/test.prologue.13 \
                     65:          regress/test.prologue.15 \
                     66:          regress/test.prologue.16 \
                     67:          regress/test.prologue.18 \
                     68:          regress/test.prologue.19 \
                     69:          regress/test.prologue.21 \
                     70:          regress/test.prologue.22 \
                     71:          regress/test.prologue.23 \
1.65      kristaps   72:          regress/test.prologue.24 \
                     73:          regress/test.prologue.25 \
                     74:          regress/test.prologue.26 \
                     75:          regress/test.prologue.27 \
                     76:          regress/test.prologue.28 \
                     77:          regress/test.prologue.29 \
                     78:          regress/test.prologue.30 \
                     79:          regress/test.prologue.31 \
                     80:          regress/test.prologue.32 \
                     81:          regress/test.prologue.33 \
1.83      kristaps   82:          regress/test.sh.03 \
                     83:          regress/test.escape.01 \
                     84:          regress/test.escape.02 \
                     85:          regress/test.escape.03 \
1.84      kristaps   86:          regress/test.escape.04 \
                     87:          regress/test.escape.06 \
                     88:          regress/test.escape.07 \
                     89:          regress/test.escape.08 \
1.87      kristaps   90:          regress/test.escape.09 \
                     91:          regress/test.escape.11 \
                     92:          regress/test.escape.12
1.64      kristaps   93:
                     94: SUCCEED        = regress/test.prologue.05 \
                     95:          regress/test.prologue.07 \
                     96:          regress/test.prologue.08 \
                     97:          regress/test.prologue.09 \
                     98:          regress/test.prologue.10 \
                     99:          regress/test.prologue.11 \
                    100:          regress/test.prologue.12 \
                    101:          regress/test.prologue.14 \
                    102:          regress/test.prologue.17 \
1.65      kristaps  103:          regress/test.prologue.20 \
                    104:          regress/test.sh.00 \
1.66      kristaps  105:          regress/test.name.00 \
1.78      kristaps  106:          regress/test.name.01 \
                    107:          regress/test.name.02 \
                    108:          regress/test.name.03 \
1.66      kristaps  109:          regress/test.list.00 \
                    110:          regress/test.list.01 \
                    111:          regress/test.list.02 \
                    112:          regress/test.list.03 \
1.67      kristaps  113:          regress/test.list.04 \
                    114:          regress/test.list.05 \
1.83      kristaps  115:          regress/test.list.06 \
                    116:          regress/test.sh.01 \
                    117:          regress/test.sh.02 \
1.84      kristaps  118:          regress/test.escape.00 \
1.87      kristaps  119:          regress/test.escape.05 \
                    120:          regress/test.escape.10
1.64      kristaps  121:
1.81      kristaps  122: REGRESS        = $(FAIL) $(SUCCEED)
                    123:
1.50      kristaps  124: all:   $(BINS)
1.32      kristaps  125:
1.50      kristaps  126: lint:  $(LLNS)
1.42      kristaps  127:
1.1       kristaps  128: clean:
                    129:        rm -f $(CLEAN)
                    130:
1.89    ! kristaps  131: cleanlint:
        !           132:        rm -f $(LNS) $(LLNS)
        !           133:
1.60      kristaps  134: dist:  mdocml-$(VERSION).tar.gz
1.59      kristaps  135:
1.60      kristaps  136: port:  mdocml-oport-$(VERSION).tar.gz
1.20      kristaps  137:
1.81      kristaps  138: www:   $(HTMLS) $(TARGZS)
1.79      kristaps  139:
1.80      kristaps  140: installwww: www
                    141:        install -m 0444 $(HTMLS) $(STATICS) $(PREFIX)/
1.81      kristaps  142:        install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/
                    143:        install -m 0444 mdocml-oport-$(VERSION).tar.gz $(PREFIX)/ports-openbsd/
                    144:        install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/mdocml.tar.gz
                    145:        install -m 0444 mdocml-oport-$(VERSION).tar.gz $(PREFIX)/ports-openbsd/mdocml.tar.gz
1.80      kristaps  146:
1.89    ! kristaps  147: regress: mdoclint
1.64      kristaps  148:        @for f in $(FAIL); do \
1.78      kristaps  149:                echo "./mdoclint $$f" ; \
                    150:                ./mdoclint $$f 2>/dev/null || continue ; exit 1 ; done
1.64      kristaps  151:        @for f in $(SUCCEED); do \
1.78      kristaps  152:                echo "./mdoclint $$f" ; \
                    153:                ./mdoclint $$f 2>/dev/null || exit 1 ; done
1.64      kristaps  154:
1.60      kristaps  155: install:
                    156:        mkdir -p $(PREFIX)/bin/
                    157:        mkdir -p $(PREFIX)/include/mdoc/
                    158:        mkdir -p $(PREFIX)/lib/
                    159:        mkdir -p $(PREFIX)/man/man1/
1.75      kristaps  160:        install -m 0755 mdocterm $(PREFIX)/bin/
                    161:        install -m 0755 mdoctree $(PREFIX)/bin/
1.81      kristaps  162:        install -m 0755 mdoclint $(PREFIX)/bin/
1.75      kristaps  163:        install -m 0444 mdocterm.1 $(PREFIX)/man/man1/
1.81      kristaps  164:        install -m 0444 mdoctree.1 $(PREFIX)/man/man1/
                    165:        install -m 0444 mdoclint.1 $(PREFIX)/man/man1/
1.60      kristaps  166:        install -m 0444 mdoc.3 $(PREFIX)/man/man3/
                    167:        install -m 0644 libmdoc.a $(PREFIX)/lib/
                    168:        install -m 0444 mdoc.h $(PREFIX)/include/
                    169:
                    170: uninstall:
1.75      kristaps  171:        rm -f $(PREFIX)/bin/mdocterm
                    172:        rm -f $(PREFIX)/bin/mdoctree
1.81      kristaps  173:        rm -f $(PREFIX)/bin/mdoclint
1.75      kristaps  174:        rm -f $(PREFIX)/man/man1/mdocterm.1
                    175:        rm -f $(PREFIX)/man/man1/mdoctree.1
1.81      kristaps  176:        rm -f $(PREFIX)/man/man1/mdoclint.1
1.60      kristaps  177:        rm -f $(PREFIX)/man/man3/mdoc.3
                    178:        rm -f $(PREFIX)/lib/libmdoc.a
                    179:        rm -f $(PREFIX)/include/mdoc.h
1.20      kristaps  180:
1.50      kristaps  181: macro.ln: macro.c private.h
                    182: macro.o: macro.c private.h
1.21      kristaps  183:
1.74      kristaps  184: term.ln: term.c term.h
                    185: term.o: term.c term.h
                    186:
1.52      kristaps  187: strings.ln: strings.c private.h
                    188: strings.o: strings.c private.h
                    189:
1.50      kristaps  190: hash.ln: hash.c private.h
                    191: hash.o: hash.c private.h
1.21      kristaps  192:
1.50      kristaps  193: mdoc.ln: mdoc.c private.h
                    194: mdoc.o: mdoc.c private.h
1.47      kristaps  195:
1.76      kristaps  196: mdocterm.ln: mdocterm.c mmain.h
                    197: mdocterm.o: mdocterm.c mmain.h
1.47      kristaps  198:
1.78      kristaps  199: mdoclint.ln: mdoclint.c mmain.h
                    200: mdoclint.o: mdoclint.c mmain.h
                    201:
1.76      kristaps  202: mdoctree.ln: mdoctree.c mmain.h
                    203: mdoctree.o: mdoctree.c mmain.h
1.39      kristaps  204:
1.53      kristaps  205: xstd.ln: xstd.c private.h
                    206: xstd.o: xstd.c private.h
                    207:
                    208: argv.ln: argv.c private.h
                    209: argv.o: argv.c private.h
                    210:
1.54      kristaps  211: validate.ln: validate.c private.h
                    212: validate.o: validate.c private.h
                    213:
1.56      kristaps  214: action.ln: action.c private.h
1.76      kristaps  215: action.o: action.c private.h
1.56      kristaps  216:
1.76      kristaps  217: mmain.ln: mmain.c mmain.h
                    218: mmain.o: mmain.c mmain.h
1.56      kristaps  219:
1.50      kristaps  220: private.h: mdoc.h
1.39      kristaps  221:
1.76      kristaps  222: mmain.h: mdoc.h
                    223:
                    224: term.h: mdoc.h
                    225:
1.81      kristaps  226: mdocml-oport-$(VERSION).tar.gz: mdocml-$(VERSION).tar.gz Makefile.port DESCR
1.60      kristaps  227:        mkdir -p .dist/mdocml/pkg
1.81      kristaps  228:        sed -e "s!@VERSION@!$(VERSION)!" Makefile.port > \
                    229:                .dist/mdocml/Makefile
1.60      kristaps  230:        md5 mdocml-$(VERSION).tar.gz > .dist/mdocml/distinfo
                    231:        rmd160 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
                    232:        sha1 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
                    233:        install -m 0644 DESCR .dist/mdocml/pkg/DESCR
                    234:        echo @comment $$OpenBSD$$ > .dist/mdocml/pkg/PLIST
1.75      kristaps  235:        echo bin/mdocterm >> .dist/mdocml/pkg/PLIST
                    236:        echo bin/mdoctree >> .dist/mdocml/pkg/PLIST
1.78      kristaps  237:        echo bin/mdoclint >> .dist/mdocml/pkg/PLIST
1.60      kristaps  238:        echo lib/libmdoc.a >> .dist/mdocml/pkg/PLIST
                    239:        echo include/mdoc.h >> .dist/mdocml/pkg/PLIST
1.75      kristaps  240:        echo @man man/man1/mdoctree.1 >> .dist/mdocml/pkg/PLIST
                    241:        echo @man man/man1/mdocterm.1 >> .dist/mdocml/pkg/PLIST
1.78      kristaps  242:        echo @man man/man1/mdoclint.1 >> .dist/mdocml/pkg/PLIST
1.60      kristaps  243:        echo @man man/man3/mdoc.3 >> .dist/mdocml/pkg/PLIST
                    244:        ( cd .dist/ && tar zcf ../$@ mdocml/ )
                    245:        rm -rf .dist/
                    246:
                    247: mdocml-$(VERSION).tar.gz: $(INSTALL)
                    248:        mkdir -p .dist/mdocml/mdocml-$(VERSION)/
1.81      kristaps  249:        mkdir -p .dist/mdocml/mdocml-$(VERSION)/regress/
1.60      kristaps  250:        install -m 0644 $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
1.81      kristaps  251:        install -m 0644 $(REGRESS) .dist/mdocml/mdocml-$(VERSION)/regress/
1.60      kristaps  252:        ( cd .dist/mdocml/ && tar zcf ../../$@ mdocml-$(VERSION)/ )
                    253:        rm -rf .dist/
                    254:
                    255: llib-llibmdoc.ln: $(LIBLNS)
                    256:        $(LINT) $(LINTFLAGS) -Clibmdoc $(LIBLNS)
                    257:
1.75      kristaps  258: llib-lmdoctree.ln: $(TREELNS) llib-llibmdoc.ln
                    259:        $(LINT) $(LINTFLAGS) -Cmdoctree $(TREELNS) llib-llibmdoc.ln
                    260:
                    261: llib-lmdocterm.ln: $(TERMLNS) llib-llibmdoc.ln
                    262:        $(LINT) $(LINTFLAGS) -Cmdocterm $(TERMLNS) llib-llibmdoc.ln
1.60      kristaps  263:
                    264: libmdoc.a: $(LIBOBJS)
                    265:        $(AR) rs $@ $(LIBOBJS)
                    266:
1.75      kristaps  267: mdocterm: $(TERMOBJS) libmdoc.a
                    268:        $(CC) $(CFLAGS) -o $@ $(TERMOBJS) libmdoc.a
                    269:
                    270: mdoctree: $(TREEOBJS) libmdoc.a
                    271:        $(CC) $(CFLAGS) -o $@ $(TREEOBJS) libmdoc.a
1.39      kristaps  272:
1.78      kristaps  273: mdoclint: $(LINTOBJS) libmdoc.a
                    274:        $(CC) $(CFLAGS) -o $@ $(LINTOBJS) libmdoc.a
1.79      kristaps  275:
                    276: .sgml.html:
                    277:        validate $<
1.85      kristaps  278:        sed -e "s!@VERSION@!$(VERSION)!" -e "s!@VDATE@!$(VDATE)!" $< > $@
                    279:

CVSweb