Makefile (274880) | Makefile (275432) |
---|---|
1# $Id: Makefile,v 1.435 2014/08/10 02:45:04 schwarze Exp $ | 1# $Id: Makefile,v 1.448 2014/11/28 18:57:31 schwarze Exp $ |
2# 3# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> 4# Copyright (c) 2011, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> 5# 6# Permission to use, copy, modify, and distribute this software for any 7# purpose with or without fee is hereby granted, provided that the above 8# copyright notice and this permission notice appear in all copies. 9# 10# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | 2# 3# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> 4# Copyright (c) 2011, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> 5# 6# Permission to use, copy, modify, and distribute this software for any 7# purpose with or without fee is hereby granted, provided that the above 8# copyright notice and this permission notice appear in all copies. 9# 10# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 |
18VERSION = 1.13.1 19 20# === USER SETTINGS ==================================================== 21 22# --- user settings relevant for all builds ---------------------------- 23 24# Specify this if you want to hard-code the operating system to appear 25# in the lower-left hand corner of -mdoc manuals. 26# 27# CFLAGS += -DOSNAME="\"OpenBSD 5.5\"" 28 29# IFF your system supports multi-byte functions (setlocale(), wcwidth(), 30# putwchar()) AND has __STDC_ISO_10646__ (that is, wchar_t is simply a 31# UCS-4 value) should you define USE_WCHAR. If you define it and your 32# system DOESN'T support this, -Tlocale will produce garbage. 33# If you don't define it, -Tlocale is a synonym for -Tacsii. 34# 35CFLAGS += -DUSE_WCHAR 36 37CFLAGS += -g -DHAVE_CONFIG_H 38CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings 39PREFIX = /usr/local 40BINDIR = $(PREFIX)/bin 41INCLUDEDIR = $(PREFIX)/include/mandoc 42LIBDIR = $(PREFIX)/lib/mandoc 43MANDIR = $(PREFIX)/man 44EXAMPLEDIR = $(PREFIX)/share/examples/mandoc 45 46INSTALL = install 47INSTALL_PROGRAM = $(INSTALL) -m 0555 48INSTALL_DATA = $(INSTALL) -m 0444 49INSTALL_LIB = $(INSTALL) -m 0444 50INSTALL_SOURCE = $(INSTALL) -m 0644 51INSTALL_MAN = $(INSTALL_DATA) 52 53# --- user settings related to database support ------------------------ 54 55# Building apropos(1) and makewhatis(8) requires both SQLite3 and fts(3). 56# To avoid those dependencies, comment the following line. 57# Be careful: the fts(3) implementation in glibc is broken on 32bit 58# machines, see: https://sourceware.org/bugzilla/show_bug.cgi?id=15838 59# 60BUILD_TARGETS += db-build 61 62# The remaining settings in this section 63# are only relevant if db-build is enabled. 64# Otherwise, they have no effect either way. 65 66# If your system has manpath(1), uncomment this. This is most any 67# system that's not OpenBSD or NetBSD. If uncommented, apropos(1) 68# and makewhatis(8) will use manpath(1) to get the MANPATH variable. 69# 70#CFLAGS += -DUSE_MANPATH 71 72# On some systems, SQLite3 may be installed below /usr/local. 73# In that case, uncomment the following two lines. 74# 75#CFLAGS += -I/usr/local/include 76#DBLIB += -L/usr/local/lib 77 78# OpenBSD has the ohash functions in libutil. 79# Comment the following line if your system doesn't. 80# 81DBLIB += -lutil 82 83SBINDIR = $(PREFIX)/sbin 84 85# --- user settings related to man.cgi --------------------------------- 86 87# To build man.cgi, copy cgi.h.example to cgi.h, edit it, 88# and enable the following line. 89# Obviously, this requires that db-build is enabled, too. 90# 91#BUILD_TARGETS += cgi-build 92 93# The remaining settings in this section 94# are only relevant if cgi-build is enabled. 95# Otherwise, they have no effect either way. 96 97# If your system does not support static binaries, comment this, 98# for example on Mac OS X. 99# 100STATIC = -static 101 102# Linux requires -pthread for statical linking. 103# 104#STATIC += -pthread 105 106WWWPREFIX = /var/www 107HTDOCDIR = $(WWWPREFIX)/htdocs 108CGIBINDIR = $(WWWPREFIX)/cgi-bin 109 110# === END OF USER SETTINGS ============================================= 111 112INSTALL_TARGETS = $(BUILD_TARGETS:-build=-install) 113 114BASEBIN = mandoc preconv demandoc 115DBBIN = apropos makewhatis | 18BASEBIN = mandoc demandoc 19DBBIN = makewhatis |
116CGIBIN = man.cgi 117 | 20CGIBIN = man.cgi 21 |
118DBLIB += -lsqlite3 119 120TESTSRCS = test-fgetln.c \ | 22TESTSRCS = test-dirent-namlen.c \ 23 test-fgetln.c \ 24 test-fts.c \ |
121 test-getsubopt.c \ 122 test-mmap.c \ 123 test-ohash.c \ 124 test-reallocarray.c \ | 25 test-getsubopt.c \ 26 test-mmap.c \ 27 test-ohash.c \ 28 test-reallocarray.c \ |
29 test-sqlite3.c \ |
|
125 test-sqlite3_errstr.c \ 126 test-strcasestr.c \ 127 test-strlcat.c \ 128 test-strlcpy.c \ 129 test-strptime.c \ | 30 test-sqlite3_errstr.c \ 31 test-strcasestr.c \ 32 test-strlcat.c \ 33 test-strlcpy.c \ 34 test-strptime.c \ |
130 test-strsep.c | 35 test-strsep.c \ 36 test-wchar.c |
131 | 37 |
132SRCS = apropos.c \ 133 arch.c \ 134 att.c \ | 38SRCS = att.c \ |
135 cgi.c \ 136 chars.c \ 137 compat_fgetln.c \ | 39 cgi.c \ 40 chars.c \ 41 compat_fgetln.c \ |
42 compat_fts.c \ |
|
138 compat_getsubopt.c \ 139 compat_ohash.c \ 140 compat_reallocarray.c \ 141 compat_sqlite3_errstr.c \ 142 compat_strcasestr.c \ 143 compat_strlcat.c \ 144 compat_strlcpy.c \ 145 compat_strsep.c \ --- 36 unchanged lines hidden (view full) --- 182 tbl_html.c \ 183 tbl_layout.c \ 184 tbl_opts.c \ 185 tbl_term.c \ 186 term.c \ 187 term_ascii.c \ 188 term_ps.c \ 189 tree.c \ | 43 compat_getsubopt.c \ 44 compat_ohash.c \ 45 compat_reallocarray.c \ 46 compat_sqlite3_errstr.c \ 47 compat_strcasestr.c \ 48 compat_strlcat.c \ 49 compat_strlcpy.c \ 50 compat_strsep.c \ --- 36 unchanged lines hidden (view full) --- 87 tbl_html.c \ 88 tbl_layout.c \ 89 tbl_opts.c \ 90 tbl_term.c \ 91 term.c \ 92 term_ascii.c \ 93 term_ps.c \ 94 tree.c \ |
190 vol.c \ | |
191 $(TESTSRCS) 192 193DISTFILES = INSTALL \ 194 LICENSE \ 195 Makefile \ 196 Makefile.depend \ 197 NEWS \ 198 TODO \ 199 apropos.1 \ | 95 $(TESTSRCS) 96 97DISTFILES = INSTALL \ 98 LICENSE \ 99 Makefile \ 100 Makefile.depend \ 101 NEWS \ 102 TODO \ 103 apropos.1 \ |
200 arch.in \ 201 att.in \ | |
202 cgi.h.example \ 203 chars.in \ | 104 cgi.h.example \ 105 chars.in \ |
106 compat_fts.h \ |
|
204 compat_ohash.h \ | 107 compat_ohash.h \ |
205 config.h.post \ 206 config.h.pre \ | |
207 configure \ | 108 configure \ |
109 configure.local.example \ |
|
208 demandoc.1 \ 209 eqn.7 \ 210 example.style.css \ 211 gmdiff \ 212 html.h \ 213 lib.in \ 214 libman.h \ 215 libmandoc.h \ 216 libmdoc.h \ 217 libroff.h \ 218 main.h \ 219 makewhatis.8 \ 220 man-cgi.css \ | 110 demandoc.1 \ 111 eqn.7 \ 112 example.style.css \ 113 gmdiff \ 114 html.h \ 115 lib.in \ 116 libman.h \ 117 libmandoc.h \ 118 libmdoc.h \ 119 libroff.h \ 120 main.h \ 121 makewhatis.8 \ 122 man-cgi.css \ |
123 man.1 \ |
|
221 man.7 \ 222 man.cgi.8 \ 223 man.h \ 224 mandoc.1 \ 225 mandoc.3 \ 226 mandoc.db.5 \ 227 mandoc.h \ 228 mandoc_aux.h \ --- 4 unchanged lines hidden (view full) --- 233 manpath.h \ 234 mansearch.3 \ 235 mansearch.h \ 236 mchars_alloc.3 \ 237 mdoc.7 \ 238 mdoc.h \ 239 msec.in \ 240 out.h \ | 124 man.7 \ 125 man.cgi.8 \ 126 man.h \ 127 mandoc.1 \ 128 mandoc.3 \ 129 mandoc.db.5 \ 130 mandoc.h \ 131 mandoc_aux.h \ --- 4 unchanged lines hidden (view full) --- 136 manpath.h \ 137 mansearch.3 \ 138 mansearch.h \ 139 mchars_alloc.3 \ 140 mdoc.7 \ 141 mdoc.h \ 142 msec.in \ 143 out.h \ |
241 preconv.1 \ | |
242 predefs.in \ 243 roff.7 \ 244 st.in \ 245 style.css \ 246 tbl.3 \ 247 tbl.7 \ 248 term.h \ | 144 predefs.in \ 145 roff.7 \ 146 st.in \ 147 style.css \ 148 tbl.3 \ 149 tbl.7 \ 150 term.h \ |
249 vol.in \ | |
250 $(SRCS) 251 252LIBMAN_OBJS = man.o \ 253 man_hash.o \ 254 man_macro.o \ 255 man_validate.o 256 | 151 $(SRCS) 152 153LIBMAN_OBJS = man.o \ 154 man_hash.o \ 155 man_macro.o \ 156 man_validate.o 157 |
257LIBMDOC_OBJS = arch.o \ 258 att.o \ | 158LIBMDOC_OBJS = att.o \ |
259 lib.o \ 260 mdoc.o \ 261 mdoc_argv.o \ 262 mdoc_hash.o \ 263 mdoc_macro.o \ 264 mdoc_validate.o \ | 159 lib.o \ 160 mdoc.o \ 161 mdoc_argv.o \ 162 mdoc_hash.o \ 163 mdoc_macro.o \ 164 mdoc_validate.o \ |
265 st.o \ 266 vol.o | 165 st.o |
267 268LIBROFF_OBJS = eqn.o \ 269 roff.o \ 270 tbl.o \ 271 tbl_data.o \ 272 tbl_layout.o \ 273 tbl_opts.o 274 275LIBMANDOC_OBJS = $(LIBMAN_OBJS) \ 276 $(LIBMDOC_OBJS) \ 277 $(LIBROFF_OBJS) \ 278 chars.o \ 279 mandoc.o \ 280 mandoc_aux.o \ 281 msec.o \ | 166 167LIBROFF_OBJS = eqn.o \ 168 roff.o \ 169 tbl.o \ 170 tbl_data.o \ 171 tbl_layout.o \ 172 tbl_opts.o 173 174LIBMANDOC_OBJS = $(LIBMAN_OBJS) \ 175 $(LIBMDOC_OBJS) \ 176 $(LIBROFF_OBJS) \ 177 chars.o \ 178 mandoc.o \ 179 mandoc_aux.o \ 180 msec.o \ |
181 preconv.o \ |
|
282 read.o 283 284COMPAT_OBJS = compat_fgetln.o \ | 182 read.o 183 184COMPAT_OBJS = compat_fgetln.o \ |
185 compat_fts.o \ |
|
285 compat_getsubopt.o \ 286 compat_ohash.o \ 287 compat_reallocarray.o \ 288 compat_sqlite3_errstr.o \ 289 compat_strcasestr.o \ 290 compat_strlcat.o \ 291 compat_strlcpy.o \ 292 compat_strsep.o --- 16 unchanged lines hidden (view full) --- 309 310MANDOC_OBJS = $(MANDOC_HTML_OBJS) \ 311 $(MANDOC_MAN_OBJS) \ 312 $(MANDOC_TERM_OBJS) \ 313 main.o \ 314 out.o \ 315 tree.o 316 | 186 compat_getsubopt.o \ 187 compat_ohash.o \ 188 compat_reallocarray.o \ 189 compat_sqlite3_errstr.o \ 190 compat_strcasestr.o \ 191 compat_strlcat.o \ 192 compat_strlcpy.o \ 193 compat_strsep.o --- 16 unchanged lines hidden (view full) --- 210 211MANDOC_OBJS = $(MANDOC_HTML_OBJS) \ 212 $(MANDOC_MAN_OBJS) \ 213 $(MANDOC_TERM_OBJS) \ 214 main.o \ 215 out.o \ 216 tree.o 217 |
218MAN_OBJS = $(MANDOC_OBJS) 219 |
|
317MAKEWHATIS_OBJS = mandocdb.o mansearch_const.o manpath.o 318 | 220MAKEWHATIS_OBJS = mandocdb.o mansearch_const.o manpath.o 221 |
319PRECONV_OBJS = preconv.o | 222APROPOS_OBJS = mansearch.o mansearch_const.o manpath.o |
320 | 223 |
321APROPOS_OBJS = apropos.o mansearch.o mansearch_const.o manpath.o 322 | |
323CGI_OBJS = $(MANDOC_HTML_OBJS) \ 324 cgi.o \ 325 mansearch.o \ 326 mansearch_const.o \ 327 out.o 328 329MANPAGE_OBJS = manpage.o mansearch.o mansearch_const.o manpath.o 330 331DEMANDOC_OBJS = demandoc.o 332 333WWW_MANS = apropos.1.html \ 334 demandoc.1.html \ | 224CGI_OBJS = $(MANDOC_HTML_OBJS) \ 225 cgi.o \ 226 mansearch.o \ 227 mansearch_const.o \ 228 out.o 229 230MANPAGE_OBJS = manpage.o mansearch.o mansearch_const.o manpath.o 231 232DEMANDOC_OBJS = demandoc.o 233 234WWW_MANS = apropos.1.html \ 235 demandoc.1.html \ |
236 man.1.html \ |
|
335 mandoc.1.html \ | 237 mandoc.1.html \ |
336 preconv.1.html \ | |
337 mandoc.3.html \ 338 mandoc_escape.3.html \ 339 mandoc_html.3.html \ 340 mandoc_malloc.3.html \ 341 mansearch.3.html \ 342 mchars_alloc.3.html \ 343 tbl.3.html \ 344 mandoc.db.5.html \ --- 10 unchanged lines hidden (view full) --- 355 mandoc_aux.h.html \ 356 manpath.h.html \ 357 mansearch.h.html \ 358 mdoc.h.html 359 360WWW_OBJS = mdocml.tar.gz \ 361 mdocml.sha256 362 | 238 mandoc.3.html \ 239 mandoc_escape.3.html \ 240 mandoc_html.3.html \ 241 mandoc_malloc.3.html \ 242 mansearch.3.html \ 243 mchars_alloc.3.html \ 244 tbl.3.html \ 245 mandoc.db.5.html \ --- 10 unchanged lines hidden (view full) --- 256 mandoc_aux.h.html \ 257 manpath.h.html \ 258 mansearch.h.html \ 259 mdoc.h.html 260 261WWW_OBJS = mdocml.tar.gz \ 262 mdocml.sha256 263 |
264include Makefile.local 265 266INSTALL_TARGETS = $(BUILD_TARGETS:-build=-install) 267 |
|
363# === DEPENDENCY HANDLING ============================================== 364 | 268# === DEPENDENCY HANDLING ============================================== 269 |
365all: base-build $(BUILD_TARGETS) | 270all: base-build $(BUILD_TARGETS) Makefile.local |
366 367base-build: $(BASEBIN) 368 369db-build: $(DBBIN) 370 371cgi-build: $(CGIBIN) 372 373install: base-install $(INSTALL_TARGETS) 374 375www: $(WWW_OBJS) $(WWW_MANS) 376 | 271 272base-build: $(BASEBIN) 273 274db-build: $(DBBIN) 275 276cgi-build: $(CGIBIN) 277 278install: base-install $(INSTALL_TARGETS) 279 280www: $(WWW_OBJS) $(WWW_MANS) 281 |
282$(WWW_MANS): mandoc 283 |
|
377include Makefile.depend 378 379# === TARGETS CONTAINING SHELL COMMANDS ================================ 380 | 284include Makefile.depend 285 286# === TARGETS CONTAINING SHELL COMMANDS ================================ 287 |
288distclean: clean 289 rm -f Makefile.local config.h config.h.old config.log config.log.old 290 |
|
381clean: | 291clean: |
382 rm -f libmandoc.a $(LIBMANDOC_OBJS) 383 rm -f apropos $(APROPOS_OBJS) | 292 rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) 293 rm -f mandoc $(MANDOC_OBJS) $(APROPOS_OBJS) |
384 rm -f makewhatis $(MAKEWHATIS_OBJS) | 294 rm -f makewhatis $(MAKEWHATIS_OBJS) |
385 rm -f preconv $(PRECONV_OBJS) | |
386 rm -f man.cgi $(CGI_OBJS) 387 rm -f manpage $(MANPAGE_OBJS) 388 rm -f demandoc $(DEMANDOC_OBJS) | 295 rm -f man.cgi $(CGI_OBJS) 296 rm -f manpage $(MANPAGE_OBJS) 297 rm -f demandoc $(DEMANDOC_OBJS) |
389 rm -f mandoc $(MANDOC_OBJS) 390 rm -f config.h config.log $(COMPAT_OBJS) | |
391 rm -f $(WWW_MANS) $(WWW_OBJS) 392 rm -rf *.dSYM 393 394base-install: base-build 395 mkdir -p $(DESTDIR)$(BINDIR) 396 mkdir -p $(DESTDIR)$(EXAMPLEDIR) 397 mkdir -p $(DESTDIR)$(LIBDIR) 398 mkdir -p $(DESTDIR)$(INCLUDEDIR) 399 mkdir -p $(DESTDIR)$(MANDIR)/man1 400 mkdir -p $(DESTDIR)$(MANDIR)/man3 401 mkdir -p $(DESTDIR)$(MANDIR)/man7 402 $(INSTALL_PROGRAM) $(BASEBIN) $(DESTDIR)$(BINDIR) 403 $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) 404 $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h \ 405 $(DESTDIR)$(INCLUDEDIR) | 298 rm -f $(WWW_MANS) $(WWW_OBJS) 299 rm -rf *.dSYM 300 301base-install: base-build 302 mkdir -p $(DESTDIR)$(BINDIR) 303 mkdir -p $(DESTDIR)$(EXAMPLEDIR) 304 mkdir -p $(DESTDIR)$(LIBDIR) 305 mkdir -p $(DESTDIR)$(INCLUDEDIR) 306 mkdir -p $(DESTDIR)$(MANDIR)/man1 307 mkdir -p $(DESTDIR)$(MANDIR)/man3 308 mkdir -p $(DESTDIR)$(MANDIR)/man7 309 $(INSTALL_PROGRAM) $(BASEBIN) $(DESTDIR)$(BINDIR) 310 $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) 311 $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h \ 312 $(DESTDIR)$(INCLUDEDIR) |
406 $(INSTALL_MAN) mandoc.1 preconv.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 | 313 $(INSTALL_MAN) man.1 mandoc.1 demandoc.1 \ 314 $(DESTDIR)$(MANDIR)/man1 |
407 $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ 408 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 409 $(INSTALL_MAN) man.7 mdoc.7 roff.7 eqn.7 tbl.7 mandoc_char.7 \ 410 $(DESTDIR)$(MANDIR)/man7 411 $(INSTALL_DATA) example.style.css $(DESTDIR)$(EXAMPLEDIR) 412 413db-install: db-build 414 mkdir -p $(DESTDIR)$(BINDIR) 415 mkdir -p $(DESTDIR)$(SBINDIR) 416 mkdir -p $(DESTDIR)$(MANDIR)/man1 417 mkdir -p $(DESTDIR)$(MANDIR)/man3 418 mkdir -p $(DESTDIR)$(MANDIR)/man5 419 mkdir -p $(DESTDIR)$(MANDIR)/man8 | 315 $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ 316 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 317 $(INSTALL_MAN) man.7 mdoc.7 roff.7 eqn.7 tbl.7 mandoc_char.7 \ 318 $(DESTDIR)$(MANDIR)/man7 319 $(INSTALL_DATA) example.style.css $(DESTDIR)$(EXAMPLEDIR) 320 321db-install: db-build 322 mkdir -p $(DESTDIR)$(BINDIR) 323 mkdir -p $(DESTDIR)$(SBINDIR) 324 mkdir -p $(DESTDIR)$(MANDIR)/man1 325 mkdir -p $(DESTDIR)$(MANDIR)/man3 326 mkdir -p $(DESTDIR)$(MANDIR)/man5 327 mkdir -p $(DESTDIR)$(MANDIR)/man8 |
420 $(INSTALL_PROGRAM) apropos $(DESTDIR)$(BINDIR) 421 ln -f $(DESTDIR)$(BINDIR)/apropos $(DESTDIR)$(BINDIR)/whatis | 328 ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/apropos 329 ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/whatis |
422 $(INSTALL_PROGRAM) makewhatis $(DESTDIR)$(SBINDIR) 423 $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1 424 ln -f $(DESTDIR)$(MANDIR)/man1/apropos.1 \ 425 $(DESTDIR)$(MANDIR)/man1/whatis.1 426 $(INSTALL_MAN) mansearch.3 $(DESTDIR)$(MANDIR)/man3 427 $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 428 $(INSTALL_MAN) makewhatis.8 $(DESTDIR)$(MANDIR)/man8 429 --- 12 unchanged lines hidden (view full) --- 442 mkdir -p $(DESTDIR)$(HTDOCDIR)/snapshots 443 $(INSTALL_DATA) $(WWW_MANS) style.css $(DESTDIR)$(HTDOCDIR) 444 $(INSTALL_DATA) $(WWW_OBJS) $(DESTDIR)$(HTDOCDIR)/snapshots 445 $(INSTALL_DATA) mdocml.tar.gz \ 446 $(DESTDIR)$(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz 447 $(INSTALL_DATA) mdocml.sha256 \ 448 $(DESTDIR)$(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256 449 | 330 $(INSTALL_PROGRAM) makewhatis $(DESTDIR)$(SBINDIR) 331 $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1 332 ln -f $(DESTDIR)$(MANDIR)/man1/apropos.1 \ 333 $(DESTDIR)$(MANDIR)/man1/whatis.1 334 $(INSTALL_MAN) mansearch.3 $(DESTDIR)$(MANDIR)/man3 335 $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 336 $(INSTALL_MAN) makewhatis.8 $(DESTDIR)$(MANDIR)/man8 337 --- 12 unchanged lines hidden (view full) --- 350 mkdir -p $(DESTDIR)$(HTDOCDIR)/snapshots 351 $(INSTALL_DATA) $(WWW_MANS) style.css $(DESTDIR)$(HTDOCDIR) 352 $(INSTALL_DATA) $(WWW_OBJS) $(DESTDIR)$(HTDOCDIR)/snapshots 353 $(INSTALL_DATA) mdocml.tar.gz \ 354 $(DESTDIR)$(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz 355 $(INSTALL_DATA) mdocml.sha256 \ 356 $(DESTDIR)$(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256 357 |
358Makefile.local config.h: configure ${TESTSRCS} 359 @echo "$@ is out of date; please run ./configure" 360 @exit 1 361 |
|
450depend: config.h 451 mkdep -f Makefile.depend $(CFLAGS) $(SRCS) 452 perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \ | 362depend: config.h 363 mkdep -f Makefile.depend $(CFLAGS) $(SRCS) 364 perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \ |
453 s|\\\n||g; s| +| |g; print;' Makefile.depend > Makefile.tmp | 365 s|\\\n||g; s| +| |g; s| $$||mg; print;' \ 366 Makefile.depend > Makefile.tmp |
454 mv Makefile.tmp Makefile.depend 455 456libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS) 457 $(AR) rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS) 458 | 367 mv Makefile.tmp Makefile.depend 368 369libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS) 370 $(AR) rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS) 371 |
459mandoc: $(MANDOC_OBJS) libmandoc.a 460 $(CC) $(LDFLAGS) -o $@ $(MANDOC_OBJS) libmandoc.a | 372mandoc: $(MAN_OBJS) libmandoc.a 373 $(CC) $(LDFLAGS) -o $@ $(MAN_OBJS) libmandoc.a $(DBLIB) |
461 462makewhatis: $(MAKEWHATIS_OBJS) libmandoc.a 463 $(CC) $(LDFLAGS) -o $@ $(MAKEWHATIS_OBJS) libmandoc.a $(DBLIB) 464 | 374 375makewhatis: $(MAKEWHATIS_OBJS) libmandoc.a 376 $(CC) $(LDFLAGS) -o $@ $(MAKEWHATIS_OBJS) libmandoc.a $(DBLIB) 377 |
465preconv: $(PRECONV_OBJS) 466 $(CC) $(LDFLAGS) -o $@ $(PRECONV_OBJS) 467 | |
468manpage: $(MANPAGE_OBJS) libmandoc.a 469 $(CC) $(LDFLAGS) -o $@ $(MANPAGE_OBJS) libmandoc.a $(DBLIB) 470 | 378manpage: $(MANPAGE_OBJS) libmandoc.a 379 $(CC) $(LDFLAGS) -o $@ $(MANPAGE_OBJS) libmandoc.a $(DBLIB) 380 |
471apropos: $(APROPOS_OBJS) libmandoc.a 472 $(CC) $(LDFLAGS) -o $@ $(APROPOS_OBJS) libmandoc.a $(DBLIB) 473 | |
474man.cgi: $(CGI_OBJS) libmandoc.a 475 $(CC) $(LDFLAGS) $(STATIC) -o $@ $(CGI_OBJS) libmandoc.a $(DBLIB) 476 477demandoc: $(DEMANDOC_OBJS) libmandoc.a 478 $(CC) $(LDFLAGS) -o $@ $(DEMANDOC_OBJS) libmandoc.a 479 480mdocml.sha256: mdocml.tar.gz 481 sha256 mdocml.tar.gz > $@ 482 483mdocml.tar.gz: $(DISTFILES) 484 mkdir -p .dist/mdocml-$(VERSION)/ | 381man.cgi: $(CGI_OBJS) libmandoc.a 382 $(CC) $(LDFLAGS) $(STATIC) -o $@ $(CGI_OBJS) libmandoc.a $(DBLIB) 383 384demandoc: $(DEMANDOC_OBJS) libmandoc.a 385 $(CC) $(LDFLAGS) -o $@ $(DEMANDOC_OBJS) libmandoc.a 386 387mdocml.sha256: mdocml.tar.gz 388 sha256 mdocml.tar.gz > $@ 389 390mdocml.tar.gz: $(DISTFILES) 391 mkdir -p .dist/mdocml-$(VERSION)/ |
485 $(INSTALL_SOURCE) $(DISTFILES) .dist/mdocml-$(VERSION) | 392 $(INSTALL) -m 0644 $(DISTFILES) .dist/mdocml-$(VERSION) |
486 chmod 755 .dist/mdocml-$(VERSION)/configure 487 ( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) ) 488 rm -rf .dist/ 489 | 393 chmod 755 .dist/mdocml-$(VERSION)/configure 394 ( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) ) 395 rm -rf .dist/ 396 |
490config.h: configure config.h.pre config.h.post $(TESTSRCS) 491 rm -f config.log 492 CC="$(CC)" CFLAGS="$(CFLAGS)" DBLIB="$(DBLIB)" \ 493 VERSION="$(VERSION)" ./configure 494 | |
495.PHONY: base-install cgi-install db-install install www-install | 397.PHONY: base-install cgi-install db-install install www-install |
496.PHONY: clean depend | 398.PHONY: clean distclean depend |
497.SUFFIXES: .1 .3 .5 .7 .8 .h 498.SUFFIXES: .1.html .3.html .5.html .7.html .8.html .h.html 499 500.h.h.html: 501 highlight -I $< > $@ 502 503.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: mandoc 504 ./mandoc -Thtml -Wall,stop \ 505 -Ostyle=style.css,man=%N.%S.html,includes=%I.html $< > $@ | 399.SUFFIXES: .1 .3 .5 .7 .8 .h 400.SUFFIXES: .1.html .3.html .5.html .7.html .8.html .h.html 401 402.h.h.html: 403 highlight -I $< > $@ 404 405.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: mandoc 406 ./mandoc -Thtml -Wall,stop \ 407 -Ostyle=style.css,man=%N.%S.html,includes=%I.html $< > $@ |