head	1.7;
access;
symbols
	netbsd-11-0-RC4:1.7
	netbsd-11-0-RC3:1.7
	netbsd-11-0-RC2:1.7
	netbsd-11-0-RC1:1.7
	perseant-exfatfs-base-20250801:1.7
	netbsd-11:1.7.0.2
	netbsd-11-base:1.7
	mdocml-1-14-6:1.1.1.20
	netbsd-10-1-RELEASE:1.6
	perseant-exfatfs-base-20240630:1.6
	perseant-exfatfs:1.6.0.12
	perseant-exfatfs-base:1.6
	netbsd-8-3-RELEASE:1.4
	netbsd-9-4-RELEASE:1.6
	netbsd-10-0-RELEASE:1.6
	netbsd-10-0-RC6:1.6
	netbsd-10-0-RC5:1.6
	netbsd-10-0-RC4:1.6
	netbsd-10-0-RC3:1.6
	netbsd-10-0-RC2:1.6
	netbsd-10-0-RC1:1.6
	netbsd-10:1.6.0.10
	netbsd-10-base:1.6
	netbsd-9-3-RELEASE:1.6
	cjep_sun2x-base1:1.6
	cjep_sun2x:1.6.0.8
	cjep_sun2x-base:1.6
	cjep_staticlib_x-base1:1.6
	netbsd-9-2-RELEASE:1.6
	cjep_staticlib_x:1.6.0.6
	cjep_staticlib_x-base:1.6
	netbsd-9-1-RELEASE:1.6
	phil-wifi-20200421:1.6
	phil-wifi-20200411:1.6
	is-mlppp:1.6.0.4
	is-mlppp-base:1.6
	phil-wifi-20200406:1.6
	netbsd-8-2-RELEASE:1.4
	netbsd-9-0-RELEASE:1.6
	netbsd-9-0-RC2:1.6
	netbsd-9-0-RC1:1.6
	phil-wifi-20191119:1.6
	netbsd-9:1.6.0.2
	netbsd-9-base:1.6
	phil-wifi-20190609:1.6
	netbsd-8-1-RELEASE:1.4
	netbsd-8-1-RC1:1.4
	mdocml-1-14-5:1.1.1.19
	pgoyette-compat-merge-20190127:1.4.10.1
	pgoyette-compat-20190127:1.5
	pgoyette-compat-20190118:1.5
	pgoyette-compat-1226:1.5
	pgoyette-compat-1126:1.5
	pgoyette-compat-1020:1.5
	pgoyette-compat-0930:1.5
	pgoyette-compat-0906:1.5
	netbsd-7-2-RELEASE:1.1.1.14
	mdocml-1-14-4:1.1.1.18
	pgoyette-compat-0728:1.4
	netbsd-8-0-RELEASE:1.4
	phil-wifi:1.4.0.12
	phil-wifi-base:1.4
	pgoyette-compat-0625:1.4
	netbsd-8-0-RC2:1.4
	pgoyette-compat-0521:1.4
	pgoyette-compat-0502:1.4
	pgoyette-compat-0422:1.4
	netbsd-8-0-RC1:1.4
	pgoyette-compat-0415:1.4
	pgoyette-compat-0407:1.4
	pgoyette-compat-0330:1.4
	pgoyette-compat-0322:1.4
	pgoyette-compat-0315:1.4
	netbsd-7-1-2-RELEASE:1.1.1.14
	pgoyette-compat:1.4.0.10
	pgoyette-compat-base:1.4
	netbsd-7-1-1-RELEASE:1.1.1.14
	matt-nb8-mediatek:1.4.0.8
	matt-nb8-mediatek-base:1.4
	perseant-stdc-iso10646:1.4.0.6
	perseant-stdc-iso10646-base:1.4
	netbsd-8:1.4.0.4
	netbsd-8-base:1.4
	prg-localcount2-base3:1.4
	prg-localcount2-base2:1.4
	prg-localcount2-base1:1.4
	prg-localcount2:1.4.0.2
	prg-localcount2-base:1.4
	pgoyette-localcount-20170426:1.4
	bouyer-socketcan-base1:1.4
	pgoyette-localcount-20170320:1.4
	mdocml-1-14-1:1.1.1.17
	netbsd-7-1:1.1.1.14.0.10
	netbsd-7-1-RELEASE:1.1.1.14
	netbsd-7-1-RC2:1.1.1.14
	netbsd-7-nhusb-base-20170116:1.1.1.14
	bouyer-socketcan:1.3.0.2
	bouyer-socketcan-base:1.3
	pgoyette-localcount-20170107:1.3
	netbsd-7-1-RC1:1.1.1.14
	pgoyette-localcount-20161104:1.3
	netbsd-7-0-2-RELEASE:1.1.1.14
	localcount-20160914:1.3
	netbsd-7-nhusb:1.1.1.14.0.8
	netbsd-7-nhusb-base:1.1.1.14
	pgoyette-localcount-20160806:1.3
	pgoyette-localcount-20160726:1.3
	mdocml-1-13-4:1.1.1.16
	pgoyette-localcount:1.2.0.2
	pgoyette-localcount-base:1.2
	netbsd-7-0-1-RELEASE:1.1.1.14
	mdocml-1-13-3:1.1.1.15
	netbsd-7-0:1.1.1.14.0.6
	netbsd-7-0-RELEASE:1.1.1.14
	netbsd-7-0-RC3:1.1.1.14
	netbsd-7-0-RC2:1.1.1.14
	netbsd-7-0-RC1:1.1.1.14
	netbsd-6-0-6-RELEASE:1.1.1.12
	netbsd-6-1-5-RELEASE:1.1.1.12
	netbsd-7:1.1.1.14.0.4
	netbsd-7-base:1.1.1.14
	yamt-pagecache-base9:1.1.1.14
	yamt-pagecache-tag8:1.1.1.11.2.1
	netbsd-6-1-4-RELEASE:1.1.1.12
	netbsd-6-0-5-RELEASE:1.1.1.12
	tls-earlyentropy:1.1.1.14.0.2
	tls-earlyentropy-base:1.1.1.14
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.14
	riastradh-drm2-base3:1.1.1.14
	netbsd-6-1-3-RELEASE:1.1.1.12
	netbsd-6-0-4-RELEASE:1.1.1.12
	mdocml-1-12-3-20130105:1.1.1.14
	netbsd-6-1-2-RELEASE:1.1.1.12
	netbsd-6-0-3-RELEASE:1.1.1.12
	netbsd-6-1-1-RELEASE:1.1.1.12
	riastradh-drm2-base2:1.1.1.13
	riastradh-drm2-base1:1.1.1.13
	riastradh-drm2:1.1.1.13.0.4
	riastradh-drm2-base:1.1.1.13
	netbsd-6-1:1.1.1.12.0.14
	netbsd-6-0-2-RELEASE:1.1.1.12
	netbsd-6-1-RELEASE:1.1.1.12
	khorben-n900:1.1.1.13.0.2
	netbsd-6-1-RC4:1.1.1.12
	mdocml-1-12-1:1.1.1.13
	netbsd-6-1-RC3:1.1.1.12
	agc-symver:1.1.1.12.0.12
	agc-symver-base:1.1.1.12
	netbsd-6-1-RC2:1.1.1.12
	netbsd-6-1-RC1:1.1.1.12
	yamt-pagecache-base8:1.1.1.12
	netbsd-6-0-1-RELEASE:1.1.1.12
	yamt-pagecache-base7:1.1.1.12
	matt-nb6-plus-nbase:1.1.1.12
	yamt-pagecache-base6:1.1.1.12
	netbsd-6-0:1.1.1.12.0.8
	netbsd-6-0-RELEASE:1.1.1.12
	netbsd-6-0-RC2:1.1.1.12
	tls-maxphys:1.1.1.12.0.6
	tls-maxphys-base:1.1.1.14
	matt-nb6-plus:1.1.1.12.0.4
	matt-nb6-plus-base:1.1.1.12
	netbsd-6-0-RC1:1.1.1.12
	yamt-pagecache-base5:1.1.1.12
	yamt-pagecache-base4:1.1.1.12
	netbsd-6:1.1.1.12.0.2
	netbsd-6-base:1.1.1.12
	mdocml-1-12-1-pre:1.1.1.12
	yamt-pagecache-base3:1.1.1.11
	yamt-pagecache-base2:1.1.1.11
	yamt-pagecache:1.1.1.11.0.2
	yamt-pagecache-base:1.1.1.11
	mdocml-1-12-0:1.1.1.11
	cherry-xenmp:1.1.1.10.0.2
	cherry-xenmp-base:1.1.1.10
	mdocml-1-11-1:1.1.1.10
	bouyer-quota2-nbase:1.1.1.9
	bouyer-quota2:1.1.1.9.0.2
	bouyer-quota2-base:1.1.1.9
	mdocml-1-10-9:1.1.1.9
	matt-mips64-premerge-20101231:1.1.1.8
	mdocml-1-10-5:1.1.1.8
	mdocml-1-10-4:1.1.1.7
	mdocml-1-10-2:1.1.1.6
	mdocml-1-10-1:1.1.1.5
	mdocml-1-10-0:1.1.1.4
	mdocml-1-9-23:1.1.1.3
	mdocml-1-9-22:1.1.1.2
	mdocml-1-9-15:1.1.1.1
	KRISTAPS:1.1.1;
locks; strict;
comment	@# @;


1.7
date	2025.05.09.07.35.40;	author wiz;	state Exp;
branches;
next	1.6;
commitid	T3V7omkqWEZHFcUF;

1.6
date	2019.03.11.00.15.38;	author christos;	state Exp;
branches
	1.6.12.1;
next	1.5;
commitid	Wb5q9fOUcwcKASeB;

1.5
date	2018.08.14.08.53.06;	author christos;	state Exp;
branches;
next	1.4;
commitid	zIf9xxIxpJBTa4OA;

1.4
date	2017.03.18.15.24.17;	author christos;	state Exp;
branches
	1.4.10.1
	1.4.12.1;
next	1.3;
commitid	ddjJ3ZQJfDQtR2Kz;

1.3
date	2016.07.15.19.40.42;	author christos;	state Exp;
branches
	1.3.2.1;
next	1.2;
commitid	0IYUQNZEGvlGbsez;

1.2
date	2015.12.17.22.31.12;	author christos;	state Exp;
branches
	1.2.2.1;
next	1.1;
commitid	moykOLAWsZBGUlNy;

1.1
date	2010.02.19.22.54.54;	author joerg;	state Exp;
branches
	1.1.1.1;
next	;

1.6.12.1
date	2025.08.02.05.22.03;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;

1.4.10.1
date	2018.09.06.06.51.47;	author pgoyette;	state Exp;
branches;
next	;
commitid	HCi1bXD317XIK0RA;

1.4.12.1
date	2019.06.10.21.51.09;	author christos;	state Exp;
branches;
next	;
commitid	jtc8rnCzWiEEHGqB;

1.3.2.1
date	2017.04.21.16.52.02;	author bouyer;	state Exp;
branches;
next	;
commitid	dUG7nkTKALCadqOz;

1.2.2.1
date	2016.07.26.03.24.14;	author pgoyette;	state Exp;
branches;
next	1.2.2.2;
commitid	x7TlcOjghfjvqMfz;

1.2.2.2
date	2017.03.20.06.56.03;	author pgoyette;	state Exp;
branches;
next	;
commitid	jjw7cAwgyKq7RfKz;

1.1.1.1
date	2010.02.19.22.54.54;	author joerg;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2010.04.05.14.19.41;	author joerg;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2010.04.20.18.05.58;	author joerg;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	2010.06.01.21.17.53;	author joerg;	state Exp;
branches;
next	1.1.1.5;

1.1.1.5
date	2010.06.16.18.09.43;	author joerg;	state Exp;
branches;
next	1.1.1.6;

1.1.1.6
date	2010.06.24.17.16.40;	author joerg;	state Exp;
branches;
next	1.1.1.7;

1.1.1.7
date	2010.07.25.19.10.44;	author joerg;	state Exp;
branches;
next	1.1.1.8;

1.1.1.8
date	2010.07.27.22.35.02;	author joerg;	state Exp;
branches;
next	1.1.1.9;

1.1.1.9
date	2011.01.12.22.57.12;	author joerg;	state Exp;
branches;
next	1.1.1.10;

1.1.1.10
date	2011.04.15.13.45.25;	author joerg;	state Exp;
branches;
next	1.1.1.11;

1.1.1.11
date	2011.10.11.19.09.36;	author joerg;	state Exp;
branches
	1.1.1.11.2.1;
next	1.1.1.12;

1.1.1.12
date	2012.01.30.16.44.12;	author joerg;	state Exp;
branches
	1.1.1.12.6.1;
next	1.1.1.13;

1.1.1.13
date	2013.04.03.14.46.49;	author christos;	state Exp;
branches;
next	1.1.1.14;

1.1.1.14
date	2014.01.05.19.21.37;	author joerg;	state Exp;
branches;
next	1.1.1.15;
commitid	Lk3ht2OKdHM9IXjx;

1.1.1.15
date	2015.12.17.21.58.47;	author christos;	state Exp;
branches;
next	1.1.1.16;
commitid	xOrI5TwdeAzxJlNy;

1.1.1.16
date	2016.07.15.14.25.55;	author christos;	state Exp;
branches;
next	1.1.1.17;
commitid	1Uhv267ohfbwrqez;

1.1.1.17
date	2017.03.18.15.06.47;	author christos;	state Exp;
branches;
next	1.1.1.18;
commitid	kAn9hvVDJyLiL2Kz;

1.1.1.18
date	2018.08.14.08.41.01;	author christos;	state Exp;
branches;
next	1.1.1.19;
commitid	GxOyTdy7PtUv64OA;

1.1.1.19
date	2019.03.10.22.28.57;	author christos;	state Exp;
branches;
next	1.1.1.20;
commitid	OY2rN8xVGWKe0SeB;

1.1.1.20
date	2025.05.09.07.32.08;	author wiz;	state Exp;
branches;
next	;
commitid	9SIDtfgbvSPBEcUF;

1.1.1.11.2.1
date	2012.04.17.00.03.35;	author yamt;	state Exp;
branches;
next	1.1.1.11.2.2;

1.1.1.11.2.2
date	2014.05.22.15.49.38;	author yamt;	state Exp;
branches;
next	;
commitid	7ubNU44ICLES8yBx;

1.1.1.12.6.1
date	2013.06.23.06.28.25;	author tls;	state Exp;
branches;
next	1.1.1.12.6.2;
commitid	OnlO1cBgtQRcIHUw;

1.1.1.12.6.2
date	2014.08.19.23.51.31;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;


desc
@@


1.7
log
@merge mandoc 1.14.6
@
text
@# Id: Makefile,v 1.540 2021/09/21 11:04:40 schwarze Exp 
#
# Copyright (c) 2011, 2013-2021 Ingo Schwarze <schwarze@@openbsd.org>
# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@@bsd.lv>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

VERSION = 1.14.6

# === LIST OF FILES ====================================================

TESTSRCS	 = test-attribute.c \
		   test-be32toh.c \
		   test-cmsg.c \
		   test-dirent-namlen.c \
		   test-EFTYPE.c \
		   test-err.c \
		   test-fts.c \
		   test-getline.c \
		   test-getsubopt.c \
		   test-isblank.c \
		   test-mkdtemp.c \
		   test-mkstemps.c \
		   test-nanosleep.c \
		   test-noop.c \
		   test-ntohl.c \
		   test-O_DIRECTORY.c \
		   test-ohash.c \
		   test-PATH_MAX.c \
		   test-pledge.c \
		   test-progname.c \
		   test-reallocarray.c \
		   test-recallocarray.c \
		   test-recvmsg.c \
		   test-rewb-bsd.c \
		   test-rewb-sysv.c \
		   test-sandbox_init.c \
		   test-strcasestr.c \
		   test-stringlist.c \
		   test-strlcat.c \
		   test-strlcpy.c \
		   test-strndup.c \
		   test-strptime.c \
		   test-strsep.c \
		   test-strtonum.c \
		   test-vasprintf.c \
		   test-wchar.c

SRCS		 = arch.c \
		   att.c \
		   catman.c \
		   cgi.c \
		   chars.c \
		   compat_err.c \
		   compat_fts.c \
		   compat_getline.c \
		   compat_getsubopt.c \
		   compat_isblank.c \
		   compat_mkdtemp.c \
		   compat_mkstemps.c \
		   compat_ohash.c \
		   compat_progname.c \
		   compat_reallocarray.c \
		   compat_recallocarray.c \
		   compat_strcasestr.c \
		   compat_stringlist.c \
		   compat_strlcat.c \
		   compat_strlcpy.c \
		   compat_strndup.c \
		   compat_strsep.c \
		   compat_strtonum.c \
		   compat_vasprintf.c \
		   dba.c \
		   dba_array.c \
		   dba_read.c \
		   dba_write.c \
		   dbm.c \
		   dbm_map.c \
		   demandoc.c \
		   eqn.c \
		   eqn_html.c \
		   eqn_term.c \
		   html.c \
		   lib.c \
		   main.c \
		   man.c \
		   man_html.c \
		   man_macro.c \
		   man_term.c \
		   man_validate.c \
		   mandoc.c \
		   mandoc_aux.c \
		   mandoc_msg.c \
		   mandoc_ohash.c \
		   mandoc_xr.c \
		   mandocd.c \
		   mandocdb.c \
		   manpath.c \
		   mansearch.c \
		   mdoc.c \
		   mdoc_argv.c \
		   mdoc_html.c \
		   mdoc_macro.c \
		   mdoc_man.c \
		   mdoc_markdown.c \
		   mdoc_state.c \
		   mdoc_term.c \
		   mdoc_validate.c \
		   msec.c \
		   out.c \
		   preconv.c \
		   read.c \
		   roff.c \
		   roff_html.c \
		   roff_term.c \
		   roff_validate.c \
		   soelim.c \
		   st.c \
		   tag.c \
		   tbl.c \
		   tbl_data.c \
		   tbl_html.c \
		   tbl_layout.c \
		   tbl_opts.c \
		   tbl_term.c \
		   term.c \
		   term_ascii.c \
		   term_ps.c \
		   term_tab.c \
		   term_tag.c \
		   tree.c

DISTFILES	 = INSTALL \
		   LICENSE \
		   Makefile \
		   Makefile.depend \
		   NEWS \
		   TODO \
		   apropos.1 \
		   catman.8 \
		   cgi.h.example \
		   compat_fts.h \
		   compat_ohash.h \
		   compat_stringlist.h \
		   configure \
		   configure.local.example \
		   dba.h \
		   dba_array.h \
		   dba_write.h \
		   dbm.h \
		   dbm_map.h \
		   demandoc.1 \
		   eqn.7 \
		   eqn.h \
		   eqn_parse.h \
		   gmdiff \
		   html.h \
		   lib.in \
		   libman.h \
		   libmandoc.h \
		   libmdoc.h \
		   main.h \
		   makewhatis.8 \
		   man.1 \
		   man.7 \
		   man.cgi.3 \
		   man.cgi.8 \
		   man.conf.5 \
		   man.h \
		   man.options.1 \
		   manconf.h \
		   mandoc.1 \
		   mandoc.3 \
		   mandoc.css \
		   mandoc.db.5 \
		   mandoc.h \
		   mandoc_aux.h \
		   mandoc_char.7 \
		   mandoc_escape.3 \
		   mandoc_headers.3 \
		   mandoc_html.3 \
		   mandoc_malloc.3 \
		   mandoc_ohash.h \
		   mandoc_parse.h \
		   mandoc_xr.h \
		   mandocd.8 \
		   mansearch.3 \
		   mansearch.h \
		   mchars_alloc.3 \
		   mdoc.7 \
		   mdoc.h \
		   msec.in \
		   out.h \
		   predefs.in \
		   roff.7 \
		   roff.h \
		   roff_int.h \
		   soelim.1 \
		   tag.h \
		   tbl.3 \
		   tbl.7 \
		   tbl.h \
		   tbl_int.h \
		   tbl_parse.h \
		   term.h \
		   term_tag.h \
		   $(SRCS) \
		   $(TESTSRCS)

LIBMAN_OBJS	 = man.o \
		   man_macro.o \
		   man_validate.o

LIBMDOC_OBJS	 = att.o \
		   lib.o \
		   mdoc.o \
		   mdoc_argv.o \
		   mdoc_macro.o \
		   mdoc_state.o \
		   mdoc_validate.o \
		   st.o

LIBROFF_OBJS	 = eqn.o \
		   roff.o \
		   roff_validate.o \
		   tbl.o \
		   tbl_data.o \
		   tbl_layout.o \
		   tbl_opts.o

LIBMANDOC_OBJS	 = $(LIBMAN_OBJS) \
		   $(LIBMDOC_OBJS) \
		   $(LIBROFF_OBJS) \
		   arch.o \
		   chars.o \
		   mandoc.o \
		   mandoc_aux.o \
		   mandoc_msg.o \
		   mandoc_ohash.o \
		   mandoc_xr.o \
		   msec.o \
		   preconv.o \
		   read.o \
		   tag.o

ALL_COBJS	 = compat_err.o \
		   compat_fts.o \
		   compat_getline.o \
		   compat_getsubopt.o \
		   compat_isblank.o \
		   compat_mkdtemp.o \
		   compat_mkstemps.o \
		   compat_ohash.o \
		   compat_progname.o \
		   compat_reallocarray.o \
		   compat_recallocarray.o \
		   compat_strcasestr.o \
		   compat_stringlist.o \
		   compat_strlcat.o \
		   compat_strlcpy.o \
		   compat_strndup.o \
		   compat_strsep.o \
		   compat_strtonum.o \
		   compat_vasprintf.o

MANDOC_HTML_OBJS = eqn_html.o \
		   html.o \
		   man_html.o \
		   mdoc_html.o \
		   roff_html.o \
		   tbl_html.o

MANDOC_TERM_OBJS = eqn_term.o \
		   man_term.o \
		   mdoc_term.o \
		   roff_term.o \
		   term.o \
		   term_ascii.o \
		   term_ps.o \
		   term_tab.o \
		   term_tag.o \
		   tbl_term.o

DBM_OBJS	 = dbm.o \
		   dbm_map.o \
		   mansearch.o

DBA_OBJS	 = dba.o \
		   dba_array.o \
		   dba_read.o \
		   dba_write.o \
		   mandocdb.o

MAIN_OBJS	 = $(MANDOC_HTML_OBJS) \
		   $(MANDOC_MAN_OBJS) \
		   $(MANDOC_TERM_OBJS) \
		   $(DBM_OBJS) \
		   $(DBA_OBJS) \
		   main.o \
		   manpath.o \
		   mdoc_man.o \
		   mdoc_markdown.o \
		   out.o \
		   tree.o

CGI_OBJS	 = $(MANDOC_HTML_OBJS) \
		   $(DBM_OBJS) \
		   cgi.o \
		   out.o

MANDOCD_OBJS	 = $(MANDOC_HTML_OBJS) \
		   $(MANDOC_TERM_OBJS) \
		   mandocd.o \
		   out.o

DEMANDOC_OBJS	 = demandoc.o

WWW_MANS	 = apropos.1.html \
		   demandoc.1.html \
		   man.1.html \
		   man.options.1.html \
		   mandoc.1.html \
		   soelim.1.html \
		   man.cgi.3.html \
		   mandoc.3.html \
		   mandoc_escape.3.html \
		   mandoc_headers.3.html \
		   mandoc_html.3.html \
		   mandoc_malloc.3.html \
		   mansearch.3.html \
		   mchars_alloc.3.html \
		   tbl.3.html \
		   man.conf.5.html \
		   mandoc.db.5.html \
		   eqn.7.html \
		   man.7.html \
		   mandoc_char.7.html \
		   mdoc.7.html \
		   roff.7.html \
		   tbl.7.html \
		   catman.8.html \
		   makewhatis.8.html \
		   man.cgi.8.html \
		   mandocd.8.html

WWW_INCS	 = eqn.h.html \
		   html.h.html \
		   man.h.html \
		   manconf.h.html \
		   mandoc.h.html \
		   mandoc_aux.h.html \
		   mandoc_parse.h.html \
		   mansearch.h.html \
		   mdoc.h.html \
		   roff.h.html \
		   tbl.h.html \
		   tbl_int.h.html \
		   tbl_parse.h.html

# === USER CONFIGURATION ===============================================

-include Makefile.local

# === DEPENDENCY HANDLING ==============================================

all: mandoc man demandoc soelim $(BUILD_TARGETS) Makefile.local

install: base-install $(INSTALL_TARGETS)

www: $(WWW_MANS) $(WWW_INCS)

$(WWW_MANS) $(WWW_INCS): mandoc

.PHONY: base-install cgi-install install www-install
.PHONY: clean distclean depend

include Makefile.depend

# === TARGETS CONTAINING SHELL COMMANDS ================================

distclean: clean
	rm -f Makefile.local config.h config.h.old config.log config.log.old

clean:
	rm -f libmandoc.a $(LIBMANDOC_OBJS) $(ALL_COBJS)
	rm -f mandoc man $(MAIN_OBJS)
	rm -f man.cgi $(CGI_OBJS)
	rm -f mandocd catman catman.o $(MANDOCD_OBJS)
	rm -f demandoc $(DEMANDOC_OBJS)
	rm -f soelim soelim.o
	rm -f $(WWW_MANS) $(WWW_INCS) mandoc*.tar.gz mandoc*.sha256
	rm -f Makefile.tmp1 Makefile.tmp2
	rm -rf *.dSYM

