From afab3d15d6541105beff4fea50dc7d033f67eae9 Mon Sep 17 00:00:00 2001
From: "Stephen A. Wood" <saw@jlab.org>
Date: Thu, 12 May 2016 16:18:16 -0400
Subject: [PATCH] Do a custom build of podd documentation   If the podd docs
 are built using the ROOT tagfile, then when the hcana   docs are built using
 the podd tag file, doxygen crashes.  This commit   adds building of the podd
 docs to the hcana doc building Makefile.  The   podd docs are built without
 using the ROOT tagfile, so a sed hack is used   to modify podd's Doxyfile.

---
 .gitignore    |  2 ++
 docs/Doxyfile |  4 ++--
 docs/Makefile | 15 ++++++++++++++-
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index dac0753..24c98e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,6 +40,8 @@ config.log
 # Doxygen generated documentation directory
 docs/ROOT.tag
 docs/html
+docs/Doxyfile_podd
+docs/Doxygen_podd.tag
 
 # Examples directory
 examples/*.root
diff --git a/docs/Doxyfile b/docs/Doxyfile
index 0a82da4..400cca4 100644
--- a/docs/Doxyfile
+++ b/docs/Doxyfile
@@ -1310,8 +1310,8 @@ SKIP_FUNCTION_MACROS   = YES
 # If a tag file is not located in the directory in which doxygen
 # is run, you must also specify the path to the tagfile here.
 
-TAGFILES               = ../podd/docs/Doxygen.tag=../podddocs \
-                         ./ROOT.tag=https://root.cern.ch/doc/master
+TAGFILES               = Doxygen_podd.tag=../podddocs \
+                          ./ROOT.tag=https://root.cern.ch/doc/master
 
 # When a file name is specified after GENERATE_TAGFILE, doxygen will create
 # a tag file that is based on the input files it reads.
diff --git a/docs/Makefile b/docs/Makefile
index 91428bd..cc33e7d 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -4,14 +4,27 @@ DOXYGEN_OUTPUT_DIRECTORY ?= .
 export DOXYGEN_OUTPUT_DIRECTORY
 export DOXYGEN_SOURCE_DIRECTORY := ..
 
+PODDDIR = ../podd/docs
+# THISDIR is location of this directory relative to the podd docs directory
+THISDIR = ../../docs
 
 all: doxygen
 
-doxygen: Doxyfile ROOT.tag
+doxygen: Doxyfile Doxygen_podd.tag ROOT.tag
 	doxygen
 
+Doxyfile_podd: $(PODDDIR)/Doxyfile
+	sed -e 's/^TAGFILES.*/TAGFILES = /;s|Doxygen.tag|$(THISDIR)/Doxygen_podd.tag|' $< > $@
+
+Doxygen_podd.tag: Doxyfile_podd
+	cd $(PODDDIR);doxygen $(THISDIR)/Doxyfile_podd
+
 ROOT.tag:
 	wget https://root.cern.ch/doc/master/ROOT.tag
 
 clean:
 	rm -r $(DOXYGEN_OUTPUT_DIRECTORY)/html
+	rm -r $(PODDDIR)/html
+	rm Doxyfile_podd
+	rm Doxygen_podd.tag
+
-- 
GitLab