From 8a8e568750a62084a728c0a6f88fb117a77ab804 Mon Sep 17 00:00:00 2001 From: nlopess Date: Fri, 30 Jul 2004 10:42:52 +0000 Subject: [PATCH] add make test_xml this is usefull to detect XML problems --- docs/Makefile.in | 3 +++ docs/README | 1 + docs/configure.in | 44 +++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 47 insertions(+), 1 deletion(-) diff --git a/docs/Makefile.in b/docs/Makefile.in index 05c9850e..8fff55c4 100755 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -26,6 +26,7 @@ LANG=@LANG@ NSGMLS=@NSGMLS@ JADE=@JADE@ -D . -wno-idref XSLTPROC=@XSLTPROC@ +XMLLINT=@XMLLINT@ FOP=@FOP@ XMLDCL=./dtds/dbxml-4.1.2/phpdocxml.dcl CATALOG=@CATALOG@ @@ -57,6 +58,8 @@ pdf: FORCE test: $(NSGMLS) -i lang-$(LANG) -s $(XMLDCL) manual.xml +test_xml: + $(XMLLINT) --noent --noout --valid manual.xml revcheck: FORCE $(PHP) -f scripts/revcheck.php $(LANG) > revcheck.html diff --git a/docs/README b/docs/README index c609ed52..f4f8dea7 100644 --- a/docs/README +++ b/docs/README @@ -10,6 +10,7 @@ Firstly issue these commands: TEST: * make test + * make test_xml (test for XML validity) MAKE: * make (to make plain html) diff --git a/docs/configure.in b/docs/configure.in index c6fb55df..df0a8b7f 100755 --- a/docs/configure.in +++ b/docs/configure.in @@ -240,7 +240,7 @@ AC_ARG_WITH(fop, fi ],[ if test -e ../../phpdoc-tools/fop/fop.bat ; then - AC_MSG_CHECKING([for xsltproc]) + AC_MSG_CHECKING([for FOP]) FOP=../../phpdoc-tools/fop/fop.bat AC_MSG_RESULT($FOP) else @@ -255,6 +255,48 @@ AC_SUBST(FOP) dnl }}} +dnl {{{ check for xmllint + +AC_ARG_WITH(xmllint, +[ --with-xmllint=PATH check for xmllint], +[ + if test $withval != "yes"; then + AC_MSG_CHECKING([for xmllint]) + if test -x $withval -a -f $withval + then + XMLLINT=$withval + AC_MSG_RESULT($XMLLINT) + else + XMLLINT=no + AC_MSG_RESULT(no) + AC_MSG_ERROR([$withval: no xmllint binary found]) + fi + else + if test -e ../../phpdoc-tools/libxml/xmllint.exe ; then + AC_MSG_CHECKING([for xmllint]) + XSLTPROC=../../phpdoc-tools/libxml/xmllint.exe + AC_MSG_RESULT($XMLLINT) + else + AC_PATH_PROG(XMLLINT,"xmllint",no) + fi + fi +],[ + if test -e ../../phpdoc-tools/libxml/xmllint.exe ; then + AC_MSG_CHECKING([for xmllint]) + XMLLINT=../../phpdoc-tools/libxml/xmllint.exe + AC_MSG_RESULT($XMLLINT) + else + AC_PATH_PROG(XMLLINT,"xmllint",no) + fi +] +) +if test $XMLLINT = "no"; then + AC_MSG_WARN([no xmllint binary found, XML Validation won't work]) +fi +AC_SUBST(XMLLINT) + +dnl }}} + dnl }}} dnl {{{ check for catalog files