From 44c15b7a8fadff949e79be0b843ec9caca61901c Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 1 Feb 2019 05:56:09 +0100 Subject: doxygen: allow manual 'make apidoc' even if --disable-doxygen Even if ./configure --disable-doxygen was passed and doxygen builds are by default skipped, provide a manual 'make apidoc' target that nevertheless generates the API doc on the premise that a 'doxygen' program is available. Especially since we do a two-pass doxygen build whenever any source file changes, my guess is --disable-doxygen could be a common choice. It is then cumbersome to have to ./configure just to get one doxygen build started. Change-Id: If8d8dfb8365c8f28612b8ce2b8ddf88f74df9a90 --- Makefile.am | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8fe5f57c..332ce653 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,19 +24,27 @@ dist-hook: EXTRA_DIST = git-version-gen .version README.md osmo-release.mk osmo-release.sh -if HAVE_DOXYGEN +HTML = \ + $(top_builddir)/doc/core/html/index.html \ + $(top_builddir)/doc/gsm/html/index.html \ + $(top_builddir)/doc/vty/html/index.html \ + $(top_builddir)/doc/codec/html/index.html \ + $(top_builddir)/doc/coding/html/index.html \ + $(top_builddir)/doc/ctrl/html/index.html \ + $(top_builddir)/doc/gb/html/index.html +if HAVE_DOXYGEN html_DATA = $(top_builddir)/doc/html.tar doc: $(html_DATA) -$(html_DATA): $(top_builddir)/doc/core/html/index.html \ - $(top_builddir)/doc/gsm/html/index.html \ - $(top_builddir)/doc/vty/html/index.html \ - $(top_builddir)/doc/codec/html/index.html \ - $(top_builddir)/doc/coding/html/index.html \ - $(top_builddir)/doc/ctrl/html/index.html \ - $(top_builddir)/doc/gb/html/index.html +$(html_DATA): apidoc +else +DOXYGEN=doxygen +endif + +.PHONY: apidoc +apidoc: $(HTML) cd $(top_builddir)/doc && tar cf html.tar */html # Support doxygen cross references from each library to each other library: @@ -193,6 +201,7 @@ $(top_builddir)/doc/gb/html/index.html: $(top_builddir)/doc/libosmogb.tag.prep \ rm -rf $(top_builddir)/doc/gb; mkdir -p $(top_builddir)/doc/gb $(DOXYGEN) Doxyfile.gb +if HAVE_DOXYGEN install-data-hook: cd $(DESTDIR)$(htmldir) && tar xf html.tar && rm -f html.tar -- cgit v1.2.3