base-install: mandoc demandoc soelim
	mkdir -p $(DESTDIR)$(BINDIR)
	mkdir -p $(DESTDIR)$(SBINDIR)
	mkdir -p $(DESTDIR)$(MANDIR)/man1
	mkdir -p $(DESTDIR)$(MANDIR)/man5
	mkdir -p $(DESTDIR)$(MANDIR)/man7
	mkdir -p $(DESTDIR)$(MANDIR)/man8
	$(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR)
	$(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_MAN)
	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_APROPOS)
	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_WHATIS)
	cd $(DESTDIR)$(SBINDIR) && \
		$(LN) ${BIN_FROM_SBIN}/mandoc $(BINM_MAKEWHATIS)
	$(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1
	$(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
	$(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
	$(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
	cd $(DESTDIR)$(MANDIR)/man1 && $(LN) $(BINM_APROPOS).1 $(BINM_WHATIS).1
	$(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5
	$(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5
	$(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7
	$(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7
	$(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7
	$(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7
	$(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7
	$(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
	$(INSTALL_MAN) makewhatis.8 \
		$(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8

lib-install: libmandoc.a
	mkdir -p $(DESTDIR)$(LIBDIR)
	mkdir -p $(DESTDIR)$(INCLUDEDIR)
	mkdir -p $(DESTDIR)$(MANDIR)/man3
	$(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
	$(INSTALL_LIB) eqn.h man.h mandoc.h mandoc_aux.h mandoc_parse.h \
		mdoc.h roff.h tbl.h $(DESTDIR)$(INCLUDEDIR)
	$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
		mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3

cgi-install: man.cgi
	mkdir -p $(DESTDIR)$(CGIBINDIR)
	mkdir -p $(DESTDIR)$(HTDOCDIR)
	$(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR)
	$(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR)

catman-install: mandocd catman
	mkdir -p $(DESTDIR)$(SBINDIR)
	mkdir -p $(DESTDIR)$(MANDIR)/man8
	$(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR)
	$(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN)
	$(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8
	$(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8

uninstall:
	rm -f $(DESTDIR)$(BINDIR)/mandoc
	rm -f $(DESTDIR)$(BINDIR)/demandoc
	rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
	rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN)
	rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
	rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
	rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
	rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1
	rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1
	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
	rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5
	rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7
	rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7
	rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
	rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi
	rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css
	rm -f $(DESTDIR)$(SBINDIR)/mandocd
	rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN)
	rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8
	rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8
	rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a
	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3
	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3
	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3
	rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3
	rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3
	rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3
	rm -f $(DESTDIR)$(INCLUDEDIR)/eqn.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/man.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_parse.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/tbl.h
	[ ! -e $(DESTDIR)$(INCLUDEDIR) ] || rmdir $(DESTDIR)$(INCLUDEDIR)

regress: all
	cd regress && ./regress.pl

regress-clean:
	cd regress && ./regress.pl . clean

Makefile.local config.h: configure $(TESTSRCS)
	@@echo "$@@ is out of date; please run ./configure"
	@@exit 1

libmandoc.a: $(MANDOC_COBJS) $(LIBMANDOC_OBJS)
	$(AR) rs $@@ $(MANDOC_COBJS) $(LIBMANDOC_OBJS)

mandoc: $(MAIN_OBJS) libmandoc.a
	$(CC) -o $@@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD)

man: mandoc
	$(LN) mandoc man

man.cgi: $(CGI_OBJS) libmandoc.a
	$(CC) $(STATIC) -o $@@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD)

mandocd: $(MANDOCD_OBJS) libmandoc.a
	$(CC) -o $@@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD)

catman: catman.o libmandoc.a
	$(CC) -o $@@ $(LDFLAGS) catman.o libmandoc.a $(LDADD)

demandoc: $(DEMANDOC_OBJS) libmandoc.a
	$(CC) -o $@@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD)

soelim: $(SOELIM_COBJS) soelim.o
	$(CC) -o $@@ $(LDFLAGS) $(SOELIM_COBJS) soelim.o

# --- maintainer targets ---

www-install: www
	$(INSTALL_DATA) mandoc.css $(HTDOCDIR)
	$(INSTALL_DATA) $(WWW_MANS) $(HTDOCDIR)/man
	$(INSTALL_DATA) $(WWW_INCS) $(HTDOCDIR)/includes

depend: config.h
	./configure -depend
	mkdep -f Makefile.tmp1 $(CFLAGS) $(SRCS)
	perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \
		s|\\\n||g; s|  +| |g; s| $$||mg; print;' \
		Makefile.tmp1 > Makefile.tmp2
	rm Makefile.tmp1
	mv Makefile.tmp2 Makefile.depend

regress-distclean:
	@@find regress \
		-name '.#*' -o \
		-name '*.orig' -o \
		-name '*.rej' -o \
		-name '*.core' \
		-exec rm -i {} \;

regress-distcheck:
	@@find regress ! -type d ! -type f
	@@find regress -type f \
		! -path '*/CVS/*' \
		! -name Makefile \
		! -name Makefile.inc \
		! -name '*.in' \
		! -name '*.out_ascii' \
		! -name '*.out_utf8' \
		! -name '*.out_html' \
		! -name '*.out_markdown' \
		! -name '*.out_lint' \
		! -path regress/regress.pl \
		! -path regress/regress.pl.1

dist: mandoc-$(VERSION).sha256

mandoc-$(VERSION).sha256: mandoc-$(VERSION).tar.gz
	sha256 mandoc-$(VERSION).tar.gz > $@@

mandoc-$(VERSION).tar.gz: $(DISTFILES)
	ls regress/*/*/*.mandoc_* && exit 1 || true
	mkdir -p .dist/mandoc-$(VERSION)/
	$(INSTALL) -m 0644 $(DISTFILES) .dist/mandoc-$(VERSION)
	cp -pR regress .dist/mandoc-$(VERSION)
	find .dist/mandoc-$(VERSION)/regress \
	    -type d -name CVS -print0 | xargs -0 rm -rf
	chmod 755 .dist/mandoc-$(VERSION)/configure
	( cd .dist/ && tar zcf ../$@@ mandoc-$(VERSION) )
	rm -rf .dist/

dist-install: dist
	$(INSTALL_DATA) mandoc-$(VERSION).tar.gz mandoc-$(VERSION).sha256 \
	    $(HTDOCDIR)/snapshots

# === SUFFIX RULES =====================================================

.SUFFIXES:	 .1       .3       .5       .7       .8       .h
.SUFFIXES:	 .1.html  .3.html  .5.html  .7.html  .8.html  .h.html

.h.h.html:
	highlight -I $< > $@@

.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html:
	./mandoc -Thtml -Wwarning,stop \
		-O 'style=/mandoc.css,man=/man/%N.%S.html;https://man.openbsd.org/%N.%S,includes=/includes/%I.html' \
		$< > $@@
@


1.6
log
@resolve conflicts
@
text
@d1 1
a1 1
# Id: Makefile,v 1.530 2019/03/06 16:08:41 schwarze Exp 
d3 1
a4 1
# Copyright (c) 2011, 2013-2019 Ingo Schwarze <schwarze@@openbsd.org>
d18 1
a18 1
VERSION = 1.14.5
d22 2
a23 1
TESTSRCS	 = test-be32toh.c \
d33 1
d70 1
d140 1
d216 1
d253 2
a254 1
		   read.o
d256 1
a256 1
COMPAT_OBJS	 = compat_err.o \
d262 1
d268 1
d291 1
a313 1
		   tag.o \
d324 1
a324 2
		   out.o \
		   tag.o
a327 7
SOELIM_OBJS	 = soelim.o \
		   compat_err.o \
		   compat_getline.o \
		   compat_progname.o \
		   compat_reallocarray.o \
		   compat_stringlist.o

d376 1
a376 1
all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local
d395 2
a396 2
	rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS)
	rm -f mandoc $(MAIN_OBJS)
d400 1
a400 1
	rm -f soelim $(SOELIM_OBJS)
d402 1
d515 2
a516 2
libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
	ar rs $@@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
d521 3
d536 2
a537 2
soelim: $(SOELIM_OBJS)
	$(CC) -o $@@ $(LDFLAGS) $(SOELIM_OBJS)
d547 2
a548 1
	mkdep -f Makefile.depend $(CFLAGS) $(SRCS)
d551 3
a553 2
		Makefile.depend > Makefile.tmp
	mv Makefile.tmp Makefile.depend
d606 2
a607 2
.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: mandoc
	mandoc -Thtml -Wwarning,stop \
@


1.6.12.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# Id: Makefile,v 1.540 2021/09/21 11:04:40 schwarze Exp 
a2 1
# Copyright (c) 2011, 2013-2021 Ingo Schwarze <schwarze@@openbsd.org>
d4 1
d18 1
a18 1
VERSION = 1.14.6
d22 1
a22 2
TESTSRCS	 = test-attribute.c \
		   test-be32toh.c \
a31 1
		   test-mkstemps.c \
a67 1
		   compat_mkstemps.c \
a136 1
		   term_tag.c \
a211 1
		   term_tag.h \
d248 1
a248 2
		   read.o \
		   tag.o
d250 1
a250 1
ALL_COBJS	 = compat_err.o \
a255 1
		   compat_mkstemps.o \
a260 1
		   compat_stringlist.o \
a282 1
		   term_tag.o \
d305 1
d316 2
a317 1
		   out.o
d321 7
d376 1
a376 1
all: mandoc man demandoc soelim $(BUILD_TARGETS) Makefile.local
d395 2
a396 2
	rm -f libmandoc.a $(LIBMANDOC_OBJS) $(ALL_COBJS)
	rm -f mandoc man $(MAIN_OBJS)
d400 1
a400 1
	rm -f soelim soelim.o
a401 1
	rm -f Makefile.tmp1 Makefile.tmp2
d514 2
a515 2
libmandoc.a: $(MANDOC_COBJS) $(LIBMANDOC_OBJS)
	$(AR) rs $@@ $(MANDOC_COBJS) $(LIBMANDOC_OBJS)
a519 3
man: mandoc
	$(LN) mandoc man

d532 2
a533 2
soelim: $(SOELIM_COBJS) soelim.o
	$(CC) -o $@@ $(LDFLAGS) $(SOELIM_COBJS) soelim.o
d543 1
a543 2
	./configure -depend
	mkdep -f Makefile.tmp1 $(CFLAGS) $(SRCS)
d546 2
a547 3
		Makefile.tmp1 > Makefile.tmp2
	rm Makefile.tmp1
	mv Makefile.tmp2 Makefile.depend
d600 2
a601 2
.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html:
	./mandoc -Thtml -Wwarning,stop \
@


1.5
log
@merge conflicts
@
text
@d1 1
a1 1
# Id: Makefile,v 1.519 2018/07/31 15:34:00 schwarze Exp 
d4 1
a4 1
# Copyright (c) 2011, 2013-2018 Ingo Schwarze <schwarze@@openbsd.org>
d18 1
a18 1
VERSION = 1.14.4
a39 1
		   test-recvmsg.c \
d42 1
d57 2
a58 1
SRCS		 = att.c \
d100 1
d160 2
a167 1
		   libroff.h \
d190 1
a204 1
		   st.in \
d208 3
d239 1
d243 1
d331 1
a347 1
		   mandocd.8.html \
d354 4
d362 1
d365 4
a368 1
		   roff.h.html
d380 1
a380 1
www: $(WWW_MANS)
d382 1
a382 1
$(WWW_MANS): mandoc
d401 1
a401 1
	rm -f $(WWW_MANS) mandoc.tar.gz mandoc.sha256
d439 2
a440 2
	$(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \
		$(DESTDIR)$(INCLUDEDIR)
d494 1
d498 1
d501 1
d538 3
a540 1
	$(INSTALL_DATA) $(WWW_MANS) mandoc.css $(HTDOCDIR)
d588 4
d601 3
a603 2
	./mandoc -Thtml -Wall,stop \
		-Ostyle=mandoc.css,man=%N.%S.html,includes=%I.html $< > $@@
@


1.4
log
@merge conflicts.
@
text
@d1 1
a1 1
# Id: Makefile,v 1.504 2017/02/18 15:29:39 schwarze Exp 
d4 1
a4 1
# Copyright (c) 2011, 2013-2017 Ingo Schwarze <schwarze@@openbsd.org>
d18 1
a18 1
VERSION = 1.14.1
d33 1
d42 1
d50 1
d70 1
d75 1
a92 1
		   man_hash.c \
d100 1
a102 1
		   manpage.c \
a106 1
		   mdoc_hash.c \
d110 1
d119 3
d134 1
d187 1
a209 1
		   man_hash.o \
a216 1
		   mdoc_hash.o \
d224 1
d237 1
d251 1
d255 1
d264 1
a266 2
MANDOC_MAN_OBJS  = mdoc_man.o

d270 1
d274 1
d294 2
a310 4
MANPAGE_OBJS	 = $(DBM_OBJS) \
		   manpage.o \
		   manpath.o

a353 3
WWW_OBJS	 = mdocml.tar.gz \
		   mdocml.sha256

d364 1
a364 1
www: $(WWW_OBJS) $(WWW_MANS)
d382 1
a382 2
	rm -f mandocd catman $(MANDOCD_OBJS)
	rm -f manpage $(MANPAGE_OBJS)
d385 1
a385 1
	rm -f $(WWW_MANS) $(WWW_OBJS)
d397 5
a401 5
	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN)
	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
	$(LN) $(DESTDIR)$(BINDIR)/mandoc \
		$(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
d406 1
a406 2
	$(LN) $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
		$(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
d483 1
a483 1
	rmdir $(DESTDIR)$(INCLUDEDIR)
a500 3
manpage: $(MANPAGE_OBJS) libmandoc.a
	$(CC) -o $@@ $(LDFLAGS) $(MANPAGE_OBJS) libmandoc.a $(LDADD)

a518 1
	mkdir -p $(HTDOCDIR)/snapshots
a519 5
	$(INSTALL_DATA) $(WWW_OBJS) $(HTDOCDIR)/snapshots
	$(INSTALL_DATA) mdocml.tar.gz \
		$(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz
	$(INSTALL_DATA) mdocml.sha256 \
		$(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256
d546 1
d551 1
a551 1
dist: mdocml.sha256
d553 2
a554 2
mdocml.sha256: mdocml.tar.gz
	sha256 mdocml.tar.gz > $@@
d556 1
a556 1
mdocml.tar.gz: $(DISTFILES)
d558 4
a561 4
	mkdir -p .dist/mdocml-$(VERSION)/
	$(INSTALL) -m 0644 $(DISTFILES) .dist/mdocml-$(VERSION)
	cp -pR regress .dist/mdocml-$(VERSION)
	find .dist/mdocml-$(VERSION)/regress \
d563 2
a564 2
	chmod 755 .dist/mdocml-$(VERSION)/configure
	( cd .dist/ && tar zcf ../$@@ mdocml-$(VERSION) )
@


1.4.12.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# Id: Makefile,v 1.530 2019/03/06 16:08:41 schwarze Exp 
d4 1
a4 1
# Copyright (c) 2011, 2013-2019 Ingo Schwarze <schwarze@@openbsd.org>
d18 1
a18 1
VERSION = 1.14.5
a32 1
		   test-noop.c \
d39 1
a40 2
		   test-recallocarray.c \
		   test-recvmsg.c \
a47 1
		   test-strndup.c \
d54 1
a54 2
SRCS		 = arch.c \
		   att.c \
a66 1
		   compat_recallocarray.c \
a70 1
		   compat_strndup.c \
d88 1
a94 1
		   mandoc_msg.c \
a95 1
		   mandoc_xr.c \
d98 1
d103 1
a106 1
		   mdoc_markdown.c \
a114 3
		   roff_html.c \
		   roff_term.c \
		   roff_validate.c \
a126 1
		   term_tab.c \
a149 2
		   eqn.h \
		   eqn_parse.h \
d156 1
a178 2
		   mandoc_parse.h \
		   mandoc_xr.h \
d192 1
a195 3
		   tbl.h \
		   tbl_int.h \
		   tbl_parse.h \
d201 1
d209 1
a216 1
		   roff_validate.o \
a224 1
		   arch.o \
a227 1
		   mandoc_msg.o \
a228 1
		   mandoc_xr.o \
a241 1
		   compat_recallocarray.o \
a244 1
		   compat_strndup.o \
a252 1
		   roff_html.o \
d255 2
a259 1
		   roff_term.o \
a262 1
		   term_tab.o \
a281 2
		   mdoc_man.o \
		   mdoc_markdown.o \
d297 4
a312 1
		   man.options.1.html \
d329 1
a335 4
		   mandocd.8.html

WWW_INCS	 = eqn.h.html \
		   html.h.html \
a339 1
		   mandoc_parse.h.html \
d342 4
a345 4
		   roff.h.html \
		   tbl.h.html \
		   tbl_int.h.html \
		   tbl_parse.h.html
d357 1
a357 1
www: $(WWW_MANS) $(WWW_INCS)
d359 1
a359 1
$(WWW_MANS) $(WWW_INCS): mandoc
d375 2
a376 1
	rm -f mandocd catman catman.o $(MANDOCD_OBJS)
d379 1
a379 1
	rm -f $(WWW_MANS) $(WWW_INCS) mandoc*.tar.gz mandoc*.sha256
d391 5
a395 5
	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_MAN)
	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_APROPOS)
	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_WHATIS)
	cd $(DESTDIR)$(SBINDIR) && \
		$(LN) ${BIN_FROM_SBIN}/mandoc $(BINM_MAKEWHATIS)
d400 2
a401 1
	cd $(DESTDIR)$(MANDIR)/man1 && $(LN) $(BINM_APROPOS).1 $(BINM_WHATIS).1
d418 2
a419 2
	$(INSTALL_LIB) eqn.h man.h mandoc.h mandoc_aux.h mandoc_parse.h \
		mdoc.h roff.h tbl.h $(DESTDIR)$(INCLUDEDIR)
a472 1
	rm -f $(DESTDIR)$(INCLUDEDIR)/eqn.h
a475 1
	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_parse.h
d478 1
a478 2
	rm -f $(DESTDIR)$(INCLUDEDIR)/tbl.h
	[ ! -e $(DESTDIR)$(INCLUDEDIR) ] || rmdir $(DESTDIR)$(INCLUDEDIR)
d496 3
d517 7
a523 3
	$(INSTALL_DATA) mandoc.css $(HTDOCDIR)
	$(INSTALL_DATA) $(WWW_MANS) $(HTDOCDIR)/man
	$(INSTALL_DATA) $(WWW_INCS) $(HTDOCDIR)/includes
a549 1
		! -name '*.out_markdown' \
d554 1
a554 1
dist: mandoc-$(VERSION).sha256
d556 2
a557 2
mandoc-$(VERSION).sha256: mandoc-$(VERSION).tar.gz
	sha256 mandoc-$(VERSION).tar.gz > $@@
d559 1
a559 1
mandoc-$(VERSION).tar.gz: $(DISTFILES)
d561 4
a564 4
	mkdir -p .dist/mandoc-$(VERSION)/
	$(INSTALL) -m 0644 $(DISTFILES) .dist/mandoc-$(VERSION)
	cp -pR regress .dist/mandoc-$(VERSION)
	find .dist/mandoc-$(VERSION)/regress \
d566 2
a567 2
	chmod 755 .dist/mandoc-$(VERSION)/configure
	( cd .dist/ && tar zcf ../$@@ mandoc-$(VERSION) )
a569 4
dist-install: dist
	$(INSTALL_DATA) mandoc-$(VERSION).tar.gz mandoc-$(VERSION).sha256 \
	    $(HTDOCDIR)/snapshots

d579 2
a580 3
	mandoc -Thtml -Wwarning,stop \
		-O 'style=/mandoc.css,man=/man/%N.%S.html;https://man.openbsd.org/%N.%S,includes=/includes/%I.html' \
		$< > $@@
@


1.4.10.1
log
@Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
@
text
@d1 1
a1 1
# Id: Makefile,v 1.519 2018/07/31 15:34:00 schwarze Exp 
d4 1
a4 1
# Copyright (c) 2011, 2013-2018 Ingo Schwarze <schwarze@@openbsd.org>
d18 1
a18 1
VERSION = 1.14.4
a32 1
		   test-noop.c \
a40 1
		   test-recallocarray.c \
a47 1
		   test-strndup.c \
a66 1
		   compat_recallocarray.c \
a70 1
		   compat_strndup.c \
d88 1
a95 1
		   mandoc_xr.c \
d98 1
d103 1
a106 1
		   mdoc_markdown.c \
a114 3
		   roff_html.c \
		   roff_term.c \
		   roff_validate.c \
a126 1
		   term_tab.c \
a178 1
		   mandoc_xr.h \
d201 1
d209 1
a216 1
		   roff_validate.o \
a228 1
		   mandoc_xr.o \
a241 1
		   compat_recallocarray.o \
a244 1
		   compat_strndup.o \
a252 1
		   roff_html.o \
d255 2
a259 1
		   roff_term.o \
a262 1
		   term_tab.o \
a281 2
		   mdoc_man.o \
		   mdoc_markdown.o \
d297 4
d344 3
d357 1
a357 1
www: $(WWW_MANS)
d375 2
a376 1
	rm -f mandocd catman catman.o $(MANDOCD_OBJS)
d379 1
a379 1
	rm -f $(WWW_MANS) mandoc.tar.gz mandoc.sha256
d391 5
a395 5
	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_MAN)
	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_APROPOS)
	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_WHATIS)
	cd $(DESTDIR)$(SBINDIR) && \
		$(LN) ${BIN_FROM_SBIN}/mandoc $(BINM_MAKEWHATIS)
d400 2
a401 1
	cd $(DESTDIR)$(MANDIR)/man1 && $(LN) $(BINM_APROPOS).1 $(BINM_WHATIS).1
d478 1
a478 1
	[ ! -e $(DESTDIR)$(INCLUDEDIR) ] || rmdir $(DESTDIR)$(INCLUDEDIR)
d496 3
d517 1
d519 5
a549 1
		! -name '*.out_markdown' \
d554 1
a554 1
dist: mandoc-$(VERSION).sha256
d556 2
a557 2
mandoc-$(VERSION).sha256: mandoc-$(VERSION).tar.gz
	sha256 mandoc-$(VERSION).tar.gz > $@@
d559 1
a559 1
mandoc-$(VERSION).tar.gz: $(DISTFILES)
d561 4
a564 4
	mkdir -p .dist/mandoc-$(VERSION)/
	$(INSTALL) -m 0644 $(DISTFILES) .dist/mandoc-$(VERSION)
	cp -pR regress .dist/mandoc-$(VERSION)
	find .dist/mandoc-$(VERSION)/regress \
d566 2
a567 2
	chmod 755 .dist/mandoc-$(VERSION)/configure
	( cd .dist/ && tar zcf ../$@@ mandoc-$(VERSION) )
@


1.3
log
@merge conflicts
@
text
@d1 1
a1 1
# Id: Makefile,v 1.488 2016/07/12 05:18:38 kristaps Exp 
d4 1
a4 1
# Copyright (c) 2011, 2013-2016 Ingo Schwarze <schwarze@@openbsd.org>
d18 1
a18 1
VERSION = 1.13.4
d22 4
a25 1
TESTSRCS	 = test-dirent-namlen.c \
d32 3
a34 1
		   test-mmap.c \
d36 1
d39 1
a43 2
		   test-sqlite3.c \
		   test-sqlite3_errstr.c \
d55 1
a66 1
		   compat_sqlite3_errstr.c \
d74 6
d96 1
a100 1
		   mansearch_const.c \
d136 1
d143 5
d165 1
d179 1
a241 1
		   compat_sqlite3_errstr.o \
d265 11
a275 1
BASE_OBJS	 = $(MANDOC_HTML_OBJS) \
d278 2
a285 6
MAIN_OBJS	 = $(BASE_OBJS)

DB_OBJS		 = mandocdb.o \
		   mansearch.o \
		   mansearch_const.o

d287 1
a288 2
		   mansearch.o \
		   mansearch_const.o \
d291 9
a299 1
MANPAGE_OBJS	 = manpage.o mansearch.o mansearch_const.o manpath.o
d315 1
d329 1
d333 1
a334 1
		   man.cgi.3.html \
d353 1
a353 5
all: base-build $(BUILD_TARGETS) Makefile.local

base-build: mandoc demandoc soelim

cgi-build: man.cgi
d361 1
a361 1
.PHONY: base-install cgi-install db-install install www-install
d373 1
a373 1
	rm -f mandoc $(BASE_OBJS) $(DB_OBJS)
d375 1
d382 1
a382 1
base-install: base-build
d384 1
a384 2
	mkdir -p $(DESTDIR)$(LIBDIR)
	mkdir -p $(DESTDIR)$(INCLUDEDIR)
a385 1
	mkdir -p $(DESTDIR)$(MANDIR)/man3
d388 1
d391 5
a395 4
	ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN)
	$(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
	$(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \
		$(DESTDIR)$(INCLUDEDIR)
a398 21
	$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
		mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
	$(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/${MANM_MANCONF}.5
	$(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MAN}.7
	$(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MDOC}.7
	$(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/${MANM_ROFF}.7
	$(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/${MANM_EQN}.7
	$(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/${MANM_TBL}.7
	$(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7

db-install: base-build
	mkdir -p $(DESTDIR)$(BINDIR)
	mkdir -p $(DESTDIR)$(SBINDIR)
	mkdir -p $(DESTDIR)$(MANDIR)/man1
	mkdir -p $(DESTDIR)$(MANDIR)/man3
	mkdir -p $(DESTDIR)$(MANDIR)/man5
	mkdir -p $(DESTDIR)$(MANDIR)/man8
	ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
	ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
	ln -f $(DESTDIR)$(BINDIR)/mandoc \
		$(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
d400 1
a400 1
	ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
d402 1
a402 1
	$(INSTALL_MAN) mansearch.3 $(DESTDIR)$(MANDIR)/man3
d404 6
d413 11
a423 1
cgi-install: cgi-build
d429 58
a486 1
Makefile.local config.h: configure ${TESTSRCS}
d502 6
d532 22
d560 1
d563 3
@


1.3.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# Id: Makefile,v 1.504 2017/02/18 15:29:39 schwarze Exp 
d4 1
a4 1
# Copyright (c) 2011, 2013-2017 Ingo Schwarze <schwarze@@openbsd.org>
d18 1
a18 1
VERSION = 1.14.1
d22 1
a22 4
TESTSRCS	 = test-be32toh.c \
		   test-cmsg.c \
		   test-dirent-namlen.c \
		   test-EFTYPE.c \
d29 1
a29 3
		   test-nanosleep.c \
		   test-ntohl.c \
		   test-O_DIRECTORY.c \
a30 1
		   test-PATH_MAX.c \
a32 1
		   test-recvmsg.c \
d37 2
a49 1
		   catman.c \
d61 1
a68 6
		   dba.c \
		   dba_array.c \
		   dba_read.c \
		   dba_write.c \
		   dbm.c \
		   dbm_map.c \
a84 1
		   mandocd.c \
d89 1
a124 1
		   catman.8 \
a130 5
		   dba.h \
		   dba_array.h \
		   dba_write.h \
		   dbm.h \
		   dbm_map.h \
a147 1
		   man.options.1 \
a160 1
		   mandocd.8 \
d223 1
d247 1
a247 11
DBM_OBJS	 = dbm.o \
		   dbm_map.o \
		   mansearch.o

DBA_OBJS	 = dba.o \
		   dba_array.o \
		   dba_read.o \
		   dba_write.o \
		   mandocdb.o

MAIN_OBJS	 = $(MANDOC_HTML_OBJS) \
a249 2
		   $(DBM_OBJS) \
		   $(DBA_OBJS) \
d256 6
a262 1
		   $(DBM_OBJS) \
d264 2
d268 1
a268 9
MANDOCD_OBJS	 = $(MANDOC_HTML_OBJS) \
		   $(MANDOC_TERM_OBJS) \
		   mandocd.o \
		   out.o \
		   tag.o

MANPAGE_OBJS	 = $(DBM_OBJS) \
		   manpage.o \
		   manpath.o
a283 1
		   man.cgi.3.html \
a296 1
		   mandocd.8.html \
a299 1
		   catman.8.html \
d301 1
d320 5
a324 1
all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local
d332 1
a332 1
.PHONY: base-install cgi-install install www-install
d344 1
a344 1
	rm -f mandoc $(MAIN_OBJS)
a345 1
	rm -f mandocd catman $(MANDOCD_OBJS)
d352 1
a352 1
base-install: mandoc demandoc soelim
d354 2
a355 1
	mkdir -p $(DESTDIR)$(SBINDIR)
d357 1
a359 1
	mkdir -p $(DESTDIR)$(MANDIR)/man8
d362 4
a365 5
	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN)
	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
	$(LN) $(DESTDIR)$(BINDIR)/mandoc \
		$(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
d369 21
d391 1
a391 1
	$(LN) $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
d393 1
a393 1
	$(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5
a394 6
	$(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7
	$(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7
	$(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7
	$(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7
	$(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7
	$(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
d398 1
a398 11
lib-install: libmandoc.a
	mkdir -p $(DESTDIR)$(LIBDIR)
	mkdir -p $(DESTDIR)$(INCLUDEDIR)
	mkdir -p $(DESTDIR)$(MANDIR)/man3
	$(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
	$(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \
		$(DESTDIR)$(INCLUDEDIR)
	$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
		mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3

cgi-install: man.cgi
d404 1
a404 58
catman-install: mandocd catman
	mkdir -p $(DESTDIR)$(SBINDIR)
	mkdir -p $(DESTDIR)$(MANDIR)/man8
	$(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR)
	$(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN)
	$(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8
	$(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8

uninstall:
	rm -f $(DESTDIR)$(BINDIR)/mandoc
	rm -f $(DESTDIR)$(BINDIR)/demandoc
	rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
	rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN)
	rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
	rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
	rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
	rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1
	rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1
	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
	rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5
	rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7
	rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7
	rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
	rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi
	rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css
	rm -f $(DESTDIR)$(SBINDIR)/mandocd
	rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN)
	rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8
	rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8
	rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a
	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3
	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3
	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3
	rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3
	rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3
	rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3
	rm -f $(DESTDIR)$(INCLUDEDIR)/man.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h
	rmdir $(DESTDIR)$(INCLUDEDIR)

regress: all
	cd regress && ./regress.pl

regress-clean:
	cd regress && ./regress.pl . clean

Makefile.local config.h: configure $(TESTSRCS)
a419 6
mandocd: $(MANDOCD_OBJS) libmandoc.a
	$(CC) -o $@@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD)

catman: catman.o libmandoc.a
	$(CC) -o $@@ $(LDFLAGS) catman.o libmandoc.a $(LDADD)

a443 22
regress-distclean:
	@@find regress \
		-name '.#*' -o \
		-name '*.orig' -o \
		-name '*.rej' -o \
		-name '*.core' \
		-exec rm -i {} \;

regress-distcheck:
	@@find regress ! -type d ! -type f
	@@find regress -type f \
		! -path '*/CVS/*' \
		! -name Makefile \
		! -name Makefile.inc \
		! -name '*.in' \
		! -name '*.out_ascii' \
		! -name '*.out_utf8' \
		! -name '*.out_html' \
		! -name '*.out_lint' \
		! -path regress/regress.pl \
		! -path regress/regress.pl.1

a449 1
	ls regress/*/*/*.mandoc_* && exit 1 || true
a451 3
	cp -pR regress .dist/mdocml-$(VERSION)
	find .dist/mdocml-$(VERSION)/regress \
	    -type d -name CVS -print0 | xargs -0 rm -rf
@


1.2
log
@merge conflicts.
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.1.1.15 2015/12/17 21:58:47 christos Exp $
d4 1
a4 1
# Copyright (c) 2011, 2013, 2014, 2015 Ingo Schwarze <schwarze@@openbsd.org>
d18 1
a18 1
VERSION = 1.13.3
d23 1
a23 1
		   test-fgetln.c \
d25 1
d27 2
d31 2
d34 3
d40 1
d46 1
d52 1
a52 1
		   compat_fgetln.c \
d54 1
d56 2
d59 1
d63 1
d68 1
d84 1
d96 1
d104 1
d106 1
d116 1
a116 2
		   tree.c \
		   $(TESTSRCS)
a125 1
		   chars.in \
d128 1
a132 1
		   example.style.css \
a141 1
		   man-cgi.css \
d144 1
d146 1
d148 1
d151 1
d160 1
a160 1
		   manpath.h \
d170 3
d174 1
a174 1
		   style.css \
d178 2
a179 1
		   $(SRCS)
d192 1
d209 1
d214 1
a214 1
COMPAT_OBJS	 = compat_fgetln.o \
d216 1
d218 2
d221 1
d228 2
a229 1
		   compat_strtonum.o
d253 1
d272 7
d283 1
d292 1
d301 1
d304 1
a306 1
		   manpath.h.html \
d308 2
a309 1
		   mdoc.h.html
d322 1
a322 1
base-build: mandoc demandoc
d348 1
a353 1
	mkdir -p $(DESTDIR)$(EXAMPLEDIR)
d358 1
d361 1
d364 1
a364 1
	$(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h \
d367 1
d371 1
a377 1
	$(INSTALL_DATA) example.style.css $(DESTDIR)$(EXAMPLEDIR)
a400 2
	mkdir -p $(DESTDIR)$(WWWPREFIX)/man/mandoc/man1
	mkdir -p $(DESTDIR)$(WWWPREFIX)/man/mandoc/man8
d402 1
a402 4
	$(INSTALL_DATA) example.style.css $(DESTDIR)$(HTDOCDIR)/man.css
	$(INSTALL_DATA) man-cgi.css $(DESTDIR)$(HTDOCDIR)
	$(INSTALL_MAN) apropos.1 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man1/
	$(INSTALL_MAN) man.cgi.8 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man8/
d409 1
a409 1
	$(AR) rs $@@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
d412 1
a412 1
	$(CC) $(LDFLAGS) -o $@@ $(MAIN_OBJS) libmandoc.a $(DBLIB)
d415 1
a415 1
	$(CC) $(LDFLAGS) -o $@@ $(MANPAGE_OBJS) libmandoc.a $(DBLIB)
d418 1
a418 1
	$(CC) $(LDFLAGS) $(STATIC) -o $@@ $(CGI_OBJS) libmandoc.a $(DBLIB)
d421 4
a424 1
	$(CC) $(LDFLAGS) -o $@@ $(DEMANDOC_OBJS) libmandoc.a
d430 1
a430 1
	$(INSTALL_DATA) $(WWW_MANS) style.css $(HTDOCDIR)
d444 2
d466 1
a466 1
		-Ostyle=style.css,man=%N.%S.html,includes=%I.html $< > $@@
@


1.2.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# Id: Makefile,v 1.488 2016/07/12 05:18:38 kristaps Exp 
d4 1
a4 1
# Copyright (c) 2011, 2013-2016 Ingo Schwarze <schwarze@@openbsd.org>
d18 1
a18 1
VERSION = 1.13.4
d23 1
a23 1
		   test-err.c \
a24 1
		   test-getline.c \
a25 2
		   test-isblank.c \
		   test-mkdtemp.c \
a27 2
		   test-pledge.c \
		   test-progname.c \
a28 3
		   test-rewb-bsd.c \
		   test-rewb-sysv.c \
		   test-sandbox_init.c \
a31 1
		   test-stringlist.c \
a36 1
		   test-vasprintf.c \
d42 1
a42 1
		   compat_err.c \
a43 1
		   compat_getline.c \
a44 2
		   compat_isblank.c \
		   compat_mkdtemp.c \
a45 1
		   compat_progname.c \
a48 1
		   compat_stringlist.c \
a52 1
		   compat_vasprintf.c \
a67 1
		   mandoc_ohash.c \
a78 1
		   mdoc_state.c \
a85 1
		   soelim.c \
a86 1
		   tag.c \
d96 2
a97 1
		   tree.c
d107 1
a109 1
		   compat_stringlist.h \
d114 1
d124 1
a126 1
		   man.cgi.3 \
a127 1
		   man.conf.5 \
a128 1
		   manconf.h \
a130 1
		   mandoc.css \
d139 1
a139 1
		   mandoc_ohash.h \
a148 3
		   roff.h \
		   roff_int.h \
		   soelim.1 \
d150 1
a150 1
		   tag.h \
d154 1
a154 2
		   $(SRCS) \
		   $(TESTSRCS)
a166 1
		   mdoc_state.o \
a182 1
		   mandoc_ohash.o \
d187 1
a187 1
COMPAT_OBJS	 = compat_err.o \
a188 1
		   compat_getline.o \
a189 2
		   compat_isblank.o \
		   compat_mkdtemp.o \
a190 1
		   compat_progname.o \
d197 1
a197 2
		   compat_strtonum.o \
		   compat_vasprintf.o
a220 1
		   tag.o \
a238 7
SOELIM_OBJS	 = soelim.o \
		   compat_err.o \
		   compat_getline.o \
		   compat_progname.o \
		   compat_reallocarray.o \
		   compat_stringlist.o

a242 1
		   soelim.1.html \
a250 1
		   man.conf.5.html \
a258 1
		   man.cgi.3.html \
a260 1
		   manconf.h.html \
d263 1
d265 1
a265 2
		   mdoc.h.html \
		   roff.h.html
d278 1
a278 1
base-build: mandoc demandoc soelim
a303 1
	rm -f soelim $(SOELIM_OBJS)
d309 1
a313 1
	mkdir -p $(DESTDIR)$(MANDIR)/man5
a315 1
	$(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
d318 1
a318 1
	$(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \
a320 1
	$(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
a323 1
	$(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/${MANM_MANCONF}.5
d330 1
d354 2
d357 4
a360 1
	$(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR)
d367 1
a367 1
	ar rs $@@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
d370 1
a370 1
	$(CC) -o $@@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD)
d373 1
a373 1
	$(CC) -o $@@ $(LDFLAGS) $(MANPAGE_OBJS) libmandoc.a $(LDADD)
d376 1
a376 1
	$(CC) $(STATIC) -o $@@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD)
d379 1
a379 4
	$(CC) -o $@@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD)

soelim: $(SOELIM_OBJS)
	$(CC) -o $@@ $(LDFLAGS) $(SOELIM_OBJS)
d385 1
a385 1
	$(INSTALL_DATA) $(WWW_MANS) mandoc.css $(HTDOCDIR)
a398 2
dist: mdocml.sha256

d419 1
a419 1
		-Ostyle=mandoc.css,man=%N.%S.html,includes=%I.html $< > $@@
@


1.2.2.2
log
@Sync with HEAD
@
text
@d1 1
a1 1
# Id: Makefile,v 1.504 2017/02/18 15:29:39 schwarze Exp 
d4 1
a4 1
# Copyright (c) 2011, 2013-2017 Ingo Schwarze <schwarze@@openbsd.org>
d18 1
a18 1
VERSION = 1.14.1
d22 1
a22 4
TESTSRCS	 = test-be32toh.c \
		   test-cmsg.c \
		   test-dirent-namlen.c \
		   test-EFTYPE.c \
d29 1
a29 3
		   test-nanosleep.c \
		   test-ntohl.c \
		   test-O_DIRECTORY.c \
a30 1
		   test-PATH_MAX.c \
a32 1
		   test-recvmsg.c \
d37 2
a49 1
		   catman.c \
d61 1
a68 6
		   dba.c \
		   dba_array.c \
		   dba_read.c \
		   dba_write.c \
		   dbm.c \
		   dbm_map.c \
a84 1
		   mandocd.c \
d89 1
a124 1
		   catman.8 \
a130 5
		   dba.h \
		   dba_array.h \
		   dba_write.h \
		   dbm.h \
		   dbm_map.h \
a147 1
		   man.options.1 \
a160 1
		   mandocd.8 \
d223 1
d247 1
a247 11
DBM_OBJS	 = dbm.o \
		   dbm_map.o \
		   mansearch.o

DBA_OBJS	 = dba.o \
		   dba_array.o \
		   dba_read.o \
		   dba_write.o \
		   mandocdb.o

MAIN_OBJS	 = $(MANDOC_HTML_OBJS) \
a249 2
		   $(DBM_OBJS) \
		   $(DBA_OBJS) \
d256 6
a262 1
		   $(DBM_OBJS) \
d264 2
d268 1
a268 9
MANDOCD_OBJS	 = $(MANDOC_HTML_OBJS) \
		   $(MANDOC_TERM_OBJS) \
		   mandocd.o \
		   out.o \
		   tag.o

MANPAGE_OBJS	 = $(DBM_OBJS) \
		   manpage.o \
		   manpath.o
a283 1
		   man.cgi.3.html \
a296 1
		   mandocd.8.html \
a299 1
		   catman.8.html \
d301 1
d320 5
a324 1
all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local
d332 1
a332 1
.PHONY: base-install cgi-install install www-install
d344 1
a344 1
	rm -f mandoc $(MAIN_OBJS)
a345 1
	rm -f mandocd catman $(MANDOCD_OBJS)
d352 1
a352 1
base-install: mandoc demandoc soelim
d354 2
a355 1
	mkdir -p $(DESTDIR)$(SBINDIR)
d357 1
a359 1
	mkdir -p $(DESTDIR)$(MANDIR)/man8
d362 4
a365 5
	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN)
	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
	$(LN) $(DESTDIR)$(BINDIR)/mandoc \
		$(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
d369 21
d391 1
a391 1
	$(LN) $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
d393 1
a393 1
	$(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5
a394 6
	$(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7
	$(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7
	$(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7
	$(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7
	$(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7
	$(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
d398 1
a398 11
lib-install: libmandoc.a
	mkdir -p $(DESTDIR)$(LIBDIR)
	mkdir -p $(DESTDIR)$(INCLUDEDIR)
	mkdir -p $(DESTDIR)$(MANDIR)/man3
	$(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
	$(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \
		$(DESTDIR)$(INCLUDEDIR)
	$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
		mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3

cgi-install: man.cgi
d404 1
a404 58
catman-install: mandocd catman
	mkdir -p $(DESTDIR)$(SBINDIR)
	mkdir -p $(DESTDIR)$(MANDIR)/man8
	$(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR)
	$(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN)
	$(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8
	$(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8

uninstall:
	rm -f $(DESTDIR)$(BINDIR)/mandoc
	rm -f $(DESTDIR)$(BINDIR)/demandoc
	rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
	rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN)
	rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
	rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
	rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
	rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1
	rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1
	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
	rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5
	rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7
	rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7
	rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
	rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi
	rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css
	rm -f $(DESTDIR)$(SBINDIR)/mandocd
	rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN)
	rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8
	rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8
	rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a
	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3
	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3
	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3
	rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3
	rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3
	rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3
	rm -f $(DESTDIR)$(INCLUDEDIR)/man.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h
	rmdir $(DESTDIR)$(INCLUDEDIR)

regress: all
	cd regress && ./regress.pl

regress-clean:
	cd regress && ./regress.pl . clean

Makefile.local config.h: configure $(TESTSRCS)
a419 6
mandocd: $(MANDOCD_OBJS) libmandoc.a
	$(CC) -o $@@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD)

catman: catman.o libmandoc.a
	$(CC) -o $@@ $(LDFLAGS) catman.o libmandoc.a $(LDADD)

a443 22
regress-distclean:
	@@find regress \
		-name '.#*' -o \
		-name '*.orig' -o \
		-name '*.rej' -o \
		-name '*.core' \
		-exec rm -i {} \;

regress-distcheck:
	@@find regress ! -type d ! -type f
	@@find regress -type f \
		! -path '*/CVS/*' \
		! -name Makefile \
		! -name Makefile.inc \
		! -name '*.in' \
		! -name '*.out_ascii' \
		! -name '*.out_utf8' \
		! -name '*.out_html' \
		! -name '*.out_lint' \
		! -path regress/regress.pl \
		! -path regress/regress.pl.1

a449 1
	ls regress/*/*/*.mandoc_* && exit 1 || true
a451 3
	cp -pR regress .dist/mdocml-$(VERSION)
	find .dist/mdocml-$(VERSION)/regress \
	    -type d -name CVS -print0 | xargs -0 rm -rf
@


1.1
log
@Initial revision
@
text
@d1 289
a289 1
.SUFFIXES:	.html .xml .sgml .1 .3 .7 .md5 .tar.gz .1.txt .3.txt .7.txt .1.sgml .3.sgml .7.sgml
d291 1
a291 81
BINDIR		= $(PREFIX)/bin
INCLUDEDIR	= $(PREFIX)/include
LIBDIR		= $(PREFIX)/lib
MANDIR		= $(PREFIX)/man
EXAMPLEDIR	= $(PREFIX)/share/examples/mandoc
INSTALL_PROGRAM	= install -m 0755
INSTALL_DATA	= install -m 0444
INSTALL_LIB	= install -m 0644
INSTALL_MAN	= $(INSTALL_DATA)

VERSION	   = 1.9.15
VDATE	   = 18 February 2010

VFLAGS     = -DVERSION="\"$(VERSION)\"" -DHAVE_CONFIG_H
WFLAGS     = -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
CFLAGS    += -g $(VFLAGS) $(WFLAGS)
#CFLAGS	  += -DOSNAME="\"OpenBSD 4.5\""
LINTFLAGS += $(VFLAGS)

MANDOCFLAGS = -Wall -fstrict
MANDOCHTML = -Thtml -Ostyle=style.css,man=%N.%S.html,includes=%I.html

MDOCLNS	   = mdoc_macro.ln mdoc.ln mdoc_hash.ln mdoc_strings.ln \
	     mdoc_argv.ln mdoc_validate.ln mdoc_action.ln \
	     lib.ln att.ln arch.ln vol.ln msec.ln st.ln \
	     mandoc.ln
MDOCOBJS   = mdoc_macro.o mdoc.o mdoc_hash.o mdoc_strings.o \
	     mdoc_argv.o mdoc_validate.o mdoc_action.o lib.o att.o \
	     arch.o vol.o msec.o st.o mandoc.o
MDOCSRCS   = mdoc_macro.c mdoc.c mdoc_hash.c mdoc_strings.c \
	     mdoc_argv.c mdoc_validate.c mdoc_action.c lib.c att.c \
	     arch.c vol.c msec.c st.c mandoc.c

MANLNS	   = man_macro.ln man.ln man_hash.ln man_validate.ln \
	     man_action.ln mandoc.ln man_argv.ln
MANOBJS	   = man_macro.o man.o man_hash.o man_validate.o \
	     man_action.o mandoc.o man_argv.o
MANSRCS	   = man_macro.c man.c man_hash.c man_validate.c \
	     man_action.c mandoc.c man_argv.c

MAINLNS	   = main.ln mdoc_term.ln chars.ln term.ln tree.ln \
	     compat.ln man_term.ln html.ln mdoc_html.ln \
	     man_html.ln out.ln
MAINOBJS   = main.o mdoc_term.o chars.o term.o tree.o compat.o \
	     man_term.o html.o mdoc_html.o man_html.o out.o
MAINSRCS   = main.c mdoc_term.c chars.c term.c tree.c compat.c \
	     man_term.c html.c mdoc_html.c man_html.c out.c

LLNS	   = llib-llibmdoc.ln llib-llibman.ln llib-lmandoc.ln
LNS	   = $(MAINLNS) $(MDOCLNS) $(MANLNS)
LIBS	   = libmdoc.a libman.a
OBJS	   = $(MDOCOBJS) $(MAINOBJS) $(MANOBJS)
SRCS	   = $(MDOCSRCS) $(MAINSRCS) $(MANSRCS)
DATAS	   = arch.in att.in lib.in msec.in st.in \
	     vol.in chars.in
HEADS	   = mdoc.h libmdoc.h man.h libman.h term.h \
	     libmandoc.h html.h chars.h out.h main.h
GSGMLS	   = mandoc.1.sgml mdoc.3.sgml mdoc.7.sgml manuals.7.sgml \
	     mandoc_char.7.sgml man.7.sgml man.3.sgml
SGMLS	   = index.sgml
HTMLS	   = ChangeLog.html index.html
XSLS	   = ChangeLog.xsl
GHTMLS	   = mandoc.1.html mdoc.3.html man.3.html mdoc.7.html \
	     man.7.html mandoc_char.7.html manuals.7.html
TEXTS	   = mandoc.1.txt mdoc.3.txt man.3.txt mdoc.7.txt man.7.txt \
	     mandoc_char.7.txt manuals.7.txt ChangeLog.txt
EXAMPLES   = example.style.css
XMLS	   = ChangeLog.xml
STATICS	   = index.css style.css external.png
MD5S	   = mdocml-$(VERSION).md5 
TARGZS	   = mdocml-$(VERSION).tar.gz
MANS	   = mandoc.1 mdoc.3 mdoc.7 manuals.7 mandoc_char.7 \
	     man.7 man.3
BINS	   = mandoc
TESTS	   = test-strlcat.c test-strlcpy.c
CONFIGS	   = config.h.pre config.h.post
CLEAN	   = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS) $(HTMLS) \
	     $(TARGZS) tags $(MD5S) $(XMLS) $(TEXTS) $(GSGMLS) \
	     $(GHTMLS) config.h config.log
INSTALL	   = $(SRCS) $(HEADS) Makefile $(MANS) $(SGMLS) $(STATICS) \
	     $(DATAS) $(XSLS) $(EXAMPLES) $(TESTS) $(CONFIGS)
d293 1
a293 1
all:	$(BINS)
d295 2
a296 1
lint:	$(LLNS)
d299 108
a406 141
	rm -f $(CLEAN)

cleanlint:
	rm -f $(LNS) $(LLNS)

cleanhtml:
	rm -f $(HTMLS) $(GSGMLS) $(GHTMLS)

dist:	mdocml-$(VERSION).tar.gz

www:	all $(GSGMLS) $(GHTMLS) $(HTMLS) $(TEXTS) $(MD5S) $(TARGZS)

htmls:	all $(GSGMLS) $(GHTMLS)

installwww: www
	install -m 0444 $(GHTMLS) $(HTMLS) $(TEXTS) $(STATICS) $(PREFIX)/
	install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/
	install -m 0444 mdocml-$(VERSION).md5 $(PREFIX)/snapshots/
	install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/mdocml.tar.gz
	install -m 0444 mdocml-$(VERSION).md5 $(PREFIX)/snapshots/mdocml.md5

install:
	mkdir -p $(BINDIR)
	mkdir -p $(EXAMPLEDIR)
	mkdir -p $(MANDIR)/man1
	mkdir -p $(MANDIR)/man7
	$(INSTALL_PROGRAM) mandoc $(BINDIR)
	$(INSTALL_MAN) mandoc.1 $(MANDIR)/man1
	$(INSTALL_MAN) man.7 mdoc.7 $(MANDIR)/man7
	$(INSTALL_DATA) example.style.css $(EXAMPLEDIR)

uninstall:
	rm -f $(BINDIR)/mandoc
	rm -f $(MANDIR)/man1/mandoc.1
	rm -f $(MANDIR)/man7/mdoc.7
	rm -f $(MANDIR)/man7/man.7
	rm -f $(EXAMPLEDIR)/example.style.css

$(OBJS): config.h

$(LNS): config.h

man_macro.ln: man_macro.c libman.h
man_macro.o: man_macro.c libman.h

lib.ln: lib.c lib.in libmdoc.h
lib.o: lib.c lib.in libmdoc.h

att.ln: att.c att.in libmdoc.h
att.o: att.c att.in libmdoc.h

arch.ln: arch.c arch.in libmdoc.h
arch.o: arch.c arch.in libmdoc.h

vol.ln: vol.c vol.in libmdoc.h
vol.o: vol.c vol.in libmdoc.h

chars.ln: chars.c chars.in chars.h
chars.o: chars.c chars.in chars.h

msec.ln: msec.c msec.in libmdoc.h
msec.o: msec.c msec.in libmdoc.h

st.ln: st.c st.in libmdoc.h
st.o: st.c st.in libmdoc.h

mdoc_macro.ln: mdoc_macro.c libmdoc.h
mdoc_macro.o: mdoc_macro.c libmdoc.h

mdoc_term.ln: mdoc_term.c term.h mdoc.h
mdoc_term.o: mdoc_term.c term.h mdoc.h

mdoc_strings.ln: mdoc_strings.c libmdoc.h
mdoc_strings.o: mdoc_strings.c libmdoc.h

man_hash.ln: man_hash.c libman.h
man_hash.o: man_hash.c libman.h

mdoc_hash.ln: mdoc_hash.c libmdoc.h
mdoc_hash.o: mdoc_hash.c libmdoc.h

mdoc.ln: mdoc.c libmdoc.h
mdoc.o: mdoc.c libmdoc.h

man.ln: man.c libman.h
man.o: man.c libman.h

main.ln: main.c mdoc.h
main.o: main.c mdoc.h

compat.ln: compat.c 
compat.o: compat.c

term.ln: term.c term.h man.h mdoc.h chars.h
term.o: term.c term.h man.h mdoc.h chars.h

html.ln: html.c html.h chars.h
html.o: html.c html.h chars.h

mdoc_html.ln: mdoc_html.c html.h mdoc.h
mdoc_html.o: mdoc_html.c html.h mdoc.h

man_html.ln: man_html.c html.h man.h out.h
man_html.o: man_html.c html.h man.h out.h

out.ln: out.c out.h
out.o: out.c out.h

tree.ln: tree.c man.h mdoc.h
tree.o: tree.c man.h mdoc.h

mdoc_argv.ln: mdoc_argv.c libmdoc.h
mdoc_argv.o: mdoc_argv.c libmdoc.h

man_argv.ln: man_argv.c libman.h
man_argv.o: man_argv.c libman.h

man_validate.ln: man_validate.c libman.h
man_validate.o: man_validate.c libman.h

mdoc_validate.ln: mdoc_validate.c libmdoc.h
mdoc_validate.o: mdoc_validate.c libmdoc.h

mdoc_action.ln: mdoc_action.c libmdoc.h
mdoc_action.o: mdoc_action.c libmdoc.h

libmdoc.h: mdoc.h

ChangeLog.xml:
	cvs2cl --xml --xml-encoding iso-8859-15 -t --noxmlns -f $@@

ChangeLog.txt:
	cvs2cl -t -f $@@

ChangeLog.html: ChangeLog.xml ChangeLog.xsl
	xsltproc -o $@@ ChangeLog.xsl ChangeLog.xml

mdocml-$(VERSION).tar.gz: $(INSTALL)
	mkdir -p .dist/mdocml/mdocml-$(VERSION)/
	cp -f $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
	( cd .dist/mdocml/ && tar zcf ../../$@@ mdocml-$(VERSION)/ )
d409 1
a409 2
llib-llibmdoc.ln: $(MDOCLNS)
	$(LINT) -Clibmdoc $(MDOCLNS)
d411 2
a412 2
llib-llibman.ln: $(MANLNS)
	$(LINT) -Clibman $(MANLNS)
d414 2
a415 2
llib-lmandoc.ln: $(MAINLNS) llib-llibmdoc.ln
	$(LINT) -Cmandoc $(MAINLNS) llib-llibmdoc.ln
d417 3
a419 37
libmdoc.a: $(MDOCOBJS)
	$(AR) rs $@@ $(MDOCOBJS)

libman.a: $(MANOBJS)
	$(AR) rs $@@ $(MANOBJS)

mandoc: $(MAINOBJS) libmdoc.a libman.a
	$(CC) $(CFLAGS) -o $@@ $(MAINOBJS) libmdoc.a libman.a

.sgml.html:
	validate --warn $<
	sed -e "s!@@VERSION@@!$(VERSION)!" -e "s!@@VDATE@@!$(VDATE)!" $< > $@@

.1.1.txt .3.3.txt .7.7.txt:
	./mandoc $(MANDOCFLAGS) $< | col -b > $@@

.1.1.sgml .3.3.sgml .7.7.sgml:
	./mandoc $(MANDOCFLAGS) $(MANDOCHTML) $< > $@@

.tar.gz.md5:
	md5 $< > $@@

config.h: config.h.pre config.h.post
	rm -f config.log
	( cat config.h.pre; \
	echo; \
	if $(CC) $(CFLAGS) -Werror -c test-strlcat.c >> config.log 2>&1; then \
		echo '#define HAVE_STRLCAT'; \
		rm test-strlcat.o; \
	fi; \
	if $(CC) $(CFLAGS) -Werror -c test-strlcpy.c >> config.log 2>&1; then \
		echo '#define HAVE_STRLCPY'; \
		rm test-strlcpy.o; \
	fi; \
	echo; \
	cat config.h.post \
	) > $@@
@


1.1.1.1
log
@Import mdocml 1.9.15 modulo a patch for .Xr handling:
- XHTML output support, more human-readable HTML output
- end-of-line white space detected in all lines
- fix subtle bug for list displays in some modes
- fix column handling
- full support for \f etc
- imporoved column handling
- various other bug fixes
- compatiblity support for strlcat/strlcpy
- groff-compatible .Xr [backed out]
@
text
@@


1.1.1.2
log
@Import of mdocml-1.9.22:
- Better support for obsolete .Xo/.Xc macros if compiled with -DUGLY
- Support for more roff instructions in the man(7) code
- Correct handling of opening punctuation in macros for mdoc(7)
- Discard more of the pod2man junk
@
text
@d13 2
a14 2
VERSION	   = 1.9.22
VDATE	   = 31 March 2010
d16 1
a16 1
VFLAGS	   = -DVERSION="\"$(VERSION)\""
d18 2
a19 10
CFLAGS    += -g $(WFLAGS) $(VFLAGS) -DHAVE_CONFIG_H

# Specify this if you want to hard-code the operating system to appear
# in the lower-left hand corner of -mdoc manuals.
# CFLAGS += -DOSNAME="\"OpenBSD 4.5\""

# Specify this if you want to accept Xo/Xc macros extending the head of
# block full-implicit macros.
# CFLAGS += -DUGLY

d132 2
a133 1
man_macro.ln man_macro.o: man_macro.c libman.h
d135 2
a136 1
lib.ln lib.o: lib.c lib.in libmdoc.h
d138 2
a139 1
att.ln att.o: att.c att.in libmdoc.h
d141 2
a142 1
arch.ln arch.o: arch.c arch.in libmdoc.h
d144 2
a145 1
vol.ln vol.o: vol.c vol.in libmdoc.h
d147 2
a148 1
chars.ln chars.o: chars.c chars.in chars.h
d150 2
a151 1
msec.ln msec.o: msec.c msec.in libmdoc.h
d153 2
a154 1
st.ln st.o: st.c st.in libmdoc.h
d156 2
a157 1
mdoc_macro.ln mdoc_macro.o: mdoc_macro.c libmdoc.h
d159 2
a160 1
mdoc_term.ln mdoc_term.o: mdoc_term.c term.h mdoc.h
d162 2
a163 1
mdoc_strings.ln mdoc_strings.o: mdoc_strings.c libmdoc.h
d165 2
a166 1
man_hash.ln man_hash.o: man_hash.c libman.h
d168 2
a169 1
mdoc_hash.ln mdoc_hash.o: mdoc_hash.c libmdoc.h
d171 2
a172 1
mdoc.ln mdoc.o: mdoc.c libmdoc.h
d174 2
a175 1
man.ln man.o: man.c libman.h
d177 2
a178 1
main.ln main.o: main.c mdoc.h
d180 2
a181 1
compat.ln compat.o: compat.c 
d183 2
a184 1
term.ln term.o: term.c term.h man.h mdoc.h chars.h
d186 2
a187 1
html.ln html.o: html.c html.h chars.h
d189 2
a190 1
mdoc_html.ln mdoc_html.o: mdoc_html.c html.h mdoc.h
d192 2
a193 1
man_html.ln man_html.o: man_html.c html.h man.h out.h
d195 2
a196 1
out.ln out.o: out.c out.h
d198 2
a199 1
tree.ln tree.o: tree.c man.h mdoc.h
d201 2
a202 1
mdoc_argv.ln mdoc_argv.o: mdoc_argv.c libmdoc.h
d204 2
a205 1
man_argv.ln man_argv.o: man_argv.c libman.h
d207 2
a208 1
man_validate.ln man_validate.o: man_validate.c libman.h
d210 2
a211 1
mdoc_validate.ln mdoc_validate.o: mdoc_validate.c libmdoc.h
d213 2
a214 1
mdoc_action.ln mdoc_action.o: mdoc_action.c libmdoc.h
@


1.1.1.3
log
@mdocml-1.9.23:
- Smaller bug fixes
- Relax some constraints that don't deal well with the real world usage
@
text
@d1 1
a1 1
.SUFFIXES:	.html .xml .sgml .1 .3 .7 .md5 .tar.gz .1.txt .3.txt .7.txt .1.sgml .3.sgml .7.sgml .h .h.html
d13 2
a14 2
VERSION	   = 1.9.23
VDATE	   = 07 April 2010
d71 1
a71 1
HTMLS	   = ChangeLog.html index.html man.h.html mdoc.h.html
d126 1
a126 1
	$(INSTALL_MAN) man.7 mdoc.7 mandoc_char.7 $(MANDIR)/man7
a133 1
	rm -f $(MANDIR)/man7/mandoc_char.7
a243 3
.h.h.html:
	highlight -I $< >$@@

@


1.1.1.4
log
@Import mdocml-1.10.0:
- basic support for the low-level roff macros
- various cleanups and improvements
@
text
@a2 1
PREFIX		= /usr/local
d8 3
a10 4
INSTALL		= install
INSTALL_PROGRAM	= $(INSTALL) -m 0755
INSTALL_DATA	= $(INSTALL) -m 0444
INSTALL_LIB	= $(INSTALL) -m 0644
d13 2
a14 2
VERSION	   = 1.10.0
VDATE	   = 29 May 2010
d24 3
a26 3
# Unset this if you don't want Xo/Xc allowing split `It' lines, which
# breaks symmetry.
CFLAGS	  += -DUGLY
a30 1

a32 12
ROFFLNS    = roff.ln

ROFFSRCS   = roff.c

ROFFOBJS   = roff.o

MANDOCLNS  = mandoc.ln

MANDOCSRCS = mandoc.c

MANDOCOBJS = mandoc.o

d35 2
a36 2
	     lib.ln att.ln arch.ln vol.ln msec.ln st.ln

d39 1
a39 2
	     arch.o vol.o msec.o st.o

d42 1
a42 1
	     arch.c vol.c msec.c st.c
d45 1
a45 2
	     man_action.ln man_argv.ln

d47 1
a47 1
	     man_action.o man_argv.o
a53 1

a55 1

d59 5
a63 14
LLNS	   = llib-llibmdoc.ln llib-llibman.ln llib-lmandoc.ln \
	     llib-llibmandoc.ln llib-llibroff.ln

LNS	   = $(MAINLNS) $(MDOCLNS) $(MANLNS) \
	     $(MANDOCLNS) $(ROFFLNS)

LIBS	   = libmdoc.a libman.a libmandoc.a libroff.a

OBJS	   = $(MDOCOBJS) $(MAINOBJS) $(MANOBJS) \
	     $(MANDOCOBJS) $(ROFFOBJS)

SRCS	   = $(MDOCSRCS) $(MAINSRCS) $(MANSRCS) \
	     $(MANDOCSRCS) $(ROFFSRCS)

a65 1

d67 1
a67 3
	     libmandoc.h html.h chars.h out.h main.h roff.h \
	     mandoc.h

d69 1
a69 3
	     mandoc_char.7.sgml man.7.sgml man.3.sgml roff.7.sgml \
	     roff.3.sgml

d71 1
a71 6

HTMLS	   = ChangeLog.html index.html man.h.html mdoc.h.html \
	     mandoc.h.html roff.h.html mandoc.1.html mdoc.3.html \
	     man.3.html mdoc.7.html man.7.html mandoc_char.7.html \
	     manuals.7.html roff.7.html roff.3.html

d73 2
a74 1

d76 1
a76 3
	     mandoc_char.7.txt manuals.7.txt ChangeLog.txt \
	     roff.7.txt roff.3.txt

a77 1

a78 1

a79 1

a80 1

d82 2
a83 4

MANS	   = mandoc.1 mdoc.3 mdoc.7 manuals.7 mandoc_char.7 man.7 \
	     man.3 roff.7 roff.3

a84 1

a85 1

d87 1
a87 2

DOCLEAN	   = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS) $(HTMLS) \
d89 2
a90 3
	     config.h config.log

DOINSTALL  = $(SRCS) $(HEADS) Makefile $(MANS) $(SGMLS) $(STATICS) \
d98 1
a98 1
	rm -f $(DOCLEAN)
d104 1
a104 1
	rm -f $(HTMLS) $(GSGMLS)
d108 3
a110 1
www:	all $(GSGMLS) $(HTMLS) $(TEXTS) $(MD5S) $(TARGZS)
d113 5
a117 5
	$(INSTALL_DATA) $(HTMLS) $(TEXTS) $(STATICS) $(DESTDIR)$(PREFIX)/
	$(INSTALL_DATA) mdocml-$(VERSION).tar.gz $(DESTDIR)$(PREFIX)/snapshots/
	$(INSTALL_DATA) mdocml-$(VERSION).md5 $(DESTDIR)$(PREFIX)/snapshots/
	$(INSTALL_DATA) mdocml-$(VERSION).tar.gz $(DESTDIR)$(PREFIX)/snapshots/mdocml.tar.gz
	$(INSTALL_DATA) mdocml-$(VERSION).md5 $(DESTDIR)$(PREFIX)/snapshots/mdocml.md5
d120 8
a127 8
	mkdir -p $(DESTDIR)$(BINDIR)
	mkdir -p $(DESTDIR)$(EXAMPLEDIR)
	mkdir -p $(DESTDIR)$(MANDIR)/man1
	mkdir -p $(DESTDIR)$(MANDIR)/man7
	$(INSTALL_PROGRAM) mandoc $(DESTDIR)$(BINDIR)
	$(INSTALL_MAN) mandoc.1 $(DESTDIR)$(MANDIR)/man1
	$(INSTALL_MAN) man.7 mdoc.7 roff.7 mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
	$(INSTALL_DATA) example.style.css $(DESTDIR)$(EXAMPLEDIR)
d130 6
a135 7
	rm -f $(DESTDIR)$(BINDIR)/mandoc
	rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1
	rm -f $(DESTDIR)$(MANDIR)/man7/mdoc.7
	rm -f $(DESTDIR)$(MANDIR)/man7/roff.7
	rm -f $(DESTDIR)$(MANDIR)/man7/man.7
	rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7
	rm -f $(DESTDIR)$(EXAMPLEDIR)/example.style.css
d171 1
a171 1
main.ln main.o: main.c mdoc.h man.h roff.h
a184 2
mandoc.ln mandoc.o: mandoc.c libmandoc.h

d208 1
a208 1
mdocml-$(VERSION).tar.gz: $(DOINSTALL)
d210 1
a210 1
	cp -f $(DOINSTALL) .dist/mdocml/mdocml-$(VERSION)/
d220 2
a221 8
llib-llibmandoc.ln: $(MANDOCLNS)
	$(LINT) -Clibmandoc $(MANDOCLNS)

llib-llibroff.ln: $(ROFFLNS)
	$(LINT) -Clibroff $(ROFFLNS)

llib-lmandoc.ln: $(MAINLNS) llib-llibmdoc.ln llib-llibman.ln llib-llibmandoc.ln llib-llibroff.ln
	$(LINT) -Cmandoc $(MAINLNS) llib-llibmdoc.ln llib-llibman.ln llib-llibmandoc.ln llib-llibroff.ln
d229 2
a230 8
libmandoc.a: $(MANDOCOBJS)
	$(AR) rs $@@ $(MANDOCOBJS)

libroff.a: $(ROFFOBJS)
	$(AR) rs $@@ $(ROFFOBJS)

mandoc: $(MAINOBJS) libroff.a libmdoc.a libman.a libmandoc.a
	$(CC) $(CFLAGS) -o $@@ $(MAINOBJS) libroff.a libmdoc.a libman.a libmandoc.a
@


1.1.1.5
log
@Import mdocml-1.10.1:
- Support multiline .Bl -column content
- cleanup SYNOPSIS macro handling
- Allow specifying the terminal width for -Tascii
- Initial PostScript output
@
text
@d1 1
a1 1
.SUFFIXES:	.html .xml .sgml .1 .3 .7 .md5 .tar.gz .1.txt .3.txt .7.txt .1.sgml .3.sgml .7.sgml .h .h.html .1.ps .3.ps .7.ps
d15 2
a16 2
VERSION	   = 1.10.1
VDATE	   = 07 June 2010
a35 2
MANDOCPS   = -Tps

d99 1
a99 1
GSGMLS	   = mandoc.1.sgml mdoc.3.sgml mdoc.7.sgml \
d108 1
a108 4
	     roff.7.html roff.3.html

PSS	   = mandoc.1.ps mdoc.3.ps man.3.ps mdoc.7.ps man.7.ps \
	     mandoc_char.7.ps roff.7.ps roff.3.ps
d113 1
a113 1
	     mandoc_char.7.txt ChangeLog.txt \
d126 1
a126 1
MANS	   = mandoc.1 mdoc.3 mdoc.7 mandoc_char.7 man.7 \
d137 1
a137 1
	     config.h config.log $(PSS)
d149 6
d157 1
a157 3
www:	all $(GSGMLS) $(HTMLS) $(TEXTS) $(MD5S) $(TARGZS) $(PSS)

ps:	$(PSS)
a303 3
.1.1.ps .3.3.ps .7.7.ps:
	./mandoc $(MANDOCFLAGS) $(MANDOCPS) $< > $@@

@


1.1.1.6
log
@Import mdocml-1.10.2:
- Minor bug-fixes and optimisations
- Support font styles for Postscript output
@
text
@d15 2
a16 2
VERSION	   = 1.10.2
VDATE	   = 19 June 2010
d72 1
a72 1
	     man_html.ln out.ln term_ps.ln term_ascii.ln
d75 1
a75 2
	     man_term.o html.o mdoc_html.o man_html.o out.o \
	     term_ps.o term_ascii.o
d78 1
a78 2
	     man_term.c html.c mdoc_html.c man_html.c out.c \
	     term_ps.c term_ascii.c
d161 1
a161 1
	$(INSTALL_DATA) $(HTMLS) $(PSS) $(TEXTS) $(STATICS) $(DESTDIR)$(PREFIX)/
a225 4
term_ps.ln term_ps.o: term_ps.c term.h main.h

term_ascii.ln term_ascii.o: term_ascii.c term.h main.h

@


1.1.1.7
log
@Import mdocml 1.10.4:
- Smaller bugfixes
- Improved .ds support
- Support .Bk -words
- Improve multi-page postscript output
- Improve indentation in SYNOPSIS
- Improved support for badly nested blocks
@
text
@d15 2
a16 2
VERSION	   = 1.10.4
VDATE	   = 12 July 2010
d26 4
d68 1
a68 1
	     man_action.c man_argv.c
@


1.1.1.8
log
@Import mdocml 1.10.5:
- Initial support for PDF output
- Improved support for various roff commands
@
text
@d1 1
a1 1
.SUFFIXES:	.html .xml .sgml .1 .3 .7 .md5 .tar.gz .1.txt .3.txt .7.txt .1.sgml .3.sgml .7.sgml .h .h.html .1.ps .3.ps .7.ps .1.pdf .3.pdf .7.pdf
d15 2
a16 2
VERSION	   = 1.10.5
VDATE	   = 27 July 2010
d28 6
a112 3
PDFS	   = mandoc.1.pdf mdoc.3.pdf man.3.pdf mdoc.7.pdf man.7.pdf \
	     mandoc_char.7.pdf roff.7.pdf roff.3.pdf

d140 1
a140 1
	     config.h config.log $(PSS) $(PDFS)
d154 1
a154 1
www:	all $(GSGMLS) $(HTMLS) $(TEXTS) $(MD5S) $(TARGZS) $(PSS) $(PDFS)
a157 2
pdf:	$(PDFS)

d159 1
a159 1
	$(INSTALL_DATA) $(HTMLS) $(PSS) $(PDFS) $(TEXTS) $(STATICS) $(DESTDIR)$(PREFIX)/
d302 1
a302 1
	./mandoc -Tascii -Wall,error -fstrict $< | col -b > $@@
d305 1
a305 1
	./mandoc -Thtml -Wall,error -fstrict -Ostyle=style.css,man=%N.%S.html,includes=%I.html $< > $@@
d308 1
a308 4
	./mandoc -Tps -Wall,error -fstrict $< > $@@

.1.1.pdf .3.3.pdf .7.7.pdf:
	./mandoc -Tpdf -Wall,error -fstrict $< > $@@
@


1.1.1.9
log
@Import mdocml-1.10.9 and additional post-release bugfixes
(tbl_data.c 1.15, tbl_layout.c 1.13, tbl_opts.c 1.8).

This features many small improvements and the initial integration of
tbl(1) support on all output devices.
@
text
@d1 1
a1 7
.SUFFIXES:	.html .xml .sgml .1 .3 .7 .md5 .tar.gz 
.SUFFIXES:	.1.txt .3.txt .7.txt
.SUFFIXES:	.1.xhtml .3.xhtml .7.xhtml
.SUFFIXES:	.1.sgml .3.sgml .7.sgml 
.SUFFIXES:	.h .h.html 
.SUFFIXES:	.1.ps .3.ps .7.ps
.SUFFIXES:	.1.pdf .3.pdf .7.pdf
d15 2
a16 2
VERSION	   = 1.10.9
VDATE	   = 07 January 2010
d28 1
a28 1
ROFFLNS    = roff.ln tbl.ln tbl_opts.ln tbl_layout.ln tbl_data.ln
d30 1
a30 1
ROFFSRCS   = roff.c tbl.c tbl_opts.c tbl_layout.c tbl_data.c
d32 1
a32 1
ROFFOBJS   = roff.o tbl.o tbl_opts.o tbl_layout.o tbl_data.o
d41 1
a41 1
	     mdoc_argv.ln mdoc_validate.ln \
d45 1
a45 1
	     mdoc_argv.o mdoc_validate.o lib.o att.o \
d49 1
a49 1
	     mdoc_argv.c mdoc_validate.c lib.c att.c \
d53 1
a53 1
	     man_argv.ln
d56 1
a56 1
	     man_argv.o
d58 1
a58 1
	     man_argv.c
d62 1
a62 2
	     man_html.ln out.ln term_ps.ln term_ascii.ln \
	     tbl_term.ln tbl_html.ln
d66 1
a66 1
	     term_ps.o term_ascii.o tbl_term.o tbl_html.o
d70 1
a70 1
	     term_ps.c term_ascii.c tbl_term.c tbl_html.c
d91 1
a91 1
	     mandoc.h libroff.h
d95 1
a95 1
	     roff.3.sgml tbl.7.sgml
a98 4
XHTMLS	   = mandoc.1.xhtml mdoc.3.xhtml \
	     man.3.xhtml mdoc.7.xhtml man.7.xhtml mandoc_char.7.xhtml \
	     roff.7.xhtml roff.3.xhtml tbl.7.xhtml

d102 1
a102 1
	     roff.7.html roff.3.html tbl.7.html
d105 1
a105 1
	     mandoc_char.7.ps roff.7.ps roff.3.ps tbl.7.ps
d108 1
a108 1
	     mandoc_char.7.pdf roff.7.pdf roff.3.pdf tbl.7.pdf
d114 1
a114 1
	     roff.7.txt roff.3.txt tbl.7.txt
d127 1
a127 1
	     man.3 roff.7 roff.3 tbl.7
d137 1
a137 1
	     config.h config.log $(PSS) $(PDFS) $(XHTMLS)
d151 1
a151 1
www:	all $(GSGMLS) $(HTMLS) $(XHTMLS) $(TEXTS) $(MD5S) $(TARGZS) $(PSS) $(PDFS)
d158 1
a158 1
	$(INSTALL_DATA) $(HTMLS) $(XHTMLS) $(PSS) $(PDFS) $(TEXTS) $(STATICS) $(DESTDIR)$(PREFIX)/
d171 1
a171 1
	$(INSTALL_MAN) man.7 mdoc.7 roff.7 tbl.7 mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
a178 1
	rm -f $(DESTDIR)$(MANDIR)/man7/tbl.7
d247 2
d301 1
a301 1
	./mandoc -Tascii -Wall,stop $< | col -b > $@@
d304 1
a304 1
	./mandoc -Thtml -Wall,stop -Ostyle=style.css,man=%N.%S.html,includes=%I.html $< > $@@
d307 1
a307 4
	./mandoc -Tps -Wall,stop $< > $@@

.1.1.xhtml .3.3.xhtml .7.7.xhtml:
	./mandoc -Txhtml -Wall,stop -Ostyle=style.css,man=%N.%S.xhtml,includes=%I.html $< > $@@
d310 1
a310 1
	./mandoc -Tpdf -Wall,stop $< > $@@
@


1.1.1.10
log
@Import mdocml-1.11.1 with a few additional fixes from CVS:

Merge the libraries into a single frontend, libmandoc.
Iinitial support for eqn(1) functionality.

Additional changes:
Portability fixes (tbl_opts.c 1.11, tbl_layout.c 1.18, tbl.c 1.25)
HTML space fixe (mdocml_html.c 1.163)
ROFF conditional nesting bug (roff.c 1.131)
@
text
@d1 26
a26 8
.PHONY: 	 clean install installwww
.SUFFIXES:	 .sgml .html .md5 .h .h.html
.SUFFIXES:	 .1       .3       .7
.SUFFIXES:	 .1.txt   .3.txt   .7.txt
.SUFFIXES:	 .1.pdf   .3.pdf   .7.pdf
.SUFFIXES:	 .1.ps    .3.ps    .7.ps
.SUFFIXES:	 .1.html  .3.html  .7.html 
.SUFFIXES:	 .1.xhtml .3.xhtml .7.xhtml 
d30 1
a30 1
# CFLAGS	+= -DOSNAME="\"OpenBSD 4.5\""
d32 1
a32 260
VERSION		 = 1.11.1
VDATE		 = 04 April 2011
CFLAGS		+= -g -DHAVE_CONFIG_H -DVERSION="\"$(VERSION)\""
CFLAGS     	+= -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
PREFIX		 = /usr/local
BINDIR		 = $(PREFIX)/bin
INCLUDEDIR	 = $(PREFIX)/include/mandoc
LIBDIR		 = $(PREFIX)/lib/mandoc
MANDIR		 = $(PREFIX)/man
EXAMPLEDIR	 = $(PREFIX)/share/examples/mandoc
INSTALL		 = install
INSTALL_PROGRAM	 = $(INSTALL) -m 0755
INSTALL_DATA	 = $(INSTALL) -m 0444
INSTALL_LIB	 = $(INSTALL) -m 0644
INSTALL_MAN	 = $(INSTALL_DATA)

all: mandoc

SRCS		 = Makefile \
		   arch.c \
		   arch.in \
		   att.c \
		   att.in \
		   chars.c \
		   chars.in \
		   compat.c \
		   config.h.post \
		   config.h.pre \
		   eqn.7 \
		   eqn.c \
		   example.style.css \
		   external.png \
		   html.c \
		   html.h \
		   index.css \
		   index.sgml \
		   lib.c \
		   lib.in \
		   libman.h \
		   libmandoc.h \
		   libmdoc.h \
		   libroff.h \
		   main.c \
		   main.h \
		   man.h \
		   man.7 \
		   man.c \
		   man_hash.c \
		   man_html.c \
		   man_macro.c \
		   man_term.c \
		   man_validate.c \
		   mandoc.1 \
		   mandoc.3 \
		   mandoc.c \
		   mandoc.h \
		   mandoc-db.1 \
		   mandoc-db.c \
		   mandoc_char.7 \
		   mdoc.h \
		   mdoc.7 \
		   mdoc.c \
		   mdoc_argv.c \
		   mdoc_hash.c \
		   mdoc_html.c \
		   mdoc_macro.c \
		   mdoc_term.c \
		   mdoc_validate.c \
		   msec.c \
		   msec.in \
		   out.c \
		   out.h \
		   read.c \
		   roff.7 \
		   roff.c \
		   st.c \
		   st.in \
		   style.css \
		   tbl.7 \
		   tbl.c \
		   tbl_data.c \
		   tbl_html.c \
		   tbl_layout.c \
		   tbl_opts.c \
		   tbl_term.c \
		   term.c \
		   term.h \
		   term_ascii.c \
		   term_ps.c \
		   test-strlcat.c \
		   test-strlcpy.c \
		   tree.c \
		   vol.c \
		   vol.in

LIBMAN_OBJS	 = man.o \
		   man_hash.o \
		   man_macro.o \
		   man_validate.o
LIBMAN_LNS	 = man.ln \
		   man_hash.ln \
		   man_macro.ln \
		   man_validate.ln

LIBMDOC_OBJS	 = arch.o \
		   att.o \
		   lib.o \
		   mdoc.o \
		   mdoc_argv.o \
		   mdoc_hash.o \
		   mdoc_macro.o \
		   mdoc_validate.o \
		   msec.o \
		   st.o \
		   vol.o
LIBMDOC_LNS	 = arch.ln \
		   att.ln \
		   lib.ln \
		   mdoc.ln \
		   mdoc_argv.ln \
		   mdoc_hash.ln \
		   mdoc_macro.ln \
		   mdoc_validate.ln \
		   msec.ln \
		   st.ln \
		   vol.ln

LIBROFF_OBJS	 = eqn.o \
		   roff.o \
		   tbl.o \
		   tbl_data.o \
		   tbl_layout.o \
		   tbl_opts.o
LIBROFF_LNS	 = eqn.ln \
		   roff.ln \
		   tbl.ln \
		   tbl_data.ln \
		   tbl_layout.ln \
		   tbl_opts.ln

LIBMANDOC_OBJS	 = $(LIBMAN_OBJS) \
		   $(LIBMDOC_OBJS) \
		   $(LIBROFF_OBJS) \
		   mandoc.o \
		   read.o
LIBMANDOC_LNS	 = $(LIBMAN_LNS) \
		   $(LIBMDOC_LNS) \
		   $(LIBROFF_LNS) \
		   mandoc.ln \
		   read.ln

arch.o arch.ln: arch.in
att.o att.ln: att.in
lib.o lib.ln: lib.in
msec.o msec.ln: msec.in
st.o st.ln: st.in
vol.o vol.ln: vol.in

$(LIBMAN_OBJS) $(LIBMAN_LNS): libman.h
$(LIBMDOC_OBJS) $(LIBMDOC_LNS): libmdoc.h
$(LIBROFF_OBJS) $(LIBROFF_LNS): libroff.h
$(LIBMANDOC_OBJS) $(LIBMANDOC_LNS): mandoc.h mdoc.h man.h libmandoc.h config.h

MANDOC_HTML_OBJS = html.o \
		   man_html.o \
		   mdoc_html.o \
		   tbl_html.o
MANDOC_HTML_LNS	 = html.ln \
		   man_html.ln \
		   mdoc_html.ln \
		   tbl_html.ln

MANDOC_TERM_OBJS = man_term.o \
		   mdoc_term.o \
		   term.o \
		   term_ascii.o \
		   term_ps.o \
		   tbl_term.o
MANDOC_TERM_LNS	 = man_term.ln \
		   mdoc_term.ln \
		   term.ln \
		   term_ascii.ln \
		   term_ps.ln \
		   tbl_term.ln

MANDOC_OBJS	 = $(MANDOC_HTML_OBJS) \
		   $(MANDOC_TERM_OBJS) \
		   chars.o \
		   main.o \
		   out.o \
		   tree.o
MANDOC_LNS	 = $(MANDOC_HTML_LNS) \
		   $(MANDOC_TERM_LNS) \
		   chars.ln \
		   main.ln \
		   out.ln \
		   tree.ln

chars.o chars.ln: chars.in

$(MANDOC_HTML_OBJS) $(MANDOC_HTML_LNS): html.h
$(MANDOC_TERM_OBJS) $(MANDOC_TERM_LNS): term.h
$(MANDOC_OBJS) $(MANDOC_LNS): main.h mandoc.h mdoc.h man.h config.h out.h

compat.o compat.ln: config.h

MANDOCDB_OBJS	 = mandoc-db.o
MANDOCDB_LNS	 = mandoc-db.ln

$(MANDOCDB_OBJS) $(MANDOCDB_LNS): mandoc.h mdoc.h man.h config.h

INDEX_MANS	 = mandoc.1.html \
		   mandoc.1.xhtml \
		   mandoc.1.ps \
		   mandoc.1.pdf \
		   mandoc.1.txt \
		   mandoc.3.html \
		   mandoc.3.xhtml \
		   mandoc.3.ps \
		   mandoc.3.pdf \
		   mandoc.3.txt \
		   eqn.7.html \
		   eqn.7.xhtml \
		   eqn.7.ps \
		   eqn.7.pdf \
		   eqn.7.txt \
		   man.7.html \
		   man.7.xhtml \
		   man.7.ps \
		   man.7.pdf \
		   man.7.txt \
		   mandoc_char.7.html \
		   mandoc_char.7.xhtml \
		   mandoc_char.7.ps \
		   mandoc_char.7.pdf \
		   mandoc_char.7.txt \
		   mdoc.7.html \
		   mdoc.7.xhtml \
		   mdoc.7.ps \
		   mdoc.7.pdf \
		   mdoc.7.txt \
		   roff.7.html \
		   roff.7.xhtml \
		   roff.7.ps \
		   roff.7.pdf \
		   roff.7.txt \
		   tbl.7.html \
		   tbl.7.xhtml \
		   tbl.7.ps \
		   tbl.7.pdf \
		   tbl.7.txt

$(INDEX_MANS): mandoc

INDEX_OBJS	 = $(INDEX_MANS) \
		   man.h.html \
		   mandoc.h.html \
		   mdoc.h.html \
		   mdocml.tar.gz \
		   mdocml.md5
d34 1
a34 1
www: index.html
d36 120
a155 1
lint: llib-llibmandoc.ln llib-lmandoc.ln
d158 7
a164 9
	rm -f libmandoc.a $(LIBMANDOC_OBJS)
	rm -f llib-llibmandoc.ln $(LIBMANDOC_LNS)
	rm -f mandoc-db $(MANDOCDB_OBJS)
	rm -f llib-lmandoc-db.ln $(MANDOCDB_LNS)
	rm -f mandoc $(MANDOC_OBJS)
	rm -f llib-lmandoc.ln $(MANDOC_LNS)
	rm -f config.h config.log compat.o compat.ln
	rm -f mdocml.tar.gz
	rm -f index.html $(INDEX_OBJS)
d166 10
a175 1
install: all
a178 1
	mkdir -p $(DESTDIR)$(MANDIR)/man3
a180 1
	$(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
d182 1
a182 2
	$(INSTALL_MAN) mandoc.3 $(DESTDIR)$(MANDIR)/man3
	$(INSTALL_MAN) man.7 mdoc.7 roff.7 eqn.7 tbl.7 mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
d185 89
a273 36
installwww: www
	mkdir -p $(PREFIX)/snapshots
	$(INSTALL_DATA) index.html external.png index.css $(PREFIX)
	$(INSTALL_DATA) $(INDEX_MANS) style.css $(PREFIX)
	$(INSTALL_DATA) mandoc.h.html man.h.html mdoc.h.html $(PREFIX)
	$(INSTALL_DATA) mdocml.tar.gz $(PREFIX)/snapshots
	$(INSTALL_DATA) mdocml.md5 $(PREFIX)/snapshots
	$(INSTALL_DATA) mdocml.tar.gz $(PREFIX)/snapshots/mdocml-$(VERSION).tar.gz
	$(INSTALL_DATA) mdocml.md5 $(PREFIX)/snapshots/mdocml-$(VERSION).md5

libmandoc.a: compat.o $(LIBMANDOC_OBJS)
	$(AR) rs $@@ compat.o $(LIBMANDOC_OBJS)

llib-llibmandoc.ln: compat.ln $(LIBMANDOC_LNS)
	$(LINT) $(LINTFLAGS) -Clibmandoc compat.ln $(LIBMANDOC_LNS)

mandoc: $(MANDOC_OBJS) libmandoc.a
	$(CC) -o $@@ $(MANDOC_OBJS) libmandoc.a

# You'll need -ldb for Linux.
mandoc-db: $(MANDOCDB_OBJS) libmandoc.a
	$(CC) -o $@@ $(MANDOCDB_OBJS) libmandoc.a

llib-lmandoc.ln: $(MANDOC_LNS)
	$(LINT) $(LINTFLAGS) -Cmandoc $(MANDOC_LNS)

llib-lmandoc-db.ln: $(MANDOCDB_LNS)
	$(LINT) $(LINTFLAGS) -Cmandoc-db $(MANDOCDB_LNS)

mdocml.md5: mdocml.tar.gz
	md5 mdocml.tar.gz >$@@

mdocml.tar.gz: $(SRCS)
	mkdir -p .dist/mdocml-$(VERSION)/
	$(INSTALL) -m 0444 $(SRCS) .dist/mdocml-$(VERSION)
	( cd .dist/ && tar zcf ../$@@ ./ )
d276 8
a283 1
index.html: $(INDEX_OBJS)
d285 20
a304 15
config.h: config.h.pre config.h.post
	rm -f config.log
	( cat config.h.pre; \
	  echo; \
	  if $(CC) $(CFLAGS) -Werror -o test-strlcat test-strlcat.c >> config.log 2>&1; then \
		echo '#define HAVE_STRLCAT'; \
		rm test-strlcat; \
	  fi; \
	  if $(CC) $(CFLAGS) -Werror -o test-strlcpy test-strlcpy.c >> config.log 2>&1; then \
		echo '#define HAVE_STRLCPY'; \
		rm test-strlcpy; \
	  fi; \
	  echo; \
	  cat config.h.post \
	) > $@@
d306 3
a308 2
.h.h.html:
	highlight -I $< >$@@
d311 1
a311 1
	./mandoc -Tascii -Wall,stop $< | col -b >$@@
d313 2
a314 2
.1.1.html .3.3.html .7.7.html:
	./mandoc -Thtml -Wall,stop -Ostyle=style.css,man=%N.%S.html,includes=%I.html $< >$@@
d317 1
a317 1
	./mandoc -Tps -Wall,stop $< >$@@
d320 1
a320 1
	./mandoc -Txhtml -Wall,stop -Ostyle=style.css,man=%N.%S.xhtml,includes=%I.html $< >$@@
d323 1
a323 1
	./mandoc -Tpdf -Wall,stop $< >$@@
d325 21
a345 3
.sgml.html:
	validate --warn $<
	sed -e "s!@@VERSION@@!$(VERSION)!" -e "s!@@VDATE@@!$(VDATE)!" $< >$@@
@


1.1.1.11
log
@Import mdocml 1.12.0:
- Support to output HTML fragments
- Initial support for mdoc->man translation
- Initial eqn support
- preconv / apropos / demandoc (not hooked up)
- Various bugfixes
@
text
@d3 6
a8 6
.SUFFIXES:	 .1       .3       .7       .8
.SUFFIXES:	 .1.txt   .3.txt   .7.txt   .8.txt
.SUFFIXES:	 .1.pdf   .3.pdf   .7.pdf   .8.pdf
.SUFFIXES:	 .1.ps    .3.ps    .7.ps    .8.ps
.SUFFIXES:	 .1.html  .3.html  .7.html  .8.html
.SUFFIXES:	 .1.xhtml .3.xhtml .7.xhtml .8.xhtml
a11 1
#
d14 2
a15 11
VERSION		 = 1.12.0
VDATE		 = 8 October 2011

# IFF your system supports multi-byte functions (setlocale(), wcwidth(),
# putwchar()) AND has __STDC_ISO_10646__ (that is, wchar_t is simply a
# UCS-4 value) should you define USE_WCHAR.  If you define it and your
# system DOESN'T support this, -Tlocale will produce garbage.
# If you don't define it, -Tlocale is a synonym for -Tacsii.
#
CFLAGS	 	+= -DUSE_WCHAR

a27 1
INSTALL_SOURCE	 = $(INSTALL) -m 0644
d30 1
a30 9
# Non-BSD systems (Linux, etc.) need -ldb to compile mandocdb and
# apropos.
# However, if you don't have -ldb at all (or it's not native), then
# comment out apropos and mandocdb. 
#
#DBLIB		 = -ldb
DBBIN		 = apropos mandocdb

all: mandoc preconv demandoc $(DBBIN)
a32 2
		   apropos.1 \
		   apropos.c \
d39 1
a39 3
		   compat_getsubopt.c \
		   compat_strlcat.c \
		   compat_strlcpy.c \
a41 2
		   demandoc.c \
		   demandoc.1 \
a43 2
		   eqn_html.c \
		   eqn_term.c \
d70 2
a71 2
		   mandocdb.8 \
		   mandocdb.c \
a79 1
		   mdoc_man.c \
a85 3
		   preconv.1 \
		   preconv.c \
		   predefs.in \
a102 2
		   test-getsubopt.c \
		   test-mmap.c \
a104 1
		   test-strptime.c \
a156 1
		   chars.o \
a161 1
		   chars.ln \
a164 7
COMPAT_OBJS	 = compat_getsubopt.o \
		   compat_strlcat.o \
		   compat_strlcpy.o
COMPAT_LNS	 = compat_getsubopt.ln \
		   compat_strlcat.ln \
		   compat_strlcpy.ln

a166 1
chars.o chars.ln: chars.in
a168 1
roff.o roff.ln: predefs.in
d177 1
a177 4
$(COMPAT_OBJS) $(COMPAT_LNS): config.h

MANDOC_HTML_OBJS = eqn_html.o \
		   html.o \
d181 1
a181 2
MANDOC_HTML_LNS	 = eqn_html.ln \
		   html.ln \
d186 1
a186 5
MANDOC_MAN_OBJS  = mdoc_man.o
MANDOC_MAN_LNS   = mdoc_man.ln

MANDOC_TERM_OBJS = eqn_term.o \
		   man_term.o \
d192 1
a192 2
MANDOC_TERM_LNS	 = eqn_term.ln \
		   man_term.ln \
a199 1
		   $(MANDOC_MAN_OBJS) \
d201 1
a205 1
		   $(MANDOC_MAN_LNS) \
d207 1
d212 2
d218 4
a221 2
MANDOCDB_OBJS	 = mandocdb.o
MANDOCDB_LNS	 = mandocdb.ln
d225 1
a225 26
PRECONV_OBJS	 = preconv.o
PRECONV_LNS	 = preconv.ln

$(PRECONV_OBJS) $(PRECONV_LNS): config.h

APROPOS_OBJS	 = apropos.o
APROPOS_LNS	 = apropos.ln

$(APROPOS_OBJS) $(APROPOS_LNS): config.h mandoc.h

DEMANDOC_OBJS	 = demandoc.o
DEMANDOC_LNS	 = demandoc.ln

$(DEMANDOC_OBJS) $(DEMANDOC_LNS): config.h

INDEX_MANS	 = apropos.1.html \
		   apropos.1.xhtml \
		   apropos.1.ps \
		   apropos.1.pdf \
		   apropos.1.txt \
		   demandoc.1.html \
		   demandoc.1.xhtml \
		   demandoc.1.ps \
		   demandoc.1.pdf \
		   demandoc.1.txt \
		   mandoc.1.html \
a254 5
		   preconv.1.html \
		   preconv.1.xhtml \
		   preconv.1.ps \
		   preconv.1.pdf \
		   preconv.1.txt \
d264 1
a264 6
		   tbl.7.txt \
		   mandocdb.8.html \
		   mandocdb.8.xhtml \
		   mandocdb.8.ps \
		   mandocdb.8.pdf \
		   mandocdb.8.txt
d277 1
a277 1
lint: llib-llibmandoc.ln llib-lmandoc.ln llib-lpreconv.ln llib-ldemandoc.ln
d282 2
a283 8
	rm -f mandocdb $(MANDOCDB_OBJS)
	rm -f llib-lmandocdb.ln $(MANDOCDB_LNS)
	rm -f preconv $(PRECONV_OBJS)
	rm -f llib-lpreconv.ln $(PRECONV_LNS)
	rm -f apropos $(APROPOS_OBJS)
	rm -f llib-lapropos.ln $(APROPOS_LNS)
	rm -f demandoc $(DEMANDOC_OBJS)
	rm -f llib-ldemandoc.ln $(DEMANDOC_LNS)
d286 2
a287 2
	rm -f config.h config.log $(COMPAT_OBJS) $(COMPAT_LNS)
	rm -f mdocml.tar.gz mdocml-win32.zip mdocml-win64.zip mdocml-macosx.zip
a288 5
	rm -rf test-strlcpy.DSYM
	rm -rf test-strlcat.DSYM 
	rm -rf test-strptime.DSYM 
	rm -rf test-mmap.DSYM 
	rm -rf test-getsubopt.DSYM
a292 2
	mkdir -p $(DESTDIR)$(LIBDIR)
	mkdir -p $(DESTDIR)$(INCLUDEDIR)
d296 1
a296 2
	mkdir -p $(DESTDIR)$(MANDIR)/man8
	$(INSTALL_PROGRAM) mandoc preconv demandoc $(DESTDIR)$(BINDIR)
d298 1
a298 2
	$(INSTALL_LIB) man.h mdoc.h mandoc.h $(DESTDIR)$(INCLUDEDIR)
	$(INSTALL_MAN) mandoc.1 preconv.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1
a304 1
	mkdir -p $(PREFIX)/binaries
d313 2
a314 2
libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
	$(AR) rs $@@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
d316 2
a317 2
llib-llibmandoc.ln: $(COMPAT_LNS) $(LIBMANDOC_LNS)
	$(LINT) $(LINTFLAGS) -Clibmandoc $(COMPAT_LNS) $(LIBMANDOC_LNS)
d320 5
a324 1
	$(CC) $(LDFLAGS) -o $@@ $(MANDOC_OBJS) libmandoc.a
d329 2
a330 23
mandocdb: $(MANDOCDB_OBJS) libmandoc.a
	$(CC) $(LDFLAGS) -o $@@ $(MANDOCDB_OBJS) libmandoc.a $(DBLIB)

llib-lmandocdb.ln: $(MANDOCDB_LNS)
	$(LINT) $(LINTFLAGS) -Cmandocdb $(MANDOCDB_LNS)

preconv: $(PRECONV_OBJS)
	$(CC) $(LDFLAGS) -o $@@ $(PRECONV_OBJS)

llib-lpreconv.ln: $(PRECONV_LNS)
	$(LINT) $(LINTFLAGS) -Cpreconv $(PRECONV_LNS)

apropos: $(APROPOS_OBJS) libmandoc.a
	$(CC) $(LDFLAGS) -o $@@ $(APROPOS_OBJS) libmandoc.a $(DBLIB)

llib-lapropos.ln: $(APROPOS_LNS)
	$(LINT) $(LINTFLAGS) -Capropos $(APROPOS_LNS)

demandoc: $(DEMANDOC_OBJS) libmandoc.a
	$(CC) $(LDFLAGS) -o $@@ $(DEMANDOC_OBJS) libmandoc.a

llib-ldemandoc.ln: $(DEMANDOC_LNS)
	$(LINT) $(LINTFLAGS) -Cdemandoc $(DEMANDOC_LNS)
d337 1
a337 1
	$(INSTALL_SOURCE) $(SRCS) .dist/mdocml-$(VERSION)
a340 31
mdocml-win32.zip: $(SRCS)
	mkdir -p .win32/mdocml-$(VERSION)/
	$(INSTALL_SOURCE) $(SRCS) .win32
	cp .win32/Makefile .win32/Makefile.old
	egrep -v -e DUSE_WCHAR -e ^DBBIN .win32/Makefile.old >.win32/Makefile
	( cd .win32; \
		CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar CFLAGS='-DOSNAME=\"Windows\"' make; \
		make install PREFIX=mdocml-$(VERSION) ; \
		zip -r ../$@@ mdocml-$(VERSION) )
	rm -rf .win32

mdocml-win64.zip: $(SRCS)
	mkdir -p .win64/mdocml-$(VERSION)/
	$(INSTALL_SOURCE) $(SRCS) .win64
	cp .win64/Makefile .win64/Makefile.old
	egrep -v -e DUSE_WCHAR -e ^DBBIN .win64/Makefile.old >.win64/Makefile
	( cd .win64; \
		CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar CFLAGS='-DOSNAME=\"Windows\"' make; \
		make install PREFIX=mdocml-$(VERSION) ; \
		zip -r ../$@@ mdocml-$(VERSION) )
	rm -rf .win64

mdocml-macosx.zip: $(SRCS)
	mkdir -p .macosx/mdocml-$(VERSION)/
	$(INSTALL_SOURCE) $(SRCS) .macosx
	( cd .macosx; \
		CFLAGS="-arch i386 -arch x86_64 -arch ppc" LDFLAGS="-arch i386 -arch x86_64 -arch ppc" make; \
		make install PREFIX=mdocml-$(VERSION) ; \
		zip -r ../$@@ mdocml-$(VERSION) )
	rm -rf .macosx

a346 8
	  if $(CC) $(CFLAGS) -Werror -o test-strptime test-strptime.c >> config.log 2>&1; then \
		echo '#define HAVE_STRPTIME'; \
		rm test-strptime; \
	  fi; \
	  if $(CC) $(CFLAGS) -Werror -o test-getsubopt test-getsubopt.c >> config.log 2>&1; then \
		echo '#define HAVE_GETSUBOPT'; \
		rm test-getsubopt; \
	  fi; \
a350 4
	  if $(CC) $(CFLAGS) -Werror -o test-mmap test-mmap.c >> config.log 2>&1; then \
		echo '#define HAVE_MMAP'; \
		rm test-mmap; \
	  fi; \
d362 1
a362 1
.1.1.txt .3.3.txt .7.7.txt .8.8.txt:
d365 1
a365 1
.1.1.html .3.3.html .7.7.html .8.8.html:
d368 1
a368 1
.1.1.ps .3.3.ps .7.7.ps .8.8.ps:
d371 1
a371 1
.1.1.xhtml .3.3.xhtml .7.7.xhtml .8.8.xhtml:
d374 1
a374 1
.1.1.pdf .3.3.pdf .7.7.pdf .8.8.pdf:
@


1.1.1.11.2.1
log
@sync with head
@
text
@a25 11
# If your system has manpath(1), uncomment this.  This is most any
# system that's not OpenBSD or NetBSD.  If uncommented, apropos(1),
# mandocdb(8), and man.cgi will popen(3) manpath(1) to get the MANPATH
# variable.
#CFLAGS		+= -DUSE_MANPATH

# If your system supports static binaries only, uncomment this.  This
# appears only to be BSD UNIX systems (Mac OS X has no support and Linux
# requires -pthreads for static libdb).
STATIC		 = -static

a28 3
WWWPREFIX	 = /var/www
HTDOCDIR	 = $(WWWPREFIX)/htdocs
CGIBINDIR	 = $(WWWPREFIX)/cgi-bin
d47 1
a47 2
DBBIN		 = apropos mandocdb man.cgi catman whatis
DBLN		 = llib-lapropos.ln llib-lmandocdb.ln llib-lman.cgi.ln llib-lcatman.ln
a51 1
		   TODO \
a53 2
		   apropos_db.c \
		   apropos_db.h \
a57 3
		   catman.8 \
		   catman.c \
		   cgi.c \
a59 1
		   compat_fgetln.c \
d65 1
a66 1
		   demandoc.c \
d85 1
a87 3
		   man.cgi.7 \
		   man-cgi.css \
		   man.h \
a96 1
		   mandoc_char.7 \
d99 2
a100 3
		   mandocdb.h \
		   manpath.c \
		   manpath.h \
a102 1
		   mdoc.h \
a117 1
		   regress \
a133 1
		   test-fgetln.c \
d141 1
a141 2
		   vol.in \
		   whatis.1
d160 1
d171 1
a192 1
		   msec.o \
a198 1
		   msec.ln \
d201 1
a201 2
COMPAT_OBJS	 = compat_fgetln.o \
		   compat_getsubopt.o \
d204 1
a204 2
COMPAT_LNS	 = compat_fgetln.ln \
		   compat_getsubopt.ln \
d270 2
a271 2
MANDOCDB_OBJS	 = mandocdb.o manpath.o
MANDOCDB_LNS	 = mandocdb.ln manpath.ln
d273 1
a273 1
$(MANDOCDB_OBJS) $(MANDOCDB_LNS): mandocdb.h mandoc.h mdoc.h man.h config.h manpath.h
d280 2
a281 2
APROPOS_OBJS	 = apropos.o apropos_db.o manpath.o
APROPOS_LNS	 = apropos.ln apropos_db.ln manpath.ln
d283 1
a283 26
$(APROPOS_OBJS) $(APROPOS_LNS): config.h mandoc.h apropos_db.h manpath.h mandocdb.h

CGI_OBJS	 = $(MANDOC_HTML_OBJS) \
		   $(MANDOC_MAN_OBJS) \
		   $(MANDOC_TERM_OBJS) \
		   cgi.o \
		   apropos_db.o \
		   manpath.o \
		   out.o \
		   tree.o

CGI_LNS	 	 = $(MANDOC_HTML_LNS) \
		   $(MANDOC_MAN_LNS) \
		   $(MANDOC_TERM_LNS) \
		   cgi.ln \
		   apropos_db.ln \
		   manpath.ln \
		   out.ln \
		   tree.ln

$(CGI_OBJS) $(CGI_LNS): main.h mdoc.h man.h out.h config.h mandoc.h apropos_db.h manpath.h mandocdb.h

CATMAN_OBJS	 = catman.o manpath.o
CATMAN_LNS 	 = catman.ln manpath.ln

$(CATMAN_OBJS) $(CATMAN_LNS): config.h mandoc.h manpath.h mandocdb.h
a294 5
		   catman.8.html \
		   catman.8.xhtml \
		   catman.8.ps \
		   catman.8.pdf \
		   catman.8.txt \
a304 5
		   whatis.1.html \
		   whatis.1.xhtml \
		   whatis.1.ps \
		   whatis.1.pdf \
		   whatis.1.txt \
a319 5
		   man.cgi.7.html \
		   man.cgi.7.xhtml \
		   man.cgi.7.ps \
		   man.cgi.7.pdf \
		   man.cgi.7.txt \
d362 1
a362 1
lint: llib-lmandoc.ln llib-lpreconv.ln llib-ldemandoc.ln $(DBLN)
d371 1
a371 1
	rm -f apropos whatis $(APROPOS_OBJS)
a372 4
	rm -f man.cgi $(CGI_OBJS)
	rm -f llib-lman.cgi.ln $(CGI_LNS)
	rm -f catman $(CATMAN_OBJS)
	rm -f llib-lcatman.ln $(CATMAN_LNS)
a379 1
	rm -rf test-fgetln.DSYM
a402 7
installcgi: all
	mkdir -p $(DESTDIR)$(CGIBINDIR)
	mkdir -p $(DESTDIR)$(HTDOCDIR)
	$(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR)
	$(INSTALL_DATA) example.style.css $(DESTDIR)$(HTDOCDIR)/man.css
	$(INSTALL_DATA) man-cgi.css $(DESTDIR)$(HTDOCDIR)

d423 2
a424 2
llib-lmandoc.ln: $(MANDOC_LNS) llib-llibmandoc.ln
	$(LINT) $(LINTFLAGS) -Cmandoc $(MANDOC_LNS) llib-llibmandoc.ln
d429 2
a430 2
llib-lmandocdb.ln: $(MANDOCDB_LNS) llib-llibmandoc.ln
	$(LINT) $(LINTFLAGS) -Cmandocdb $(MANDOCDB_LNS) llib-llibmandoc.ln
d435 2
a436 5
llib-lpreconv.ln: $(PRECONV_LNS) llib-llibmandoc.ln
	$(LINT) $(LINTFLAGS) -Cpreconv $(PRECONV_LNS) llib-llibmandoc.ln

whatis: apropos
	cp -f apropos whatis
d441 2
a442 14
llib-lapropos.ln: $(APROPOS_LNS) llib-llibmandoc.ln
	$(LINT) $(LINTFLAGS) -Capropos $(APROPOS_LNS) llib-llibmandoc.ln

catman: $(CATMAN_OBJS) libmandoc.a
	$(CC) $(LDFLAGS) -o $@@ $(CATMAN_OBJS) libmandoc.a $(DBLIB)

llib-lcatman.ln: $(CATMAN_LNS) llib-llibmandoc.ln
	$(LINT) $(LINTFLAGS) -Ccatman $(CATMAN_LNS) llib-llibmandoc.ln

man.cgi: $(CGI_OBJS) libmandoc.a
	$(CC) $(LDFLAGS) $(STATIC) -o $@@ $(CGI_OBJS) libmandoc.a $(DBLIB)

llib-lman.cgi.ln: $(CGI_LNS) llib-llibmandoc.ln
	$(LINT) $(LINTFLAGS) -Cman.cgi $(CGI_LNS) llib-llibmandoc.ln
d447 2
a448 2
llib-ldemandoc.ln: $(DEMANDOC_LNS) llib-llibmandoc.ln
	$(LINT) $(LINTFLAGS) -Cdemandoc $(DEMANDOC_LNS) llib-llibmandoc.ln
a495 4
	  if $(CC) $(CFLAGS) -Werror -o test-fgetln test-fgetln.c >> config.log 2>&1; then \
		echo '#define HAVE_FGETLN'; \
		rm test-fgetln; \
	  fi; \
@


1.1.1.11.2.2
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d4 3
d8 1
d13 1
a13 1
# CFLAGS	+= -DOSNAME="\"OpenBSD 5.4\""
d15 2
a16 2
VERSION		 = 1.13.0
VDATE		 = 4 January 2014
d27 3
a29 2
# system that's not OpenBSD or NetBSD.  If uncommented, manpage(1) and
# mandocdb(8) will use manpath(1) to get the MANPATH variable.
d32 3
a34 2
# If your system does not support static binaries, comment this,
# for example on Mac OS X.
a35 2
# Linux requires -pthread to statically link with libdb.
#STATIC		+= -pthread
d37 1
a37 1
CFLAGS		+= -I/usr/local/include -g -DHAVE_CONFIG_H
d55 8
a62 2
DBLIB		 = -L/usr/local/lib -lsqlite3
DBBIN		 = mandocdb manpage apropos
a65 9
TESTSRCS	 = test-fgetln.c \
		   test-getsubopt.c \
		   test-mmap.c \
		   test-ohash.c \
		   test-strlcat.c \
		   test-strlcpy.c \
		   test-strnlen.c \
		   test-strptime.c

a66 1
		   NEWS \
d70 2
d76 2
a82 3
		   compat_ohash.c \
		   compat_ohash.h \
		   compat_strcasestr.c \
a84 2
		   compat_strnlen.c \
		   compat_strsep.c \
a86 1
		   configure \
a94 1
		   gmdiff \
d109 1
d124 1
a124 1
		   manpage.c \
a126 2
		   mansearch.c \
		   mansearch.h \
d145 1
a150 1
		   tbl.3 \
d162 6
d171 1
a171 1
		   $(TESTSRCS)
d177 4
d192 10
d209 6
d223 7
a232 2
		   compat_ohash.o \
		   compat_strcasestr.o \
d234 21
a254 18
		   compat_strlcpy.o \
		   compat_strnlen.o \
		   compat_strsep.o

arch.o: arch.in
att.o: att.in
chars.o: chars.in
lib.o: lib.in
msec.o: msec.in
roff.o: predefs.in
st.o: st.in
vol.o: vol.in

$(LIBMAN_OBJS): libman.h
$(LIBMDOC_OBJS): libmdoc.h
$(LIBROFF_OBJS): libroff.h
$(LIBMANDOC_OBJS): mandoc.h mdoc.h man.h libmandoc.h config.h
$(COMPAT_OBJS): config.h compat_ohash.h
d261 5
a265 1
$(MANDOC_HTML_OBJS): html.h
d268 1
d277 7
a283 1
$(MANDOC_TERM_OBJS): term.h
d291 10
a300 1
$(MANDOC_OBJS): main.h mandoc.h mdoc.h man.h config.h out.h
d303 3
a305 1
$(MANDOCDB_OBJS): mansearch.h mandoc.h mdoc.h man.h config.h manpath.h
d308 26
a333 1
$(PRECONV_OBJS): config.h
d335 1
a335 2
APROPOS_OBJS	 = apropos.o mansearch.o manpath.o
$(APROPOS_OBJS): config.h manpath.h mansearch.h
d337 4
a340 2
MANPAGE_OBJS	 = manpage.o mansearch.o manpath.o
$(MANPAGE_OBJS): config.h manpath.h mansearch.h
d343 3
a345 1
$(DEMANDOC_OBJS): config.h
d348 9
d358 4
d363 9
a371 1
		   preconv.1.html \
d373 4
a376 1
		   tbl.3.html \
d378 4
d383 9
d393 4
d398 9
d408 4
d413 9
a421 1
		   mandocdb.8.html
d434 2
d438 1
a438 1
	rm -f apropos $(APROPOS_OBJS)
d440 1
d442 7
a448 1
	rm -f manpage $(MANPAGE_OBJS)
d450 1
d452 3
a454 2
	rm -f config.h config.log $(COMPAT_OBJS)
	rm -f mdocml.tar.gz
d456 6
a461 1
	rm -rf *.dSYM
d471 1
d476 1
a476 1
	$(INSTALL_MAN) mandoc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
d483 1
a483 1
	#$(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR)
d501 3
d507 3
d513 3
d519 5
a523 2
manpage: $(MANPAGE_OBJS) libmandoc.a
	$(CC) $(LDFLAGS) -o $@@ $(MANPAGE_OBJS) libmandoc.a $(DBLIB)
d528 15
d546 3
d555 1
a555 2
	chmod 755 .dist/mdocml-$(VERSION)/configure
	( cd .dist/ && tar zcf ../$@@ mdocml-$(VERSION) )
d558 31
d591 1
a591 1
config.h: configure config.h.pre config.h.post $(TESTSRCS)
d593 29
a621 1
	CC="$(CC)" CFLAGS="$(CFLAGS)" VERSION="$(VERSION)" ./configure
d626 3
d632 9
@


1.1.1.12
log
@Merge mdocml state from 2012-01-30 for various relaxed checks in the
parser to allow it to pass almost all man pages in pkgsrc.
@
text
@a25 11
# If your system has manpath(1), uncomment this.  This is most any
# system that's not OpenBSD or NetBSD.  If uncommented, apropos(1),
# mandocdb(8), and man.cgi will popen(3) manpath(1) to get the MANPATH
# variable.
#CFLAGS		+= -DUSE_MANPATH

# If your system supports static binaries only, uncomment this.  This
# appears only to be BSD UNIX systems (Mac OS X has no support and Linux
# requires -pthreads for static libdb).
STATIC		 = -static

a28 3
WWWPREFIX	 = /var/www
HTDOCDIR	 = $(WWWPREFIX)/htdocs
CGIBINDIR	 = $(WWWPREFIX)/cgi-bin
d47 1
a47 2
DBBIN		 = apropos mandocdb man.cgi catman whatis
DBLN		 = llib-lapropos.ln llib-lmandocdb.ln llib-lman.cgi.ln llib-lcatman.ln
a51 1
		   TODO \
a53 2
		   apropos_db.c \
		   apropos_db.h \
a57 3
		   catman.8 \
		   catman.c \
		   cgi.c \
a59 1
		   compat_fgetln.c \
d65 1
a66 1
		   demandoc.c \
d85 1
a87 3
		   man.cgi.7 \
		   man-cgi.css \
		   man.h \
a96 1
		   mandoc_char.7 \
d99 2
a100 3
		   mandocdb.h \
		   manpath.c \
		   manpath.h \
a102 1
		   mdoc.h \
a117 1
		   regress \
a133 1
		   test-fgetln.c \
d141 1
a141 2
		   vol.in \
		   whatis.1
d160 1
d171 1
a192 1
		   msec.o \
a198 1
		   msec.ln \
d201 1
a201 2
COMPAT_OBJS	 = compat_fgetln.o \
		   compat_getsubopt.o \
d204 1
a204 2
COMPAT_LNS	 = compat_fgetln.ln \
		   compat_getsubopt.ln \
d270 2
a271 2
MANDOCDB_OBJS	 = mandocdb.o manpath.o
MANDOCDB_LNS	 = mandocdb.ln manpath.ln
d273 1
a273 1
$(MANDOCDB_OBJS) $(MANDOCDB_LNS): mandocdb.h mandoc.h mdoc.h man.h config.h manpath.h
d280 2
a281 2
APROPOS_OBJS	 = apropos.o apropos_db.o manpath.o
APROPOS_LNS	 = apropos.ln apropos_db.ln manpath.ln
d283 1
a283 26
$(APROPOS_OBJS) $(APROPOS_LNS): config.h mandoc.h apropos_db.h manpath.h mandocdb.h

CGI_OBJS	 = $(MANDOC_HTML_OBJS) \
		   $(MANDOC_MAN_OBJS) \
		   $(MANDOC_TERM_OBJS) \
		   cgi.o \
		   apropos_db.o \
		   manpath.o \
		   out.o \
		   tree.o

CGI_LNS	 	 = $(MANDOC_HTML_LNS) \
		   $(MANDOC_MAN_LNS) \
		   $(MANDOC_TERM_LNS) \
		   cgi.ln \
		   apropos_db.ln \
		   manpath.ln \
		   out.ln \
		   tree.ln

$(CGI_OBJS) $(CGI_LNS): main.h mdoc.h man.h out.h config.h mandoc.h apropos_db.h manpath.h mandocdb.h

CATMAN_OBJS	 = catman.o manpath.o
CATMAN_LNS 	 = catman.ln manpath.ln

$(CATMAN_OBJS) $(CATMAN_LNS): config.h mandoc.h manpath.h mandocdb.h
a294 5
		   catman.8.html \
		   catman.8.xhtml \
		   catman.8.ps \
		   catman.8.pdf \
		   catman.8.txt \
a304 5
		   whatis.1.html \
		   whatis.1.xhtml \
		   whatis.1.ps \
		   whatis.1.pdf \
		   whatis.1.txt \
a319 5
		   man.cgi.7.html \
		   man.cgi.7.xhtml \
		   man.cgi.7.ps \
		   man.cgi.7.pdf \
		   man.cgi.7.txt \
d362 1
a362 1
lint: llib-lmandoc.ln llib-lpreconv.ln llib-ldemandoc.ln $(DBLN)
d371 1
a371 1
	rm -f apropos whatis $(APROPOS_OBJS)
a372 4
	rm -f man.cgi $(CGI_OBJS)
	rm -f llib-lman.cgi.ln $(CGI_LNS)
	rm -f catman $(CATMAN_OBJS)
	rm -f llib-lcatman.ln $(CATMAN_LNS)
a379 1
	rm -rf test-fgetln.DSYM
a402 7
installcgi: all
	mkdir -p $(DESTDIR)$(CGIBINDIR)
	mkdir -p $(DESTDIR)$(HTDOCDIR)
	$(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR)
	$(INSTALL_DATA) example.style.css $(DESTDIR)$(HTDOCDIR)/man.css
	$(INSTALL_DATA) man-cgi.css $(DESTDIR)$(HTDOCDIR)

d423 2
a424 2
llib-lmandoc.ln: $(MANDOC_LNS) llib-llibmandoc.ln
	$(LINT) $(LINTFLAGS) -Cmandoc $(MANDOC_LNS) llib-llibmandoc.ln
d429 2
a430 2
llib-lmandocdb.ln: $(MANDOCDB_LNS) llib-llibmandoc.ln
	$(LINT) $(LINTFLAGS) -Cmandocdb $(MANDOCDB_LNS) llib-llibmandoc.ln
d435 2
a436 5
llib-lpreconv.ln: $(PRECONV_LNS) llib-llibmandoc.ln
	$(LINT) $(LINTFLAGS) -Cpreconv $(PRECONV_LNS) llib-llibmandoc.ln

whatis: apropos
	cp -f apropos whatis
d441 2
a442 14
llib-lapropos.ln: $(APROPOS_LNS) llib-llibmandoc.ln
	$(LINT) $(LINTFLAGS) -Capropos $(APROPOS_LNS) llib-llibmandoc.ln

catman: $(CATMAN_OBJS) libmandoc.a
	$(CC) $(LDFLAGS) -o $@@ $(CATMAN_OBJS) libmandoc.a $(DBLIB)

llib-lcatman.ln: $(CATMAN_LNS) llib-llibmandoc.ln
	$(LINT) $(LINTFLAGS) -Ccatman $(CATMAN_LNS) llib-llibmandoc.ln

man.cgi: $(CGI_OBJS) libmandoc.a
	$(CC) $(LDFLAGS) $(STATIC) -o $@@ $(CGI_OBJS) libmandoc.a $(DBLIB)

llib-lman.cgi.ln: $(CGI_LNS) llib-llibmandoc.ln
	$(LINT) $(LINTFLAGS) -Cman.cgi $(CGI_LNS) llib-llibmandoc.ln
d447 2
a448 2
llib-ldemandoc.ln: $(DEMANDOC_LNS) llib-llibmandoc.ln
	$(LINT) $(LINTFLAGS) -Cdemandoc $(DEMANDOC_LNS) llib-llibmandoc.ln
a495 4
	  if $(CC) $(CFLAGS) -Werror -o test-fgetln test-fgetln.c >> config.log 2>&1; then \
		echo '#define HAVE_FGETLN'; \
		rm test-fgetln; \
	  fi; \
@


1.1.1.12.6.1
log
@resync from head
@
text
@d15 2
a16 2
VERSION		 = 1.12.1
VDATE		 = 23 March 2012
d145 1
d456 6
a461 10
	rm -rf test-fgetln.dSYM
	rm -rf test-strlcpy.dSYM
	rm -rf test-strlcat.dSYM 
	rm -rf test-strptime.dSYM 
	rm -rf test-mmap.dSYM 
	rm -rf test-getsubopt.dSYM
	rm -rf apropos.dSYM
	rm -rf catman.dSYM
	rm -rf mandocdb.dSYM
	rm -rf whatis.dSYM
d471 1
@


1.1.1.12.6.2
log
@Rebase to HEAD as of a few days ago.
@
text
@d4 3
d8 1
d13 1
a13 1
# CFLAGS	+= -DOSNAME="\"OpenBSD 5.4\""
d15 2
a16 2
VERSION		 = 1.13.0
VDATE		 = 4 January 2014
d27 3
a29 2
# system that's not OpenBSD or NetBSD.  If uncommented, manpage(1) and
# mandocdb(8) will use manpath(1) to get the MANPATH variable.
d32 3
a34 2
# If your system does not support static binaries, comment this,
# for example on Mac OS X.
a35 2
# Linux requires -pthread to statically link with libdb.
#STATIC		+= -pthread
d37 1
a37 1
CFLAGS		+= -I/usr/local/include -g -DHAVE_CONFIG_H
d55 8
a62 2
DBLIB		 = -L/usr/local/lib -lsqlite3
DBBIN		 = mandocdb manpage apropos
a65 9
TESTSRCS	 = test-fgetln.c \
		   test-getsubopt.c \
		   test-mmap.c \
		   test-ohash.c \
		   test-strlcat.c \
		   test-strlcpy.c \
		   test-strnlen.c \
		   test-strptime.c

a66 1
		   NEWS \
d70 2
d76 2
a82 3
		   compat_ohash.c \
		   compat_ohash.h \
		   compat_strcasestr.c \
a84 2
		   compat_strnlen.c \
		   compat_strsep.c \
a86 1
		   configure \
a94 1
		   gmdiff \
d109 1
d124 1
a124 1
		   manpage.c \
a126 2
		   mansearch.c \
		   mansearch.h \
a149 1
		   tbl.3 \
d161 6
d170 1
a170 1
		   $(TESTSRCS)
d176 4
d191 10
d208 6
d222 7
a231 2
		   compat_ohash.o \
		   compat_strcasestr.o \
d233 21
a253 18
		   compat_strlcpy.o \
		   compat_strnlen.o \
		   compat_strsep.o

arch.o: arch.in
att.o: att.in
chars.o: chars.in
lib.o: lib.in
msec.o: msec.in
roff.o: predefs.in
st.o: st.in
vol.o: vol.in

$(LIBMAN_OBJS): libman.h
$(LIBMDOC_OBJS): libmdoc.h
$(LIBROFF_OBJS): libroff.h
$(LIBMANDOC_OBJS): mandoc.h mdoc.h man.h libmandoc.h config.h
$(COMPAT_OBJS): config.h compat_ohash.h
d260 5
a264 1
$(MANDOC_HTML_OBJS): html.h
d267 1
d276 7
a282 1
$(MANDOC_TERM_OBJS): term.h
d290 10
a299 1
$(MANDOC_OBJS): main.h mandoc.h mdoc.h man.h config.h out.h
d302 3
a304 1
$(MANDOCDB_OBJS): mansearch.h mandoc.h mdoc.h man.h config.h manpath.h
d307 26
a332 1
$(PRECONV_OBJS): config.h
d334 1
a334 2
APROPOS_OBJS	 = apropos.o mansearch.o manpath.o
$(APROPOS_OBJS): config.h manpath.h mansearch.h
d336 4
a339 2
MANPAGE_OBJS	 = manpage.o mansearch.o manpath.o
$(MANPAGE_OBJS): config.h manpath.h mansearch.h
d342 3
a344 1
$(DEMANDOC_OBJS): config.h
d347 9
d357 4
d362 9
a370 1
		   preconv.1.html \
d372 4
a375 1
		   tbl.3.html \
d377 4
d382 9
d392 4
d397 9
d407 4
d412 9
a420 1
		   mandocdb.8.html
d433 2
d437 1
a437 1
	rm -f apropos $(APROPOS_OBJS)
d439 1
d441 7
a447 1
	rm -f manpage $(MANPAGE_OBJS)
d449 1
d451 3
a453 2
	rm -f config.h config.log $(COMPAT_OBJS)
	rm -f mdocml.tar.gz
d455 10
a464 1
	rm -rf *.dSYM
d478 1
a478 1
	$(INSTALL_MAN) mandoc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
d485 1
a485 1
	#$(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR)
d503 3
d509 3
d515 3
d521 5
a525 2
manpage: $(MANPAGE_OBJS) libmandoc.a
	$(CC) $(LDFLAGS) -o $@@ $(MANPAGE_OBJS) libmandoc.a $(DBLIB)
d530 15
d548 3
d557 1
a557 2
	chmod 755 .dist/mdocml-$(VERSION)/configure
	( cd .dist/ && tar zcf ../$@@ mdocml-$(VERSION) )
d560 31
d593 1
a593 1
config.h: configure config.h.pre config.h.post $(TESTSRCS)
d595 29
a623 1
	CC="$(CC)" CFLAGS="$(CFLAGS)" VERSION="$(VERSION)" ./configure
d628 3
d634 9
@


1.1.1.13
log
@import latest
@
text
@d15 2
a16 2
VERSION		 = 1.12.1
VDATE		 = 23 March 2012
d145 1
d456 6
a461 10
	rm -rf test-fgetln.dSYM
	rm -rf test-strlcpy.dSYM
	rm -rf test-strlcat.dSYM 
	rm -rf test-strptime.dSYM 
	rm -rf test-mmap.dSYM 
	rm -rf test-getsubopt.dSYM
	rm -rf apropos.dSYM
	rm -rf catman.dSYM
	rm -rf mandocdb.dSYM
	rm -rf whatis.dSYM
d471 1
@


1.1.1.14
log
@Import mdocml 1.12.3 from upstream CVS as of today.

Changes in version 1.12.3, released on December 31, 2013

 * In the mdoc(7) SYNOPSIS, line breaks and hanging indentation
   now work correctly for .Fo/.Fa/.Fc and .Fn blocks.
   Thanks to Franco Fichtner for doing part of the work.
 * The mdoc(7) .Bk macro got some addititonal bugfixes.
 * In mdoc(7) macro arguments, double quotes can now be quoted
   by doubling them, just like in man(7).
   Thanks to Tsugutomo ENAMI for the patch.
 * At the end of man(7) macro lines, end-of-sentence spacing
   now works.  Thanks to Franco Fichtner for the patch.
 * For backward compatibility, the man(7) parser now supports the
   man-ext .UR/.UE (uniform resource identifier) block macros.
 * The man(7) parser now handles closing blocks that are not open
   more gracefully.
 * The man(7) parser now ignores blank lines right after .SH and .SS.
 * In the man(7) formatter, reset indentation when leaving a block,
   not just when entering the next one.
 * The roff(7) .nr request now supports incrementing and decrementing
   number registers and stops parsing the number right before the
   first non-digit character.
 * The roff(7) parser now supports the alternative escape sequence
   syntax \C'uXXXX' for Unicode characters.
 * The roff(7) parser now parses and ignores the .fam (font family)
   and .hw (hyphenation points) requests and the \d and \u escape
   sequences.
 * The roff(7) manual got a new ESCAPE SEQUENCE REFERENCE.

Changes in version 1.12.2, released on Oktober 5, 2013

 * The mdoc(7) to man(7) converter, to be called as mandoc -Tman,
   is now fully functional.
 * The mandoc(1) utility now supports the -Ios (default operating system)
   input option, and the -Tutf8 output mode now actually works.
 * The mandocdb(8) utility no longer truncates existing databases when
   starting to build new ones, but only replaces them when the build
   actually succeeds.
 * The man(7) parser now supports the PD macro (paragraph distance),
   and (for GNU man-ext compatibility only) EX (example block) and EE
   (example end).  Plus several bugfixes regarding indentation, line
   breaks, and vertical spacing, and regarding RS following TP.
 * The roff(7) parser now supports the \f(BI (bold+italic) font escape,
   the \z (zero cursor advance) escape and the cc (change control
   character) and it (input line trap) requests. Plus bugfixes regarding
   the \t (tab) escape, nested escape sequences, and conditional requests.
 * In mdoc(7), several bugs were fixed related to UTF-8 output of quoting
   enclosures, delimiter handling, list indentation and horizontal and
   vertical spacing, formatting of the Lk, %U, and %C macros, plus some
   bugfixes related to the handling of syntax errors like badly nested
   font blocks, stray Ta macros outside column lists, unterminated It Xo
   blocks, and non-text children of Nm blocks.
 * In tbl(7), the width of horizontal spans and the vertical spacing
   around tables was corrected, and in man(7) files, a crash was fixed
   that was triggered by some particular unclosed T{ macros.
 * For mandoc developers, we now provide a tbl(3) library manual and
   gmdiff, a very small, very simplistic groff-versus-mandoc output
   comparison tool.
@
text
@d4 3
d8 1
d13 1
a13 1
# CFLAGS	+= -DOSNAME="\"OpenBSD 5.4\""
d15 2
a16 2
VERSION		 = 1.13.0
VDATE		 = 4 January 2014
d27 3
a29 2
# system that's not OpenBSD or NetBSD.  If uncommented, manpage(1) and
# mandocdb(8) will use manpath(1) to get the MANPATH variable.
d32 3
a34 2
# If your system does not support static binaries, comment this,
# for example on Mac OS X.
a35 2
# Linux requires -pthread to statically link with libdb.
#STATIC		+= -pthread
d37 1
a37 1
CFLAGS		+= -I/usr/local/include -g -DHAVE_CONFIG_H
d55 8
a62 2
DBLIB		 = -L/usr/local/lib -lsqlite3
DBBIN		 = mandocdb manpage apropos
a65 9
TESTSRCS	 = test-fgetln.c \
		   test-getsubopt.c \
		   test-mmap.c \
		   test-ohash.c \
		   test-strlcat.c \
		   test-strlcpy.c \
		   test-strnlen.c \
		   test-strptime.c

a66 1
		   NEWS \
d70 2
d76 2
a82 3
		   compat_ohash.c \
		   compat_ohash.h \
		   compat_strcasestr.c \
a84 2
		   compat_strnlen.c \
		   compat_strsep.c \
a86 1
		   configure \
a94 1
		   gmdiff \
d109 1
d124 1
a124 1
		   manpage.c \
a126 2
		   mansearch.c \
		   mansearch.h \
a149 1
		   tbl.3 \
d161 6
d170 1
a170 1
		   $(TESTSRCS)
d176 4
d191 10
d208 6
d222 7
a231 2
		   compat_ohash.o \
		   compat_strcasestr.o \
d233 21
a253 18
		   compat_strlcpy.o \
		   compat_strnlen.o \
		   compat_strsep.o

arch.o: arch.in
att.o: att.in
chars.o: chars.in
lib.o: lib.in
msec.o: msec.in
roff.o: predefs.in
st.o: st.in
vol.o: vol.in

$(LIBMAN_OBJS): libman.h
$(LIBMDOC_OBJS): libmdoc.h
$(LIBROFF_OBJS): libroff.h
$(LIBMANDOC_OBJS): mandoc.h mdoc.h man.h libmandoc.h config.h
$(COMPAT_OBJS): config.h compat_ohash.h
d260 5
a264 1
$(MANDOC_HTML_OBJS): html.h
d267 1
d276 7
a282 1
$(MANDOC_TERM_OBJS): term.h
d290 10
a299 1
$(MANDOC_OBJS): main.h mandoc.h mdoc.h man.h config.h out.h
d302 3
a304 1
$(MANDOCDB_OBJS): mansearch.h mandoc.h mdoc.h man.h config.h manpath.h
d307 26
a332 1
$(PRECONV_OBJS): config.h
d334 1
a334 2
APROPOS_OBJS	 = apropos.o mansearch.o manpath.o
$(APROPOS_OBJS): config.h manpath.h mansearch.h
d336 4
a339 2
MANPAGE_OBJS	 = manpage.o mansearch.o manpath.o
$(MANPAGE_OBJS): config.h manpath.h mansearch.h
d342 3
a344 1
$(DEMANDOC_OBJS): config.h
d347 9
d357 4
d362 9
a370 1
		   preconv.1.html \
d372 4
a375 1
		   tbl.3.html \
d377 4
d382 9
d392 4
d397 9
d407 4
d412 9
a420 1
		   mandocdb.8.html
d433 2
d437 1
a437 1
	rm -f apropos $(APROPOS_OBJS)
d439 1
d441 7
a447 1
	rm -f manpage $(MANPAGE_OBJS)
d449 1
d451 3
a453 2
	rm -f config.h config.log $(COMPAT_OBJS)
	rm -f mdocml.tar.gz
d455 10
a464 1
	rm -rf *.dSYM
d478 1
a478 1
	$(INSTALL_MAN) mandoc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
d485 1
a485 1
	#$(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR)
d503 3
d509 3
d515 3
d521 5
a525 2
manpage: $(MANPAGE_OBJS) libmandoc.a
	$(CC) $(LDFLAGS) -o $@@ $(MANPAGE_OBJS) libmandoc.a $(DBLIB)
d530 15
d548 3
d557 1
a557 2
	chmod 755 .dist/mdocml-$(VERSION)/configure
	( cd .dist/ && tar zcf ../$@@ mdocml-$(VERSION) )
d560 31
d593 1
a593 1
config.h: configure config.h.pre config.h.post $(TESTSRCS)
d595 29
a623 1
	CC="$(CC)" CFLAGS="$(CFLAGS)" VERSION="$(VERSION)" ./configure
d628 3
d634 9
@


1.1.1.15
log
@import mdocml 1.13.3
@
text
@d1 7
a7 1
# $Id: Makefile,v 1.457 2015/03/13 12:35:32 schwarze Exp $
d9 10
a18 2
# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@@bsd.lv>
# Copyright (c) 2011, 2013, 2014, 2015 Ingo Schwarze <schwarze@@openbsd.org>
d20 37
a56 19
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

VERSION = 1.13.3

# === LIST OF FILES ====================================================

TESTSRCS	 = test-dirent-namlen.c \
		   test-fgetln.c \
		   test-fts.c \
a59 4
		   test-reallocarray.c \
		   test-sqlite3.c \
		   test-sqlite3_errstr.c \
		   test-strcasestr.c \
d62 2
a63 4
		   test-strptime.c \
		   test-strsep.c \
		   test-strtonum.c \
		   test-wchar.c
d65 9
a73 1
SRCS		 = att.c \
d76 1
a77 1
		   compat_fts.c \
d80 1
a80 2
		   compat_reallocarray.c \
		   compat_sqlite3_errstr.c \
d84 1
d86 4
a89 1
		   compat_strtonum.c \
d91 1
d95 3
d99 3
d103 5
d109 2
d112 2
d119 2
d122 3
a124 1
		   mandoc_aux.c \
d128 1
d130 2
a131 1
		   mansearch_const.c \
d133 1
d142 1
d144 2
d147 1
d149 1
d152 4
d163 1
d167 2
a170 57
DISTFILES	 = INSTALL \
		   LICENSE \
		   Makefile \
		   Makefile.depend \
		   NEWS \
		   TODO \
		   apropos.1 \
		   cgi.h.example \
		   chars.in \
		   compat_fts.h \
		   compat_ohash.h \
		   configure \
		   configure.local.example \
		   demandoc.1 \
		   eqn.7 \
		   example.style.css \
		   gmdiff \
		   html.h \
		   lib.in \
		   libman.h \
		   libmandoc.h \
		   libmdoc.h \
		   libroff.h \
		   main.h \
		   makewhatis.8 \
		   man-cgi.css \
		   man.1 \
		   man.7 \
		   man.cgi.8 \
		   man.h \
		   mandoc.1 \
		   mandoc.3 \
		   mandoc.db.5 \
		   mandoc.h \
		   mandoc_aux.h \
		   mandoc_char.7 \
		   mandoc_escape.3 \
		   mandoc_headers.3 \
		   mandoc_html.3 \
		   mandoc_malloc.3 \
		   manpath.h \
		   mansearch.3 \
		   mansearch.h \
		   mchars_alloc.3 \
		   mdoc.7 \
		   mdoc.h \
		   msec.in \
		   out.h \
		   predefs.in \
		   roff.7 \
		   st.in \
		   style.css \
		   tbl.3 \
		   tbl.7 \
		   term.h \
		   $(SRCS)

d176 2
a177 1
LIBMDOC_OBJS	 = att.o \
d184 2
a185 1
		   st.o
a198 1
		   mandoc_aux.o \
a199 1
		   preconv.o \
a202 1
		   compat_fts.o \
a204 2
		   compat_reallocarray.o \
		   compat_sqlite3_errstr.o \
d208 17
a224 2
		   compat_strsep.o \
		   compat_strtonum.o
d231 1
d242 1
d244 1
a244 1
BASE_OBJS	 = $(MANDOC_HTML_OBJS) \
a247 1
		   manpath.o \
d250 1
d252 2
a253 1
MAIN_OBJS	 = $(BASE_OBJS)
d255 2
a256 9
DB_OBJS		 = mandocdb.o \
		   mansearch.o \
		   mansearch_const.o

CGI_OBJS	 = $(MANDOC_HTML_OBJS) \
		   cgi.o \
		   mansearch.o \
		   mansearch_const.o \
		   out.o
d258 5
a262 1
MANPAGE_OBJS	 = manpage.o mansearch.o mansearch_const.o manpath.o
d265 1
d267 1
a267 1
WWW_MANS	 = apropos.1.html \
a268 1
		   man.1.html \
d270 1
a271 6
		   mandoc_escape.3.html \
		   mandoc_headers.3.html \
		   mandoc_html.3.html \
		   mandoc_malloc.3.html \
		   mansearch.3.html \
		   mchars_alloc.3.html \
a272 1
		   mandoc.db.5.html \
d279 5
a283 2
		   makewhatis.8.html \
		   man.cgi.8.html \
d286 3
a288 23
		   mandoc_aux.h.html \
		   manpath.h.html \
		   mansearch.h.html \
		   mdoc.h.html

WWW_OBJS	 = mdocml.tar.gz \
		   mdocml.sha256

# === USER CONFIGURATION ===============================================

include Makefile.local

# === DEPENDENCY HANDLING ==============================================

all: base-build $(BUILD_TARGETS) Makefile.local

base-build: mandoc demandoc

cgi-build: man.cgi

install: base-install $(INSTALL_TARGETS)

www: $(WWW_OBJS) $(WWW_MANS)
d290 1
a290 11
$(WWW_MANS): mandoc

.PHONY: base-install cgi-install db-install install www-install
.PHONY: clean distclean depend

include Makefile.depend

# === TARGETS CONTAINING SHELL COMMANDS ================================

distclean: clean
	rm -f Makefile.local config.h config.h.old config.log config.log.old
d293 4
a296 3
	rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS)
	rm -f mandoc $(BASE_OBJS) $(DB_OBJS)
	rm -f man.cgi $(CGI_OBJS)
d299 4
a302 1
	rm -f $(WWW_MANS) $(WWW_OBJS)
d305 1
a305 1
base-install: base-build
d313 1
a313 2
	$(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR)
	ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN)
d315 4
a318 12
	$(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h \
		$(DESTDIR)$(INCLUDEDIR)
	$(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1
	$(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
	$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
		mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
	$(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MAN}.7
	$(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MDOC}.7
	$(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/${MANM_ROFF}.7
	$(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/${MANM_EQN}.7
	$(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/${MANM_TBL}.7
	$(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
d321 1
a321 20
db-install: base-build
	mkdir -p $(DESTDIR)$(BINDIR)
	mkdir -p $(DESTDIR)$(SBINDIR)
	mkdir -p $(DESTDIR)$(MANDIR)/man1
	mkdir -p $(DESTDIR)$(MANDIR)/man3
	mkdir -p $(DESTDIR)$(MANDIR)/man5
	mkdir -p $(DESTDIR)$(MANDIR)/man8
	ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
	ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
	ln -f $(DESTDIR)$(BINDIR)/mandoc \
		$(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
	$(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
	ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
		$(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
	$(INSTALL_MAN) mansearch.3 $(DESTDIR)$(MANDIR)/man3
	$(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5
	$(INSTALL_MAN) makewhatis.8 \
		$(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8

cgi-install: cgi-build
d324 1
a324 3
	mkdir -p $(DESTDIR)$(WWWPREFIX)/man/mandoc/man1
	mkdir -p $(DESTDIR)$(WWWPREFIX)/man/mandoc/man8
	$(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR)
a326 2
	$(INSTALL_MAN) apropos.1 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man1/
	$(INSTALL_MAN) man.cgi.8 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man8/
d328 10
a337 3
Makefile.local config.h: configure ${TESTSRCS}
	@@echo "$@@ is out of date; please run ./configure"
	@@exit 1
d342 8
a349 2
mandoc: $(MAIN_OBJS) libmandoc.a
	$(CC) $(LDFLAGS) -o $@@ $(MAIN_OBJS) libmandoc.a $(DBLIB)
d354 2
a355 2
man.cgi: $(CGI_OBJS) libmandoc.a
	$(CC) $(LDFLAGS) $(STATIC) -o $@@ $(CGI_OBJS) libmandoc.a $(DBLIB)
d360 2
a361 1
# --- maintainer targets ---
d363 1
a363 20
www-install: www
	mkdir -p $(HTDOCDIR)/snapshots
	$(INSTALL_DATA) $(WWW_MANS) style.css $(HTDOCDIR)
	$(INSTALL_DATA) $(WWW_OBJS) $(HTDOCDIR)/snapshots
	$(INSTALL_DATA) mdocml.tar.gz \
		$(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz
	$(INSTALL_DATA) mdocml.sha256 \
		$(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256

depend: config.h
	mkdep -f Makefile.depend $(CFLAGS) $(SRCS)
	perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \
		s|\\\n||g; s|  +| |g; s| $$||mg; print;' \
		Makefile.depend > Makefile.tmp
	mv Makefile.tmp Makefile.depend

mdocml.sha256: mdocml.tar.gz
	sha256 mdocml.tar.gz > $@@

mdocml.tar.gz: $(DISTFILES)
d365 1
a365 1
	$(INSTALL) -m 0644 $(DISTFILES) .dist/mdocml-$(VERSION)
d370 1
a370 1
# === SUFFIX RULES =====================================================
d372 3
a374 2
.SUFFIXES:	 .1       .3       .5       .7       .8       .h
.SUFFIXES:	 .1.html  .3.html  .5.html  .7.html  .8.html  .h.html
d377 4
a380 1
	highlight -I $< > $@@
d382 3
a384 3
.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: mandoc
	./mandoc -Thtml -Wall,stop \
		-Ostyle=style.css,man=%N.%S.html,includes=%I.html $< > $@@
@


1.1.1.16
log
@Changes in version 1.13.4, released on July 14, 2016

    --- MAJOR NEW FEATURES ---
 * man.conf(5): Design and implement a simpler configuration file format.
 * man(1): Leverage less(1) -T and :t in a way resembling ctags(1)
   to jump to the definitions of various terms inside manual pages.
 * soelim(1): New implementation by Baptiste Daroussin.
 * privilege limitation: Use OpenBSD pledge(2) or OS X sandbox_init(3)
   when available.
 * man.cgi(8): Support short URIs like http://man.openbsd.org/mdoc .
 * mandoc.css: Use one unified stylesheet rather than three different ones.
    --- MAJOR FUNCTIONALLY RELEVANT BUGFIXES ---
 * mdoc(7): Fix multiple aspects of SYNOPSIS .Nm formatting.
 * man(1): Fix process group handling, avoiding unclean shutdowns.
    --- PORTABILITY IMPROVEMENTS ---
 * Correctly use the ohash(3) compatibility implementation
   even when building without SQLite support.
 * Add compat glue for building on Solaris 9 and 10.
 * Let ./configure select a supported RE syntax for word boundaries.
 * Support LDFLAGS, to be used for example for hardening options.
 * Avoid mixing putchar(3) and putwchar(3) on the same file descriptor,
   it resulted in output corruption on some platforms.
 * Avoid reusing va_lists, use va_copy(3) for better portability.
 * Do not hardcode the path to the more(1) program.
    --- MINOR NEW FEATURES ---
 * roff(7): Implement \n(.$ (number of macro arguments).
 * roff(7): Fully implement \z (do not advance cursor).
 * roff(7): Implement the `r'  conditional (register exists).
 * roff(7): Implement \\$* (interpolate all arguments).
 * roff(7): Parse and ignore \, and \/ (italic corrections).
 * When there is no -m, no -M, no MANPATH and no /etc/man.conf,
   fall back to /usr/share/man:/usr/X11R6/man:/usr/local/man.
 * man(1): Give manuals in purely numerical sections priority over
   manuals of the same name in sections with an alphabetical suffix.
 * man.cgi(8): Support "header.html" and "footer.html".
 * man.cgi(8): Set the "autofocus" attribute on the query text box.
 * man.cgi(8): Simplify the search form, drop two useless buttons.
 * man.cgi(8): Delete the pseudo-manpath "mandoc", assume that
   apropos(1) and man.cgi(8) are installed in the default manpath.
    --- RELIABILITY BUGFIXES ---
 * mdoc(7): Avoid a use after free and an assertion failure when nodes
   are deleted during validation.
 * mdoc(7): Avoid a NULL pointer access when .Bd has no arguments.
 * mdoc(7): Avoid a NULL pointer access triggered by mismatching end macros.
 * mdoc(7): Avoid an assertion when .Fo has no argument.
 * mdoc(7): Avoid an assertion when .Ta<tab> occurs in .Bl -column.
 * mdoc(7): Avoid an assertion when a body gets broken and has a tail.
 * roff(7): Avoid an assertion caused by blanks inside \o.
 * roff(7): Make .so links to gziped manuals work without mandoc.db(5).
 * tbl(7): Avoid a use after free when the last line of a layout is empty.
 * eqn(7): Avoid an infinite loop caused by recursive "define".
 * makewhatis(8): Avoid a segfault caused by unusual directory structures.
 * Fix handling of leading, trailing, and double colons in MANPATH and -m.
    --- MINOR BUGFIXES ---
 * mdoc(7): Put arguments to end macros of broken partial explicit blocks
   inside the breaking block.
 * mdoc(7): Let .Dv force normal font.
 * mdoc(7): Make trailing whitespace significant in .Bl -tag widths.
 * mdoc(7): Fix macro interpretation around tabs in .Bl -column.
 * man(7): Use the default width for .RS without arguments.
 * man(7): On a new RS nesting level, the saved width starts from
   the default width, not from the saved width of the previous level.
 * man(7): Allow .PD in next-line scope.
 * man(7): Improve handling of empty .HP.
 * man(7): Improve formatting of .br and .sp inside .HP.
 * man(7): Do not mistreat empty arguments to font alternating
   macros as vertical spacing requests.
 * man(7): Allow fill mode changes in tagged paragraph next-line scope.
 * man(7): Fix minor bugs in block rewinding and simplify the related code.
 * man(7): Add missing line breaks before subsection headers.
 * man(7): Give section and subsection headers hanging indentation.
 * man(7): Make trailing whitespace significant in .TP widths.
 * roff(7): Don't allow breaking the output line after hyphens
   that immediately follow escape sequences.
 * roff(7): Ignore blank characters at the beginning of conditional blocks.
 * roff(7): Escape breakable hyphens only after handling input line traps.
 * roff(7): Reject \[uD800] to \[uDFFF] (surrogates) in the parser.
 * tbl(7): Allow more than one data field after T} on the same input line.
 * terminal output: Apply bold and italic to non-ASCII Unicode codepoints.
 * terminal output: Improve rounding rules for horizontal scaling widths.
 * HTML output: Render ASCII_NBRSP as "&nbsp;", not "-".
 * man(1): Do not match the first part of a name if it continues with a dot.
 * man(1): Keep working even if the current directory is unusable.
 * man(1): Better error message when $PAGER is invalid.
 * makewhatis(8): Improve handling of .Va and .Vt macros.
 * apropos(1): Print "nothing appropriate" to stderr when appropriate.
 * apropos(1): Abort with a useful error message when elementary
   database operations like preparing queries or binding variables fail.
    --- STRUCTURAL CHANGES, no functional change ---
 * mdoc(7) and man(7): Unified data structures struct roff_node etc.
 * mdoc(7) and man(7): Unified node handling library in roff.c.
 * mdoc(7) and man(7): Seperate validation phase from parsing.
 * roff(7): Major character table cleanup.
 * Link with libz rather than forking gunzip(1).
    --- THANKS TO ---
 * Baptiste Daroussin (FreeBSD) for the new soelim(1)
   and for release testing.
 * Anthony Bentley (OpenBSD) for unifying mandoc.css, two nice
   patches for man.cgi(8), some documentation patches, some bug
   reports, and various useful discussions.
 * Todd Miller (OpenBSD) for lots of help with process group and
   signal handling, a few patches, some bug reports and some useful
   discussions.
 * Jonathan Gray (OpenBSD) for yet more testing with afl(1)
   again resulting in more than half a dozen important bug reports.
 * Svyatoslav Mishyn (Crux Linux) for some patches, several bug
   reports, and extensive release testing.
 * Christian Neukirchen (void Linux) for a number of compatibility
   patches and suggestions and several bug reports.
 * Christos Zoulas (NetBSD) for a bug fix patch and some useful
   suggestions for cleanup.
 * Florian Obser (OpenBSD) for a bugfix patch and some bug reports.
 * Sevan Janiyan for help with Solaris compatibility and release
   testing on many platforms.
 * Jan Holzhueter and OpenCSW in general for help with Solaris
   compatibility, and for providing me with a Solaris 9/10/11 testing
   environment.
 * Michael McConville (OpenBSD) for some simple cleanup patches.
 * Thomas Klausner (NetBSD) for some bug reports and release testing.
 * Christian Weisgerber, Dmitrij Czarkoff, Igor Sobrado,
   Ken Westerback, Marc Espie, Mike Belopuhov, Rafael Neves,
   Ted Unangst, Tim van der Molen, Theo Buehler, Theo de Raadt
   (OpenBSD), Kurt Jaeger, Dag Erling Smoergrav (FreeBSD),
   Joerg Sonnenberger (NetBSD), Carsten Kunze (Heirloom troff),
   Daniel Levai, Fabian Raetz, Jan Stary, Jean-Yves Migeon,
   Lorenzo Beretta, Markus Waldeck, Maxim Belooussov, Michael Reed,
   Peter Bray, and Serguey Parkhomovsky for bug reports and feature
   suggestions.
 * Alexander Hall, Andrew Fresh, Antoine Jacoutot, Doug Hogan,
   Jason McIntyre, Jasper Lievisse Adriaanse, Kent Spillner,
   Nicholas Marriott, Peter Hessler, Sebastien Marie, Stefan Sperling,
   and Theo de Raadt (OpenBSD) for helpful discussions and feedback.
@
text
@d1 1
a1 1
# Id: Makefile,v 1.488 2016/07/12 05:18:38 kristaps Exp 
d4 1
a4 1
# Copyright (c) 2011, 2013-2016 Ingo Schwarze <schwarze@@openbsd.org>
d18 1
a18 1
VERSION = 1.13.4
d23 1
a23 1
		   test-err.c \
a24 1
		   test-getline.c \
a25 2
		   test-isblank.c \
		   test-mkdtemp.c \
a27 2
		   test-pledge.c \
		   test-progname.c \
a28 3
		   test-rewb-bsd.c \
		   test-rewb-sysv.c \
		   test-sandbox_init.c \
a31 1
		   test-stringlist.c \
a36 1
		   test-vasprintf.c \
d42 1
a42 1
		   compat_err.c \
a43 1
		   compat_getline.c \
a44 2
		   compat_isblank.c \
		   compat_mkdtemp.c \
a45 1
		   compat_progname.c \
a48 1
		   compat_stringlist.c \
a52 1
		   compat_vasprintf.c \
a67 1
		   mandoc_ohash.c \
a78 1
		   mdoc_state.c \
a85 1
		   soelim.c \
a86 1
		   tag.c \
d96 2
a97 1
		   tree.c
d107 1
a109 1
		   compat_stringlist.h \
d114 1
d124 1
a126 1
		   man.cgi.3 \
a127 1
		   man.conf.5 \
a128 1
		   manconf.h \
a130 1
		   mandoc.css \
d139 1
a139 1
		   mandoc_ohash.h \
a148 3
		   roff.h \
		   roff_int.h \
		   soelim.1 \
d150 1
a150 1
		   tag.h \
d154 1
a154 2
		   $(SRCS) \
		   $(TESTSRCS)
a166 1
		   mdoc_state.o \
a182 1
		   mandoc_ohash.o \
d187 1
a187 1
COMPAT_OBJS	 = compat_err.o \
a188 1
		   compat_getline.o \
a189 2
		   compat_isblank.o \
		   compat_mkdtemp.o \
a190 1
		   compat_progname.o \
d197 1
a197 2
		   compat_strtonum.o \
		   compat_vasprintf.o
a220 1
		   tag.o \
a238 7
SOELIM_OBJS	 = soelim.o \
		   compat_err.o \
		   compat_getline.o \
		   compat_progname.o \
		   compat_reallocarray.o \
		   compat_stringlist.o

a242 1
		   soelim.1.html \
a250 1
		   man.conf.5.html \
a258 1
		   man.cgi.3.html \
a260 1
		   manconf.h.html \
d263 1
d265 1
a265 2
		   mdoc.h.html \
		   roff.h.html
d278 1
a278 1
base-build: mandoc demandoc soelim
a303 1
	rm -f soelim $(SOELIM_OBJS)
d309 1
a313 1
	mkdir -p $(DESTDIR)$(MANDIR)/man5
a315 1
	$(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
d318 1
a318 1
	$(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \
a320 1
	$(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
a323 1
	$(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/${MANM_MANCONF}.5
d330 1
d354 2
d357 4
a360 1
	$(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR)
d367 1
a367 1
	ar rs $@@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
d370 1
a370 1
	$(CC) -o $@@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD)
d373 1
a373 1
	$(CC) -o $@@ $(LDFLAGS) $(MANPAGE_OBJS) libmandoc.a $(LDADD)
d376 1
a376 1
	$(CC) $(STATIC) -o $@@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD)
d379 1
a379 4
	$(CC) -o $@@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD)

soelim: $(SOELIM_OBJS)
	$(CC) -o $@@ $(LDFLAGS) $(SOELIM_OBJS)
d385 1
a385 1
	$(INSTALL_DATA) $(WWW_MANS) mandoc.css $(HTDOCDIR)
a398 2
dist: mdocml.sha256

d419 1
a419 1
		-Ostyle=mandoc.css,man=%N.%S.html,includes=%I.html $< > $@@
@


1.1.1.17
log
@
Changes in version 1.14.1, released on February 21, 2017

    --- MAJOR NEW FEATURES ---
 * apropos(1): Reimplement complete semantic search functionality
   without the dependency on SQLite3, using only POSIX APIs.
   This comes with a completely new mandoc.db(5) file format.
 * man(1): Support more than one tag entry for the same search term,
   plus some minor improvements to the less(1) :t support.
 * -Thtml: Use real macro names for CSS classes.
   Systematic cleanup of and many improvements to mandoc.css.
 * -Thtml: Produce human readable HTML code by using indentation
   and better line breaks.  Improve various HTML elements,
   and trim several useless ones.
 * New catman(8) utility, still somewhat experimental.
 * Now includes a portable version of the OpenBSD mandoc regression
   suite, see regress/regress.pl.1 for details.
    --- REMOVED FUNCTIONALITY ---
 * Operating systems that don't provide mmap(3) are no longer supported.
 * Drop support for manpath(1).  Even if your system has manpath(1),
   it is simpler to use MANPATH_DEFAULT in configure.local for
   operating system defaults, man.conf(5) for machine-specific
   modifications, and ${MANPATH}, -m, and -M for user preferences
   than to bother with the complexity of manpath(1).
 * makewhatis(8) -p: No longer warn about missing MLINKS since these
   are no longer needed for anything.
    --- MINOR NEW FEATURES ---
 * mdoc(7): Warn about invalid punctuation and content below NAME.
 * mdoc(7): Warn about .Xr lacking the second argument (section).
 * mdoc(7): Warn about violations of the rule "new sentence, new line".
 * roff(7): Warn about trailing whitespace at the end of comments.
 * mdoc(7): Improve rendering of double quotes.
 * mdoc(7): Always do text production in the validator, never in the
   formatters.  Cleaner, simpler, shorter, helps NetBSD apropos(1)
   and also makes -Ttree output more useful.
 * -Ttree: Show metadata and some additional node flags.
   New -Onoval output option to show the unvalidated tree.
    --- RELIABILITY BUGFIXES ---
 * man(1): Make "man -l" work with standard input from a pipe or file,
   as long as standard output is a terminal.
 * man(7): Fix out of bounds read access if a text node immediately
   preceded the first .SH header.
 * mdoc(7): Fix out of bounds read access for .Bl without a type
   but with a width.
 * mdoc(7): Fix out of bounds read access for .Bl -column starting
   with a tab character instead of a child .It macro.
 * mdoc(7): Fix syntax tree corruption leading to segfaults caused
   by stray block end macros in nested blocks of mismatching type.
 * man(1): Fix NULL dereference when the first of multiple pages
   shown was preformatted.
 * mdoc(7): Fix syntax tree corruption leading to NULL dereference
   caused by partial implicit macros inside .Bl -column table cells.
 * mdoc(7): Fix syntax tree corruption leading to NULL dereference
   for macro sequences like .Bl .Bl .It Bo .El .It.
 * mdoc(7): Fix syntax tree corruption leading to NULL dereference
   caused by .Ta following a nested .Bl -column breaking another block.
 * mdoc(7): Fix syntax tree corruption sometimes leading to NULL
   dereference caused by indirectly broken .Nd or .Nm blocks.
 * mdoc(7) -Thtml: Fix a NULL dereference for .Bl -column with 0 columns.
 * mdoc(7): Fix NULL dereference in some specific cases of a
   block-end macro calling another block-end macro.
 * mdoc(7): Fix NULL dereference if the only child of the head
   of the first .Sh was an empty in-line macro.
 * eqn(7): Fix NULL dereference in the terminal formatter
   for empty matrices and empty square roots.
 * mdoc(7): Fix an assertion failure for a .Bd without a type that
   breaks another block.
 * mdoc(7): Fix an assertion failure that happened for some .Bl -column
   lists containing a column width of "-4n", "-3n", or "-2n".
 * mdoc(7): Fix an assertion failure caused by .Bl -column without .It
   but containing eqn(7) or tbl(7) code.
 * roff(7): Fix an assertion failure caused by \z\[u00FF] with -Tps/-Tpdf.
 * roff(7): Fix an assertion failures caused by whitespace inside \o''
   (overstrike) sequences.
 * -Thtml: Fix an assertion failure caused by -Oman or -Oincludes of
   excessive length.
    --- PORTABILITY IMPROVEMENTS ---
 * man(1): Do not mix stdio narrow and wide stream orientation
   on stdout, which could cause output corruption on glibc.
 * mandoc(1): Autodetect a suitable locale for -Tutf8 mode.
 * ./configure: Autodetect whether PATH_MAX and O_DIRECTORY are defined.
 * ./configure: Autodetect if nanosleep(3) needs -lrt.
 * ./configure: Provide an ${LN} configuration variable.
 * ./configure: Put compiler arguments that may contain -l at the end.
    --- MINOR BUGFIXES ---
 * mdoc(7): Fix SYNOPSIS output if the first child of .Nm is a macro.
 * mdoc(7) -Thtml: Improve formatting of .Bl -tag with short tags.
 * man(7) -Thtml: Preserve whitespace in .nf (nofill) mode.
 * mandoc(1): Error out on invalid output options on the command line.
    --- STRUCTURAL CHANGES, no functional change ---
 * Redesign part of the mandoc_html(3) interfaces, making them much
   easier to use and reducing the amount of code by a few hundred lines.
    --- THANKS TO ---
 * Michael Stapelberg (Debian) for designing the new mandocd(8)
   and parts of the new catman(8), for release testing, and for a
   number of patches and bug reports.
 * Baptiste Daroussin (FreeBSD) for profiling the new makewhatis(8)
   implementation and suggesting an algorithmic improvement which
   more than doubled performance, and for a few bug reports.
 * Ed Maste (FreeBSD) for an important patch improving reproducibility
   of builds in makewhatis(8), and for a few bug reports.
 * Theo Buehler (OpenBSD) for almost twenty important bug reports,
   most of them found by systematic afl(1) fuzzing.
 * Benny Lofgren, David Dahlberg, and in particular Vadim Zhukov
   for crucial help in getting .Bl -tag CSS formatting fixed.
 * Svyatoslav Mishyn (Crux Linux) for an initial version of the
   patch to autodetect a suitable locale for -Tutf8 mode
   and for release testing.
 * Jason McIntyre (OpenBSD) for multiple useful discussions
   and a number of bug reports.
 * Sevan Janiyan (NetBSD) for extensive release testing and multiple
   bug reports.
 * Thomas Klausner and Christos Zoulas (NetBSD), Yuri Pankov (illumos),
   and Leah Neukirchen (Void Linux) for release testing and bug reports.
 * Ulrich Spoerlein (FreeBSD) for release testing.
 * Alexander Bluhm, Andrew Fresh, Antoine Jacoutot, Antony Bentley,
   Christian Weisgerber, Jonathan Gray, Marc Espie, Martijn van Duren,
   Stuart Henderson, Ted Unangst, Theo de Raadt (OpenBSD), Abhinav
   Upadhyay, Kamil Rytarowski (NetBSD), Aaron M. Ucko, Bdale Garbee,
   Reiner Herrmann, Shane Kerr (Debian), Daniel Sabogal (Alpine Linux),
   Carsten Kunze (Heirloom roff), Kristaps Dzonsons (bsd.lv),
   Anton Lindqvist, Jan Stary, Jeremy A. Mates, Mark Patruck,
   Pavan Maddamsetti, Sean Levy <attila@@stalphonsos.com>, and
   Tiago Silva for bug reports.
 * Brent Cook, Marc Espie, Philip Guenther, Todd Miller (OpenBSD)
   and Markus Waldeck for useful discussions.
 * And as usual, OpenCSW for providing me with a Solaris 9/10/11
   testing environment.
@
text
@d1 1
a1 1
# Id: Makefile,v 1.504 2017/02/18 15:29:39 schwarze Exp 
d4 1
a4 1
# Copyright (c) 2011, 2013-2017 Ingo Schwarze <schwarze@@openbsd.org>
d18 1
a18 1
VERSION = 1.14.1
d22 1
a22 4
TESTSRCS	 = test-be32toh.c \
		   test-cmsg.c \
		   test-dirent-namlen.c \
		   test-EFTYPE.c \
d29 1
a29 3
		   test-nanosleep.c \
		   test-ntohl.c \
		   test-O_DIRECTORY.c \
a30 1
		   test-PATH_MAX.c \
a32 1
		   test-recvmsg.c \
d37 2
a49 1
		   catman.c \
d61 1
a68 6
		   dba.c \
		   dba_array.c \
		   dba_read.c \
		   dba_write.c \
		   dbm.c \
		   dbm_map.c \
a84 1
		   mandocd.c \
d89 1
a124 1
		   catman.8 \
a130 5
		   dba.h \
		   dba_array.h \
		   dba_write.h \
		   dbm.h \
		   dbm_map.h \
a147 1
		   man.options.1 \
a160 1
		   mandocd.8 \
d223 1
d247 1
a247 11
DBM_OBJS	 = dbm.o \
		   dbm_map.o \
		   mansearch.o

DBA_OBJS	 = dba.o \
		   dba_array.o \
		   dba_read.o \
		   dba_write.o \
		   mandocdb.o

MAIN_OBJS	 = $(MANDOC_HTML_OBJS) \
a249 2
		   $(DBM_OBJS) \
		   $(DBA_OBJS) \
d256 6
a262 1
		   $(DBM_OBJS) \
d264 2
d268 1
a268 9
MANDOCD_OBJS	 = $(MANDOC_HTML_OBJS) \
		   $(MANDOC_TERM_OBJS) \
		   mandocd.o \
		   out.o \
		   tag.o

MANPAGE_OBJS	 = $(DBM_OBJS) \
		   manpage.o \
		   manpath.o
a283 1
		   man.cgi.3.html \
a296 1
		   mandocd.8.html \
a299 1
		   catman.8.html \
d301 1
d320 5
a324 1
all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local
d332 1
a332 1
.PHONY: base-install cgi-install install www-install
d344 1
a344 1
	rm -f mandoc $(MAIN_OBJS)
a345 1
	rm -f mandocd catman $(MANDOCD_OBJS)
d352 1
a352 1
base-install: mandoc demandoc soelim
d354 2
a355 1
	mkdir -p $(DESTDIR)$(SBINDIR)
d357 1
a359 1
	mkdir -p $(DESTDIR)$(MANDIR)/man8
d362 4
a365 5
	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN)
	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
	$(LN) $(DESTDIR)$(BINDIR)/mandoc \
		$(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
d369 21
d391 1
a391 1
	$(LN) $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
d393 1
a393 1
	$(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5
a394 6
	$(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7
	$(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7
	$(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7
	$(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7
	$(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7
	$(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
d398 1
a398 11
lib-install: libmandoc.a
	mkdir -p $(DESTDIR)$(LIBDIR)
	mkdir -p $(DESTDIR)$(INCLUDEDIR)
	mkdir -p $(DESTDIR)$(MANDIR)/man3
	$(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
	$(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \
		$(DESTDIR)$(INCLUDEDIR)
	$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
		mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3

cgi-install: man.cgi
d404 1
a404 58
catman-install: mandocd catman
	mkdir -p $(DESTDIR)$(SBINDIR)
	mkdir -p $(DESTDIR)$(MANDIR)/man8
	$(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR)
	$(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN)
	$(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8
	$(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8

uninstall:
	rm -f $(DESTDIR)$(BINDIR)/mandoc
	rm -f $(DESTDIR)$(BINDIR)/demandoc
	rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
	rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN)
	rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
	rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
	rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
	rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1
	rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1
	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
	rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5
	rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7
	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7
	rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7
	rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
	rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi
	rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css
	rm -f $(DESTDIR)$(SBINDIR)/mandocd
	rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN)
	rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8
	rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8
	rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a
	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3
	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3
	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3
	rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3
	rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3
	rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3
	rm -f $(DESTDIR)$(INCLUDEDIR)/man.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h
	rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h
	rmdir $(DESTDIR)$(INCLUDEDIR)

regress: all
	cd regress && ./regress.pl

regress-clean:
	cd regress && ./regress.pl . clean

Makefile.local config.h: configure $(TESTSRCS)
a419 6
mandocd: $(MANDOCD_OBJS) libmandoc.a
	$(CC) -o $@@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD)

catman: catman.o libmandoc.a
	$(CC) -o $@@ $(LDFLAGS) catman.o libmandoc.a $(LDADD)

a443 22
regress-distclean:
	@@find regress \
		-name '.#*' -o \
		-name '*.orig' -o \
		-name '*.rej' -o \
		-name '*.core' \
		-exec rm -i {} \;

regress-distcheck:
	@@find regress ! -type d ! -type f
	@@find regress -type f \
		! -path '*/CVS/*' \
		! -name Makefile \
		! -name Makefile.inc \
		! -name '*.in' \
		! -name '*.out_ascii' \
		! -name '*.out_utf8' \
		! -name '*.out_html' \
		! -name '*.out_lint' \
		! -path regress/regress.pl \
		! -path regress/regress.pl.1

a449 1
	ls regress/*/*/*.mandoc_* && exit 1 || true
a451 3
	cp -pR regress .dist/mdocml-$(VERSION)
	find .dist/mdocml-$(VERSION)/regress \
	    -type d -name CVS -print0 | xargs -0 rm -rf
@


1.1.1.18
log
@Import 1.14.4

This file lists the most important changes in the mandoc.bsd.lv distribution.

Changes in version 1.14.4, released on August 8, 2018

    --- MAJOR NEW FEATURES ---
 * In ASCII output, render mathematical symbols and greek letters
   as transliterations conveying the characters' meanings rather
   than trying to imitate their shape.  Consequently, such characters
   can now be used in portable manual pages.  All the same, please
   limit their use to contexts where they really matter, for example
   when showing complicated mathematical formulae.
 * First steps towards better support for small screens in HTML
   output (responsive design): avoid most style= attributes, in
   particular all hard-coded indentations and column widths, and
   provide a better mandoc.css style sheet with a @@media query,
   using em units throughout, and avoiding redundancy in selectors.
 * Better HTML output with some more fitting HTML elements, eliminating
   needless class= attributes, and avoiding various HTML syntax errors
   (element nesting, URL-fragment syntax, duplicate id= attributes).
    --- MINOR NEW FEATURES ---
 * When a man(1) argument contains a slash, imply -l like in man-db.
 * Use TIOCGWINSZ to reduce the default -Owidth and -Oindent during
   interactive use on terminals narrower than 79 columns.
 * Generated PostScript files are now more than 50% smaller.
 * Terminal rendering of eqn(7) is improved in several respects.
 * Simplified and nicer output from the mdoc(7) .Lk macro, formatting
   all links in-line, even long ones.
 * roff(7) \n+ and \n- numerical register auto-increment and -decrement
 * roff(7) .nr optional third argument (auto-increment step size)
 * Autodetect in ./configure whether the compiler can use -W and -static,
   allowing to build on Solaris 10 and 11 without any configure.local.
    --- RELIABILITY BUGFIXES ---
 * Only activate UTF-8 output when the user really selected UTF-8,
   not some other multibyte character encoding.
 * Prevent excessive .ll arguments from generating infinite output.
 * Fix out of bounds accesses to parse buffers that could happen when
   using renamed or user defined macros after roff(7) conditionals.
 * Avoid an assertion failure in certain .Bl -column lists.
 * Avoid a NULL pointer access on deroff() failure after '.SS ""'.
 * Fix a segfault that could be triggered by two invalid .Dt macros.
 * Fix two syntax errors in generated PDF files.
 * Properly state the page size in generated PostScript files.
 * Close a memory leak caused by missing gzclose(3).
 * Fix misformatting of man(7) documents lacking .SH macros
   in PostScript and PDF output.
 * And many minor bugfixes.
    --- THANKS TO ---
 * Marc Espie (OpenBSD) for implementing the size reduction of
   PostScript files, one additional patch for code simplification,
   and two bug reports.
 * Theo Buehler (OpenBSD) for a bugfix patch,
   and Theo de Raadt (OpenBSD) for checking it.
 * John Gardner for more than a dozen suggestions regarding HTML output.
 * Mike Williams for teaching me how to use %%DocumentMedia and
   setpagedevice in PostScript files.
 * Werner Lemberg (groff) for feedback on mdoc(7) language changes.
 * Colin Watson (man-db) for feedback on man-db semantics.
 * Jason McIntyre (OpenBSD) for lots of feedback and suggestions
   on diagnostic messages and on the documentation.
 * Thomas Klausner (NetBSD) for suggesting two new style messages
   and one new feature, for two bug reports, and for release testing.
 * Leah Neukirchen (Void Linux) for suggesting a new style message,
   five bug reports, and release testing.
 * Anthony Bentley (OpenBSD) for reporting multiple bugs and missing
   features.
 * Paul Irofti (OpenBSD) and Nate Bargmann for suggesting new features.
 * Michael Stapelberg (Debian) for bug reports and release testing.
 * Christian Weisgerber, Jonathan Gray, Stuart Henderson,
   Ted Unangst (OpenBSD), Takeshi Nakayama (NetBSD),
   Anton Lazarov, Jakub Klinkovsky, Jan Stary, Jesper Wallin,
   Will Backmam, and Wolfgang Mueller for bug reports.
 * Sevan Janiyan (NetBSD) for additions to lib.in.
 * George Brown for suggesting code simplifications.
 * David Coppa, Igor Sobrado (OpenBSD), and Alexander Kuleshov
   for documentation improvements.
 * Laura Morales and Raf Czlonka for questions resulting in better
   documentation.
 * Yuri Pankov (illumos) for release testing.

Changes in version 1.14.3, released on August 5, 2017

    --- BUG FIXES ---
 * man(7): Do not crash with out-of-bounds read access to a constant
   array if .sp or a blank line immediately precedes .SS or .SH.
 * mdoc(7): Do not crash with out-of-bounds read access to a constant
   array if .sp or a blank line precede the first .Sh macro.
 * tbl(7): Ignore explicitly specified negative column widths rather than
   wrapping around to huge numbers and risking memory exhaustion.
 * man(1): No longer use names that only occur in the SYNOPSIS section.
   Gets rid of some surprising behaviour and bogus warnings.
    --- THANKS TO ---
   Leah Neukirchen (Void Linux), Markus Waldeck (Debian),
   Peter Bui (nd.edu), and Yuri Pankov (illumos) for bug reports.

Changes in version 1.14.2, released on July 28, 2017

    --- MAJOR NEW FEATURES ---
 * New mdoc(7) -Tmarkdown output mode.
 * For -Thtml, implement internal hyperlinks pointing to authoritative
   definitions of various syntax elements, similar to the ctags(1)-like
   less(1) :t internal searching in terminal mode.
 * Provide a superset of the functionality of the former mdoclint(1)
   utility and a new -Wstyle message level with several new messages,
   including validity checking of .Xr cross references.
 * tbl(7): Implement automatic line breaking inside individual table
   cells, and several other formatting improvements.
 * eqn(7): Complete rewrite of the lexer, resulting in several bugfixes.
 * Continue parser unification, in particular allowing generation
   of syntax tree nodes on the roff(7) level, allowing implementation
   of many additional roff requests.
    --- REMOVED FUNCTIONALITY ---
 * Delete the manpage(1) utility.  It was never enabled in any release.
 * Delete the -Txhtml command line option.  It has been an obsolete
   alias for the -Thtml output mode for more than two years.
    --- MINOR NEW FEATURES ---
 * -Tlint now puts parser messages on stdout instead of stderr,
   making commands like "man -l -Tlint *.1" useful.
 * mdoc(7): Various .Lk formatting improvements.
 * mdoc(7) -Thtml: Better CSS for .Bl lists.
 * man(7): Implement the .MT/.ME block macro (mailto hyperlink).
 * man(7): Implement the .DT macro (restore default tab positions).
 * man(7): Improved support for manuals generated with reStructuredText
   by partial support for the \n[an-margin] number register.
 * man(7) -Thtml: Support deep linking to .SH and .SS headers.
 * tbl(7): Implement the "allbox" table option.
 * tbl(7): Implement the column spacing and the 'w' (minimum column
   width) layout modifiers.
 * tbl(7): Significant improvements of the manual page.
 * eqn(7): Much improved font selection, including recognition of
   well-known function names, and a few other formatting improvements.
 * eqn(7) -Thtml: Use <mn> and <mo> in addition to <mi>.
 * roff(7): Implement the .ce (centering), .mc (margin character),
   .rj (right justify), .ta (define tab stops), .ti (temporary indent),
   .als (macro alias), .ec and .eo (escape character control),
   .po (page offset), and .rn (macro rename) requests.
 * roff(7) .am: Implement appending to mdoc(7) and man(7) macros.
 * roff(7): implement the \h (horizontol motion), \l (horizontal
   line drawing), and \p (break output line) escape sequences,
   and also several additional character escape sequences.
 * roff(7): Implement the 'd' conditional (macro or string defined).
 * man.cgi(8) now uses pledge(2), too.
 * regress.pl(1): simpler user interface, better summary output,
   simpler code, and no more recursion.
    --- THANKS TO ---
 * Anthony Bentley (OpenBSD) for the implementation of .MT/.ME,
   reports of many bugs and missing features, and suggestions
   for a number of feature and documentation improvements.
 * Sebastien Marie (OpenBSD) for two source code patches and
   for some useful discussions.
 * Florian Obser (OpenBSD) for a bugfix patch and a bug report.
 * Jonathan Gray (OpenBSD) for several bug reports from afl(1)
   and several more from static analysis tools.
 * Theo Buehler (OpenBSD) for several bug reports, most from afl(1).
 * Jason McIntyre (OpenBSD) for many useful discussions about a
   wide variety of topics, lots of continuous testing, a number of
   bug reports, and some suggestions for messages and documentation.
 * Thomas Klausner (NetBSD) for lots of help while migrating
   mdoclint(1) functionality to mandoc -Tlint, for suggesting
   several useful new messages, and for release testing.
 * Reyk Floeter (OpenBSD) and Vsevolod Stakhov (FreeBSD) for
   suggesting a markdown output mode.
 * Thomas Guettler for suggesting -Thtml internal hyperlinks.
 * Yuri Pankov (Illumos) for inspiring new warning messages and
   for extensive release testing.
 * Anton Lindqvist and TJ Townsend (both OpenBSD) and Jan Stary
   for multiple bug reports.
 * Leah Neukirchen (Void Linux) for bug reports and release testing.
 * Michael Stapelberg (Debian) for suggesting feature improvements
   and for release testing.
 * Martin Natano and Theo de Raadt (both OpenBSD), Andreas Voegele,
   Gabriel Guzman, Gonzalo Tornaria, Markus Waldeck, and Raf Czlonka
   for bug reports.
 * Antoine Jacoutot (OpenBSD) and Steffen Nurpmeso for suggesting
   feature improvements.
 * Dag-Erling Smoergrav (FreeBSD) for inspiring new warning messages.
 * Ted Unangst and Marc Espie (OpenBSD) for providing useful ideas.
 * Svyatoslav Mishyn (Crux Linux) for release testing.
 * Carsten Kunze (Heirloom roff) for help keeping mandoc and groff
   compatible and for committing some of my patches to groff.
@
text
@d1 1
a1 1
# Id: Makefile,v 1.519 2018/07/31 15:34:00 schwarze Exp 
d4 1
a4 1
# Copyright (c) 2011, 2013-2018 Ingo Schwarze <schwarze@@openbsd.org>
d18 1
a18 1
VERSION = 1.14.4
a32 1
		   test-noop.c \
a40 1
		   test-recallocarray.c \
a47 1
		   test-strndup.c \
a66 1
		   compat_recallocarray.c \
a70 1
		   compat_strndup.c \
d88 1
a95 1
		   mandoc_xr.c \
d98 1
d103 1
a106 1
		   mdoc_markdown.c \
a114 3
		   roff_html.c \
		   roff_term.c \
		   roff_validate.c \
a126 1
		   term_tab.c \
a178 1
		   mandoc_xr.h \
d201 1
d209 1
a216 1
		   roff_validate.o \
a228 1
		   mandoc_xr.o \
a241 1
		   compat_recallocarray.o \
a244 1
		   compat_strndup.o \
a252 1
		   roff_html.o \
d255 2
a259 1
		   roff_term.o \
a262 1
		   term_tab.o \
a281 2
		   mdoc_man.o \
		   mdoc_markdown.o \
d297 4
d344 3
d357 1
a357 1
www: $(WWW_MANS)
d375 2
a376 1
	rm -f mandocd catman catman.o $(MANDOCD_OBJS)
d379 1
a379 1
	rm -f $(WWW_MANS) mandoc.tar.gz mandoc.sha256
d391 5
a395 5
	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_MAN)
	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_APROPOS)
	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_WHATIS)
	cd $(DESTDIR)$(SBINDIR) && \
		$(LN) ${BIN_FROM_SBIN}/mandoc $(BINM_MAKEWHATIS)
d400 2
a401 1
	cd $(DESTDIR)$(MANDIR)/man1 && $(LN) $(BINM_APROPOS).1 $(BINM_WHATIS).1
d478 1
a478 1
	[ ! -e $(DESTDIR)$(INCLUDEDIR) ] || rmdir $(DESTDIR)$(INCLUDEDIR)
d496 3
d517 1
d519 5
a549 1
		! -name '*.out_markdown' \
d554 1
a554 1
dist: mandoc-$(VERSION).sha256
d556 2
a557 2
mandoc-$(VERSION).sha256: mandoc-$(VERSION).tar.gz
	sha256 mandoc-$(VERSION).tar.gz > $@@
d559 1
a559 1
mandoc-$(VERSION).tar.gz: $(DISTFILES)
d561 4
a564 4
	mkdir -p .dist/mandoc-$(VERSION)/
	$(INSTALL) -m 0644 $(DISTFILES) .dist/mandoc-$(VERSION)
	cp -pR regress .dist/mandoc-$(VERSION)
	find .dist/mandoc-$(VERSION)/regress \
d566 2
a567 2
	chmod 755 .dist/mandoc-$(VERSION)/configure
	( cd .dist/ && tar zcf ../$@@ mandoc-$(VERSION) )
@


1.1.1.19
log
@Changes in version 1.14.5, released on March 10, 2019

    --- MAJOR NEW FEATURES ---
 * apropos(1): improve POSIX compliance by accepting case-insensitive
   extended regular expressions by default
 * new -O tag[=term] output option (open a page at the definition of a term)
 * tbl(7) -T html: spanning and horizontal and vertical alignment of cells
 * tbl(7) -T html: draw lines on the edges of table cells
 * tbl(7) -T utf8: render lines with the Unicode box drawing characters
 * mandoc is now able to handle the manual pages of the groff package.
    --- MINOR NEW FEATURES ---
 * -T html: new option -O toc (table of contents)
 * -T html: second argument to -O man to support local and remote links
 * mdoc(7) .Bd -centered now fills the text contained in it
 * man-ext .SY and .YS macros (synopsis block)
 * man-ext .TQ macro (tagged paragraph without vertical space before it)
 * tbl(7) \& explicit alignment indicator
 * roff(7) .shift, .while, and .return requests
 * roff(7) .char request (output glyph definition)
 * roff(7) .nop request (no operation)
 * roff(7) .ft request: handle the CB, CI, and CR fonts
 * roff(7) .if c conditional (character available)
 * roff(7) \\$@@ escape sequence (insert all macro arguments, quoted)
 * roff(7) \*(.T predefined string (interpolate output device name)
 * roff(7) \[charNNN] escape sequence (for printable ASCII characters)
 * roff(7) \# escape sequence (line continuation with comment)
    --- HTML OUTPUT SYNTAX CORRECTIONS ---
 * Render .br and \p as <br/>, not as an empty <div>.
 * Render .Pp and .PP as <p> and automatically close it when needed.
 * Stop writing empty list elements for non-compact .Bl -tag lists.
 * Do not put <p> inside <a> if .UR or .MT contain .PP.
 * Implement tooltips purely in CSS rather than abusing title= attributes.
    --- MINOR FUNCTIONAL IMPROVEMENTS ---
 * many improvements to the handling of fill and no-fill mode
 * tbl(7): better column widths in the presence of horizontal spans
 * several minor improvements to escape sequence handling
 * several minor improvements to manual font handling
 * portability: autodetect need for _GNU_SOURCE or _OPENBSD_SOURCE
 * portability: autodetect whether less(1) supports the -T option
 * large numbers of bugfixes of diverse kinds
    --- STRUCTURAL IMPROVEMENTS ---
 * Disentangle eqn(7) and tbl(7) from other parser header files,
   and clean up some parser data structures.
 * Substantially simplify error and warning message infrastructure.
    --- THANKS TO ---
 * John Gardner for crucial help implementing tooltips in CSS.
 * Alexander Bluhm, Raphael Graf, Ted Unangst (OpenBSD)
   and Daniel Sabogal (Alpine Linux) for patches.
 * Anthony Bentley and Jason McIntyre (OpenBSD) for documentation patches,
   suggesting new features, bug reports, and useful discussions.
 * Kyle Evans and Baptiste Daroussin (FreeBSD) for minor patches.
 * Pali Rohar for suggesting multiple new features and for reporting
   several bugs and missing features.
 * Klemens Nanni (OpenBSD) for suggesting multiple new features.
 * Kristaps Dzonsons (bsd.lv), Marc Espie (OpenBSD), Adam Kalisz,
   and Laura Morales for suggesting new features.
 * Wolfram Schneider and Yuri Pankov (FreeBSD) for reporting missing features.
 * Edward Tomasz Napierala (FreeBSD) for suggesting a feature improvement.
 * Thomas Klausner (NetBSD) and Sevan Janiyan (SmartOS)
   for bug reports and release testing.
 * Bryan Steele, Janne Johansson, Kurt Mosiejczuk, Mike Belopuhov, Theo
   Buehler, Todd Miller (OpenBSD), Andreas Gustafsson, Christos Zoulas,
   Robert Elz (NetBSD), Kurt Jaeger (FreeBSD), Fabio Scotoni, Kelvin
   Sherlock, Mark Harris, Orestis Ioannou, Raf Czlonka, and Sean Farrell
   for bug reports.
 * Ulrich Spoerlein (FreeBSD), Leah Neukirchen (Void Linux),
   Matej Cepl (openSUSE), and Jan Stary (MacOS X) for release testing.
 * Brian Callahan and Stuart Henderson (OpenBSD) for help
   with the OpenBSD groff port.
 * Bertrand Garrigues, Branden Robinson, Ralph Corderoy, and Werner
   Lemberg (GNU troff) for checking groff patches.
 * Scott Cheloha, Theo de Raadt (OpenBSD)
   and Natanael Copa (Alpine Linux) for useful discussions.
@
text
@d1 1
a1 1
# Id: Makefile,v 1.530 2019/03/06 16:08:41 schwarze Exp 
d4 1
a4 1
# Copyright (c) 2011, 2013-2019 Ingo Schwarze <schwarze@@openbsd.org>
d18 1
a18 1
VERSION = 1.14.5
d40 1
a42 1
		   test-recvmsg.c \
d57 1
a57 2
SRCS		 = arch.c \
		   att.c \
a98 1
		   mandoc_msg.c \
a157 2
		   eqn.h \
		   eqn_parse.h \
d164 1
a186 1
		   mandoc_parse.h \
d201 1
a204 3
		   tbl.h \
		   tbl_int.h \
		   tbl_parse.h \
a232 1
		   arch.o \
a235 1
		   mandoc_msg.o \
a322 1
		   man.options.1.html \
d339 1
a345 4
		   mandocd.8.html

WWW_INCS	 = eqn.h.html \
		   html.h.html \
a349 1
		   mandoc_parse.h.html \
d352 1
a352 4
		   roff.h.html \
		   tbl.h.html \
		   tbl_int.h.html \
		   tbl_parse.h.html
d364 1
a364 1
www: $(WWW_MANS) $(WWW_INCS)
d366 1
a366 1
$(WWW_MANS) $(WWW_INCS): mandoc
d385 1
a385 1
	rm -f $(WWW_MANS) $(WWW_INCS) mandoc*.tar.gz mandoc*.sha256
d423 2
a424 2
	$(INSTALL_LIB) eqn.h man.h mandoc.h mandoc_aux.h mandoc_parse.h \
		mdoc.h roff.h tbl.h $(DESTDIR)$(INCLUDEDIR)
a477 1
	rm -f $(DESTDIR)$(INCLUDEDIR)/eqn.h
a480 1
	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_parse.h
a482 1
	rm -f $(DESTDIR)$(INCLUDEDIR)/tbl.h
d519 1
a519 3
	$(INSTALL_DATA) mandoc.css $(HTDOCDIR)
	$(INSTALL_DATA) $(WWW_MANS) $(HTDOCDIR)/man
	$(INSTALL_DATA) $(WWW_INCS) $(HTDOCDIR)/includes
a566 4
dist-install: dist
	$(INSTALL_DATA) mandoc-$(VERSION).tar.gz mandoc-$(VERSION).sha256 \
	    $(HTDOCDIR)/snapshots

d576 2
a577 3
	mandoc -Thtml -Wwarning,stop \
		-O 'style=/mandoc.css,man=/man/%N.%S.html;https://man.openbsd.org/%N.%S,includes=/includes/%I.html' \
		$< > $@@
@


1.1.1.20
log
@import mandoc 1.14.6
@
text
@d1 1
a1 1
# Id: Makefile,v 1.540 2021/09/21 11:04:40 schwarze Exp 
a2 1
# Copyright (c) 2011, 2013-2021 Ingo Schwarze <schwarze@@openbsd.org>
d4 1
d18 1
a18 1
VERSION = 1.14.6
d22 1
a22 2
TESTSRCS	 = test-attribute.c \
		   test-be32toh.c \
a31 1
		   test-mkstemps.c \
a67 1
		   compat_mkstemps.c \
a136 1
		   term_tag.c \
a211 1
		   term_tag.h \
d248 1
a248 2
		   read.o \
		   tag.o
d250 1
a250 1
ALL_COBJS	 = compat_err.o \
a255 1
		   compat_mkstemps.o \
a260 1
		   compat_stringlist.o \
a282 1
		   term_tag.o \
d305 1
d316 2
a317 1
		   out.o
d321 7
d376 1
a376 1
all: mandoc man demandoc soelim $(BUILD_TARGETS) Makefile.local
d395 2
a396 2
	rm -f libmandoc.a $(LIBMANDOC_OBJS) $(ALL_COBJS)
	rm -f mandoc man $(MAIN_OBJS)
d400 1
a400 1
	rm -f soelim soelim.o
a401 1
	rm -f Makefile.tmp1 Makefile.tmp2
d514 2
a515 2
libmandoc.a: $(MANDOC_COBJS) $(LIBMANDOC_OBJS)
	$(AR) rs $@@ $(MANDOC_COBJS) $(LIBMANDOC_OBJS)
a519 3
man: mandoc
	$(LN) mandoc man

d532 2
a533 2
soelim: $(SOELIM_COBJS) soelim.o
	$(CC) -o $@@ $(LDFLAGS) $(SOELIM_COBJS) soelim.o
d543 1
a543 2
	./configure -depend
	mkdep -f Makefile.tmp1 $(CFLAGS) $(SRCS)
d546 2
a547 3
		Makefile.tmp1 > Makefile.tmp2
	rm Makefile.tmp1
	mv Makefile.tmp2 Makefile.depend
d600 2
a601 2
.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html:
	./mandoc -Thtml -Wwarning,stop \
@


