allow plantuml with doxygen < 1.8.11

master
Marc Wäckerlin 8 years ago
parent 1069530530
commit 25cca256e0
  1. 27
      scripts/ax_init_standard_project.m4
  2. 19
      scripts/bootstrap.sh

@ -543,20 +543,12 @@ AC_DEFUN([AX_USE_SCRIPTS], [
AC_CONFIG_FILES([scripts/makefile])
])
# use this in configure.ac to support PlantUML in Doxygen generation
AC_DEFUN([AX_USE_PLANTUML], [
if test -f "${srcdir}/doc/plantuml.jar"; then
PLANTUML="doc/plantuml.jar"
AX_SUBST(PLANTUML)
fi
AM_CONDITIONAL(HAVE_PLANTUML, test -n "$PLANTUML")
])
# use this in configure.ac to support Doxygen documentation generation
AC_DEFUN([AX_USE_DOXYGEN], [
AC_CHECK_PROG(have_doxygen, doxygen, yes, no)
AC_CHECK_PROG(have_dot, dot, yes, no)
AC_CHECK_PROG(have_mscgen, mscgen, yes, no)
AM_CONDITIONAL(NEED_PLANTUML, test "$have_doxygen" = "yes" -a "1.8.11" != $((echo "1.8.11"; doxygen -v) | sort -V | head -1))
PDF_DOC=${PACKAGE_NAME}-${PACKAGE_VERSION}.pdf
AC_SUBST(PDF_DOC)
if test "$have_doxygen" = "no"; then
@ -581,14 +573,25 @@ AC_DEFUN([AX_USE_DOXYGEN], [
AX_ADD_MAKEFILE_TARGET_DEP([.PHONY], [pdf gen-uml-images], [doc/makefile.in])
test -f doc/makefile.in && cat >> doc/makefile.in <<EOF
#### Begin: Appended by $0
doc: doxyfile
doc: doxyfile @NEED_PLANTUML_TRUE@ den-uml-images
doxygen doxyfile
@PEDANTIC_TRUE@ test \! -s doxygen.errors
@NEED_PLANTUML_TRUE@EXTRA_DIST = ${EXTRA_DIST} plantuml.jar
@NEED_PLANTUML_TRUE@
@NEED_PLANTUML_TRUE@gen-uml-images:
@NEED_PLANTUML_TRUE@ test -d gen-uml-images || mkdir gen-uml-images
@NEED_PLANTUML_TRUE@ eval \$\$(sed -n 's, *INPUT *\\(+\\?\\)= *\\(.*\\),INPUT\\1=" \\2",gp' doxyfile); \\
@NEED_PLANTUML_TRUE@ eval \$\$(sed -n 's, *FILE_PATTERNS *\\(+\\?\\)= *\\(.*\\),FILE_PATTERNS\\1=" \\2",gp' doxyfile); \\
@NEED_PLANTUML_TRUE@ SOURCES="**.("\$\$(echo \$\${FILE_PATTERNS} | sed 's,*.,,g;s, ,|,g')")"; \\
@NEED_PLANTUML_TRUE@ for src in \$\$INPUT; do \\
@NEED_PLANTUML_TRUE@ java -Djava.awt.headless=true -jar \${top_srcdir}/doc/plantuml.jar -v -o \$\$(pwd)/gen-uml-images "\$\$src/\$\$SOURCES"; \\
@NEED_PLANTUML_TRUE@ done
clean-documentation:
-rm doxygen.errors @PDF_DOC@
-rm doxygen.errors @PDF_DOC@ @NEED_PLANTUML_TRUE@ gen-uml-images
distclean-documentation:
-rm -r html gen-uml-images
-rm -r html
-rm @PACKAGE_NAME@.doxytag
maintainer-clean-documentation:
-rm makefile.in

@ -154,7 +154,7 @@ GENERATED FILES
* doc/header.html.in - if you enabled AX_USE_DOXYGEN
* doc/footer.html.in - if you enabled AX_USE_DOXYGEN
* doc/style.css - if you enabled AX_USE_DOXYGEN
* doc/plantuml.jar - if you enable AX_USE_PLANTUML
* doc/plantuml.jar - if you enable AX_USE_DOXYGEN
* test/makefile.am - if you enabled AX_USE_CPPUNIT and AX_USE_CXX
* test/${DEFAULT_PROJECT_NAME#lib}.cxx - if you enabled AX_BUILD_TEST or AX_USE_CPPUNIT
* examples/makefile.am - if you enabled AX_BUILD_EXAMPLES
@ -243,11 +243,6 @@ FILES
* Enable LibTool library creation: AX_USE_LIBTOOL
* Enable Scripts: AX_USE_SCRIPTS
* Enable Doxygen documentation generation: AX_USE_DOXYGEN
* Enable PlantUML for Doxygen: AX_USE_PLANTUML
Example, add in doxygen documentation:
@startuml{overview.png}
Alice -> Bob: test
@enduml
* Enable Debian packaging by calling "make deb": AX_USE_DEBIAN_PACKAGING
* Enable RPM packaging by calling "make rpm": AX_USE_RPM_PACKAGING
* Enable C++ testing using CppUnit: AX_USE_CPPUNIT
@ -555,7 +550,6 @@ AX_INIT_STANDARD_PROJECT
#AX_USE_LIBTOOL
#AX_USE_SCRIPTS
#AX_USE_DOXYGEN
#AX_USE_PLANTUML
#AX_USE_DEBIAN_PACKAGING
#AX_USE_RPM_PACKAGING
#AX_USE_CPPUNIT
@ -975,7 +969,7 @@ to --condition AX_USE_DOXYGEN doc/style.css <<EOF
margin: 0;
}
EOF
if testtag AX_USE_PLANTUML; then
if testtag AX_USE_DOXYGEN; then
copy doc/plantuml.jar
fi
if testtag AX_USE_DOXYGEN; then
@ -1007,8 +1001,13 @@ if testtag AX_USE_DOXYGEN; then
doxyadd ALIASES '"description=@DESCRIPTION@"'
doxyadd ALIASES '"readme=@README_HTML@"'
doxyadd ALIASES '"author=<a href="@AUTHOR_URL@" target="_blank">@AUTHOR_NAME@</a>"'
if testtag AX_USE_PLANTUML; then
doxyreplace PLANTUML_JAR_PATH '"@top_srcdir@/@PLANTUML@"'
# hack plantuml for doxygen < 1.8.11
if test "1.8.11" = $((echo "1.8.11"; doxygen -v) | sort -V | head -1); then
doxyreplace PLANTUML_JAR_PATH '"@top_srcdir@/doc/plantuml.jar"'
else
doxyadd ALIASES '"startuml{1}=@image html \\1\\n@image latex \\1\\n\\if DontIgnorePlantUMLCode"'
doxyadd ALIASES '"enduml=\\endif"'
doxyadd IMAGE_PATH '"gen-uml-images"'
fi
doxyreplace ENABLE_PREPROCESSING YES
doxyreplace MACRO_EXPANSION YES

Loading…
Cancel
Save