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

Annotation of mandoc/Makefile, Revision 1.390

1.319     kristaps    1: .PHONY:         clean install installwww
                      2: .SUFFIXES:      .sgml .html .md5 .h .h.html
1.356     schwarze    3: .SUFFIXES:      .1       .3       .7       .8
                      4: .SUFFIXES:      .1.txt   .3.txt   .7.txt   .8.txt
                      5: .SUFFIXES:      .1.pdf   .3.pdf   .7.pdf   .8.pdf
                      6: .SUFFIXES:      .1.ps    .3.ps    .7.ps    .8.ps
                      7: .SUFFIXES:      .1.html  .3.html  .7.html  .8.html
                      8: .SUFFIXES:      .1.xhtml .3.xhtml .7.xhtml .8.xhtml
1.259     kristaps    9:
                     10: # Specify this if you want to hard-code the operating system to appear
                     11: # in the lower-left hand corner of -mdoc manuals.
1.375     kristaps   12: #
1.319     kristaps   13: # CFLAGS       += -DOSNAME="\"OpenBSD 4.5\""
1.259     kristaps   14:
1.374     kristaps   15: VERSION                 = 1.12.0
                     16: VDATE           = 8 October 2011
1.375     kristaps   17:
1.341     kristaps   18: # IFF your system supports multi-byte functions (setlocale(), wcwidth(),
                     19: # putwchar()) AND has __STDC_ISO_10646__ (that is, wchar_t is simply a
                     20: # UCS-4 value) should you define USE_WCHAR.  If you define it and your
                     21: # system DOESN'T support this, -Tlocale will produce garbage.
                     22: # If you don't define it, -Tlocale is a synonym for -Tacsii.
1.375     kristaps   23: #
1.362     kristaps   24: CFLAGS         += -DUSE_WCHAR
1.375     kristaps   25:
1.380     kristaps   26: # If your system has manpath(1), uncomment this.  This is most any
                     27: # system that's not OpenBSD or NetBSD.  If uncommented, apropos(1),
                     28: # mandocdb(8), and man.cgi will popen(3) manpath(1) to get the MANPATH
                     29: # variable.
1.384     schwarze   30: #CFLAGS                += -DUSE_MANPATH
1.383     kristaps   31:
1.390   ! kristaps   32: # If your system supports static binaries only, uncomment this.  This
        !            33: # appears only to be BSD UNIX systems (Mac OS X has no support and Linux
        !            34: # requires -pthreads for static libdb).
1.386     kristaps   35: STATIC          = -static
1.379     kristaps   36:
1.362     kristaps   37: CFLAGS         += -g -DHAVE_CONFIG_H -DVERSION="\"$(VERSION)\""
1.319     kristaps   38: CFLAGS         += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
                     39: PREFIX          = /usr/local
1.387     kristaps   40: WWWPREFIX       = /var/www
                     41: HTDOCDIR        = $(WWWPREFIX)/htdocs
                     42: CGIBINDIR       = $(WWWPREFIX)/cgi-bin
1.319     kristaps   43: BINDIR          = $(PREFIX)/bin
1.321     kristaps   44: INCLUDEDIR      = $(PREFIX)/include/mandoc
                     45: LIBDIR          = $(PREFIX)/lib/mandoc
1.319     kristaps   46: MANDIR          = $(PREFIX)/man
                     47: EXAMPLEDIR      = $(PREFIX)/share/examples/mandoc
                     48: INSTALL                 = install
                     49: INSTALL_PROGRAM         = $(INSTALL) -m 0755
                     50: INSTALL_DATA    = $(INSTALL) -m 0444
                     51: INSTALL_LIB     = $(INSTALL) -m 0644
1.353     kristaps   52: INSTALL_SOURCE  = $(INSTALL) -m 0644
1.319     kristaps   53: INSTALL_MAN     = $(INSTALL_DATA)
                     54:
1.375     kristaps   55: # Non-BSD systems (Linux, etc.) need -ldb to compile mandocdb and
                     56: # apropos.
                     57: # However, if you don't have -ldb at all (or it's not native), then
                     58: # comment out apropos and mandocdb.
                     59: #
1.358     kristaps   60: #DBLIB          = -ldb
1.383     kristaps   61: DBBIN           = apropos mandocdb man.cgi catman whatis
                     62: DBLN            = llib-lapropos.ln llib-lmandocdb.ln llib-lman.cgi.ln llib-lcatman.ln
1.358     kristaps   63:
1.375     kristaps   64: all: mandoc preconv demandoc $(DBBIN)
1.319     kristaps   65:
                     66: SRCS            = Makefile \
1.389     kristaps   67:                   TODO \
1.372     kristaps   68:                   apropos.1 \
                     69:                   apropos.c \
1.389     kristaps   70:                   apropos_db.c \
                     71:                   apropos_db.h \
