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

Annotation of mandoc/Makefile, Revision 1.72

1.62      kristaps    1: VERSION        = 1.2.0
1.31      kristaps    2:
1.50      kristaps    3: CFLAGS += -W -Wall -Wno-unused-parameter -g
1.7       kristaps    4:
1.60      kristaps    5: LIBLNS = macro.ln mdoc.ln hash.ln strings.ln xstd.ln argv.ln \
1.69      kristaps    6:          validate.ln action.ln
1.60      kristaps    7:
1.71      kristaps    8: BINLNS = mdocml.ln term.ln tree.ln
1.60      kristaps    9:
                     10: LNS    = $(LIBLNS) $(BINLNS)
1.4       kristaps   11:
1.50      kristaps   12: LLNS   = llib-llibmdoc.ln llib-lmdocml.ln
1.4       kristaps   13:
1.50      kristaps   14: LIBS   = libmdoc.a
1.4       kristaps   15:
1.60      kristaps   16: LIBOBJS        = macro.o mdoc.o hash.o strings.o xstd.o argv.o \
1.69      kristaps   17:          validate.o action.o
1.60      kristaps   18:
1.71      kristaps   19: BINOBJS        = mdocml.o term.o tree.o
1.60      kristaps   20:
                     21: OBJS   = $(LIBOBJS) $(BINOBJS)
1.4       kristaps   22:
1.60      kristaps   23: SRCS   = macro.c mdoc.c mdocml.c hash.c strings.c xstd.c argv.c \
1.70      kristaps   24:          validate.c action.c
1.4       kristaps   25:
1.60      kristaps   26: HEADS  = mdoc.h private.h
1.1       kristaps   27:
1.63      kristaps   28: MANS   = mdocml.1 mdoc.3
                     29:
1.50      kristaps   30: BINS   = mdocml
1.4       kristaps   31:
1.50      kristaps   32: CLEAN  = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS)
1.29      kristaps   33:
1.63      kristaps   34: INSTALL        = $(SRCS) $(HEADS) Makefile Makefile.port DESCR $(MANS)
1.59      kristaps   35:
1.64      kristaps   36: FAIL   = regress/test.empty \
                     37:          regress/test.prologue.00 \
                     38:          regress/test.prologue.01 \
                     39:          regress/test.prologue.02 \
                     40:          regress/test.prologue.03 \
                     41:          regress/test.prologue.04 \
                     42:          regress/test.prologue.06 \
                     43:          regress/test.prologue.13 \
                     44:          regress/test.prologue.15 \
                     45:          regress/test.prologue.16 \
                     46:          regress/test.prologue.18 \
                     47:          regress/test.prologue.19 \
                     48:          regress/test.prologue.21 \
                     49:          regress/test.prologue.22 \
                     50:          regress/test.prologue.23 \
1.65      kristaps   51:          regress/test.prologue.24 \
                     52:          regress/test.prologue.25 \
                     53:          regress/test.prologue.26 \
                     54:          regress/test.prologue.27 \
                     55:          regress/test.prologue.28 \
                     56:          regress/test.prologue.29 \
                     57:          regress/test.prologue.30 \
                     58:          regress/test.prologue.31 \
                     59:          regress/test.prologue.32 \
                     60:          regress/test.prologue.33 \
                     61:          regress/test.sh.01 \
                     62:          regress/test.sh.02 \
                     63:          regress/test.sh.03 \
                     64:          regress/test.name.01 \
                     65:          regress/test.name.02 \
                     66:          regress/test.name.03
1.64      kristaps   67:
                     68: SUCCEED        = regress/test.prologue.05 \
                     69:          regress/test.prologue.07 \
                     70:          regress/test.prologue.08 \
                     71:          regress/test.prologue.09 \
                     72:          regress/test.prologue.10 \
                     73:          regress/test.prologue.11 \
                     74:          regress/test.prologue.12 \
                     75:          regress/test.prologue.14 \
                     76:          regress/test.prologue.17 \
1.65      kristaps   77:          regress/test.prologue.20 \
                     78:          regress/test.sh.00 \
1.66      kristaps   79:          regress/test.name.00 \
                     80:          regress/test.list.00 \
                     81:          regress/test.list.01 \
                     82:          regress/test.list.02 \
                     83:          regress/test.list.03 \
1.67      kristaps   84:          regress/test.list.04 \
                     85:          regress/test.list.05 \
                     86:          regress/test.list.06
1.64      kristaps   87:
1.50      kristaps   88: all:   $(BINS)
1.32      kristaps   89:
1.50      kristaps   90: lint:  $(LLNS)
1.42      kristaps   91:
1.1       kristaps   92: clean:
                     93:        rm -f $(CLEAN)
                     94:
1.60      kristaps   95: dist:  mdocml-$(VERSION).tar.gz
1.59      kristaps   96:
1.60      kristaps   97: port:  mdocml-oport-$(VERSION).tar.gz
1.20      kristaps   98:
1.68      kristaps   99: regress:: mdocml
1.64      kristaps  100:        @for f in $(FAIL); do \
                    101:                echo "./mdocml $$f" ; \
                    102:                ./mdocml $$f 2>/dev/null || continue ; exit 1 ; done
                    103:        @for f in $(SUCCEED); do \
                    104:                echo "./mdocml $$f" ; \
                    105:                ./mdocml $$f 2>/dev/null || exit 1 ; done
                    106:
