new possibility to generate perldoc

master
Marc Wäckerlin 8 years ago
parent 39d73705e1
commit 5e7c69df1f
  1. 49
      scripts/ax_init_standard_project.m4
  2. 17
      scripts/bootstrap.sh

@ -616,6 +616,55 @@ uninstall-documentation:
EOF 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 <<EOF
#### Begin: Appended by $0
doc: perldoc/index.html
perldoc/index.html: \${PERL_SOURCES:%=perldoc/%}
echo "<html><head><title>Perl Documentation</title></head><body><h1>Perl Documentation</h1><ul>" > perldoc/index.html
for p in \${PERL_SOURCES:%=perldoc/%}; do \
echo '<li><a href="'"\$\${p#perldoc/}"'/index.html">'"\$\${p#perldoc/}"'</a></li>' >> perldoc/index.html; \
done
echo "</ul></body></html>" >> 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 # require a specific package, with fallback: test for a header
# - parameter: # - parameter:
# $1 = unique id (no special characters) # $1 = unique id (no special characters)

@ -149,7 +149,7 @@ GENERATED FILES
* src/version.cxx - if you enabled AX_USE_CXX * src/version.cxx - if you enabled AX_USE_CXX
* html/makefile.am - if you enabled AX_BUILD_HTML * html/makefile.am - if you enabled AX_BUILD_HTML
* scripts/makefile.am - if you enabled AX_USE_SCRIPTS * 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/doxyfile.in - if you enabled AX_USE_DOXYGEN
* doc/header.html.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 * doc/footer.html.in - if you enabled AX_USE_DOXYGEN
@ -208,8 +208,8 @@ FILE DEPENDENCIES
* test/makefile.am depends on AX_USE_LIBTOOL * test/makefile.am depends on AX_USE_LIBTOOL
* html/makefile.am depends on AX_BUILD_HTML * html/makefile.am depends on AX_BUILD_HTML
* doc/doxyfile.in depends on AX_BUILD_EXAMPLES * doc/doxyfile.in depends on AX_BUILD_EXAMPLES
* debian/control.in depends on AX_USE_DOXYGEN, AX_USE_CPPUNIT * debian/control.in depends on AX_USE_DOXYGEN, AX_USE_PERLDOC,
AX_CXX_QT, AX_CHECK_QT, AX_REQUIRE_QT, AX_USE_LIBTOOL 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}.install depends on AX_USE_LIBTOOL
* debian/${DEFAULT_PROJECT_NAME}.dirs 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 * debian/${DEFAULT_PROJECT_NAME}-dev.install depends on AX_USE_LIBTOOL
@ -243,6 +243,7 @@ FILES
* Enable LibTool library creation: AX_USE_LIBTOOL * Enable LibTool library creation: AX_USE_LIBTOOL
* Enable Scripts: AX_USE_SCRIPTS * Enable Scripts: AX_USE_SCRIPTS
* Enable Doxygen documentation generation: AX_USE_DOXYGEN * 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 Debian packaging by calling "make deb": AX_USE_DEBIAN_PACKAGING
* Enable RPM packaging by calling "make rpm": AX_USE_RPM_PACKAGING * Enable RPM packaging by calling "make rpm": AX_USE_RPM_PACKAGING
* Enable C++ testing using CppUnit: AX_USE_CPPUNIT * Enable C++ testing using CppUnit: AX_USE_CPPUNIT
@ -550,6 +551,7 @@ AX_INIT_STANDARD_PROJECT
#AX_USE_LIBTOOL #AX_USE_LIBTOOL
#AX_USE_SCRIPTS #AX_USE_SCRIPTS
#AX_USE_DOXYGEN #AX_USE_DOXYGEN
#AX_USE_PERLDOC
#AX_USE_DEBIAN_PACKAGING #AX_USE_DEBIAN_PACKAGING
#AX_USE_RPM_PACKAGING #AX_USE_RPM_PACKAGING
#AX_USE_CPPUNIT #AX_USE_CPPUNIT
@ -835,7 +837,7 @@ ${HEADER}dist_bin_SCRIPTS =
MAINTAINERCLEANFILES = makefile.in MAINTAINERCLEANFILES = makefile.in
EOF 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 if testtag AX_BUILD_TEST; then
to test/runtests.sh < ${0%/*}/test/runtests.sh to test/runtests.sh < ${0%/*}/test/runtests.sh
fi fi
@ -1098,7 +1100,7 @@ if testtag AX_USE_DEBIAN_PACKAGING; then
-- @AUTHOR@ @BUILD_DATE@ -- @AUTHOR@ @BUILD_DATE@
EOF 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 <<EOF to debian/control.in <<EOF
Source: @PACKAGE_NAME@ Source: @PACKAGE_NAME@
Priority: extra Priority: extra
@ -1173,6 +1175,9 @@ BuildRequires: gnupg, ${VCSDEPENDS} make, automake, autoconf, rpm-build$(
if testtag AX_USE_DOXYGEN; then if testtag AX_USE_DOXYGEN; then
echo -n ", doxygen"; echo -n ", doxygen";
fi fi
if testtag AX_USE_PERLDOC; then
echo -n ", libpod-tree-perl";
fi
if testtag AX_USE_PLANTUML; then if testtag AX_USE_PLANTUML; then
echo -n ", default-jre-headless"; echo -n ", default-jre-headless";
fi fi
@ -1287,7 +1292,7 @@ fi
if testtag AX_USE_SCRIPTS; then if testtag AX_USE_SCRIPTS; then
SUBDIRS="${SUBDIRS} scripts" SUBDIRS="${SUBDIRS} scripts"
fi fi
if testtag AX_USE_DOXYGEN; then if testtag 'AX_USE_DOXYGEN|AX_USE_PERLDOC'; then
SUBDIRS="${SUBDIRS} doc" SUBDIRS="${SUBDIRS} doc"
fi fi
if testtag AX_BUILD_EXAMPLES; then if testtag AX_BUILD_EXAMPLES; then

Loading…
Cancel
Save