1.319     kristaps   72:                   arch.c \
                     73:                   arch.in \
                     74:                   att.c \
                     75:                   att.in \
1.389     kristaps   76:                   catman.8 \
                     77:                   catman.c \
                     78:                   cgi.c \
1.319     kristaps   79:                   chars.c \
                     80:                   chars.in \
1.390   ! kristaps   81:                   compat_fgetln.c \
1.362     kristaps   82:                   compat_getsubopt.c \
                     83:                   compat_strlcat.c \
                     84:                   compat_strlcpy.c \
1.319     kristaps   85:                   config.h.post \
                     86:                   config.h.pre \
1.389     kristaps   87:                   demandoc.1 \
1.369     kristaps   88:                   demandoc.c \
1.319     kristaps   89:                   eqn.7 \
                     90:                   eqn.c \
1.360     kristaps   91:                   eqn_html.c \
1.359     kristaps   92:                   eqn_term.c \
1.319     kristaps   93:                   example.style.css \
                     94:                   external.png \
                     95:                   html.c \
                     96:                   html.h \
                     97:                   index.css \
                     98:                   index.sgml \
                     99:                   lib.c \
                    100:                   lib.in \
                    101:                   libman.h \
                    102:                   libmandoc.h \
                    103:                   libmdoc.h \
                    104:                   libroff.h \
                    105:                   main.c \
                    106:                   main.h \
                    107:                   man.7 \
                    108:                   man.c \
1.382     kristaps  109:                   man.cgi.7 \
1.389     kristaps  110:                   man.cgi.css \
                    111:                   man.h \
1.319     kristaps  112:                   man_hash.c \
                    113:                   man_html.c \
                    114:                   man_macro.c \
                    115:                   man_term.c \
                    116:                   man_validate.c \
                    117:                   mandoc.1 \
                    118:                   mandoc.3 \
                    119:                   mandoc.c \
                    120:                   mandoc.h \
1.389     kristaps  121:                   mandoc_char.7 \
1.356     schwarze  122:                   mandocdb.8 \
1.355     kristaps  123:                   mandocdb.c \
1.378     schwarze  124:                   mandocdb.h \
1.380     kristaps  125:                   manpath.c \
                    126:                   manpath.h \
1.319     kristaps  127:                   mdoc.7 \
                    128:                   mdoc.c \
1.389     kristaps  129:                   mdoc.h \
1.319     kristaps  130:                   mdoc_argv.c \
                    131:                   mdoc_hash.c \
                    132:                   mdoc_html.c \
                    133:                   mdoc_macro.c \
1.371     schwarze  134:                   mdoc_man.c \
1.319     kristaps  135:                   mdoc_term.c \
                    136:                   mdoc_validate.c \
                    137:                   msec.c \
                    138:                   msec.in \
                    139:                   out.c \
                    140:                   out.h \
1.344     kristaps  141:                   preconv.1 \
                    142:                   preconv.c \
1.342     kristaps  143:                   predefs.in \
1.319     kristaps  144:                   read.c \
1.389     kristaps  145:                   regress \
1.319     kristaps  146:                   roff.7 \
                    147:                   roff.c \
                    148:                   st.c \
                    149:                   st.in \
                    150:                   style.css \
                    151:                   tbl.7 \
                    152:                   tbl.c \
                    153:                   tbl_data.c \
                    154:                   tbl_html.c \
                    155:                   tbl_layout.c \
                    156:                   tbl_opts.c \
                    157:                   tbl_term.c \
                    158:                   term.c \
                    159:                   term.h \
                    160:                   term_ascii.c \
                    161:                   term_ps.c \
1.390   ! kristaps  162:                   test-fgetln.c \
1.365     kristaps  163:                   test-getsubopt.c \
1.347     kristaps  164:                   test-mmap.c \
1.319     kristaps  165:                   test-strlcat.c \
                    166:                   test-strlcpy.c \
1.365     kristaps  167:                   test-strptime.c \
1.319     kristaps  168:                   tree.c \
                    169:                   vol.c \
1.389     kristaps  170:                   vol.in \
                    171:                   whatis.1
1.319     kristaps  172:
                    173: LIBMAN_OBJS     = man.o \
                    174:                   man_hash.o \
                    175:                   man_macro.o \
                    176:                   man_validate.o
1.325     kristaps  177: LIBMAN_LNS      = man.ln \
                    178:                   man_hash.ln \
                    179:                   man_macro.ln \
                    180:                   man_validate.ln
                    181:
1.319     kristaps  182: LIBMDOC_OBJS    = arch.o \
                    183:                   att.o \
                    184:                   lib.o \
                    185:                   mdoc.o \
                    186:                   mdoc_argv.o \
                    187:                   mdoc_hash.o \
                    188:                   mdoc_macro.o \
                    189:                   mdoc_validate.o \
                    190:                   st.o \
                    191:                   vol.o
