diff --git a/scripts/ax_init_standard_project.m4 b/scripts/ax_init_standard_project.m4 index 079528b..651f53a 100644 --- a/scripts/ax_init_standard_project.m4 +++ b/scripts/ax_init_standard_project.m4 @@ -616,6 +616,55 @@ uninstall-documentation: EOF ]) +# use this in configure.ac to support Doxygen documentation generation +AC_DEFUN([AX_USE_PERLDOC], [ + PERL_SOURCES="m4_default([$1], [perl])" + AX_SUBST(PERL_SOURCES) + if test -z "$PERL_SOURCES"; then + AC_MSG_ERROR([You must specify the path to per files + - use [AX]_[USE]_PERLDOC([[pathes to perldoc]])]); fi + AC_CHECK_PROG(have_perldoc, pods2html, yes, no) + if test "$have_doxygen" = "no"; then + AC_MSG_WARN([Missing program pods2html! + - you cannot rebuild the documentation + - there are precompiled derived files in the distribution + - if you need to generate documentation, install libpod-tree-perl]); fi + AC_CONFIG_FILES([doc/makefile]) + AX_ADD_MAKEFILE_TARGET_DEP([distclean-am], [distclean-perldoc], [doc/makefile.in]) + AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-perldoc], [doc/makefile.in]) + AX_ADD_MAKEFILE_TARGET_DEP([install-data-am], [install-data-perldoc], [doc/makefile.in]) + AX_ADD_MAKEFILE_TARGET_DEP([uninstall-am], [uninstall-perldoc], [doc/makefile.in]) + AX_ADD_MAKEFILE_TARGET_DEP([all], [doc], [doc/makefile.in]) + AX_ADD_MAKEFILE_TARGET_DEP([.PHONY], [doc], [doc/makefile.in]) + test -f doc/makefile.in && cat >> doc/makefile.in <Perl Documentation

Perl Documentation

" >> perldoc/index.html + +perldoc/%: + pods2html --notoc --empty --index index @top_srcdir@/\${@:perldoc/%=%} \$[@] + +distclean-perldoc: + -rm -r perldoc +maintainer-clean-perldoc: + -rm makefile.in +install-data-perldoc: + test -d \$(DESTDIR)\${docdir} || mkdir -p \$(DESTDIR)\${docdir} + chmod -R u+w \$(DESTDIR)\${docdir} + cp -r perldoc \$(DESTDIR)\${docdir}/ +uninstall-perldoc: + -chmod -R u+w \$(DESTDIR)\${docdir} + -rm -rf \$(DESTDIR)\${docdir}/perldoc +#### End: $0 +EOF +]) + # require a specific package, with fallback: test for a header # - parameter: # $1 = unique id (no special characters) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 54afce4..54c1181 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -149,7 +149,7 @@ GENERATED FILES * src/version.cxx - if you enabled AX_USE_CXX * html/makefile.am - if you enabled AX_BUILD_HTML * scripts/makefile.am - if you enabled AX_USE_SCRIPTS - * doc/makefile.am - if you enabled AX_USE_DOXYGEN + * doc/makefile.am - if you enabled AX_USE_DOXYGEN or AX_USE_PERLDOC * doc/doxyfile.in - if you enabled AX_USE_DOXYGEN * doc/header.html.in - if you enabled AX_USE_DOXYGEN * doc/footer.html.in - if you enabled AX_USE_DOXYGEN @@ -208,8 +208,8 @@ FILE DEPENDENCIES * test/makefile.am depends on AX_USE_LIBTOOL * html/makefile.am depends on AX_BUILD_HTML * doc/doxyfile.in depends on AX_BUILD_EXAMPLES - * debian/control.in depends on AX_USE_DOXYGEN, AX_USE_CPPUNIT - AX_CXX_QT, AX_CHECK_QT, AX_REQUIRE_QT, AX_USE_LIBTOOL + * debian/control.in depends on AX_USE_DOXYGEN, AX_USE_PERLDOC, + AX_USE_CPPUNIT AX_CXX_QT, AX_CHECK_QT, AX_REQUIRE_QT, AX_USE_LIBTOOL * debian/${DEFAULT_PROJECT_NAME}.install depends on AX_USE_LIBTOOL * debian/${DEFAULT_PROJECT_NAME}.dirs depends on AX_USE_LIBTOOL * debian/${DEFAULT_PROJECT_NAME}-dev.install depends on AX_USE_LIBTOOL @@ -243,6 +243,7 @@ FILES * Enable LibTool library creation: AX_USE_LIBTOOL * Enable Scripts: AX_USE_SCRIPTS * Enable Doxygen documentation generation: AX_USE_DOXYGEN + * Enable Perldoc documentation generation: AX_USE_PERLDOC * 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 @@ -550,6 +551,7 @@ AX_INIT_STANDARD_PROJECT #AX_USE_LIBTOOL #AX_USE_SCRIPTS #AX_USE_DOXYGEN +#AX_USE_PERLDOC #AX_USE_DEBIAN_PACKAGING #AX_USE_RPM_PACKAGING #AX_USE_CPPUNIT @@ -835,7 +837,7 @@ ${HEADER}dist_bin_SCRIPTS = MAINTAINERCLEANFILES = makefile.in EOF -echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | to --condition AX_USE_DOXYGEN doc/makefile.am +echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | to --condition 'AX_USE_DOXYGEN|AX_USE_PERLDOC' doc/makefile.am if testtag AX_BUILD_TEST; then to test/runtests.sh < ${0%/*}/test/runtests.sh fi @@ -1098,7 +1100,7 @@ if testtag AX_USE_DEBIAN_PACKAGING; then -- @AUTHOR@ @BUILD_DATE@ EOF - BUILD_DEPENDS="debhelper, ${VCSDEPENDS} pkg-config, automake, libtool, autotools-dev, pandoc, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen"; fi; if testtag AX_USE_PLANTUML; then echo -n ", default-jre-headless|default-jre"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | libqt4-core | libqtcore4, qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)" + BUILD_DEPENDS="debhelper, ${VCSDEPENDS} pkg-config, automake, libtool, autotools-dev, pandoc, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen"; fi; if testtag AX_USE_PERLDOC; then echo -n ", libpod-tree-perl"; fi; if testtag AX_USE_PLANTUML; then echo -n ", default-jre-headless|default-jre"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | libqt4-core | libqtcore4, qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)" to debian/control.in <