diff --git a/external/bsd/mdocml/Makefile b/external/bsd/mdocml/Makefile new file mode 100644 index 000000000000..e432c64cae3d --- /dev/null +++ b/external/bsd/mdocml/Makefile @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.1 2009/10/21 18:04:52 joerg Exp $ + +SUBDIR= lib .WAIT bin man + +.include diff --git a/external/bsd/mdocml/Makefile.inc b/external/bsd/mdocml/Makefile.inc new file mode 100644 index 000000000000..cf54b6967e32 --- /dev/null +++ b/external/bsd/mdocml/Makefile.inc @@ -0,0 +1,18 @@ +# $NetBSD: Makefile.inc,v 1.1 2009/10/21 18:04:52 joerg Exp $ + +.include + +VERSION= 1.9.9 + +CPPFLAGS+= -DVERSION=\"${VERSION}\" + +DISTDIR:= ${.PARSEDIR}/dist + +.PATH: ${DISTDIR} + +.for _LIB in man mdoc +MDOCMLOBJDIR.${_LIB} != cd ${.PARSEDIR}/lib/lib${_LIB} && ${PRINTOBJDIR} +MDOCMLLIB.${_LIB}= ${MDOCMLOBJDIR.${_LIB}}/lib${_LIB}.a +.endfor + +WARNS?= 4 diff --git a/external/bsd/mdocml/bin/Makefile b/external/bsd/mdocml/bin/Makefile new file mode 100644 index 000000000000..a373a2f45fe5 --- /dev/null +++ b/external/bsd/mdocml/bin/Makefile @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.1 2009/10/21 18:04:52 joerg Exp $ + +SUBDIR= mandoc + +.include diff --git a/external/bsd/mdocml/bin/Makefile.inc b/external/bsd/mdocml/bin/Makefile.inc new file mode 100644 index 000000000000..0fe99142af2b --- /dev/null +++ b/external/bsd/mdocml/bin/Makefile.inc @@ -0,0 +1,3 @@ +# $NetBSD: Makefile.inc,v 1.1 2009/10/21 18:04:52 joerg Exp $ + +.include "${.PARSEDIR}/../Makefile.inc" diff --git a/external/bsd/mdocml/bin/mandoc/Makefile b/external/bsd/mdocml/bin/mandoc/Makefile new file mode 100644 index 000000000000..9a82863470bb --- /dev/null +++ b/external/bsd/mdocml/bin/mandoc/Makefile @@ -0,0 +1,20 @@ +# $NetBSD: Makefile,v 1.1 2009/10/21 18:04:52 joerg Exp $ + +.include + +PROG= mandoc + +SRCS= 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 + +.ifndef HOSTPROG +DPADD+= ${MDOCMLLIB.man} ${MDOCMLLIB.mdoc} +LDADD+= -L${MDOCMLOBJDIR.man} -lman -L${MDOCMLOBJDIR.mdoc} -lmdoc +.else +SRCS.libman!= cd ${.PARSEDIR}/../../lib/libman && ${MAKE} -V '$${SRCS}' +SRCS.libmdoc!= cd ${.PARSEDIR}/../../lib/libmdoc && ${MAKE} -V '$${SRCS}' + +SRCS+= ${SRCS.libman} ${SRCS.libmdoc:Nmandoc.c} +.endif + +.include diff --git a/external/bsd/mdocml/lib/Makefile b/external/bsd/mdocml/lib/Makefile new file mode 100644 index 000000000000..eaeb73d68698 --- /dev/null +++ b/external/bsd/mdocml/lib/Makefile @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.1 2009/10/21 18:04:52 joerg Exp $ + +SUBDIR= libman libmdoc + +.include diff --git a/external/bsd/mdocml/lib/Makefile.inc b/external/bsd/mdocml/lib/Makefile.inc new file mode 100644 index 000000000000..0fe99142af2b --- /dev/null +++ b/external/bsd/mdocml/lib/Makefile.inc @@ -0,0 +1,3 @@ +# $NetBSD: Makefile.inc,v 1.1 2009/10/21 18:04:52 joerg Exp $ + +.include "${.PARSEDIR}/../Makefile.inc" diff --git a/external/bsd/mdocml/lib/libman/Makefile b/external/bsd/mdocml/lib/libman/Makefile new file mode 100644 index 000000000000..f691cd1a4d9f --- /dev/null +++ b/external/bsd/mdocml/lib/libman/Makefile @@ -0,0 +1,10 @@ +# $NetBSD: Makefile,v 1.1 2009/10/21 18:04:52 joerg Exp $ + +LIBISPRIVATE= yes + +LIB= man +SRCS= man_macro.c man.c man_hash.c man_validate.c \ + man_action.c mandoc.c man_argv.c +MAN= mdoc.3 + +.include diff --git a/external/bsd/mdocml/lib/libmdoc/Makefile b/external/bsd/mdocml/lib/libmdoc/Makefile new file mode 100644 index 000000000000..62359f390642 --- /dev/null +++ b/external/bsd/mdocml/lib/libmdoc/Makefile @@ -0,0 +1,11 @@ +# $NetBSD: Makefile,v 1.1 2009/10/21 18:04:52 joerg Exp $ + +LIBISPRIVATE= yes + +LIB= mdoc +SRCS= 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 +MAN= man.3 + +.include diff --git a/external/bsd/mdocml/man/Makefile b/external/bsd/mdocml/man/Makefile new file mode 100644 index 000000000000..ad18a4ee824b --- /dev/null +++ b/external/bsd/mdocml/man/Makefile @@ -0,0 +1,19 @@ +# $NetBSD: Makefile,v 1.1 2009/10/21 18:04:52 joerg Exp $ + +MAN= mandoc_man.7 mandoc_char.7 mandoc_mdoc.7 manuals.7 + +.include + +mandoc_man.7: + ${_MKTARGET_CREATE} + rm -f ${.TARGET} + ${TOOL_CAT} ${DISTDIR}/man.7 > ${.TARGET} + +mandoc_mdoc.7: + ${_MKTARGET_CREATE} + rm -f ${.TARGET} + ${TOOL_CAT} ${DISTDIR}/mdoc.7 > ${.TARGET} + +CLEANFILES+= mandoc_man.7 mandoc_mdoc.7 + +.include diff --git a/external/bsd/mdocml/prepare-import.sh b/external/bsd/mdocml/prepare-import.sh new file mode 100644 index 000000000000..419fc5fe5209 --- /dev/null +++ b/external/bsd/mdocml/prepare-import.sh @@ -0,0 +1,14 @@ +#/bin/sh + +set -e + +cd dist +rm -rf ChangeLog.xsl Makefile example.style.css index.css *.sgml + +uuencode external.png < external.png > external.png.uu + +rm external.png + +for f in [a-z]*; do + sed 's/\$Id: prepare-import.sh,v 1.1 2009/10/21 18:04:52 joerg Exp $Vendor-Id:/' < $f > $f.new && mv $f.new $f +done diff --git a/tools/mandoc/Makefile b/tools/mandoc/Makefile new file mode 100644 index 000000000000..916590a3904a --- /dev/null +++ b/tools/mandoc/Makefile @@ -0,0 +1,6 @@ +# $NetBSD: Makefile,v 1.1 2009/10/21 18:04:52 joerg Exp $ + +HOSTPROGNAME= ${_TOOL_PREFIX}mandoc +HOST_SRCDIR= external/bsd/mdocml/bin/mandoc + +.include "${.CURDIR}/../Makefile.host"