1.325     kristaps  192: LIBMDOC_LNS     = arch.ln \
                    193:                   att.ln \
                    194:                   lib.ln \
                    195:                   mdoc.ln \
                    196:                   mdoc_argv.ln \
                    197:                   mdoc_hash.ln \
                    198:                   mdoc_macro.ln \
                    199:                   mdoc_validate.ln \
                    200:                   st.ln \
                    201:                   vol.ln
                    202:
1.319     kristaps  203: LIBROFF_OBJS    = eqn.o \
                    204:                   roff.o \
                    205:                   tbl.o \
                    206:                   tbl_data.o \
                    207:                   tbl_layout.o \
                    208:                   tbl_opts.o
1.325     kristaps  209: LIBROFF_LNS     = eqn.ln \
                    210:                   roff.ln \
                    211:                   tbl.ln \
                    212:                   tbl_data.ln \
                    213:                   tbl_layout.ln \
                    214:                   tbl_opts.ln
                    215:
1.319     kristaps  216: LIBMANDOC_OBJS  = $(LIBMAN_OBJS) \
                    217:                   $(LIBMDOC_OBJS) \
                    218:                   $(LIBROFF_OBJS) \
1.333     kristaps  219:                   chars.o \
1.319     kristaps  220:                   mandoc.o \
1.385     schwarze  221:                   msec.o \
1.319     kristaps  222:                   read.o
1.325     kristaps  223: LIBMANDOC_LNS   = $(LIBMAN_LNS) \
                    224:                   $(LIBMDOC_LNS) \
                    225:                   $(LIBROFF_LNS) \
1.333     kristaps  226:                   chars.ln \
1.325     kristaps  227:                   mandoc.ln \
1.385     schwarze  228:                   msec.ln \
1.325     kristaps  229:                   read.ln
                    230:
1.390   ! kristaps  231: COMPAT_OBJS     = compat_fgetln.o \
        !           232:                   compat_getsubopt.o \
1.362     kristaps  233:                   compat_strlcat.o \
                    234:                   compat_strlcpy.o
1.390   ! kristaps  235: COMPAT_LNS      = compat_fgetln.ln \
        !           236:                   compat_getsubopt.ln \
1.362     kristaps  237:                   compat_strlcat.ln \
                    238:                   compat_strlcpy.ln
                    239:
1.325     kristaps  240: arch.o arch.ln: arch.in
                    241: att.o att.ln: att.in
1.333     kristaps  242: chars.o chars.ln: chars.in
1.325     kristaps  243: lib.o lib.ln: lib.in
                    244: msec.o msec.ln: msec.in
1.342     kristaps  245: roff.o roff.ln: predefs.in
1.325     kristaps  246: st.o st.ln: st.in
                    247: vol.o vol.ln: vol.in
                    248:
                    249: $(LIBMAN_OBJS) $(LIBMAN_LNS): libman.h
                    250: $(LIBMDOC_OBJS) $(LIBMDOC_LNS): libmdoc.h
                    251: $(LIBROFF_OBJS) $(LIBROFF_LNS): libroff.h
                    252: $(LIBMANDOC_OBJS) $(LIBMANDOC_LNS): mandoc.h mdoc.h man.h libmandoc.h config.h
1.319     kristaps  253:
1.362     kristaps  254: $(COMPAT_OBJS) $(COMPAT_LNS): config.h
                    255:
1.360     kristaps  256: MANDOC_HTML_OBJS = eqn_html.o \
                    257:                   html.o \
1.319     kristaps  258:                   man_html.o \
                    259:                   mdoc_html.o \
                    260:                   tbl_html.o
1.360     kristaps  261: MANDOC_HTML_LNS         = eqn_html.ln \
                    262:                   html.ln \
1.325     kristaps  263:                   man_html.ln \
                    264:                   mdoc_html.ln \
                    265:                   tbl_html.ln
                    266:
1.371     schwarze  267: MANDOC_MAN_OBJS  = mdoc_man.o
                    268: MANDOC_MAN_LNS   = mdoc_man.ln
                    269:
1.359     kristaps  270: MANDOC_TERM_OBJS = eqn_term.o \
                    271:                   man_term.o \
1.319     kristaps  272:                   mdoc_term.o \
                    273:                   term.o \
                    274:                   term_ascii.o \
                    275:                   term_ps.o \
                    276:                   tbl_term.o
1.359     kristaps  277: MANDOC_TERM_LNS         = eqn_term.ln \
                    278:                   man_term.ln \
1.325     kristaps  279:                   mdoc_term.ln \
                    280:                   term.ln \
                    281:                   term_ascii.ln \
                    282:                   term_ps.ln \
                    283:                   tbl_term.ln
                    284:
