diff options
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | doc/sphinx/Makefile.am | 19 |
2 files changed, 19 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 346a36cf61..4d554da8e9 100644 --- a/configure.ac +++ b/configure.ac @@ -1383,6 +1383,10 @@ AM_CONDITIONAL(HAVE_ASCIIDOC, test "x$ASCIIDOC" != "xno") AC_PATH_PROG(PLANTUML, plantuml, no) AM_CONDITIONAL(HAVE_PLANTUML, test "x$PLANTUML" != "xno") +# Check for xmllint. +AC_PATH_PROG(XMLLINT, xmllint, no) +AM_CONDITIONAL(HAVE_XMLLINT, test "x$XMLLINT" != "xno") + # Check for valgrind AC_PATH_PROG(VALGRIND, valgrind, no) AM_CONDITIONAL(HAVE_VALGRIND, test "x$VALGRIND" != "xno") diff --git a/doc/sphinx/Makefile.am b/doc/sphinx/Makefile.am index 62cf7490d7..967b32bc26 100644 --- a/doc/sphinx/Makefile.am +++ b/doc/sphinx/Makefile.am @@ -144,20 +144,31 @@ svgs += uml/select4.svg svgs += uml/tkey.svg svgs += uml/update.svg +txts = +txts += uml/option-data-priority.atxt +txts += uml/priority-of-lease-lifetimes-and-dhcpv4-fields.atxt +txts += uml/tkey.atxt +txts += uml/update.atxt + if HAVE_PLANTUML uml: uml-to-png uml-to-svg format-svgs uml-to-txt uml-to-png: $(umls) - @PLANTUML@ -tpng $^ + @ @PLANTUML@ -tpng $^ uml-to-svg: $(umls) - @PLANTUML@ -tsvg $^ + @ @PLANTUML@ -tsvg $^ format-svgs: $(svgs) - for svg in $(svgs); do xq -x . $$svg > tmp; mv tmp $$svg; done +if HAVE_XMLLINT + @ for svg in $(svgs); do xmllint --format $$svg > tmp; mv tmp $$svg; done +else + @ printf 'WARNING: xmllint not found. SVGs not formatted.\n' +endif uml-to-txt: $(umls) - @PLANTUML@ -ttxt $^ + @ @PLANTUML@ -ttxt $^ + for txt in $(txts); do sed 's/ *$$//g' $$txt > tmp; mv tmp $$txt; done endif EXTRA_DIST += $(umls) |