aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-10-30 01:05:59 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-10-30 01:05:59 +0000
commit93532ca064860f11e028460ccba316421115382b (patch)
tree8d4016a78fb814ed5d5e15dafd641aae89f1a759
parentbeec73d4d10017b24d09a5cf7254db7dbb4c9804 (diff)
downloadpaludis-93532ca064860f11e028460ccba316421115382b.tar.gz
paludis-93532ca064860f11e028460ccba316421115382b.tar.xz
If --enable-htmltidy, use htmltidy to verify generated documentation. Fix current validation problems. Fixes: ticket:420
-rw-r--r--configure.ac11
-rw-r--r--doc/Makefile.am10
-rw-r--r--doc/api/Makefile.am7
-rw-r--r--doc/api/toplinks.html.part.in2
-rw-r--r--doc/clients/Makefile.am7
-rw-r--r--doc/clients/toplinks.html.part.in2
-rw-r--r--doc/configuration/Makefile.am7
-rw-r--r--doc/configuration/hooks.html.part2
-rw-r--r--doc/configuration/toplinks.html.part.in2
-rw-r--r--doc/faq/Makefile.am7
-rw-r--r--doc/faq/toplinks.html.part.in2
-rwxr-xr-xdoc/htmltidy.bash9
-rw-r--r--doc/overview/Makefile.am7
-rw-r--r--doc/overview/toplinks.html.part.in2
-rw-r--r--doc/toplinks.html.part.in2
15 files changed, 72 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 6a9bda4..e054796 100644
--- a/configure.ac
+++ b/configure.ac
@@ -694,6 +694,17 @@ fi
AC_SUBST([DOXYGEN_TAG_FILES])
dnl }}}
+dnl {{{
+AC_MSG_CHECKING([whether to use htmltidy to verify documentation])
+AC_ARG_ENABLE([htmltidy],
+ AS_HELP_STRING([--enable-htmltidy], [Check generated documentation with htmltidy]),
+ [HAVE_HTMLTIDY=$enableval
+ AC_MSG_RESULT([$enableval])],
+ [HAVE_HTMLTIDY=no
+ AC_MSG_RESULT([no])])
+AC_SUBST([HAVE_HTMLTIDY])
+AM_CONDITIONAL([HAVE_HTMLTIDY], test "x$HAVE_HTMLTIDY" = "xyes")
+
dnl {{{ check for whether to build qa stuff
AC_MSG_CHECKING([whether to build QA tools])
AC_ARG_ENABLE([qa],
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 034f7d8..8319a88 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -33,6 +33,16 @@ paludishtml_DATA = \
paludis.css \
paludis_270.png
+dist_check_SCRIPTS = \
+ htmltidy.bash
+
+if HAVE_HTMLTIDY
+
+TESTS = $(paludishtml_DATA)
+TESTS_ENVIRONMENT = bash $(top_srcdir)/doc/htmltidy.bash
+
+endif
+
index.html : header.html.part index.html.part footer.html.part
cat header.html.part index.html.part footer.html.part > $@
diff --git a/doc/api/Makefile.am b/doc/api/Makefile.am
index a58620a..cb7b377 100644
--- a/doc/api/Makefile.am
+++ b/doc/api/Makefile.am
@@ -17,6 +17,13 @@ paludisapihtmldir = $(htmldir)/api
paludisapihtml_DATA = \
index.html
+if HAVE_HTMLTIDY
+
+TESTS = $(paludisapihtml_DATA)
+TESTS_ENVIRONMENT = bash $(top_srcdir)/doc/htmltidy.bash
+
+endif
+
index.html : header.html.part $(srcdir)/index.html.part footer.html.part
cat header.html.part $(srcdir)/index.html.part footer.html.part > $@
diff --git a/doc/api/toplinks.html.part.in b/doc/api/toplinks.html.part.in
index f6f121e..3fe12ef 100644
--- a/doc/api/toplinks.html.part.in
+++ b/doc/api/toplinks.html.part.in
@@ -1,7 +1,7 @@
<!-- vim: set tw=120 ft=html sw=4 sts=4 et : -->
<div class="topnavinner">
- <table border="0" cellspacing="0">
+ <table border="0" cellspacing="0" summary="Navigation links">
<tr>
<td rowspan="7" class="logotab">
<a href="###TOPURI###/index.html" class="noarrow"><img style="border: 0px; padding-right: 50px;"
diff --git a/doc/clients/Makefile.am b/doc/clients/Makefile.am
index 4d13de5..9aa84ff 100644
--- a/doc/clients/Makefile.am
+++ b/doc/clients/Makefile.am
@@ -22,6 +22,13 @@ paludisclientshtml_DATA = \
index.html \
$(ALL_CLIENTS_HTML)
+if HAVE_HTMLTIDY
+
+TESTS = $(paludisclientshtml_DATA)
+TESTS_ENVIRONMENT = bash $(top_srcdir)/doc/htmltidy.bash
+
+endif
+
index.html : header.html.part $(srcdir)/index.html.part footer.html.part
cat header.html.part $(srcdir)/index.html.part footer.html.part > $@
diff --git a/doc/clients/toplinks.html.part.in b/doc/clients/toplinks.html.part.in
index bb96d0e..80111e5 100644
--- a/doc/clients/toplinks.html.part.in
+++ b/doc/clients/toplinks.html.part.in
@@ -1,7 +1,7 @@
<!-- vim: set tw=120 ft=html sw=4 sts=4 et : -->
<div class="topnavinner">
- <table border="0" cellspacing="0">
+ <table border="0" cellspacing="0" summary="Navigation links">
<tr>
<td rowspan="7" class="logotab">
<a href="###TOPURI###/index.html" class="noarrow"><img style="border: 0px; padding-right: 50px;"
diff --git a/doc/configuration/Makefile.am b/doc/configuration/Makefile.am
index 26e86eb..1a0b0dc 100644
--- a/doc/configuration/Makefile.am
+++ b/doc/configuration/Makefile.am
@@ -92,6 +92,13 @@ paludisconfigurationhtml_DATA = \
installedunpackaged.html \
vdb.html
+if HAVE_HTMLTIDY
+
+TESTS = $(paludisconfigurationhtml_DATA)
+TESTS_ENVIRONMENT = bash $(top_srcdir)/doc/htmltidy.bash
+
+endif
+
index.html : header.html.part $(srcdir)/index.html.part footer.html.part
cat header.html.part $(srcdir)/index.html.part footer.html.part > $@
diff --git a/doc/configuration/hooks.html.part b/doc/configuration/hooks.html.part
index 142d8ef..cb53cf8 100644
--- a/doc/configuration/hooks.html.part
+++ b/doc/configuration/hooks.html.part
@@ -56,7 +56,7 @@ that is executed when a particular well defined action occurs.</p>
<p>Not all hook execution code methods are available for all hook categories. The
following table indicates availability:</p>
-<table border="1">
+<table border="1" summary="Which methods are supported for which categories">
<tr>
<td></td>
<th><code>.bash</code></th>
diff --git a/doc/configuration/toplinks.html.part.in b/doc/configuration/toplinks.html.part.in
index f9fbfc5..52aeb42 100644
--- a/doc/configuration/toplinks.html.part.in
+++ b/doc/configuration/toplinks.html.part.in
@@ -1,7 +1,7 @@
<!-- vim: set tw=120 ft=html sw=4 sts=4 et : -->
<div class="topnavinner">
- <table border="0" cellspacing="0">
+ <table border="0" cellspacing="0" summary="Navigation links">
<tr>
<td rowspan="7" class="logotab">
<a href="###TOPURI###index.html" class="noarrow"><img style="border: 0px; padding-right: 50px;"
diff --git a/doc/faq/Makefile.am b/doc/faq/Makefile.am
index 5afea37..c1e3e60 100644
--- a/doc/faq/Makefile.am
+++ b/doc/faq/Makefile.am
@@ -36,6 +36,13 @@ paludisfaqhtml_DATA = \
stricter.html \
repositories.html
+if HAVE_HTMLTIDY
+
+TESTS = $(paludisfaqhtml_DATA)
+TESTS_ENVIRONMENT = bash $(top_srcdir)/doc/htmltidy.bash
+
+endif
+
index.html : header.html.part $(srcdir)/index.html.part footer.html.part
cat header.html.part $(srcdir)/index.html.part footer.html.part > $@
diff --git a/doc/faq/toplinks.html.part.in b/doc/faq/toplinks.html.part.in
index b5f39b6..419cd40 100644
--- a/doc/faq/toplinks.html.part.in
+++ b/doc/faq/toplinks.html.part.in
@@ -1,7 +1,7 @@
<!-- vim: set tw=120 ft=html sw=4 sts=4 et : -->
<div class="topnavinner">
- <table border="0" cellspacing="0">
+ <table border="0" cellspacing="0" summary="Navigation links">
<tr>
<td rowspan="7" class="logotab">
<a href="###TOPURI###index.html" class="noarrow"><img style="border: 0px; padding-right: 50px;"
diff --git a/doc/htmltidy.bash b/doc/htmltidy.bash
new file mode 100755
index 0000000..fc8c493
--- /dev/null
+++ b/doc/htmltidy.bash
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+if [[ "${1/.html}" == "${1}" ]] ; then
+ echo "Not .html, no checking performed"
+ exit 0
+fi
+
+tidy -utf8 -q < "${1}" 1>/dev/null
+
diff --git a/doc/overview/Makefile.am b/doc/overview/Makefile.am
index 1a12548..aa6c287 100644
--- a/doc/overview/Makefile.am
+++ b/doc/overview/Makefile.am
@@ -26,6 +26,13 @@ paludisoverviewhtml_DATA = \
gettingstarted.html \
contact.html
+if HAVE_HTMLTIDY
+
+TESTS = $(paludisoverviewhtml_DATA)
+TESTS_ENVIRONMENT = bash $(top_srcdir)/doc/htmltidy.bash
+
+endif
+
index.html : header.html.part $(srcdir)/index.html.part footer.html.part
cat header.html.part $(srcdir)/index.html.part footer.html.part > $@
diff --git a/doc/overview/toplinks.html.part.in b/doc/overview/toplinks.html.part.in
index 2fb8b1b..4fabae8 100644
--- a/doc/overview/toplinks.html.part.in
+++ b/doc/overview/toplinks.html.part.in
@@ -1,7 +1,7 @@
<!-- vim: set tw=120 ft=html sw=4 sts=4 et : -->
<div class="topnavinner">
- <table border="0" cellspacing="0">
+ <table border="0" cellspacing="0" summary="Navigation links">
<tr>
<td rowspan="7" class="logotab">
<a href="###TOPURI###/index.html" class="noarrow"><img style="border: 0px; padding-right: 50px;"
diff --git a/doc/toplinks.html.part.in b/doc/toplinks.html.part.in
index 2f476be..0ab194d 100644
--- a/doc/toplinks.html.part.in
+++ b/doc/toplinks.html.part.in
@@ -1,7 +1,7 @@
<!-- vim: set tw=120 ft=html sw=4 sts=4 et : -->
<div class="topnavinner">
- <table border="0" cellspacing="0">
+ <table border="0" cellspacing="0" summary="Navigation links">
<tr>
<td rowspan="7" class="logotab">
<a href="###TOPURI###index.html" class="noarrow"><img style="border: 0px; padding-right: 50px;"