Makefile revision 1.1.1.15 1 1.1.1.15 christos # $Id: Makefile,v 1.1.1.15 2015/12/17 21:58:47 christos Exp $
2 1.1.1.11 joerg #
3 1.1.1.15 christos # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps (at] bsd.lv>
4 1.1.1.15 christos # Copyright (c) 2011, 2013, 2014, 2015 Ingo Schwarze <schwarze (at] openbsd.org>
5 1.1.1.11 joerg #
6 1.1.1.15 christos # Permission to use, copy, modify, and distribute this software for any
7 1.1.1.15 christos # purpose with or without fee is hereby granted, provided that the above
8 1.1.1.15 christos # copyright notice and this permission notice appear in all copies.
9 1.1.1.15 christos #
10 1.1.1.15 christos # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 1.1.1.15 christos # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 1.1.1.15 christos # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 1.1.1.15 christos # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 1.1.1.15 christos # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 1.1.1.15 christos # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 1.1.1.15 christos # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 1.1.1.15 christos
18 1.1.1.15 christos VERSION = 1.13.3
19 1.1.1.15 christos
20 1.1.1.15 christos # === LIST OF FILES ====================================================
21 1.1.1.15 christos
22 1.1.1.15 christos TESTSRCS = test-dirent-namlen.c \
23 1.1.1.15 christos test-fgetln.c \
24 1.1.1.15 christos test-fts.c \
25 1.1.1.14 joerg test-getsubopt.c \
26 1.1.1.14 joerg test-mmap.c \
27 1.1.1.14 joerg test-ohash.c \
28 1.1.1.15 christos test-reallocarray.c \
29 1.1.1.15 christos test-sqlite3.c \
30 1.1.1.15 christos test-sqlite3_errstr.c \
31 1.1.1.15 christos test-strcasestr.c \
32 1.1.1.14 joerg test-strlcat.c \
33 1.1.1.14 joerg test-strlcpy.c \
34 1.1.1.15 christos test-strptime.c \
35 1.1.1.15 christos test-strsep.c \
36 1.1.1.15 christos test-strtonum.c \
37 1.1.1.15 christos test-wchar.c
38 1.1.1.14 joerg
39 1.1.1.15 christos SRCS = att.c \
40 1.1.1.12 joerg cgi.c \
41 1.1.1.10 joerg chars.c \
42 1.1.1.12 joerg compat_fgetln.c \
43 1.1.1.15 christos compat_fts.c \
44 1.1.1.11 joerg compat_getsubopt.c \
45 1.1.1.14 joerg compat_ohash.c \
46 1.1.1.15 christos compat_reallocarray.c \
47 1.1.1.15 christos compat_sqlite3_errstr.c \
48 1.1.1.14 joerg compat_strcasestr.c \
49 1.1.1.11 joerg compat_strlcat.c \
50 1.1.1.11 joerg compat_strlcpy.c \
51 1.1.1.14 joerg compat_strsep.c \
52 1.1.1.15 christos compat_strtonum.c \
53 1.1.1.12 joerg demandoc.c \
54 1.1.1.10 joerg eqn.c \
55 1.1.1.11 joerg eqn_html.c \
56 1.1.1.11 joerg eqn_term.c \
57 1.1.1.10 joerg html.c \
58 1.1.1.10 joerg lib.c \
59 1.1.1.10 joerg main.c \
60 1.1.1.10 joerg man.c \
61 1.1.1.10 joerg man_hash.c \
62 1.1.1.10 joerg man_html.c \
63 1.1.1.10 joerg man_macro.c \
64 1.1.1.10 joerg man_term.c \
65 1.1.1.10 joerg man_validate.c \
66 1.1.1.10 joerg mandoc.c \
67 1.1.1.15 christos mandoc_aux.c \
68 1.1.1.11 joerg mandocdb.c \
69 1.1.1.14 joerg manpage.c \
70 1.1.1.12 joerg manpath.c \
71 1.1.1.14 joerg mansearch.c \
72 1.1.1.15 christos mansearch_const.c \
73 1.1.1.10 joerg mdoc.c \
74 1.1.1.10 joerg mdoc_argv.c \
75 1.1.1.10 joerg mdoc_hash.c \
76 1.1.1.10 joerg mdoc_html.c \
77 1.1.1.10 joerg mdoc_macro.c \
78 1.1.1.11 joerg mdoc_man.c \
79 1.1.1.10 joerg mdoc_term.c \
80 1.1.1.10 joerg mdoc_validate.c \
81 1.1.1.10 joerg msec.c \
82 1.1.1.10 joerg out.c \
83 1.1.1.11 joerg preconv.c \
84 1.1.1.10 joerg read.c \
85 1.1.1.10 joerg roff.c \
86 1.1.1.10 joerg st.c \
87 1.1.1.10 joerg tbl.c \
88 1.1.1.10 joerg tbl_data.c \
89 1.1.1.10 joerg tbl_html.c \
90 1.1.1.10 joerg tbl_layout.c \
91 1.1.1.10 joerg tbl_opts.c \
92 1.1.1.10 joerg tbl_term.c \
93 1.1.1.10 joerg term.c \
94 1.1.1.10 joerg term_ascii.c \
95 1.1.1.10 joerg term_ps.c \
96 1.1.1.10 joerg tree.c \
97 1.1.1.14 joerg $(TESTSRCS)
98 1.1.1.10 joerg
99 1.1.1.15 christos DISTFILES = INSTALL \
100 1.1.1.15 christos LICENSE \
101 1.1.1.15 christos Makefile \
102 1.1.1.15 christos Makefile.depend \
103 1.1.1.15 christos NEWS \
104 1.1.1.15 christos TODO \
105 1.1.1.15 christos apropos.1 \
106 1.1.1.15 christos cgi.h.example \
107 1.1.1.15 christos chars.in \
108 1.1.1.15 christos compat_fts.h \
109 1.1.1.15 christos compat_ohash.h \
110 1.1.1.15 christos configure \
111 1.1.1.15 christos configure.local.example \
112 1.1.1.15 christos demandoc.1 \
113 1.1.1.15 christos eqn.7 \
114 1.1.1.15 christos example.style.css \
115 1.1.1.15 christos gmdiff \
116 1.1.1.15 christos html.h \
117 1.1.1.15 christos lib.in \
118 1.1.1.15 christos libman.h \
119 1.1.1.15 christos libmandoc.h \
120 1.1.1.15 christos libmdoc.h \
121 1.1.1.15 christos libroff.h \
122 1.1.1.15 christos main.h \
123 1.1.1.15 christos makewhatis.8 \
124 1.1.1.15 christos man-cgi.css \
125 1.1.1.15 christos man.1 \
126 1.1.1.15 christos man.7 \
127 1.1.1.15 christos man.cgi.8 \
128 1.1.1.15 christos man.h \
129 1.1.1.15 christos mandoc.1 \
130 1.1.1.15 christos mandoc.3 \
131 1.1.1.15 christos mandoc.db.5 \
132 1.1.1.15 christos mandoc.h \
133 1.1.1.15 christos mandoc_aux.h \
134 1.1.1.15 christos mandoc_char.7 \
135 1.1.1.15 christos mandoc_escape.3 \
136 1.1.1.15 christos mandoc_headers.3 \
137 1.1.1.15 christos mandoc_html.3 \
138 1.1.1.15 christos mandoc_malloc.3 \
139 1.1.1.15 christos manpath.h \
140 1.1.1.15 christos mansearch.3 \
141 1.1.1.15 christos mansearch.h \
142 1.1.1.15 christos mchars_alloc.3 \
143 1.1.1.15 christos mdoc.7 \
144 1.1.1.15 christos mdoc.h \
145 1.1.1.15 christos msec.in \
146 1.1.1.15 christos out.h \
147 1.1.1.15 christos predefs.in \
148 1.1.1.15 christos roff.7 \
149 1.1.1.15 christos st.in \
150 1.1.1.15 christos style.css \
151 1.1.1.15 christos tbl.3 \
152 1.1.1.15 christos tbl.7 \
153 1.1.1.15 christos term.h \
154 1.1.1.15 christos $(SRCS)
155 1.1.1.15 christos
156 1.1.1.10 joerg LIBMAN_OBJS = man.o \
157 1.1.1.10 joerg man_hash.o \
158 1.1.1.10 joerg man_macro.o \
159 1.1.1.10 joerg man_validate.o
160 1.1.1.10 joerg
161 1.1.1.15 christos LIBMDOC_OBJS = att.o \
162 1.1.1.10 joerg lib.o \
163 1.1.1.10 joerg mdoc.o \
164 1.1.1.10 joerg mdoc_argv.o \
165 1.1.1.10 joerg mdoc_hash.o \
166 1.1.1.10 joerg mdoc_macro.o \
167 1.1.1.10 joerg mdoc_validate.o \
168 1.1.1.15 christos st.o
169 1.1.1.10 joerg
170 1.1.1.10 joerg LIBROFF_OBJS = eqn.o \
171 1.1.1.10 joerg roff.o \
172 1.1.1.10 joerg tbl.o \
173 1.1.1.10 joerg tbl_data.o \
174 1.1.1.10 joerg tbl_layout.o \
175 1.1.1.10 joerg tbl_opts.o
176 1.1.1.10 joerg
177 1.1.1.10 joerg LIBMANDOC_OBJS = $(LIBMAN_OBJS) \
178 1.1.1.10 joerg $(LIBMDOC_OBJS) \
179 1.1.1.10 joerg $(LIBROFF_OBJS) \
180 1.1.1.11 joerg chars.o \
181 1.1.1.10 joerg mandoc.o \
182 1.1.1.15 christos mandoc_aux.o \
183 1.1.1.12 joerg msec.o \
184 1.1.1.15 christos preconv.o \
185 1.1.1.10 joerg read.o
186 1.1.1.10 joerg
187 1.1.1.12 joerg COMPAT_OBJS = compat_fgetln.o \
188 1.1.1.15 christos compat_fts.o \
189 1.1.1.12 joerg compat_getsubopt.o \
190 1.1.1.14 joerg compat_ohash.o \
191 1.1.1.15 christos compat_reallocarray.o \
192 1.1.1.15 christos compat_sqlite3_errstr.o \
193 1.1.1.14 joerg compat_strcasestr.o \
194 1.1.1.11 joerg compat_strlcat.o \
195 1.1.1.14 joerg compat_strlcpy.o \
196 1.1.1.15 christos compat_strsep.o \
197 1.1.1.15 christos compat_strtonum.o
198 1.1.1.11 joerg
199 1.1.1.11 joerg MANDOC_HTML_OBJS = eqn_html.o \
200 1.1.1.11 joerg html.o \
201 1.1.1.10 joerg man_html.o \
202 1.1.1.10 joerg mdoc_html.o \
203 1.1.1.10 joerg tbl_html.o
204 1.1.1.10 joerg
205 1.1.1.11 joerg MANDOC_MAN_OBJS = mdoc_man.o
206 1.1.1.11 joerg
207 1.1.1.11 joerg MANDOC_TERM_OBJS = eqn_term.o \
208 1.1.1.11 joerg man_term.o \
209 1.1.1.10 joerg mdoc_term.o \
210 1.1.1.10 joerg term.o \
211 1.1.1.10 joerg term_ascii.o \
212 1.1.1.10 joerg term_ps.o \
213 1.1.1.10 joerg tbl_term.o
214 1.1.1.10 joerg
215 1.1.1.15 christos BASE_OBJS = $(MANDOC_HTML_OBJS) \
216 1.1.1.11 joerg $(MANDOC_MAN_OBJS) \
217 1.1.1.10 joerg $(MANDOC_TERM_OBJS) \
218 1.1.1.10 joerg main.o \
219 1.1.1.15 christos manpath.o \
220 1.1.1.10 joerg out.o \
221 1.1.1.10 joerg tree.o
222 1.1.1.10 joerg
223 1.1.1.15 christos MAIN_OBJS = $(BASE_OBJS)
224 1.1.1.10 joerg
225 1.1.1.15 christos DB_OBJS = mandocdb.o \
226 1.1.1.15 christos mansearch.o \
227 1.1.1.15 christos mansearch_const.o
228 1.1.1.15 christos
229 1.1.1.15 christos CGI_OBJS = $(MANDOC_HTML_OBJS) \
230 1.1.1.15 christos cgi.o \
231 1.1.1.15 christos mansearch.o \
232 1.1.1.15 christos mansearch_const.o \
233 1.1.1.15 christos out.o
234 1.1.1.12 joerg
235 1.1.1.15 christos MANPAGE_OBJS = manpage.o mansearch.o mansearch_const.o manpath.o
236 1.1.1.11 joerg
237 1.1.1.11 joerg DEMANDOC_OBJS = demandoc.o
238 1.1.1.11 joerg
239 1.1.1.15 christos WWW_MANS = apropos.1.html \
240 1.1.1.11 joerg demandoc.1.html \
241 1.1.1.15 christos man.1.html \
242 1.1.1.11 joerg mandoc.1.html \
243 1.1.1.10 joerg mandoc.3.html \
244 1.1.1.15 christos mandoc_escape.3.html \
245 1.1.1.15 christos mandoc_headers.3.html \
246 1.1.1.15 christos mandoc_html.3.html \
247 1.1.1.15 christos mandoc_malloc.3.html \
248 1.1.1.15 christos mansearch.3.html \
249 1.1.1.15 christos mchars_alloc.3.html \
250 1.1.1.14 joerg tbl.3.html \
251 1.1.1.15 christos mandoc.db.5.html \
252 1.1.1.10 joerg eqn.7.html \
253 1.1.1.10 joerg man.7.html \
254 1.1.1.10 joerg mandoc_char.7.html \
255 1.1.1.10 joerg mdoc.7.html \
256 1.1.1.10 joerg roff.7.html \
257 1.1.1.10 joerg tbl.7.html \
258 1.1.1.15 christos makewhatis.8.html \
259 1.1.1.15 christos man.cgi.8.html \
260 1.1.1.10 joerg man.h.html \
261 1.1.1.10 joerg mandoc.h.html \
262 1.1.1.15 christos mandoc_aux.h.html \
263 1.1.1.15 christos manpath.h.html \
264 1.1.1.15 christos mansearch.h.html \
265 1.1.1.15 christos mdoc.h.html
266 1.1.1.15 christos
267 1.1.1.15 christos WWW_OBJS = mdocml.tar.gz \
268 1.1.1.15 christos mdocml.sha256
269 1.1.1.15 christos
270 1.1.1.15 christos # === USER CONFIGURATION ===============================================
271 1.1.1.15 christos
272 1.1.1.15 christos include Makefile.local
273 1.1.1.15 christos
274 1.1.1.15 christos # === DEPENDENCY HANDLING ==============================================
275 1.1.1.15 christos
276 1.1.1.15 christos all: base-build $(BUILD_TARGETS) Makefile.local
277 1.1.1.15 christos
278 1.1.1.15 christos base-build: mandoc demandoc
279 1.1.1.15 christos
280 1.1.1.15 christos cgi-build: man.cgi
281 1.1.1.15 christos
282 1.1.1.15 christos install: base-install $(INSTALL_TARGETS)
283 1.1.1.15 christos
284 1.1.1.15 christos www: $(WWW_OBJS) $(WWW_MANS)
285 1.1 joerg
286 1.1.1.15 christos $(WWW_MANS): mandoc
287 1.1.1.15 christos
288 1.1.1.15 christos .PHONY: base-install cgi-install db-install install www-install
289 1.1.1.15 christos .PHONY: clean distclean depend
290 1.1.1.15 christos
291 1.1.1.15 christos include Makefile.depend
292 1.1.1.15 christos
293 1.1.1.15 christos # === TARGETS CONTAINING SHELL COMMANDS ================================
294 1.1.1.15 christos
295 1.1.1.15 christos distclean: clean
296 1.1.1.15 christos rm -f Makefile.local config.h config.h.old config.log config.log.old
297 1.1.1.4 joerg
298 1.1 joerg clean:
299 1.1.1.15 christos rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS)
300 1.1.1.15 christos rm -f mandoc $(BASE_OBJS) $(DB_OBJS)
301 1.1.1.15 christos rm -f man.cgi $(CGI_OBJS)
302 1.1.1.14 joerg rm -f manpage $(MANPAGE_OBJS)
303 1.1.1.11 joerg rm -f demandoc $(DEMANDOC_OBJS)
304 1.1.1.15 christos rm -f $(WWW_MANS) $(WWW_OBJS)
305 1.1.1.14 joerg rm -rf *.dSYM
306 1.1 joerg
307 1.1.1.15 christos base-install: base-build
308 1.1.1.4 joerg mkdir -p $(DESTDIR)$(BINDIR)
309 1.1.1.4 joerg mkdir -p $(DESTDIR)$(EXAMPLEDIR)
310 1.1.1.11 joerg mkdir -p $(DESTDIR)$(LIBDIR)
311 1.1.1.11 joerg mkdir -p $(DESTDIR)$(INCLUDEDIR)
312 1.1.1.4 joerg mkdir -p $(DESTDIR)$(MANDIR)/man1
313 1.1.1.10 joerg mkdir -p $(DESTDIR)$(MANDIR)/man3
314 1.1.1.4 joerg mkdir -p $(DESTDIR)$(MANDIR)/man7
315 1.1.1.15 christos $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR)
316 1.1.1.15 christos ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN)
317 1.1.1.10 joerg $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
318 1.1.1.15 christos $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h \
319 1.1.1.15 christos $(DESTDIR)$(INCLUDEDIR)
320 1.1.1.15 christos $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1
321 1.1.1.15 christos $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
322 1.1.1.15 christos $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
323 1.1.1.15 christos mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
324 1.1.1.15 christos $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MAN}.7
325 1.1.1.15 christos $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MDOC}.7
326 1.1.1.15 christos $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/${MANM_ROFF}.7
327 1.1.1.15 christos $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/${MANM_EQN}.7
328 1.1.1.15 christos $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/${MANM_TBL}.7
329 1.1.1.15 christos $(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
330 1.1.1.4 joerg $(INSTALL_DATA) example.style.css $(DESTDIR)$(EXAMPLEDIR)
331 1.1 joerg
332 1.1.1.15 christos db-install: base-build
333 1.1.1.15 christos mkdir -p $(DESTDIR)$(BINDIR)
334 1.1.1.15 christos mkdir -p $(DESTDIR)$(SBINDIR)
335 1.1.1.15 christos mkdir -p $(DESTDIR)$(MANDIR)/man1
336 1.1.1.15 christos mkdir -p $(DESTDIR)$(MANDIR)/man3
337 1.1.1.15 christos mkdir -p $(DESTDIR)$(MANDIR)/man5
338 1.1.1.15 christos mkdir -p $(DESTDIR)$(MANDIR)/man8
339 1.1.1.15 christos ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
340 1.1.1.15 christos ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
341 1.1.1.15 christos ln -f $(DESTDIR)$(BINDIR)/mandoc \
342 1.1.1.15 christos $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
343 1.1.1.15 christos $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
344 1.1.1.15 christos ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
345 1.1.1.15 christos $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
346 1.1.1.15 christos $(INSTALL_MAN) mansearch.3 $(DESTDIR)$(MANDIR)/man3
347 1.1.1.15 christos $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5
348 1.1.1.15 christos $(INSTALL_MAN) makewhatis.8 \
349 1.1.1.15 christos $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
350 1.1.1.15 christos
351 1.1.1.15 christos cgi-install: cgi-build
352 1.1.1.12 joerg mkdir -p $(DESTDIR)$(CGIBINDIR)
353 1.1.1.12 joerg mkdir -p $(DESTDIR)$(HTDOCDIR)
354 1.1.1.15 christos mkdir -p $(DESTDIR)$(WWWPREFIX)/man/mandoc/man1
355 1.1.1.15 christos mkdir -p $(DESTDIR)$(WWWPREFIX)/man/mandoc/man8
356 1.1.1.15 christos $(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR)
357 1.1.1.12 joerg $(INSTALL_DATA) example.style.css $(DESTDIR)$(HTDOCDIR)/man.css
358 1.1.1.12 joerg $(INSTALL_DATA) man-cgi.css $(DESTDIR)$(HTDOCDIR)
359 1.1.1.15 christos $(INSTALL_MAN) apropos.1 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man1/
360 1.1.1.15 christos $(INSTALL_MAN) man.cgi.8 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man8/
361 1.1.1.12 joerg
362 1.1.1.15 christos Makefile.local config.h: configure ${TESTSRCS}
363 1.1.1.15 christos @echo "$@ is out of date; please run ./configure"
364 1.1.1.15 christos @exit 1
365 1.1.1.10 joerg
366 1.1.1.11 joerg libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
367 1.1.1.11 joerg $(AR) rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
368 1.1.1.10 joerg
369 1.1.1.15 christos mandoc: $(MAIN_OBJS) libmandoc.a
370 1.1.1.15 christos $(CC) $(LDFLAGS) -o $@ $(MAIN_OBJS) libmandoc.a $(DBLIB)
371 1.1.1.11 joerg
372 1.1.1.14 joerg manpage: $(MANPAGE_OBJS) libmandoc.a
373 1.1.1.14 joerg $(CC) $(LDFLAGS) -o $@ $(MANPAGE_OBJS) libmandoc.a $(DBLIB)
374 1.1.1.11 joerg
375 1.1.1.15 christos man.cgi: $(CGI_OBJS) libmandoc.a
376 1.1.1.15 christos $(CC) $(LDFLAGS) $(STATIC) -o $@ $(CGI_OBJS) libmandoc.a $(DBLIB)
377 1.1.1.11 joerg
378 1.1.1.11 joerg demandoc: $(DEMANDOC_OBJS) libmandoc.a
379 1.1.1.11 joerg $(CC) $(LDFLAGS) -o $@ $(DEMANDOC_OBJS) libmandoc.a
380 1.1.1.11 joerg
381 1.1.1.15 christos # --- maintainer targets ---
382 1.1.1.10 joerg
383 1.1.1.15 christos www-install: www
384 1.1.1.15 christos mkdir -p $(HTDOCDIR)/snapshots
385 1.1.1.15 christos $(INSTALL_DATA) $(WWW_MANS) style.css $(HTDOCDIR)
386 1.1.1.15 christos $(INSTALL_DATA) $(WWW_OBJS) $(HTDOCDIR)/snapshots
387 1.1.1.15 christos $(INSTALL_DATA) mdocml.tar.gz \
388 1.1.1.15 christos $(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz
389 1.1.1.15 christos $(INSTALL_DATA) mdocml.sha256 \
390 1.1.1.15 christos $(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256
391 1.1.1.15 christos
392 1.1.1.15 christos depend: config.h
393 1.1.1.15 christos mkdep -f Makefile.depend $(CFLAGS) $(SRCS)
394 1.1.1.15 christos perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \
395 1.1.1.15 christos s|\\\n||g; s| +| |g; s| $$||mg; print;' \
396 1.1.1.15 christos Makefile.depend > Makefile.tmp
397 1.1.1.15 christos mv Makefile.tmp Makefile.depend
398 1.1.1.15 christos
399 1.1.1.15 christos mdocml.sha256: mdocml.tar.gz
400 1.1.1.15 christos sha256 mdocml.tar.gz > $@
401 1.1.1.15 christos
402 1.1.1.15 christos mdocml.tar.gz: $(DISTFILES)
403 1.1.1.10 joerg mkdir -p .dist/mdocml-$(VERSION)/
404 1.1.1.15 christos $(INSTALL) -m 0644 $(DISTFILES) .dist/mdocml-$(VERSION)
405 1.1.1.14 joerg chmod 755 .dist/mdocml-$(VERSION)/configure
406 1.1.1.14 joerg ( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) )
407 1.1 joerg rm -rf .dist/
408 1.1 joerg
409 1.1.1.15 christos # === SUFFIX RULES =====================================================
410 1.1.1.4 joerg
411 1.1.1.15 christos .SUFFIXES: .1 .3 .5 .7 .8 .h
412 1.1.1.15 christos .SUFFIXES: .1.html .3.html .5.html .7.html .8.html .h.html
413 1.1 joerg
414 1.1.1.10 joerg .h.h.html:
415 1.1.1.15 christos highlight -I $< > $@
416 1.1 joerg
417 1.1.1.15 christos .1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: mandoc
418 1.1.1.15 christos ./mandoc -Thtml -Wall,stop \
419 1.1.1.15 christos -Ostyle=style.css,man=%N.%S.html,includes=%I.html $< > $@
420