1.319     kristaps  285: MANDOC_OBJS     = $(MANDOC_HTML_OBJS) \
1.371     schwarze  286:                   $(MANDOC_MAN_OBJS) \
1.319     kristaps  287:                   $(MANDOC_TERM_OBJS) \
                    288:                   main.o \
                    289:                   out.o \
                    290:                   tree.o
1.325     kristaps  291: MANDOC_LNS      = $(MANDOC_HTML_LNS) \
1.371     schwarze  292:                   $(MANDOC_MAN_LNS) \
1.325     kristaps  293:                   $(MANDOC_TERM_LNS) \
                    294:                   main.ln \
                    295:                   out.ln \
                    296:                   tree.ln
                    297:
                    298: $(MANDOC_HTML_OBJS) $(MANDOC_HTML_LNS): html.h
                    299: $(MANDOC_TERM_OBJS) $(MANDOC_TERM_LNS): term.h
                    300: $(MANDOC_OBJS) $(MANDOC_LNS): main.h mandoc.h mdoc.h man.h config.h out.h
1.319     kristaps  301:
1.380     kristaps  302: MANDOCDB_OBJS   = mandocdb.o manpath.o
                    303: MANDOCDB_LNS    = mandocdb.ln manpath.ln
1.326     kristaps  304:
1.380     kristaps  305: $(MANDOCDB_OBJS) $(MANDOCDB_LNS): mandocdb.h mandoc.h mdoc.h man.h config.h manpath.h
1.326     kristaps  306:
1.343     kristaps  307: PRECONV_OBJS    = preconv.o
                    308: PRECONV_LNS     = preconv.ln
                    309:
                    310: $(PRECONV_OBJS) $(PRECONV_LNS): config.h
                    311:
1.380     kristaps  312: APROPOS_OBJS    = apropos.o apropos_db.o manpath.o
                    313: APROPOS_LNS     = apropos.ln apropos_db.ln manpath.ln
1.372     kristaps  314:
1.380     kristaps  315: $(APROPOS_OBJS) $(APROPOS_LNS): config.h mandoc.h apropos_db.h manpath.h mandocdb.h
1.376     kristaps  316:
1.383     kristaps  317: CGI_OBJS        = $(MANDOC_HTML_OBJS) \
                    318:                   $(MANDOC_MAN_OBJS) \
                    319:                   $(MANDOC_TERM_OBJS) \
                    320:                   cgi.o \
                    321:                   apropos_db.o \
                    322:                   manpath.o \
                    323:                   out.o \
                    324:                   tree.o
1.376     kristaps  325:
1.383     kristaps  326: CGI_LNS                 = $(MANDOC_HTML_LNS) \
                    327:                   $(MANDOC_MAN_LNS) \
                    328:                   $(MANDOC_TERM_LNS) \
                    329:                   cgi.ln \
                    330:                   apropos_db.ln \
                    331:                   manpath.ln \
                    332:                   out.ln \
                    333:                   tree.ln
1.372     kristaps  334:
1.383     kristaps  335: $(CGI_OBJS) $(CGI_LNS): main.h mdoc.h man.h out.h config.h mandoc.h apropos_db.h manpath.h mandocdb.h
1.381     kristaps  336:
1.383     kristaps  337: CATMAN_OBJS     = catman.o manpath.o
                    338: CATMAN_LNS      = catman.ln manpath.ln
                    339:
                    340: $(CATMAN_OBJS) $(CATMAN_LNS): config.h mandoc.h manpath.h
1.381     kristaps  341:
1.369     kristaps  342: DEMANDOC_OBJS   = demandoc.o
                    343: DEMANDOC_LNS    = demandoc.ln
                    344:
                    345: $(DEMANDOC_OBJS) $(DEMANDOC_LNS): config.h
                    346:
1.372     kristaps  347: INDEX_MANS      = apropos.1.html \
                    348:                   apropos.1.xhtml \
                    349:                   apropos.1.ps \
                    350:                   apropos.1.pdf \
                    351:                   apropos.1.txt \
1.390   ! kristaps  352:                   catman.8.html \
        !           353:                   catman.8.xhtml \
        !           354:                   catman.8.ps \
        !           355:                   catman.8.pdf \
        !           356:                   catman.8.txt \
1.372     kristaps  357:                   demandoc.1.html \
1.369     kristaps  358:                   demandoc.1.xhtml \
                    359:                   demandoc.1.ps \
                    360:                   demandoc.1.pdf \
                    361:                   demandoc.1.txt \
                    362:                   mandoc.1.html \
1.319     kristaps  363:                   mandoc.1.xhtml \
                    364:                   mandoc.1.ps \
                    365:                   mandoc.1.pdf \
                    366:                   mandoc.1.txt \
