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

Annotation of mandoc/Makefile, Revision 1.84

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

CVSweb