Build glue for mdocml and for mandoc as standalone tool.

This commit is contained in:
joerg 2009-10-21 18:04:52 +00:00
parent 4154958b6b
commit c2dba7fe45
12 changed files with 119 additions and 0 deletions

5
external/bsd/mdocml/Makefile vendored Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2009/10/21 18:04:52 joerg Exp $
SUBDIR= lib .WAIT bin man
.include <bsd.subdir.mk>

18
external/bsd/mdocml/Makefile.inc vendored Normal file
View File

@ -0,0 +1,18 @@
# $NetBSD: Makefile.inc,v 1.1 2009/10/21 18:04:52 joerg Exp $
.include <bsd.own.mk>
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

5
external/bsd/mdocml/bin/Makefile vendored Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2009/10/21 18:04:52 joerg Exp $
SUBDIR= mandoc
.include <bsd.subdir.mk>

3
external/bsd/mdocml/bin/Makefile.inc vendored Normal file
View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile.inc,v 1.1 2009/10/21 18:04:52 joerg Exp $
.include "${.PARSEDIR}/../Makefile.inc"

20
external/bsd/mdocml/bin/mandoc/Makefile vendored Normal file
View File

@ -0,0 +1,20 @@
# $NetBSD: Makefile,v 1.1 2009/10/21 18:04:52 joerg Exp $
.include <bsd.own.mk>
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 <bsd.prog.mk>

5
external/bsd/mdocml/lib/Makefile vendored Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2009/10/21 18:04:52 joerg Exp $
SUBDIR= libman libmdoc
.include <bsd.subdir.mk>

3
external/bsd/mdocml/lib/Makefile.inc vendored Normal file
View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile.inc,v 1.1 2009/10/21 18:04:52 joerg Exp $
.include "${.PARSEDIR}/../Makefile.inc"

10
external/bsd/mdocml/lib/libman/Makefile vendored Normal file
View File

@ -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 <bsd.lib.mk>

View File

@ -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 <bsd.lib.mk>

19
external/bsd/mdocml/man/Makefile vendored Normal file
View File

@ -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 <bsd.init.mk>
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 <bsd.man.mk>

14
external/bsd/mdocml/prepare-import.sh vendored Normal file
View File

@ -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

6
tools/mandoc/Makefile Normal file
View File

@ -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"