From d9432de6029fc187dc9e45f1235ddf910454a9d9 Mon Sep 17 00:00:00 2001 From: schwarze Date: Thu, 14 Aug 2014 00:07:55 +0000 Subject: [PATCH] Add a simple target to validate the syntax of -Thtml output. Not hooked to the build yet because there are still too many bugs. --- regress/usr.bin/mandoc/Makefile.inc | 11 +++++++++-- regress/usr.bin/mandoc/Makefile.sub | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/regress/usr.bin/mandoc/Makefile.inc b/regress/usr.bin/mandoc/Makefile.inc index 1f744ddc151..a104d338b17 100644 --- a/regress/usr.bin/mandoc/Makefile.inc +++ b/regress/usr.bin/mandoc/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.13 2014/08/11 04:18:18 schwarze Exp $ +# $OpenBSD: Makefile.inc,v 1.14 2014/08/14 00:07:55 schwarze Exp $ .include "Makefile.sub" @@ -37,6 +37,8 @@ _LINTFILES += ${t}.mandoc_lint _LINTDIFFS += ${t}.diff_lint .endfor +_HTMLVALS = ${REGRESS_TARGETS:C/$/.validate_html/} + # --- convenience targets --- # Note that bsd.regress.mk automatically adds REGRESS_TARGETS to all. @@ -50,6 +52,8 @@ tman: tman-clean ${_MANDIFFS} lint: lint-clean ${_LINTDIFFS} +html: ${_HTMLVALS} + # --- suffix rules --- .SUFFIXES: .diff_ascii .diff_lint .diff_man .diff_utf8 .in .in_man \ @@ -107,6 +111,9 @@ ${t}: ${t}.diff_ascii ${t}.diff_man ${t}: @echo "TODO: -Tascii disabled for: ${.TARGET}" . endif +${t}.validate_html: ${t}.in + @echo "${MANDOC} ${MOPTS} -Thtml ${t}.in | validate" + @-${MANDOC} ${MOPTS} -Thtml ${.ALLSRC} | validate .endfor .for t in ${UTF8_TARGETS} @@ -141,7 +148,7 @@ lint-clean: rm -f ${_LINTFILES} .endif -.PHONY: ${_ASCIIDIFFS} ${_LINTDIFFS} ${_MANDIFFS} ${_UTF8DIFFS} +.PHONY: ${_ASCIIDIFFS} ${_HTMLVALS} ${_LINTDIFFS} ${_MANDIFFS} ${_UTF8DIFFS} # ---------------------------------------------------------------------- diff --git a/regress/usr.bin/mandoc/Makefile.sub b/regress/usr.bin/mandoc/Makefile.sub index 15689d4826c..dc98ec81e73 100644 --- a/regress/usr.bin/mandoc/Makefile.sub +++ b/regress/usr.bin/mandoc/Makefile.sub @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile.sub,v 1.1 2014/06/20 18:27:51 schwarze Exp $ +# $OpenBSD: Makefile.sub,v 1.2 2014/08/14 00:07:55 schwarze Exp $ -_MAIN_TARGETS = ascii utf8 tman lint +_MAIN_TARGETS = ascii utf8 tman lint html _CLEAN_TARGETS = ascii-clean utf8-clean tman-clean lint-clean _OUT_TARGETS = groff groff-clean lint-out lint-out-clean obj-clean -- 2.20.1