1.389     kristaps  367:                   whatis.1.html \
                    368:                   whatis.1.xhtml \
                    369:                   whatis.1.ps \
                    370:                   whatis.1.pdf \
                    371:                   whatis.1.txt \
1.319     kristaps  372:                   mandoc.3.html \
                    373:                   mandoc.3.xhtml \
                    374:                   mandoc.3.ps \
                    375:                   mandoc.3.pdf \
                    376:                   mandoc.3.txt \
                    377:                   eqn.7.html \
                    378:                   eqn.7.xhtml \
                    379:                   eqn.7.ps \
                    380:                   eqn.7.pdf \
                    381:                   eqn.7.txt \
                    382:                   man.7.html \
                    383:                   man.7.xhtml \
                    384:                   man.7.ps \
                    385:                   man.7.pdf \
                    386:                   man.7.txt \
1.390   ! kristaps  387:                   man.cgi.7.html \
        !           388:                   man.cgi.7.xhtml \
        !           389:                   man.cgi.7.ps \
        !           390:                   man.cgi.7.pdf \
        !           391:                   man.cgi.7.txt \
1.319     kristaps  392:                   mandoc_char.7.html \
                    393:                   mandoc_char.7.xhtml \
                    394:                   mandoc_char.7.ps \
                    395:                   mandoc_char.7.pdf \
                    396:                   mandoc_char.7.txt \
                    397:                   mdoc.7.html \
                    398:                   mdoc.7.xhtml \
                    399:                   mdoc.7.ps \
                    400:                   mdoc.7.pdf \
                    401:                   mdoc.7.txt \
1.344     kristaps  402:                   preconv.1.html \
                    403:                   preconv.1.xhtml \
                    404:                   preconv.1.ps \
                    405:                   preconv.1.pdf \
                    406:                   preconv.1.txt \
1.319     kristaps  407:                   roff.7.html \
                    408:                   roff.7.xhtml \
                    409:                   roff.7.ps \
                    410:                   roff.7.pdf \
                    411:                   roff.7.txt \
                    412:                   tbl.7.html \
                    413:                   tbl.7.xhtml \
                    414:                   tbl.7.ps \
                    415:                   tbl.7.pdf \
1.356     schwarze  416:                   tbl.7.txt \
                    417:                   mandocdb.8.html \
                    418:                   mandocdb.8.xhtml \
                    419:                   mandocdb.8.ps \
                    420:                   mandocdb.8.pdf \
                    421:                   mandocdb.8.txt
1.319     kristaps  422:
                    423: $(INDEX_MANS): mandoc
                    424:
                    425: INDEX_OBJS      = $(INDEX_MANS) \
                    426:                   man.h.html \
                    427:                   mandoc.h.html \
                    428:                   mdoc.h.html \
                    429:                   mdocml.tar.gz \
                    430:                   mdocml.md5
1.132     kristaps  431:
1.319     kristaps  432: www: index.html
1.42      kristaps  433:
1.376     kristaps  434: lint: llib-lmandoc.ln llib-lpreconv.ln llib-ldemandoc.ln $(DBLN)
1.325     kristaps  435:
1.1       kristaps  436: clean:
1.319     kristaps  437:        rm -f libmandoc.a $(LIBMANDOC_OBJS)
1.325     kristaps  438:        rm -f llib-llibmandoc.ln $(LIBMANDOC_LNS)
1.355     kristaps  439:        rm -f mandocdb $(MANDOCDB_OBJS)
                    440:        rm -f llib-lmandocdb.ln $(MANDOCDB_LNS)
1.343     kristaps  441:        rm -f preconv $(PRECONV_OBJS)
                    442:        rm -f llib-lpreconv.ln $(PRECONV_LNS)
1.389     kristaps  443:        rm -f apropos whatis $(APROPOS_OBJS)
1.372     kristaps  444:        rm -f llib-lapropos.ln $(APROPOS_LNS)
1.376     kristaps  445:        rm -f man.cgi $(CGI_OBJS)
                    446:        rm -f llib-lman.cgi.ln $(CGI_LNS)
1.383     kristaps  447:        rm -f catman $(CATMAN_OBJS)
                    448:        rm -f llib-lcatman.ln $(CATMAN_LNS)
1.369     kristaps  449:        rm -f demandoc $(DEMANDOC_OBJS)
                    450:        rm -f llib-ldemandoc.ln $(DEMANDOC_LNS)
1.319     kristaps  451:        rm -f mandoc $(MANDOC_OBJS)
1.325     kristaps  452:        rm -f llib-lmandoc.ln $(MANDOC_LNS)
1.362     kristaps  453:        rm -f config.h config.log $(COMPAT_OBJS) $(COMPAT_LNS)
1.368     kristaps  454:        rm -f mdocml.tar.gz mdocml-win32.zip mdocml-win64.zip mdocml-macosx.zip
1.319     kristaps  455:        rm -f index.html $(INDEX_OBJS)
1.390   ! kristaps  456:        rm -rf test-fgetln.DSYM
1.364     kristaps  457:        rm -rf test-strlcpy.DSYM
                    458:        rm -rf test-strlcat.DSYM
                    459:        rm -rf test-strptime.DSYM
                    460:        rm -rf test-mmap.DSYM
                    461:        rm -rf test-getsubopt.DSYM
