Home | History | Annotate | Line # | Download | only in dist
Makefile revision 1.3.2.1
      1  1.3.2.1    bouyer # Id: Makefile,v 1.504 2017/02/18 15:29:39 schwarze Exp 
      2      1.2  christos #
      3      1.2  christos # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps (at] bsd.lv>
      4  1.3.2.1    bouyer # Copyright (c) 2011, 2013-2017 Ingo Schwarze <schwarze (at] openbsd.org>
      5      1.2  christos #
      6      1.2  christos # Permission to use, copy, modify, and distribute this software for any
      7      1.2  christos # purpose with or without fee is hereby granted, provided that the above
      8      1.2  christos # copyright notice and this permission notice appear in all copies.
      9      1.2  christos #
     10      1.2  christos # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
     11      1.2  christos # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     12      1.2  christos # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
     13      1.2  christos # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     14      1.2  christos # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     15      1.2  christos # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
     16      1.2  christos # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     17      1.2  christos 
     18  1.3.2.1    bouyer VERSION = 1.14.1
     19      1.2  christos 
     20      1.2  christos # === LIST OF FILES ====================================================
     21      1.2  christos 
     22  1.3.2.1    bouyer TESTSRCS	 = test-be32toh.c \
     23  1.3.2.1    bouyer 		   test-cmsg.c \
     24  1.3.2.1    bouyer 		   test-dirent-namlen.c \
     25  1.3.2.1    bouyer 		   test-EFTYPE.c \
     26      1.3  christos 		   test-err.c \
     27      1.2  christos 		   test-fts.c \
     28      1.3  christos 		   test-getline.c \
     29      1.2  christos 		   test-getsubopt.c \
     30      1.3  christos 		   test-isblank.c \
     31      1.3  christos 		   test-mkdtemp.c \
     32  1.3.2.1    bouyer 		   test-nanosleep.c \
     33  1.3.2.1    bouyer 		   test-ntohl.c \
     34  1.3.2.1    bouyer 		   test-O_DIRECTORY.c \
     35      1.2  christos 		   test-ohash.c \
     36  1.3.2.1    bouyer 		   test-PATH_MAX.c \
     37      1.3  christos 		   test-pledge.c \
     38      1.3  christos 		   test-progname.c \
     39  1.3.2.1    bouyer 		   test-recvmsg.c \
     40      1.2  christos 		   test-reallocarray.c \
     41      1.3  christos 		   test-rewb-bsd.c \
     42      1.3  christos 		   test-rewb-sysv.c \
     43      1.3  christos 		   test-sandbox_init.c \
     44      1.2  christos 		   test-strcasestr.c \
     45      1.3  christos 		   test-stringlist.c \
     46      1.2  christos 		   test-strlcat.c \
     47      1.2  christos 		   test-strlcpy.c \
     48      1.2  christos 		   test-strptime.c \
     49      1.2  christos 		   test-strsep.c \
     50      1.2  christos 		   test-strtonum.c \
     51      1.3  christos 		   test-vasprintf.c \
     52      1.2  christos 		   test-wchar.c
     53      1.2  christos 
     54      1.2  christos SRCS		 = att.c \
     55  1.3.2.1    bouyer 		   catman.c \
     56      1.2  christos 		   cgi.c \
     57      1.2  christos 		   chars.c \
     58      1.3  christos 		   compat_err.c \
     59      1.2  christos 		   compat_fts.c \
     60      1.3  christos 		   compat_getline.c \
     61      1.2  christos 		   compat_getsubopt.c \
     62      1.3  christos 		   compat_isblank.c \
     63      1.3  christos 		   compat_mkdtemp.c \
     64      1.2  christos 		   compat_ohash.c \
     65      1.3  christos 		   compat_progname.c \
     66      1.2  christos 		   compat_reallocarray.c \
     67      1.2  christos 		   compat_strcasestr.c \
     68      1.3  christos 		   compat_stringlist.c \
     69      1.2  christos 		   compat_strlcat.c \
     70      1.2  christos 		   compat_strlcpy.c \
     71      1.2  christos 		   compat_strsep.c \
     72      1.2  christos 		   compat_strtonum.c \
     73      1.3  christos 		   compat_vasprintf.c \
     74  1.3.2.1    bouyer 		   dba.c \
     75  1.3.2.1    bouyer 		   dba_array.c \
     76  1.3.2.1    bouyer 		   dba_read.c \
     77  1.3.2.1    bouyer 		   dba_write.c \
     78  1.3.2.1    bouyer 		   dbm.c \
     79  1.3.2.1    bouyer 		   dbm_map.c \
     80      1.2  christos 		   demandoc.c \
     81      1.2  christos 		   eqn.c \
     82      1.2  christos 		   eqn_html.c \
     83      1.2  christos 		   eqn_term.c \
     84      1.2  christos 		   html.c \
     85      1.2  christos 		   lib.c \
     86      1.2  christos 		   main.c \
     87      1.2  christos 		   man.c \
     88      1.2  christos 		   man_hash.c \
     89      1.2  christos 		   man_html.c \
     90      1.2  christos 		   man_macro.c \
     91      1.2  christos 		   man_term.c \
     92      1.2  christos 		   man_validate.c \
     93      1.2  christos 		   mandoc.c \
     94      1.2  christos 		   mandoc_aux.c \
     95      1.3  christos 		   mandoc_ohash.c \
     96  1.3.2.1    bouyer 		   mandocd.c \
     97      1.2  christos 		   mandocdb.c \
     98      1.2  christos 		   manpage.c \
     99      1.2  christos 		   manpath.c \
    100      1.2  christos 		   mansearch.c \
    101      1.2  christos 		   mdoc.c \
    102      1.2  christos 		   mdoc_argv.c \
    103      1.2  christos 		   mdoc_hash.c \
    104      1.2  christos 		   mdoc_html.c \
    105      1.2  christos 		   mdoc_macro.c \
    106      1.2  christos 		   mdoc_man.c \
    107      1.3  christos 		   mdoc_state.c \
    108      1.2  christos 		   mdoc_term.c \
    109      1.2  christos 		   mdoc_validate.c \
    110      1.2  christos 		   msec.c \
    111      1.2  christos 		   out.c \
    112      1.2  christos 		   preconv.c \
    113      1.2  christos 		   read.c \
    114      1.2  christos 		   roff.c \
    115      1.3  christos 		   soelim.c \
    116      1.2  christos 		   st.c \
    117      1.3  christos 		   tag.c \
    118      1.2  christos 		   tbl.c \
    119      1.2  christos 		   tbl_data.c \
    120      1.2  christos 		   tbl_html.c \
    121      1.2  christos 		   tbl_layout.c \
    122      1.2  christos 		   tbl_opts.c \
    123      1.2  christos 		   tbl_term.c \
    124      1.2  christos 		   term.c \
    125      1.2  christos 		   term_ascii.c \
    126      1.2  christos 		   term_ps.c \
    127      1.3  christos 		   tree.c
    128      1.2  christos 
    129      1.2  christos DISTFILES	 = INSTALL \
    130      1.2  christos 		   LICENSE \
    131      1.2  christos 		   Makefile \
    132      1.2  christos 		   Makefile.depend \
    133      1.2  christos 		   NEWS \
    134      1.2  christos 		   TODO \
    135      1.2  christos 		   apropos.1 \
    136  1.3.2.1    bouyer 		   catman.8 \
    137      1.2  christos 		   cgi.h.example \
    138      1.2  christos 		   compat_fts.h \
    139      1.2  christos 		   compat_ohash.h \
    140      1.3  christos 		   compat_stringlist.h \
    141      1.2  christos 		   configure \
    142      1.2  christos 		   configure.local.example \
    143  1.3.2.1    bouyer 		   dba.h \
    144  1.3.2.1    bouyer 		   dba_array.h \
    145  1.3.2.1    bouyer 		   dba_write.h \
    146  1.3.2.1    bouyer 		   dbm.h \
    147  1.3.2.1    bouyer 		   dbm_map.h \
    148      1.2  christos 		   demandoc.1 \
    149      1.2  christos 		   eqn.7 \
    150      1.2  christos 		   gmdiff \
    151      1.2  christos 		   html.h \
    152      1.2  christos 		   lib.in \
    153      1.2  christos 		   libman.h \
    154      1.2  christos 		   libmandoc.h \
    155      1.2  christos 		   libmdoc.h \
    156      1.2  christos 		   libroff.h \
    157      1.2  christos 		   main.h \
    158      1.2  christos 		   makewhatis.8 \
    159      1.2  christos 		   man.1 \
    160      1.2  christos 		   man.7 \
    161      1.3  christos 		   man.cgi.3 \
    162      1.2  christos 		   man.cgi.8 \
    163      1.3  christos 		   man.conf.5 \
    164      1.2  christos 		   man.h \
    165  1.3.2.1    bouyer 		   man.options.1 \
    166      1.3  christos 		   manconf.h \
    167      1.2  christos 		   mandoc.1 \
    168      1.2  christos 		   mandoc.3 \
    169      1.3  christos 		   mandoc.css \
    170      1.2  christos 		   mandoc.db.5 \
    171      1.2  christos 		   mandoc.h \
    172      1.2  christos 		   mandoc_aux.h \
    173      1.2  christos 		   mandoc_char.7 \
    174      1.2  christos 		   mandoc_escape.3 \
    175      1.2  christos 		   mandoc_headers.3 \
    176      1.2  christos 		   mandoc_html.3 \
    177      1.2  christos 		   mandoc_malloc.3 \
    178      1.3  christos 		   mandoc_ohash.h \
    179  1.3.2.1    bouyer 		   mandocd.8 \
    180      1.2  christos 		   mansearch.3 \
    181      1.2  christos 		   mansearch.h \
    182      1.2  christos 		   mchars_alloc.3 \
    183      1.2  christos 		   mdoc.7 \
    184      1.2  christos 		   mdoc.h \
    185      1.2  christos 		   msec.in \
    186      1.2  christos 		   out.h \
    187      1.2  christos 		   predefs.in \
    188      1.2  christos 		   roff.7 \
    189      1.3  christos 		   roff.h \
    190      1.3  christos 		   roff_int.h \
    191      1.3  christos 		   soelim.1 \
    192      1.2  christos 		   st.in \
    193      1.3  christos 		   tag.h \
    194      1.2  christos 		   tbl.3 \
    195      1.2  christos 		   tbl.7 \
    196      1.2  christos 		   term.h \
    197      1.3  christos 		   $(SRCS) \
    198      1.3  christos 		   $(TESTSRCS)
    199      1.2  christos 
    200      1.2  christos LIBMAN_OBJS	 = man.o \
    201      1.2  christos 		   man_hash.o \
    202      1.2  christos 		   man_macro.o \
    203      1.2  christos 		   man_validate.o
    204      1.2  christos 
    205      1.2  christos LIBMDOC_OBJS	 = att.o \
    206      1.2  christos 		   lib.o \
    207      1.2  christos 		   mdoc.o \
    208      1.2  christos 		   mdoc_argv.o \
    209      1.2  christos 		   mdoc_hash.o \
    210      1.2  christos 		   mdoc_macro.o \
    211      1.3  christos 		   mdoc_state.o \
    212      1.2  christos 		   mdoc_validate.o \
    213      1.2  christos 		   st.o
    214      1.2  christos 
    215      1.2  christos LIBROFF_OBJS	 = eqn.o \
    216      1.2  christos 		   roff.o \
    217      1.2  christos 		   tbl.o \
    218      1.2  christos 		   tbl_data.o \
    219      1.2  christos 		   tbl_layout.o \
    220      1.2  christos 		   tbl_opts.o
    221      1.2  christos 
    222      1.2  christos LIBMANDOC_OBJS	 = $(LIBMAN_OBJS) \
    223      1.2  christos 		   $(LIBMDOC_OBJS) \
    224      1.2  christos 		   $(LIBROFF_OBJS) \
    225      1.2  christos 		   chars.o \
    226      1.2  christos 		   mandoc.o \
    227      1.2  christos 		   mandoc_aux.o \
    228      1.3  christos 		   mandoc_ohash.o \
    229      1.2  christos 		   msec.o \
    230      1.2  christos 		   preconv.o \
    231      1.2  christos 		   read.o
    232      1.2  christos 
    233      1.3  christos COMPAT_OBJS	 = compat_err.o \
    234      1.2  christos 		   compat_fts.o \
    235      1.3  christos 		   compat_getline.o \
    236      1.2  christos 		   compat_getsubopt.o \
    237      1.3  christos 		   compat_isblank.o \
    238      1.3  christos 		   compat_mkdtemp.o \
    239      1.2  christos 		   compat_ohash.o \
    240      1.3  christos 		   compat_progname.o \
    241      1.2  christos 		   compat_reallocarray.o \
    242      1.2  christos 		   compat_strcasestr.o \
    243      1.2  christos 		   compat_strlcat.o \
    244      1.2  christos 		   compat_strlcpy.o \
    245      1.2  christos 		   compat_strsep.o \
    246      1.3  christos 		   compat_strtonum.o \
    247      1.3  christos 		   compat_vasprintf.o
    248      1.2  christos 
    249      1.2  christos MANDOC_HTML_OBJS = eqn_html.o \
    250      1.2  christos 		   html.o \
    251      1.2  christos 		   man_html.o \
    252      1.2  christos 		   mdoc_html.o \
    253      1.2  christos 		   tbl_html.o
    254      1.2  christos 
    255      1.2  christos MANDOC_MAN_OBJS  = mdoc_man.o
    256      1.2  christos 
    257      1.2  christos MANDOC_TERM_OBJS = eqn_term.o \
    258      1.2  christos 		   man_term.o \
    259      1.2  christos 		   mdoc_term.o \
    260      1.2  christos 		   term.o \
    261      1.2  christos 		   term_ascii.o \
    262      1.2  christos 		   term_ps.o \
    263      1.2  christos 		   tbl_term.o
    264      1.2  christos 
    265  1.3.2.1    bouyer DBM_OBJS	 = dbm.o \
    266  1.3.2.1    bouyer 		   dbm_map.o \
    267  1.3.2.1    bouyer 		   mansearch.o
    268  1.3.2.1    bouyer 
    269  1.3.2.1    bouyer DBA_OBJS	 = dba.o \
    270  1.3.2.1    bouyer 		   dba_array.o \
    271  1.3.2.1    bouyer 		   dba_read.o \
    272  1.3.2.1    bouyer 		   dba_write.o \
    273  1.3.2.1    bouyer 		   mandocdb.o
    274  1.3.2.1    bouyer 
    275  1.3.2.1    bouyer MAIN_OBJS	 = $(MANDOC_HTML_OBJS) \
    276      1.2  christos 		   $(MANDOC_MAN_OBJS) \
    277      1.2  christos 		   $(MANDOC_TERM_OBJS) \
    278  1.3.2.1    bouyer 		   $(DBM_OBJS) \
    279  1.3.2.1    bouyer 		   $(DBA_OBJS) \
    280      1.2  christos 		   main.o \
    281      1.2  christos 		   manpath.o \
    282      1.2  christos 		   out.o \
    283      1.3  christos 		   tag.o \
    284      1.2  christos 		   tree.o
    285      1.2  christos 
    286      1.2  christos CGI_OBJS	 = $(MANDOC_HTML_OBJS) \
    287  1.3.2.1    bouyer 		   $(DBM_OBJS) \
    288      1.2  christos 		   cgi.o \
    289      1.2  christos 		   out.o
    290      1.2  christos 
    291  1.3.2.1    bouyer MANDOCD_OBJS	 = $(MANDOC_HTML_OBJS) \
    292  1.3.2.1    bouyer 		   $(MANDOC_TERM_OBJS) \
    293  1.3.2.1    bouyer 		   mandocd.o \
    294  1.3.2.1    bouyer 		   out.o \
    295  1.3.2.1    bouyer 		   tag.o
    296  1.3.2.1    bouyer 
    297  1.3.2.1    bouyer MANPAGE_OBJS	 = $(DBM_OBJS) \
    298  1.3.2.1    bouyer 		   manpage.o \
    299  1.3.2.1    bouyer 		   manpath.o
    300      1.2  christos 
    301      1.2  christos DEMANDOC_OBJS	 = demandoc.o
    302      1.2  christos 
    303      1.3  christos SOELIM_OBJS	 = soelim.o \
    304      1.3  christos 		   compat_err.o \
    305      1.3  christos 		   compat_getline.o \
    306      1.3  christos 		   compat_progname.o \
    307      1.3  christos 		   compat_reallocarray.o \
    308      1.3  christos 		   compat_stringlist.o
    309      1.3  christos 
    310      1.2  christos WWW_MANS	 = apropos.1.html \
    311      1.2  christos 		   demandoc.1.html \
    312      1.2  christos 		   man.1.html \
    313      1.2  christos 		   mandoc.1.html \
    314      1.3  christos 		   soelim.1.html \
    315  1.3.2.1    bouyer 		   man.cgi.3.html \
    316      1.2  christos 		   mandoc.3.html \
    317      1.2  christos 		   mandoc_escape.3.html \
    318      1.2  christos 		   mandoc_headers.3.html \
    319      1.2  christos 		   mandoc_html.3.html \
    320      1.2  christos 		   mandoc_malloc.3.html \
    321      1.2  christos 		   mansearch.3.html \
    322      1.2  christos 		   mchars_alloc.3.html \
    323      1.2  christos 		   tbl.3.html \
    324      1.3  christos 		   man.conf.5.html \
    325      1.2  christos 		   mandoc.db.5.html \
    326      1.2  christos 		   eqn.7.html \
    327      1.2  christos 		   man.7.html \
    328      1.2  christos 		   mandoc_char.7.html \
    329  1.3.2.1    bouyer 		   mandocd.8.html \
    330      1.2  christos 		   mdoc.7.html \
    331      1.2  christos 		   roff.7.html \
    332      1.2  christos 		   tbl.7.html \
    333  1.3.2.1    bouyer 		   catman.8.html \
    334      1.2  christos 		   makewhatis.8.html \
    335      1.2  christos 		   man.cgi.8.html \
    336      1.2  christos 		   man.h.html \
    337      1.3  christos 		   manconf.h.html \
    338      1.2  christos 		   mandoc.h.html \
    339      1.2  christos 		   mandoc_aux.h.html \
    340      1.2  christos 		   mansearch.h.html \
    341      1.3  christos 		   mdoc.h.html \
    342      1.3  christos 		   roff.h.html
    343      1.2  christos 
    344      1.2  christos WWW_OBJS	 = mdocml.tar.gz \
    345      1.2  christos 		   mdocml.sha256
    346      1.2  christos 
    347      1.2  christos # === USER CONFIGURATION ===============================================
    348      1.2  christos 
    349      1.2  christos -include Makefile.local
    350      1.2  christos 
    351      1.2  christos # === DEPENDENCY HANDLING ==============================================
    352      1.2  christos 
    353  1.3.2.1    bouyer all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local
    354      1.2  christos 
    355      1.2  christos install: base-install $(INSTALL_TARGETS)
    356      1.2  christos 
    357      1.2  christos www: $(WWW_OBJS) $(WWW_MANS)
    358      1.2  christos 
    359      1.2  christos $(WWW_MANS): mandoc
    360      1.2  christos 
    361  1.3.2.1    bouyer .PHONY: base-install cgi-install install www-install
    362      1.2  christos .PHONY: clean distclean depend
    363      1.1     joerg 
    364      1.2  christos include Makefile.depend
    365      1.1     joerg 
    366      1.2  christos # === TARGETS CONTAINING SHELL COMMANDS ================================
    367      1.1     joerg 
    368      1.2  christos distclean: clean
    369      1.2  christos 	rm -f Makefile.local config.h config.h.old config.log config.log.old
    370      1.1     joerg 
    371      1.1     joerg clean:
    372      1.2  christos 	rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS)
    373  1.3.2.1    bouyer 	rm -f mandoc $(MAIN_OBJS)
    374      1.2  christos 	rm -f man.cgi $(CGI_OBJS)
    375  1.3.2.1    bouyer 	rm -f mandocd catman $(MANDOCD_OBJS)
    376      1.2  christos 	rm -f manpage $(MANPAGE_OBJS)
    377      1.2  christos 	rm -f demandoc $(DEMANDOC_OBJS)
    378      1.3  christos 	rm -f soelim $(SOELIM_OBJS)
    379      1.2  christos 	rm -f $(WWW_MANS) $(WWW_OBJS)
    380      1.2  christos 	rm -rf *.dSYM
    381      1.2  christos 
    382  1.3.2.1    bouyer base-install: mandoc demandoc soelim
    383      1.2  christos 	mkdir -p $(DESTDIR)$(BINDIR)
    384  1.3.2.1    bouyer 	mkdir -p $(DESTDIR)$(SBINDIR)
    385      1.2  christos 	mkdir -p $(DESTDIR)$(MANDIR)/man1
    386      1.3  christos 	mkdir -p $(DESTDIR)$(MANDIR)/man5
    387      1.2  christos 	mkdir -p $(DESTDIR)$(MANDIR)/man7
    388  1.3.2.1    bouyer 	mkdir -p $(DESTDIR)$(MANDIR)/man8
    389      1.2  christos 	$(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR)
    390      1.3  christos 	$(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
    391  1.3.2.1    bouyer 	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN)
    392  1.3.2.1    bouyer 	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
    393  1.3.2.1    bouyer 	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
    394  1.3.2.1    bouyer 	$(LN) $(DESTDIR)$(BINDIR)/mandoc \
    395  1.3.2.1    bouyer 		$(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
    396      1.2  christos 	$(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1
    397      1.3  christos 	$(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
    398      1.2  christos 	$(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
    399      1.2  christos 	$(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
    400  1.3.2.1    bouyer 	$(LN) $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
    401      1.2  christos 		$(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
    402  1.3.2.1    bouyer 	$(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5
    403      1.2  christos 	$(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5
    404  1.3.2.1    bouyer 	$(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7
    405  1.3.2.1    bouyer 	$(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7
    406  1.3.2.1    bouyer 	$(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7
    407  1.3.2.1    bouyer 	$(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7
    408  1.3.2.1    bouyer 	$(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7
    409  1.3.2.1    bouyer 	$(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
    410      1.2  christos 	$(INSTALL_MAN) makewhatis.8 \
    411      1.2  christos 		$(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
    412      1.2  christos 
    413  1.3.2.1    bouyer lib-install: libmandoc.a
    414  1.3.2.1    bouyer 	mkdir -p $(DESTDIR)$(LIBDIR)
    415  1.3.2.1    bouyer 	mkdir -p $(DESTDIR)$(INCLUDEDIR)
    416  1.3.2.1    bouyer 	mkdir -p $(DESTDIR)$(MANDIR)/man3
    417  1.3.2.1    bouyer 	$(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
    418  1.3.2.1    bouyer 	$(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \
    419  1.3.2.1    bouyer 		$(DESTDIR)$(INCLUDEDIR)
    420  1.3.2.1    bouyer 	$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
    421  1.3.2.1    bouyer 		mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
    422  1.3.2.1    bouyer 
    423  1.3.2.1    bouyer cgi-install: man.cgi
    424      1.2  christos 	mkdir -p $(DESTDIR)$(CGIBINDIR)
    425      1.2  christos 	mkdir -p $(DESTDIR)$(HTDOCDIR)
    426      1.2  christos 	$(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR)
    427      1.3  christos 	$(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR)
    428      1.2  christos 
    429  1.3.2.1    bouyer catman-install: mandocd catman
    430  1.3.2.1    bouyer 	mkdir -p $(DESTDIR)$(SBINDIR)
    431  1.3.2.1    bouyer 	mkdir -p $(DESTDIR)$(MANDIR)/man8
    432  1.3.2.1    bouyer 	$(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR)
    433  1.3.2.1    bouyer 	$(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN)
    434  1.3.2.1    bouyer 	$(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8
    435  1.3.2.1    bouyer 	$(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8
    436  1.3.2.1    bouyer 
    437  1.3.2.1    bouyer uninstall:
    438  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(BINDIR)/mandoc
    439  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(BINDIR)/demandoc
    440  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
    441  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN)
    442  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
    443  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
    444  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
    445  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1
    446  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1
    447  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
    448  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
    449  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
    450  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
    451  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5
    452  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5
    453  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7
    454  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7
    455  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7
    456  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7
    457  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7
    458  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7
    459  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
    460  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi
    461  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css
    462  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(SBINDIR)/mandocd
    463  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN)
    464  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8
    465  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8
    466  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a
    467  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3
    468  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3
    469  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3
    470  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3
    471  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3
    472  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3
    473  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(INCLUDEDIR)/man.h
    474  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h
    475  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h
    476  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h
    477  1.3.2.1    bouyer 	rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h
    478  1.3.2.1    bouyer 	rmdir $(DESTDIR)$(INCLUDEDIR)
    479  1.3.2.1    bouyer 
    480  1.3.2.1    bouyer regress: all
    481  1.3.2.1    bouyer 	cd regress && ./regress.pl
    482  1.3.2.1    bouyer 
    483  1.3.2.1    bouyer regress-clean:
    484  1.3.2.1    bouyer 	cd regress && ./regress.pl . clean
    485  1.3.2.1    bouyer 
    486  1.3.2.1    bouyer Makefile.local config.h: configure $(TESTSRCS)
    487      1.2  christos 	@echo "$@ is out of date; please run ./configure"
    488      1.2  christos 	@exit 1
    489      1.2  christos 
    490      1.2  christos libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
    491      1.3  christos 	ar rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
    492      1.2  christos 
    493      1.2  christos mandoc: $(MAIN_OBJS) libmandoc.a
    494      1.3  christos 	$(CC) -o $@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD)
    495      1.2  christos 
    496      1.2  christos manpage: $(MANPAGE_OBJS) libmandoc.a
    497      1.3  christos 	$(CC) -o $@ $(LDFLAGS) $(MANPAGE_OBJS) libmandoc.a $(LDADD)
    498      1.2  christos 
    499      1.2  christos man.cgi: $(CGI_OBJS) libmandoc.a
    500      1.3  christos 	$(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD)
    501      1.2  christos 
    502  1.3.2.1    bouyer mandocd: $(MANDOCD_OBJS) libmandoc.a
    503  1.3.2.1    bouyer 	$(CC) -o $@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD)
    504  1.3.2.1    bouyer 
    505  1.3.2.1    bouyer catman: catman.o libmandoc.a
    506  1.3.2.1    bouyer 	$(CC) -o $@ $(LDFLAGS) catman.o libmandoc.a $(LDADD)
    507  1.3.2.1    bouyer 
    508      1.2  christos demandoc: $(DEMANDOC_OBJS) libmandoc.a
    509      1.3  christos 	$(CC) -o $@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD)
    510      1.3  christos 
    511      1.3  christos soelim: $(SOELIM_OBJS)
    512      1.3  christos 	$(CC) -o $@ $(LDFLAGS) $(SOELIM_OBJS)
    513      1.2  christos 
    514      1.2  christos # --- maintainer targets ---
    515      1.2  christos 
    516      1.2  christos www-install: www
    517      1.2  christos 	mkdir -p $(HTDOCDIR)/snapshots
    518      1.3  christos 	$(INSTALL_DATA) $(WWW_MANS) mandoc.css $(HTDOCDIR)
    519      1.2  christos 	$(INSTALL_DATA) $(WWW_OBJS) $(HTDOCDIR)/snapshots
    520      1.2  christos 	$(INSTALL_DATA) mdocml.tar.gz \
    521      1.2  christos 		$(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz
    522      1.2  christos 	$(INSTALL_DATA) mdocml.sha256 \
    523      1.2  christos 		$(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256
    524      1.2  christos 
    525      1.2  christos depend: config.h
    526      1.2  christos 	mkdep -f Makefile.depend $(CFLAGS) $(SRCS)
    527      1.2  christos 	perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \
    528      1.2  christos 		s|\\\n||g; s|  +| |g; s| $$||mg; print;' \
    529      1.2  christos 		Makefile.depend > Makefile.tmp
    530      1.2  christos 	mv Makefile.tmp Makefile.depend
    531      1.2  christos 
    532  1.3.2.1    bouyer regress-distclean:
    533  1.3.2.1    bouyer 	@find regress \
    534  1.3.2.1    bouyer 		-name '.#*' -o \
    535  1.3.2.1    bouyer 		-name '*.orig' -o \
    536  1.3.2.1    bouyer 		-name '*.rej' -o \
    537  1.3.2.1    bouyer 		-name '*.core' \
    538  1.3.2.1    bouyer 		-exec rm -i {} \;
    539  1.3.2.1    bouyer 
    540  1.3.2.1    bouyer regress-distcheck:
    541  1.3.2.1    bouyer 	@find regress ! -type d ! -type f
    542  1.3.2.1    bouyer 	@find regress -type f \
    543  1.3.2.1    bouyer 		! -path '*/CVS/*' \
    544  1.3.2.1    bouyer 		! -name Makefile \
    545  1.3.2.1    bouyer 		! -name Makefile.inc \
    546  1.3.2.1    bouyer 		! -name '*.in' \
    547  1.3.2.1    bouyer 		! -name '*.out_ascii' \
    548  1.3.2.1    bouyer 		! -name '*.out_utf8' \
    549  1.3.2.1    bouyer 		! -name '*.out_html' \
    550  1.3.2.1    bouyer 		! -name '*.out_lint' \
    551  1.3.2.1    bouyer 		! -path regress/regress.pl \
    552  1.3.2.1    bouyer 		! -path regress/regress.pl.1
    553  1.3.2.1    bouyer 
    554      1.3  christos dist: mdocml.sha256
    555      1.3  christos 
    556      1.2  christos mdocml.sha256: mdocml.tar.gz
    557      1.2  christos 	sha256 mdocml.tar.gz > $@
    558      1.2  christos 
    559      1.2  christos mdocml.tar.gz: $(DISTFILES)
    560  1.3.2.1    bouyer 	ls regress/*/*/*.mandoc_* && exit 1 || true
    561      1.2  christos 	mkdir -p .dist/mdocml-$(VERSION)/
    562      1.2  christos 	$(INSTALL) -m 0644 $(DISTFILES) .dist/mdocml-$(VERSION)
    563  1.3.2.1    bouyer 	cp -pR regress .dist/mdocml-$(VERSION)
    564  1.3.2.1    bouyer 	find .dist/mdocml-$(VERSION)/regress \
    565  1.3.2.1    bouyer 	    -type d -name CVS -print0 | xargs -0 rm -rf
    566      1.2  christos 	chmod 755 .dist/mdocml-$(VERSION)/configure
    567      1.2  christos 	( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) )
    568      1.1     joerg 	rm -rf .dist/
    569      1.1     joerg 
    570      1.2  christos # === SUFFIX RULES =====================================================
    571      1.1     joerg 
    572      1.2  christos .SUFFIXES:	 .1       .3       .5       .7       .8       .h
    573      1.2  christos .SUFFIXES:	 .1.html  .3.html  .5.html  .7.html  .8.html  .h.html
    574      1.1     joerg 
    575      1.2  christos .h.h.html:
    576      1.2  christos 	highlight -I $< > $@
    577      1.1     joerg 
    578      1.2  christos .1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: mandoc
    579      1.2  christos 	./mandoc -Thtml -Wall,stop \
    580      1.3  christos 		-Ostyle=mandoc.css,man=%N.%S.html,includes=%I.html $< > $@
    581