mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
doc: Check DocBook XML validity during the build
Building the documentation with XSLT does not check the DTD, like a DSSSL build would. One can often get away with having invalid XML, but the stylesheets might then create incorrect output, as they are not designed to handle that. Therefore, check the validity of the XML against the DTD, using xmllint, during the build. Add xmllint detection to configure, and add some documentation. xmllint comes with libxml2, which is already in use, but it might be in a separate package, such as libxml2-utils on Debian. Reviewed-by: Fabien COELHO <coelho@cri.ensmp.fr>
This commit is contained in:
43
configure
vendored
43
configure
vendored
@ -630,6 +630,7 @@ vpath_build
|
||||
PROVE
|
||||
OSX
|
||||
XSLTPROC
|
||||
XMLLINT
|
||||
DBTOEPUB
|
||||
COLLATEINDEX
|
||||
DOCBOOKSTYLE
|
||||
@ -14654,6 +14655,48 @@ fi
|
||||
test -n "$DBTOEPUB" && break
|
||||
done
|
||||
|
||||
for ac_prog in xmllint
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_XMLLINT+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$XMLLINT"; then
|
||||
ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_XMLLINT="$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
XMLLINT=$ac_cv_prog_XMLLINT
|
||||
if test -n "$XMLLINT"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
|
||||
$as_echo "$XMLLINT" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
test -n "$XMLLINT" && break
|
||||
done
|
||||
|
||||
for ac_prog in xsltproc
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
|
Reference in New Issue
Block a user