1.290     kristaps  462:
1.319     kristaps  463: install: all
1.270     joerg     464:        mkdir -p $(DESTDIR)$(BINDIR)
                    465:        mkdir -p $(DESTDIR)$(EXAMPLEDIR)
1.332     kristaps  466:        mkdir -p $(DESTDIR)$(LIBDIR)
1.334     kristaps  467:        mkdir -p $(DESTDIR)$(INCLUDEDIR)
1.270     joerg     468:        mkdir -p $(DESTDIR)$(MANDIR)/man1
1.319     kristaps  469:        mkdir -p $(DESTDIR)$(MANDIR)/man3
1.270     joerg     470:        mkdir -p $(DESTDIR)$(MANDIR)/man7
1.356     schwarze  471:        mkdir -p $(DESTDIR)$(MANDIR)/man8
1.369     kristaps  472:        $(INSTALL_PROGRAM) mandoc preconv demandoc $(DESTDIR)$(BINDIR)
1.324     kristaps  473:        $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
1.352     kristaps  474:        $(INSTALL_LIB) man.h mdoc.h mandoc.h $(DESTDIR)$(INCLUDEDIR)
1.369     kristaps  475:        $(INSTALL_MAN) mandoc.1 preconv.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1
1.319     kristaps  476:        $(INSTALL_MAN) mandoc.3 $(DESTDIR)$(MANDIR)/man3
1.311     kristaps  477:        $(INSTALL_MAN) man.7 mdoc.7 roff.7 eqn.7 tbl.7 mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
1.270     joerg     478:        $(INSTALL_DATA) example.style.css $(DESTDIR)$(EXAMPLEDIR)
1.387     kristaps  479:
                    480: installcgi: all
                    481:        mkdir -p $(DESTDIR)$(CGIBINDIR)
                    482:        mkdir -p $(DESTDIR)$(HTDOCDIR)
                    483:        $(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR)
                    484:        $(INSTALL_DATA) example.style.css $(DESTDIR)$(HTDOCDIR)/man.css
1.388     kristaps  485:        $(INSTALL_DATA) man.cgi.css $(DESTDIR)$(HTDOCDIR)
1.60      kristaps  486:
1.319     kristaps  487: installwww: www
                    488:        mkdir -p $(PREFIX)/snapshots
1.363     kristaps  489:        mkdir -p $(PREFIX)/binaries
1.320     kristaps  490:        $(INSTALL_DATA) index.html external.png index.css $(PREFIX)
                    491:        $(INSTALL_DATA) $(INDEX_MANS) style.css $(PREFIX)
1.319     kristaps  492:        $(INSTALL_DATA) mandoc.h.html man.h.html mdoc.h.html $(PREFIX)
                    493:        $(INSTALL_DATA) mdocml.tar.gz $(PREFIX)/snapshots
                    494:        $(INSTALL_DATA) mdocml.md5 $(PREFIX)/snapshots
                    495:        $(INSTALL_DATA) mdocml.tar.gz $(PREFIX)/snapshots/mdocml-$(VERSION).tar.gz
                    496:        $(INSTALL_DATA) mdocml.md5 $(PREFIX)/snapshots/mdocml-$(VERSION).md5
                    497:
1.362     kristaps  498: libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
                    499:        $(AR) rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
1.319     kristaps  500:
1.362     kristaps  501: llib-llibmandoc.ln: $(COMPAT_LNS) $(LIBMANDOC_LNS)
                    502:        $(LINT) $(LINTFLAGS) -Clibmandoc $(COMPAT_LNS) $(LIBMANDOC_LNS)
1.325     kristaps  503:
1.319     kristaps  504: mandoc: $(MANDOC_OBJS) libmandoc.a
1.368     kristaps  505:        $(CC) $(LDFLAGS) -o $@ $(MANDOC_OBJS) libmandoc.a
1.325     kristaps  506:
1.376     kristaps  507: llib-lmandoc.ln: $(MANDOC_LNS) llib-llibmandoc.ln
                    508:        $(LINT) $(LINTFLAGS) -Cmandoc $(MANDOC_LNS) llib-llibmandoc.ln
