Anonymous avatar Anonymous committed 8ec7fc2

Install doxygen files into the installation area

Comments (0)

Files changed (4)

+2003-06-05  Christian Arnault  <arnault@lal.in2p3.fr>
+
+	* cmt/requirements: Modification of the pattern for installing the
+	doxygen into the installation areas.
+
+	* cmt/fragments/doxygen_header: Make use of the new doxygen.sh
+	shell script
+
+	* cmt/doxygen.sh: Add a script for finding all tag files
+	corresponding to used packages. Find tag files either inside the
+	packages (../doc/<package>.tag) or in installation area
+	(doc/<package>.tag)
+
 2002-12-05  Christian Arnault  <carnault@lxplus032.cern.ch>
 
         * cmt/fragments/Doxyfile: Add DOT_IMAGE_FORMAT to override the png default (set to gif)
+
+### set -x
+
+package=$1
+DOXYGEN_OUTPUT_DIRECTORY=$2
+
+package_tagfile="${CMTINSTALLAREA}/doc/${package}.tag"
+DOXYGEN_GENERATE_TAGFILE=${package_tagfile}
+
+tagfiles=""
+
+cmtexe=${CMTROOT}/${CMTBIN}/cmt.exe
+
+for f in `${cmtexe} show uses | grep -v '#' | sed -e 's#[ ][ ]*#:#g'` ; do
+  ##echo $f
+
+  p=`echo $f | cut -d: -f2`
+  prefix=`echo $f | cut -d: -f4 | egrep -v '[(]'`
+
+  if test "${p}" = "CMT"; then continue; fi
+  if test "${prefix}" = "CMT"; then continue; fi
+
+  pp=`echo $f | sed -e 's#.*[(]##' -e 's#[)].*##'`
+  ##echo "p=${p} prefix=${prefix} path=${pp}"
+
+  inpackage=`find ${pp}/${prefix}/${p} -name ${p}.tag | sed -e 's#//#/#g'`
+
+  if test -f ${pp}/InstallArea/doc/${p}.tag ; then
+    echo "${p}.tag found in installarea ${pp}"
+    tagfiles="${tagfiles} ${pp}/InstallArea/doc/${p}.tag"
+  elif test ! "${inpackage}" = ""; then
+    echo "${p}.tag found in package ${pp}/${prefix}/${p}"
+    tagfiles="${tagfiles} ${inpackage}"
+  fi
+
+done
+
+if test ! -d ${DOXYGEN_OUTPUT_DIRECTORY}; then mkdir -p ${DOXYGEN_OUTPUT_DIRECTORY}; fi
+if test ! -d ../doc; then mkdir -p ../doc; fi
+
+##echo "TAGFILES               = ${tagfiles}"
+##echo "GENERATE_TAGFILE       = ${DOXYGEN_GENERATE_TAGFILE}"
+
+${cmtexe} filter ${ATLASDOXYGENROOT}/cmt/fragments/Doxyfile ../doc/Doxyfile
+
+cat ../doc/Doxyfile | \
+  sed -e 's#^TAGFILES.*#TAGFILES = '"${tagfiles}"'#' \
+      -e 's#^GENERATE_TAGFILE.*#GENERATE_TAGFILE = '"${package_tagfile}"'#'>t$$; mv t$$ ../doc/Doxyfile
+
+(cd ../doc; doxygen)
+
+if test ! "${tagfiles}" = ""; then
+
+  list=""
+  for f in `echo ${tagfiles}`; do
+    filename=`basename ${f}`
+    package=${filename%.tag}
+    d=`dirname ${f} | sed \
+	-e 's#.*/InstallArea/doc#../../'${package}'/html#' \
+	-e 's#/afs/cern.ch/atlas/software/dist/\(.*\)#http://atlas.web.cern.ch/Atlas/GROUPS/SOFTWARE/OO/dist/\1/Doxygen/html#'`
+    list="${list} -l ${filename}@${d}"
+  done
+
+  cd ${DOXYGEN_OUTPUT_DIRECTORY}/html
+  perl installdox ${list} *.html
+
+fi
+
+
+

cmt/fragments/doxygen_header

 ##
 
 ${CONSTITUENT} ::
-	@for d in ${DOXYGEN_INPUT}; do \
-	  if test ! -d $$d; then \
+	@for d in $(DOXYGEN_INPUT); do \
+	  if test ! -d $${d}; then \
 	    info="directory"; \
-	    missing=$$d; \
+	    missing=$${d}; \
 	    error=1; \
 	    break; \
 	  else \
 	    info="files"; \
 	    error=1; \
-	    for p in ${DOXYGEN_FILE_PATTERNS}; do \
-	      a=`eval ls $$d/$$p 2>&1`; \
+	    for p in $(DOXYGEN_FILE_PATTERNS); do \
+	      a=`eval ls $${d}/$${p} 2>&1`; \
 	      if test $$? = 0; then \
 		error=; \
 		break; \
-	      fi; \
+	      fi \
 	    done; \
-	    if test "$$error" = 1; then break; fi; \
+	    if test "$${error}" = 1; then break; fi; \
 	  fi; \
 	done; \
-	if test "$$error" = 1; then \
-	  echo "Missing $$info $$missing for Doxygen input"; \
-	else \
-	  if test ! -d ../doc; then mkdir -p ../doc; fi; \
-	  cd ../doc; \
-	  $(cmtexe) filter $(ATLASDOXYGENROOT)/cmt/fragments/Doxyfile ../doc/Doxyfile; \
-	  doxygen; \
+	if test "$${error}" = 1; then \
+	  echo "Missing $${info} $${missing} for Doxygen input"; \
+	  exit 0; \
 	fi
+	@$(ATLASDOXYGENROOT)/cmt/doxygen.sh $(package) $(DOXYGEN_OUTPUT_DIRECTORY)
 
 ${CONSTITUENT}clean ::
 	@if test ! -d ../doc; then \
 
 #path_append PATH "" WIN32 "c:\doxygen-1.2.3\bin"
 
-macro DOXYGEN_OUTPUT_DIRECTORY "$(doc)Doxygen"
 #macro DOXYGEN_INPUT           "../src ../$(package) ../doc/MainPage.h"
 macro DOXYGEN_INPUT            "../src ../$(package)"
 
 macro DOXYGEN_FILE_PATTERNS    "*.cxx *.h"
 macro DOXYGEN_EXAMPLE_PATH     "../doc"
 macro DOXYGEN_EXAMPLE_PATTERNS "*.cxx"
-macro DOXYGEN_GENERATE_TAGFILE "../doc/$(package).tag"
 macro DOXYGEN_SORT_MEMBER_DOCS "NO"
 
 
 pattern -global doxygen \
-  macro <package>_tagfile "$(<package>_root)/doc/<package>.tag" ; \
-  macro_append DOXYGEN_TAGFILES " $(<package>_tagfile)" ; \
-  private ; \
-  macro_remove DOXYGEN_TAGFILES "$(<package>_tagfile)" ; \
-  public ; \
+  macro DOXYGEN_OUTPUT_DIRECTORY "$(CMTINSTALLAREA)/doc/<package>" ; \
   document doxygen doxygen<package> -group=doxygen
 
 make_fragment doxygen -header=doxygen_header
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.