1.60      kristaps  107: install:
                    108:        mkdir -p $(PREFIX)/bin/
                    109:        mkdir -p $(PREFIX)/include/mdoc/
                    110:        mkdir -p $(PREFIX)/lib/
                    111:        mkdir -p $(PREFIX)/man/man1/
                    112:        install -m 0755 mdocml $(PREFIX)/bin/
                    113:        install -m 0444 mdocml.1 $(PREFIX)/man/man1/
                    114:        install -m 0444 mdoc.3 $(PREFIX)/man/man3/
                    115:        install -m 0644 libmdoc.a $(PREFIX)/lib/
                    116:        install -m 0444 mdoc.h $(PREFIX)/include/
                    117:
1.61      kristaps  118: install-dist: mdocml-$(VERSION).tar.gz mdocml-oport-$(VERSION).tar.gz
                    119:        install -m 0644 mdocml-$(VERSION).tar.gz $(PREFIX)/
                    120:        install -m 0644 mdocml-$(VERSION).tar.gz $(PREFIX)/mdocml.tar.gz
                    121:        install -m 0644 mdocml-oport-$(VERSION).tar.gz $(PREFIX)/
                    122:        install -m 0644 mdocml-oport-$(VERSION).tar.gz $(PREFIX)/mdocml-oport.tar.gz
                    123:
1.60      kristaps  124: uninstall:
                    125:        rm -f $(PREFIX)/bin/mdocml
                    126:        rm -f $(PREFIX)/man/man1/mdocml.1
                    127:        rm -f $(PREFIX)/man/man3/mdoc.3
                    128:        rm -f $(PREFIX)/lib/libmdoc.a
                    129:        rm -f $(PREFIX)/include/mdoc.h
1.20      kristaps  130:
1.50      kristaps  131: macro.ln: macro.c private.h
1.21      kristaps  132:
1.50      kristaps  133: macro.o: macro.c private.h
1.21      kristaps  134:
1.71      kristaps  135: tree.ln: tree.c mdoc.h
                    136:
                    137: tree.o: tree.c mdoc.h
                    138:
1.72    ! kristaps  139: term.ln: term.c private.h
1.71      kristaps  140:
1.72    ! kristaps  141: term.o: term.c private.h
1.71      kristaps  142:
1.52      kristaps  143: strings.ln: strings.c private.h
                    144:
                    145: strings.o: strings.c private.h
                    146:
1.50      kristaps  147: hash.ln: hash.c private.h
1.21      kristaps  148:
1.50      kristaps  149: hash.o: hash.c private.h
1.21      kristaps  150:
1.50      kristaps  151: mdoc.ln: mdoc.c private.h
1.39      kristaps  152:
1.50      kristaps  153: mdoc.o: mdoc.c private.h
1.47      kristaps  154:
1.50      kristaps  155: mdocml.ln: mdocml.c mdoc.h
1.47      kristaps  156:
1.50      kristaps  157: mdocml.o: mdocml.c mdoc.h
1.39      kristaps  158:
1.53      kristaps  159: xstd.ln: xstd.c private.h
                    160:
                    161: xstd.o: xstd.c private.h
                    162:
                    163: argv.ln: argv.c private.h
                    164:
                    165: argv.o: argv.c private.h
                    166:
1.54      kristaps  167: validate.ln: validate.c private.h
                    168:
                    169: validate.o: validate.c private.h
                    170:
1.56      kristaps  171: action.ln: action.c private.h
                    172:
                    173: action.o: action.c private.h
                    174:
1.50      kristaps  175: private.h: mdoc.h
1.39      kristaps  176:
1.60      kristaps  177: mdocml-oport-$(VERSION).tar.gz: Makefile.port DESCR
                    178:        mkdir -p .dist/mdocml/pkg
                    179:        sed -e "s!@VERSION@!$(VERSION)!" Makefile.port > .dist/mdocml/Makefile
                    180:        md5 mdocml-$(VERSION).tar.gz > .dist/mdocml/distinfo
                    181:        rmd160 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
                    182:        sha1 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
                    183:        install -m 0644 DESCR .dist/mdocml/pkg/DESCR
                    184:        echo @comment $$OpenBSD$$ > .dist/mdocml/pkg/PLIST
                    185:        echo bin/mdocml >> .dist/mdocml/pkg/PLIST
                    186:        echo lib/libmdoc.a >> .dist/mdocml/pkg/PLIST
                    187:        echo include/mdoc.h >> .dist/mdocml/pkg/PLIST
                    188:        echo @man man/man1/mdocml.1 >> .dist/mdocml/pkg/PLIST
                    189:        echo @man man/man3/mdoc.3 >> .dist/mdocml/pkg/PLIST
                    190:        ( cd .dist/ && tar zcf ../$@ mdocml/ )
                    191:        rm -rf .dist/
                    192:
                    193: mdocml-$(VERSION).tar.gz: $(INSTALL)
                    194:        mkdir -p .dist/mdocml/mdocml-$(VERSION)/
                    195:        install -m 0644 $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
                    196:        ( cd .dist/mdocml/ && tar zcf ../../$@ mdocml-$(VERSION)/ )
                    197:        rm -rf .dist/
                    198:
                    199: llib-llibmdoc.ln: $(LIBLNS)
                    200:        $(LINT) $(LINTFLAGS) -Clibmdoc $(LIBLNS)
                    201:
                    202: llib-lmdocml.ln: $(BINLNS) llib-llibmdoc.ln
                    203:        $(LINT) $(LINTFLAGS) -Cmdocml $(BINLNS) llib-llibmdoc.ln
                    204:
                    205: libmdoc.a: $(LIBOBJS)
                    206:        $(AR) rs $@ $(LIBOBJS)
                    207:
                    208: mdocml:        $(BINOBJS) libmdoc.a
1.71      kristaps  209:        $(CC) $(CFLAGS) -o $@ $(BINOBJS) libmdoc.a -lcurses
1.39      kristaps  210:

CVSweb