1.343     kristaps  509:
1.355     kristaps  510: mandocdb: $(MANDOCDB_OBJS) libmandoc.a
1.368     kristaps  511:        $(CC) $(LDFLAGS) -o $@ $(MANDOCDB_OBJS) libmandoc.a $(DBLIB)
1.326     kristaps  512:
1.376     kristaps  513: llib-lmandocdb.ln: $(MANDOCDB_LNS) llib-llibmandoc.ln
                    514:        $(LINT) $(LINTFLAGS) -Cmandocdb $(MANDOCDB_LNS) llib-llibmandoc.ln
1.343     kristaps  515:
                    516: preconv: $(PRECONV_OBJS)
1.368     kristaps  517:        $(CC) $(LDFLAGS) -o $@ $(PRECONV_OBJS)
1.343     kristaps  518:
1.376     kristaps  519: llib-lpreconv.ln: $(PRECONV_LNS) llib-llibmandoc.ln
                    520:        $(LINT) $(LINTFLAGS) -Cpreconv $(PRECONV_LNS) llib-llibmandoc.ln
1.372     kristaps  521:
1.383     kristaps  522: whatis: apropos
                    523:        cp -f apropos whatis
                    524:
1.372     kristaps  525: apropos: $(APROPOS_OBJS) libmandoc.a
1.373     kristaps  526:        $(CC) $(LDFLAGS) -o $@ $(APROPOS_OBJS) libmandoc.a $(DBLIB)
1.372     kristaps  527:
1.376     kristaps  528: llib-lapropos.ln: $(APROPOS_LNS) llib-llibmandoc.ln
                    529:        $(LINT) $(LINTFLAGS) -Capropos $(APROPOS_LNS) llib-llibmandoc.ln
1.381     kristaps  530:
1.383     kristaps  531: catman: $(CATMAN_OBJS) libmandoc.a
                    532:        $(CC) $(LDFLAGS) -o $@ $(CATMAN_OBJS) libmandoc.a $(DBLIB)
1.381     kristaps  533:
1.383     kristaps  534: llib-lcatman.ln: $(CATMAN_LNS) llib-llibmandoc.ln
                    535:        $(LINT) $(LINTFLAGS) -Ccatman $(CATMAN_LNS) llib-llibmandoc.ln
1.376     kristaps  536:
                    537: man.cgi: $(CGI_OBJS) libmandoc.a
1.383     kristaps  538:        $(CC) $(LDFLAGS) $(STATIC) -o $@ $(CGI_OBJS) libmandoc.a $(DBLIB)
1.376     kristaps  539:
                    540: llib-lman.cgi.ln: $(CGI_LNS) llib-llibmandoc.ln
                    541:        $(LINT) $(LINTFLAGS) -Cman.cgi $(CGI_LNS) llib-llibmandoc.ln
1.369     kristaps  542:
                    543: demandoc: $(DEMANDOC_OBJS) libmandoc.a
                    544:        $(CC) $(LDFLAGS) -o $@ $(DEMANDOC_OBJS) libmandoc.a
                    545:
1.376     kristaps  546: llib-ldemandoc.ln: $(DEMANDOC_LNS) llib-llibmandoc.ln
                    547:        $(LINT) $(LINTFLAGS) -Cdemandoc $(DEMANDOC_LNS) llib-llibmandoc.ln
1.319     kristaps  548:
                    549: mdocml.md5: mdocml.tar.gz
                    550:        md5 mdocml.tar.gz >$@
                    551:
                    552: mdocml.tar.gz: $(SRCS)
                    553:        mkdir -p .dist/mdocml-$(VERSION)/
1.353     kristaps  554:        $(INSTALL_SOURCE) $(SRCS) .dist/mdocml-$(VERSION)
1.319     kristaps  555:        ( cd .dist/ && tar zcf ../$@ ./ )
1.60      kristaps  556:        rm -rf .dist/
                    557:
1.363     kristaps  558: mdocml-win32.zip: $(SRCS)
1.362     kristaps  559:        mkdir -p .win32/mdocml-$(VERSION)/
                    560:        $(INSTALL_SOURCE) $(SRCS) .win32
                    561:        cp .win32/Makefile .win32/Makefile.old
1.375     kristaps  562:        egrep -v -e DUSE_WCHAR -e ^DBBIN .win32/Makefile.old >.win32/Makefile
1.368     kristaps  563:        ( cd .win32; \
                    564:                CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar CFLAGS='-DOSNAME=\"Windows\"' make; \
1.362     kristaps  565:                make install PREFIX=mdocml-$(VERSION) ; \
                    566:                zip -r ../$@ mdocml-$(VERSION) )
                    567:        rm -rf .win32
1.366     kristaps  568:
                    569: mdocml-win64.zip: $(SRCS)
                    570:        mkdir -p .win64/mdocml-$(VERSION)/
                    571:        $(INSTALL_SOURCE) $(SRCS) .win64
                    572:        cp .win64/Makefile .win64/Makefile.old
