Home | History | Annotate | Line # | Download | only in dist
Makefile revision 1.2.2.1
      1  1.2.2.1  pgoyette # Id: Makefile,v 1.488 2016/07/12 05:18:38 kristaps Exp 
      2      1.2  christos #
      3      1.2  christos # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps (at] bsd.lv>
      4  1.2.2.1  pgoyette # Copyright (c) 2011, 2013-2016 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.2.2.1  pgoyette VERSION = 1.13.4
     19      1.2  christos 
     20      1.2  christos # === LIST OF FILES ====================================================
     21      1.2  christos 
     22      1.2  christos TESTSRCS	 = test-dirent-namlen.c \
     23  1.2.2.1  pgoyette 		   test-err.c \
     24      1.2  christos 		   test-fts.c \
     25  1.2.2.1  pgoyette 		   test-getline.c \
     26      1.2  christos 		   test-getsubopt.c \
     27  1.2.2.1  pgoyette 		   test-isblank.c \
     28  1.2.2.1  pgoyette 		   test-mkdtemp.c \
     29      1.2  christos 		   test-mmap.c \
     30      1.2  christos 		   test-ohash.c \
     31  1.2.2.1  pgoyette 		   test-pledge.c \
     32  1.2.2.1  pgoyette 		   test-progname.c \
     33      1.2  christos 		   test-reallocarray.c \
     34  1.2.2.1  pgoyette 		   test-rewb-bsd.c \
     35  1.2.2.1  pgoyette 		   test-rewb-sysv.c \
     36  1.2.2.1  pgoyette 		   test-sandbox_init.c \
     37      1.2  christos 		   test-sqlite3.c \
     38      1.2  christos 		   test-sqlite3_errstr.c \
     39      1.2  christos 		   test-strcasestr.c \
     40  1.2.2.1  pgoyette 		   test-stringlist.c \
     41      1.2  christos 		   test-strlcat.c \
     42      1.2  christos 		   test-strlcpy.c \
     43      1.2  christos 		   test-strptime.c \
     44      1.2  christos 		   test-strsep.c \
     45      1.2  christos 		   test-strtonum.c \
     46  1.2.2.1  pgoyette 		   test-vasprintf.c \
     47      1.2  christos 		   test-wchar.c
     48      1.2  christos 
     49      1.2  christos SRCS		 = att.c \
     50      1.2  christos 		   cgi.c \
     51      1.2  christos 		   chars.c \
     52  1.2.2.1  pgoyette 		   compat_err.c \
     53      1.2  christos 		   compat_fts.c \
     54  1.2.2.1  pgoyette 		   compat_getline.c \
     55      1.2  christos 		   compat_getsubopt.c \
     56  1.2.2.1  pgoyette 		   compat_isblank.c \
     57  1.2.2.1  pgoyette 		   compat_mkdtemp.c \
     58      1.2  christos 		   compat_ohash.c \
     59  1.2.2.1  pgoyette 		   compat_progname.c \
     60      1.2  christos 		   compat_reallocarray.c \
     61      1.2  christos 		   compat_sqlite3_errstr.c \
     62      1.2  christos 		   compat_strcasestr.c \
     63  1.2.2.1  pgoyette 		   compat_stringlist.c \
     64      1.2  christos 		   compat_strlcat.c \
     65      1.2  christos 		   compat_strlcpy.c \
     66      1.2  christos 		   compat_strsep.c \
     67      1.2  christos 		   compat_strtonum.c \
     68  1.2.2.1  pgoyette 		   compat_vasprintf.c \
     69      1.2  christos 		   demandoc.c \
     70      1.2  christos 		   eqn.c \
     71      1.2  christos 		   eqn_html.c \
     72      1.2  christos 		   eqn_term.c \
     73      1.2  christos 		   html.c \
     74      1.2  christos 		   lib.c \
     75      1.2  christos 		   main.c \
     76      1.2  christos 		   man.c \
     77      1.2  christos 		   man_hash.c \
     78      1.2  christos 		   man_html.c \
     79      1.2  christos 		   man_macro.c \
     80      1.2  christos 		   man_term.c \
     81      1.2  christos 		   man_validate.c \
     82      1.2  christos 		   mandoc.c \
     83      1.2  christos 		   mandoc_aux.c \
     84  1.2.2.1  pgoyette 		   mandoc_ohash.c \
     85      1.2  christos 		   mandocdb.c \
     86      1.2  christos 		   manpage.c \
     87      1.2  christos 		   manpath.c \
     88      1.2  christos 		   mansearch.c \
     89      1.2  christos 		   mansearch_const.c \
     90      1.2  christos 		   mdoc.c \
     91      1.2  christos 		   mdoc_argv.c \
     92      1.2  christos 		   mdoc_hash.c \
     93      1.2  christos 		   mdoc_html.c \
     94      1.2  christos 		   mdoc_macro.c \
     95      1.2  christos 		   mdoc_man.c \
     96  1.2.2.1  pgoyette 		   mdoc_state.c \
     97      1.2  christos 		   mdoc_term.c \
     98      1.2  christos 		   mdoc_validate.c \
     99      1.2  christos 		   msec.c \
    100      1.2  christos 		   out.c \
    101      1.2  christos 		   preconv.c \
    102      1.2  christos 		   read.c \
    103      1.2  christos 		   roff.c \
    104  1.2.2.1  pgoyette 		   soelim.c \
    105      1.2  christos 		   st.c \
    106  1.2.2.1  pgoyette 		   tag.c \
    107      1.2  christos 		   tbl.c \
    108      1.2  christos 		   tbl_data.c \
    109      1.2  christos 		   tbl_html.c \
    110      1.2  christos 		   tbl_layout.c \
    111      1.2  christos 		   tbl_opts.c \
    112      1.2  christos 		   tbl_term.c \
    113      1.2  christos 		   term.c \
    114      1.2  christos 		   term_ascii.c \
    115      1.2  christos 		   term_ps.c \
    116  1.2.2.1  pgoyette 		   tree.c
    117      1.2  christos 
    118      1.2  christos DISTFILES	 = INSTALL \
    119      1.2  christos 		   LICENSE \
    120      1.2  christos 		   Makefile \
    121      1.2  christos 		   Makefile.depend \
    122      1.2  christos 		   NEWS \
    123      1.2  christos 		   TODO \
    124      1.2  christos 		   apropos.1 \
    125      1.2  christos 		   cgi.h.example \
    126      1.2  christos 		   compat_fts.h \
    127      1.2  christos 		   compat_ohash.h \
    128  1.2.2.1  pgoyette 		   compat_stringlist.h \
    129      1.2  christos 		   configure \
    130      1.2  christos 		   configure.local.example \
    131      1.2  christos 		   demandoc.1 \
    132      1.2  christos 		   eqn.7 \
    133      1.2  christos 		   gmdiff \
    134      1.2  christos 		   html.h \
    135      1.2  christos 		   lib.in \
    136      1.2  christos 		   libman.h \
    137      1.2  christos 		   libmandoc.h \
    138      1.2  christos 		   libmdoc.h \
    139      1.2  christos 		   libroff.h \
    140      1.2  christos 		   main.h \
    141      1.2  christos 		   makewhatis.8 \
    142      1.2  christos 		   man.1 \
    143      1.2  christos 		   man.7 \
    144  1.2.2.1  pgoyette 		   man.cgi.3 \
    145      1.2  christos 		   man.cgi.8 \
    146  1.2.2.1  pgoyette 		   man.conf.5 \
    147      1.2  christos 		   man.h \
    148  1.2.2.1  pgoyette 		   manconf.h \
    149      1.2  christos 		   mandoc.1 \
    150      1.2  christos 		   mandoc.3 \
    151  1.2.2.1  pgoyette 		   mandoc.css \
    152      1.2  christos 		   mandoc.db.5 \
    153      1.2  christos 		   mandoc.h \
    154      1.2  christos 		   mandoc_aux.h \
    155      1.2  christos 		   mandoc_char.7 \
    156      1.2  christos 		   mandoc_escape.3 \
    157      1.2  christos 		   mandoc_headers.3 \
    158      1.2  christos 		   mandoc_html.3 \
    159      1.2  christos 		   mandoc_malloc.3 \
    160  1.2.2.1  pgoyette 		   mandoc_ohash.h \
    161      1.2  christos 		   mansearch.3 \
    162      1.2  christos 		   mansearch.h \
    163      1.2  christos 		   mchars_alloc.3 \
    164      1.2  christos 		   mdoc.7 \
    165      1.2  christos 		   mdoc.h \
    166      1.2  christos 		   msec.in \
    167      1.2  christos 		   out.h \
    168      1.2  christos 		   predefs.in \
    169      1.2  christos 		   roff.7 \
    170  1.2.2.1  pgoyette 		   roff.h \
    171  1.2.2.1  pgoyette 		   roff_int.h \
    172  1.2.2.1  pgoyette 		   soelim.1 \
    173      1.2  christos 		   st.in \
    174  1.2.2.1  pgoyette 		   tag.h \
    175      1.2  christos 		   tbl.3 \
    176      1.2  christos 		   tbl.7 \
    177      1.2  christos 		   term.h \
    178  1.2.2.1  pgoyette 		   $(SRCS) \
    179  1.2.2.1  pgoyette 		   $(TESTSRCS)
    180      1.2  christos 
    181      1.2  christos LIBMAN_OBJS	 = man.o \
    182      1.2  christos 		   man_hash.o \
    183      1.2  christos 		   man_macro.o \
    184      1.2  christos 		   man_validate.o
    185      1.2  christos 
    186      1.2  christos LIBMDOC_OBJS	 = att.o \
    187      1.2  christos 		   lib.o \
    188      1.2  christos 		   mdoc.o \
    189      1.2  christos 		   mdoc_argv.o \
    190      1.2  christos 		   mdoc_hash.o \
    191      1.2  christos 		   mdoc_macro.o \
    192  1.2.2.1  pgoyette 		   mdoc_state.o \
    193      1.2  christos 		   mdoc_validate.o \
    194      1.2  christos 		   st.o
    195      1.2  christos 
    196      1.2  christos LIBROFF_OBJS	 = eqn.o \
    197      1.2  christos 		   roff.o \
    198      1.2  christos 		   tbl.o \
    199      1.2  christos 		   tbl_data.o \
    200      1.2  christos 		   tbl_layout.o \
    201      1.2  christos 		   tbl_opts.o
    202      1.2  christos 
    203      1.2  christos LIBMANDOC_OBJS	 = $(LIBMAN_OBJS) \
    204      1.2  christos 		   $(LIBMDOC_OBJS) \
    205      1.2  christos 		   $(LIBROFF_OBJS) \
    206      1.2  christos 		   chars.o \
    207      1.2  christos 		   mandoc.o \
    208      1.2  christos 		   mandoc_aux.o \
    209  1.2.2.1  pgoyette 		   mandoc_ohash.o \
    210      1.2  christos 		   msec.o \
    211      1.2  christos 		   preconv.o \
    212      1.2  christos 		   read.o
    213      1.2  christos 
    214  1.2.2.1  pgoyette COMPAT_OBJS	 = compat_err.o \
    215      1.2  christos 		   compat_fts.o \
    216  1.2.2.1  pgoyette 		   compat_getline.o \
    217      1.2  christos 		   compat_getsubopt.o \
    218  1.2.2.1  pgoyette 		   compat_isblank.o \
    219  1.2.2.1  pgoyette 		   compat_mkdtemp.o \
    220      1.2  christos 		   compat_ohash.o \
    221  1.2.2.1  pgoyette 		   compat_progname.o \
    222      1.2  christos 		   compat_reallocarray.o \
    223      1.2  christos 		   compat_sqlite3_errstr.o \
    224      1.2  christos 		   compat_strcasestr.o \
    225      1.2  christos 		   compat_strlcat.o \
    226      1.2  christos 		   compat_strlcpy.o \
    227      1.2  christos 		   compat_strsep.o \
    228  1.2.2.1  pgoyette 		   compat_strtonum.o \
    229  1.2.2.1  pgoyette 		   compat_vasprintf.o
    230      1.2  christos 
    231      1.2  christos MANDOC_HTML_OBJS = eqn_html.o \
    232      1.2  christos 		   html.o \
    233      1.2  christos 		   man_html.o \
    234      1.2  christos 		   mdoc_html.o \
    235      1.2  christos 		   tbl_html.o
    236      1.2  christos 
    237      1.2  christos MANDOC_MAN_OBJS  = mdoc_man.o
    238      1.2  christos 
    239      1.2  christos MANDOC_TERM_OBJS = eqn_term.o \
    240      1.2  christos 		   man_term.o \
    241      1.2  christos 		   mdoc_term.o \
    242      1.2  christos 		   term.o \
    243      1.2  christos 		   term_ascii.o \
    244      1.2  christos 		   term_ps.o \
    245      1.2  christos 		   tbl_term.o
    246      1.2  christos 
    247      1.2  christos BASE_OBJS	 = $(MANDOC_HTML_OBJS) \
    248      1.2  christos 		   $(MANDOC_MAN_OBJS) \
    249      1.2  christos 		   $(MANDOC_TERM_OBJS) \
    250      1.2  christos 		   main.o \
    251      1.2  christos 		   manpath.o \
    252      1.2  christos 		   out.o \
    253  1.2.2.1  pgoyette 		   tag.o \
    254      1.2  christos 		   tree.o
    255      1.2  christos 
    256      1.2  christos MAIN_OBJS	 = $(BASE_OBJS)
    257      1.2  christos 
    258      1.2  christos DB_OBJS		 = mandocdb.o \
    259      1.2  christos 		   mansearch.o \
    260      1.2  christos 		   mansearch_const.o
    261      1.2  christos 
    262      1.2  christos CGI_OBJS	 = $(MANDOC_HTML_OBJS) \
    263      1.2  christos 		   cgi.o \
    264      1.2  christos 		   mansearch.o \
    265      1.2  christos 		   mansearch_const.o \
    266      1.2  christos 		   out.o
    267      1.2  christos 
    268      1.2  christos MANPAGE_OBJS	 = manpage.o mansearch.o mansearch_const.o manpath.o
    269      1.2  christos 
    270      1.2  christos DEMANDOC_OBJS	 = demandoc.o
    271      1.2  christos 
    272  1.2.2.1  pgoyette SOELIM_OBJS	 = soelim.o \
    273  1.2.2.1  pgoyette 		   compat_err.o \
    274  1.2.2.1  pgoyette 		   compat_getline.o \
    275  1.2.2.1  pgoyette 		   compat_progname.o \
    276  1.2.2.1  pgoyette 		   compat_reallocarray.o \
    277  1.2.2.1  pgoyette 		   compat_stringlist.o
    278  1.2.2.1  pgoyette 
    279      1.2  christos WWW_MANS	 = apropos.1.html \
    280      1.2  christos 		   demandoc.1.html \
    281      1.2  christos 		   man.1.html \
    282      1.2  christos 		   mandoc.1.html \
    283  1.2.2.1  pgoyette 		   soelim.1.html \
    284      1.2  christos 		   mandoc.3.html \
    285      1.2  christos 		   mandoc_escape.3.html \
    286      1.2  christos 		   mandoc_headers.3.html \
    287      1.2  christos 		   mandoc_html.3.html \
    288      1.2  christos 		   mandoc_malloc.3.html \
    289      1.2  christos 		   mansearch.3.html \
    290      1.2  christos 		   mchars_alloc.3.html \
    291      1.2  christos 		   tbl.3.html \
    292  1.2.2.1  pgoyette 		   man.conf.5.html \
    293      1.2  christos 		   mandoc.db.5.html \
    294      1.2  christos 		   eqn.7.html \
    295      1.2  christos 		   man.7.html \
    296      1.2  christos 		   mandoc_char.7.html \
    297      1.2  christos 		   mdoc.7.html \
    298      1.2  christos 		   roff.7.html \
    299      1.2  christos 		   tbl.7.html \
    300      1.2  christos 		   makewhatis.8.html \
    301  1.2.2.1  pgoyette 		   man.cgi.3.html \
    302      1.2  christos 		   man.cgi.8.html \
    303      1.2  christos 		   man.h.html \
    304  1.2.2.1  pgoyette 		   manconf.h.html \
    305      1.2  christos 		   mandoc.h.html \
    306      1.2  christos 		   mandoc_aux.h.html \
    307      1.2  christos 		   mansearch.h.html \
    308  1.2.2.1  pgoyette 		   mdoc.h.html \
    309  1.2.2.1  pgoyette 		   roff.h.html
    310      1.2  christos 
    311      1.2  christos WWW_OBJS	 = mdocml.tar.gz \
    312      1.2  christos 		   mdocml.sha256
    313      1.2  christos 
    314      1.2  christos # === USER CONFIGURATION ===============================================
    315      1.2  christos 
    316      1.2  christos -include Makefile.local
    317      1.2  christos 
    318      1.2  christos # === DEPENDENCY HANDLING ==============================================
    319      1.2  christos 
    320      1.2  christos all: base-build $(BUILD_TARGETS) Makefile.local
    321      1.2  christos 
    322  1.2.2.1  pgoyette base-build: mandoc demandoc soelim
    323      1.2  christos 
    324      1.2  christos cgi-build: man.cgi
    325      1.2  christos 
    326      1.2  christos install: base-install $(INSTALL_TARGETS)
    327      1.2  christos 
    328      1.2  christos www: $(WWW_OBJS) $(WWW_MANS)
    329      1.2  christos 
    330      1.2  christos $(WWW_MANS): mandoc
    331      1.2  christos 
    332      1.2  christos .PHONY: base-install cgi-install db-install install www-install
    333      1.2  christos .PHONY: clean distclean depend
    334      1.1     joerg 
    335      1.2  christos include Makefile.depend
    336      1.1     joerg 
    337      1.2  christos # === TARGETS CONTAINING SHELL COMMANDS ================================
    338      1.1     joerg 
    339      1.2  christos distclean: clean
    340      1.2  christos 	rm -f Makefile.local config.h config.h.old config.log config.log.old
    341      1.1     joerg 
    342      1.1     joerg clean:
    343      1.2  christos 	rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS)
    344      1.2  christos 	rm -f mandoc $(BASE_OBJS) $(DB_OBJS)
    345      1.2  christos 	rm -f man.cgi $(CGI_OBJS)
    346      1.2  christos 	rm -f manpage $(MANPAGE_OBJS)
    347      1.2  christos 	rm -f demandoc $(DEMANDOC_OBJS)
    348  1.2.2.1  pgoyette 	rm -f soelim $(SOELIM_OBJS)
    349      1.2  christos 	rm -f $(WWW_MANS) $(WWW_OBJS)
    350      1.2  christos 	rm -rf *.dSYM
    351      1.2  christos 
    352      1.2  christos base-install: base-build
    353      1.2  christos 	mkdir -p $(DESTDIR)$(BINDIR)
    354      1.2  christos 	mkdir -p $(DESTDIR)$(LIBDIR)
    355      1.2  christos 	mkdir -p $(DESTDIR)$(INCLUDEDIR)
    356      1.2  christos 	mkdir -p $(DESTDIR)$(MANDIR)/man1
    357      1.2  christos 	mkdir -p $(DESTDIR)$(MANDIR)/man3
    358  1.2.2.1  pgoyette 	mkdir -p $(DESTDIR)$(MANDIR)/man5
    359      1.2  christos 	mkdir -p $(DESTDIR)$(MANDIR)/man7
    360      1.2  christos 	$(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR)
    361  1.2.2.1  pgoyette 	$(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
    362      1.2  christos 	ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN)
    363      1.2  christos 	$(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
    364  1.2.2.1  pgoyette 	$(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \
    365      1.2  christos 		$(DESTDIR)$(INCLUDEDIR)
    366      1.2  christos 	$(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1
    367  1.2.2.1  pgoyette 	$(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
    368      1.2  christos 	$(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
    369      1.2  christos 	$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
    370      1.2  christos 		mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
    371  1.2.2.1  pgoyette 	$(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/${MANM_MANCONF}.5
    372      1.2  christos 	$(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MAN}.7
    373      1.2  christos 	$(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MDOC}.7
    374      1.2  christos 	$(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/${MANM_ROFF}.7
    375      1.2  christos 	$(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/${MANM_EQN}.7
    376      1.2  christos 	$(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/${MANM_TBL}.7
    377      1.2  christos 	$(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
    378      1.2  christos 
    379      1.2  christos db-install: base-build
    380      1.2  christos 	mkdir -p $(DESTDIR)$(BINDIR)
    381      1.2  christos 	mkdir -p $(DESTDIR)$(SBINDIR)
    382      1.2  christos 	mkdir -p $(DESTDIR)$(MANDIR)/man1
    383      1.2  christos 	mkdir -p $(DESTDIR)$(MANDIR)/man3
    384      1.2  christos 	mkdir -p $(DESTDIR)$(MANDIR)/man5
    385      1.2  christos 	mkdir -p $(DESTDIR)$(MANDIR)/man8
    386      1.2  christos 	ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
    387      1.2  christos 	ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
    388      1.2  christos 	ln -f $(DESTDIR)$(BINDIR)/mandoc \
    389      1.2  christos 		$(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
    390      1.2  christos 	$(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
    391      1.2  christos 	ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
    392      1.2  christos 		$(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
    393      1.2  christos 	$(INSTALL_MAN) mansearch.3 $(DESTDIR)$(MANDIR)/man3
    394      1.2  christos 	$(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5
    395      1.2  christos 	$(INSTALL_MAN) makewhatis.8 \
    396      1.2  christos 		$(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
    397      1.2  christos 
    398      1.2  christos cgi-install: cgi-build
    399      1.2  christos 	mkdir -p $(DESTDIR)$(CGIBINDIR)
    400      1.2  christos 	mkdir -p $(DESTDIR)$(HTDOCDIR)
    401      1.2  christos 	$(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR)
    402  1.2.2.1  pgoyette 	$(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR)
    403      1.2  christos 
    404      1.2  christos Makefile.local config.h: configure ${TESTSRCS}
    405      1.2  christos 	@echo "$@ is out of date; please run ./configure"
    406      1.2  christos 	@exit 1
    407      1.2  christos 
    408      1.2  christos libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
    409  1.2.2.1  pgoyette 	ar rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
    410      1.2  christos 
    411      1.2  christos mandoc: $(MAIN_OBJS) libmandoc.a
    412  1.2.2.1  pgoyette 	$(CC) -o $@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD)
    413      1.2  christos 
    414      1.2  christos manpage: $(MANPAGE_OBJS) libmandoc.a
    415  1.2.2.1  pgoyette 	$(CC) -o $@ $(LDFLAGS) $(MANPAGE_OBJS) libmandoc.a $(LDADD)
    416      1.2  christos 
    417      1.2  christos man.cgi: $(CGI_OBJS) libmandoc.a
    418  1.2.2.1  pgoyette 	$(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD)
    419      1.2  christos 
    420      1.2  christos demandoc: $(DEMANDOC_OBJS) libmandoc.a
    421  1.2.2.1  pgoyette 	$(CC) -o $@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD)
    422  1.2.2.1  pgoyette 
    423  1.2.2.1  pgoyette soelim: $(SOELIM_OBJS)
    424  1.2.2.1  pgoyette 	$(CC) -o $@ $(LDFLAGS) $(SOELIM_OBJS)
    425      1.2  christos 
    426      1.2  christos # --- maintainer targets ---
    427      1.2  christos 
    428      1.2  christos www-install: www
    429      1.2  christos 	mkdir -p $(HTDOCDIR)/snapshots
    430  1.2.2.1  pgoyette 	$(INSTALL_DATA) $(WWW_MANS) mandoc.css $(HTDOCDIR)
    431      1.2  christos 	$(INSTALL_DATA) $(WWW_OBJS) $(HTDOCDIR)/snapshots
    432      1.2  christos 	$(INSTALL_DATA) mdocml.tar.gz \
    433      1.2  christos 		$(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz
    434      1.2  christos 	$(INSTALL_DATA) mdocml.sha256 \
    435      1.2  christos 		$(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256
    436      1.2  christos 
    437      1.2  christos depend: config.h
    438      1.2  christos 	mkdep -f Makefile.depend $(CFLAGS) $(SRCS)
    439      1.2  christos 	perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \
    440      1.2  christos 		s|\\\n||g; s|  +| |g; s| $$||mg; print;' \
    441      1.2  christos 		Makefile.depend > Makefile.tmp
    442      1.2  christos 	mv Makefile.tmp Makefile.depend
    443      1.2  christos 
    444  1.2.2.1  pgoyette dist: mdocml.sha256
    445  1.2.2.1  pgoyette 
    446      1.2  christos mdocml.sha256: mdocml.tar.gz
    447      1.2  christos 	sha256 mdocml.tar.gz > $@
    448      1.2  christos 
    449      1.2  christos mdocml.tar.gz: $(DISTFILES)
    450      1.2  christos 	mkdir -p .dist/mdocml-$(VERSION)/
    451      1.2  christos 	$(INSTALL) -m 0644 $(DISTFILES) .dist/mdocml-$(VERSION)
    452      1.2  christos 	chmod 755 .dist/mdocml-$(VERSION)/configure
    453      1.2  christos 	( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) )
    454      1.1     joerg 	rm -rf .dist/
    455      1.1     joerg 
    456      1.2  christos # === SUFFIX RULES =====================================================
    457      1.1     joerg 
    458      1.2  christos .SUFFIXES:	 .1       .3       .5       .7       .8       .h
    459      1.2  christos .SUFFIXES:	 .1.html  .3.html  .5.html  .7.html  .8.html  .h.html
    460      1.1     joerg 
    461      1.2  christos .h.h.html:
    462      1.2  christos 	highlight -I $< > $@
    463      1.1     joerg 
    464      1.2  christos .1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: mandoc
    465      1.2  christos 	./mandoc -Thtml -Wall,stop \
    466  1.2.2.1  pgoyette 		-Ostyle=mandoc.css,man=%N.%S.html,includes=%I.html $< > $@
    467