From b175971f8087d38c003bac67bbd2c535e807d415 Mon Sep 17 00:00:00 2001 From: Martijn van Beurden Date: Sun, 18 Sep 2022 20:09:48 +0200 Subject: Include api dir in distribution Also, don't create empty Doxygen tag and api directory --- .github/workflows/action.yml | 2 +- configure.ac | 6 ++++++ doc/Makefile.am | 33 +++++++++++++++++++++++++++------ 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 6bbbaf44..dd11c1a2 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -142,7 +142,7 @@ jobs: if: startsWith(matrix.os,'ubuntu') run: | sudo apt-get update - sudo apt-get install -y libtool-bin libogg-dev doxygen libxml2-utils w3c-sgml-lib + sudo apt-get install -y libtool-bin libogg-dev - name: Install Windows dependencies if: startsWith(matrix.os,'windows') diff --git a/configure.ac b/configure.ac index d0f29e05..50f19efc 100644 --- a/configure.ac +++ b/configure.ac @@ -375,6 +375,12 @@ if test "x$enable_doxygen_docs" != xfalse ; then fi AM_CONDITIONAL(FLaC__HAS_DOXYGEN, test -n "$DOXYGEN") +if test "x$DOXYGEN" = "x"; then + AC_CHECK_FILE($srcdir/doc/FLAC.tag,[HAVE_PREBUILT_FLAC_TAG=yes]) + AC_CHECK_FILE($srcdir/doc/api/modules.html,[HAVE_PREBUILT_API_DIR=yes]) +fi +AM_CONDITIONAL(FLaC__HAS_PREBUILT_DOXYGEN, test "x$HAVE_PREBUILD_FLAG_TAG$HAVEPREBUILD_API_DIR" = "xyesyes") + AC_ARG_ENABLE(local-xmms-plugin, AS_HELP_STRING([--enable-local-xmms-plugin],[Install XMMS plugin to ~/.xmms/Plugins instead of system location]), [case "${enableval}" in diff --git a/doc/Makefile.am b/doc/Makefile.am index cb0df6f8..593d691b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -25,17 +25,38 @@ FLAC.tag: Doxyfile rm -rf api mv doxytmp/html api rm -rf doxytmp -else -FLAC.tag: - touch $@ - mkdir -p api -endif doc_DATA = \ FLAC.tag +else +if FLaC__HAS_PREBUILT_DOXYGEN +doc_DATA = \ + FLAC.tag +endif +endif EXTRA_DIST = Doxyfile.in doxygen.footer.html \ - isoflac.txt $(doc_DATA) CMakeLists.txt + isoflac.txt $(doc_DATA) CMakeLists.txt \ + api +if FLaC__HAS_DOXYGEN +# The install targets don't copy whole directories so we have to +# handle 'api/' specially: +install-data-local: + $(mkinstalldirs) $(DESTDIR)$(docdir)/api + (cd $(builddir)/api && $(INSTALL_DATA) * $(DESTDIR)$(docdir)/api) +uninstall-local: + rm -rf $(DESTDIR)$(docdir)/api distclean-local: rm -rf FLAC.tag api doxytmp +endif + +if FLaC__HAS_PREBUILT_DOXYGEN +# The install targets don't copy whole directories so we have to +# handle 'api/' specially: +install-data-local: + $(mkinstalldirs) $(DESTDIR)$(docdir)/api + (cd $(builddir)/api && $(INSTALL_DATA) * $(DESTDIR)$(docdir)/api) +uninstall-local: + rm -rf $(DESTDIR)$(docdir)/api +endif -- cgit v1.2.1