1.375     kristaps  573:        egrep -v -e DUSE_WCHAR -e ^DBBIN .win64/Makefile.old >.win64/Makefile
1.368     kristaps  574:        ( cd .win64; \
                    575:                CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar CFLAGS='-DOSNAME=\"Windows\"' make; \
1.366     kristaps  576:                make install PREFIX=mdocml-$(VERSION) ; \
                    577:                zip -r ../$@ mdocml-$(VERSION) )
                    578:        rm -rf .win64
                    579:
1.368     kristaps  580: mdocml-macosx.zip: $(SRCS)
                    581:        mkdir -p .macosx/mdocml-$(VERSION)/
                    582:        $(INSTALL_SOURCE) $(SRCS) .macosx
                    583:        ( cd .macosx; \
                    584:                CFLAGS="-arch i386 -arch x86_64 -arch ppc" LDFLAGS="-arch i386 -arch x86_64 -arch ppc" make; \
                    585:                make install PREFIX=mdocml-$(VERSION) ; \
                    586:                zip -r ../$@ mdocml-$(VERSION) )
                    587:        rm -rf .macosx
1.362     kristaps  588:
1.319     kristaps  589: index.html: $(INDEX_OBJS)
1.148     kristaps  590:
1.319     kristaps  591: config.h: config.h.pre config.h.post
                    592:        rm -f config.log
                    593:        ( cat config.h.pre; \
                    594:          echo; \
1.390   ! kristaps  595:          if $(CC) $(CFLAGS) -Werror -o test-fgetln test-fgetln.c >> config.log 2>&1; then \
        !           596:                echo '#define HAVE_FGETLN'; \
        !           597:                rm test-fgetln; \
        !           598:          fi; \
1.362     kristaps  599:          if $(CC) $(CFLAGS) -Werror -o test-strptime test-strptime.c >> config.log 2>&1; then \
                    600:                echo '#define HAVE_STRPTIME'; \
                    601:                rm test-strptime; \
                    602:          fi; \
                    603:          if $(CC) $(CFLAGS) -Werror -o test-getsubopt test-getsubopt.c >> config.log 2>&1; then \
                    604:                echo '#define HAVE_GETSUBOPT'; \
                    605:                rm test-getsubopt; \
                    606:          fi; \
1.319     kristaps  607:          if $(CC) $(CFLAGS) -Werror -o test-strlcat test-strlcat.c >> config.log 2>&1; then \
                    608:                echo '#define HAVE_STRLCAT'; \
                    609:                rm test-strlcat; \
1.347     kristaps  610:          fi; \
                    611:          if $(CC) $(CFLAGS) -Werror -o test-mmap test-mmap.c >> config.log 2>&1; then \
                    612:                echo '#define HAVE_MMAP'; \
                    613:                rm test-mmap; \
1.319     kristaps  614:          fi; \
                    615:          if $(CC) $(CFLAGS) -Werror -o test-strlcpy test-strlcpy.c >> config.log 2>&1; then \
                    616:                echo '#define HAVE_STRLCPY'; \
                    617:                rm test-strlcpy; \
                    618:          fi; \
                    619:          echo; \
                    620:          cat config.h.post \
                    621:        ) > $@
1.60      kristaps  622:
1.319     kristaps  623: .h.h.html:
                    624:        highlight -I $< >$@
1.168     kristaps  625:
1.356     schwarze  626: .1.1.txt .3.3.txt .7.7.txt .8.8.txt:
1.319     kristaps  627:        ./mandoc -Tascii -Wall,stop $< | col -b >$@
1.168     kristaps  628:
1.356     schwarze  629: .1.1.html .3.3.html .7.7.html .8.8.html:
1.319     kristaps  630:        ./mandoc -Thtml -Wall,stop -Ostyle=style.css,man=%N.%S.html,includes=%I.html $< >$@
1.277     kristaps  631:
1.356     schwarze  632: .1.1.ps .3.3.ps .7.7.ps .8.8.ps:
1.319     kristaps  633:        ./mandoc -Tps -Wall,stop $< >$@
1.297     kristaps  634:
1.356     schwarze  635: .1.1.xhtml .3.3.xhtml .7.7.xhtml .8.8.xhtml:
1.319     kristaps  636:        ./mandoc -Txhtml -Wall,stop -Ostyle=style.css,man=%N.%S.xhtml,includes=%I.html $< >$@
1.290     kristaps  637:
1.356     schwarze  638: .1.1.pdf .3.3.pdf .7.7.pdf .8.8.pdf:
1.319     kristaps  639:        ./mandoc -Tpdf -Wall,stop $< >$@
1.212     kristaps  640:
1.319     kristaps  641: .sgml.html:
                    642:        validate --warn $<
                    643:        sed -e "s!@VERSION@!$(VERSION)!" -e "s!@VDATE@!$(VDATE)!" $< >$@

CVSweb