Commits

carn...@4525493e-7705-40b1-a816-d608a930855b  committed c21621c

Improvements for reliability

  • Participants
  • Parent commits 8ec7fc2

Comments (0)

Files changed (4)

+2003-06-18  Christian Arnault  <arnault@lal.in2p3.fr>
+
+	* cmt/fragments/doxygen_header: 
+
+	* cmt/requirements: Add requirements to the list of included files.
+
+	* cmt/doxygen.sh: Generate a table of used packages
+	Generate a default mainpage.h when none exists
+	Filters out missing or empty input directories
+
 2003-06-05  Christian Arnault  <arnault@lal.in2p3.fr>
 
 	* cmt/requirements: Modification of the pattern for installing the

File cmt/doxygen.sh

 
-### set -x
+###set -x
 
 package=$1
-DOXYGEN_OUTPUT_DIRECTORY=$2
+shift
+DOXYGEN_OUTPUT_DIRECTORY=$1
+shift
+DOXYGEN_FILE_PATTERNS=$1
+shift
+DOXYGEN_INPUT=$1
+shift
 
 package_tagfile="${CMTINSTALLAREA}/doc/${package}.tag"
 DOXYGEN_GENERATE_TAGFILE=${package_tagfile}
 
 cmtexe=${CMTROOT}/${CMTBIN}/cmt.exe
 
+used_packages=""
+
 for f in `${cmtexe} show uses | grep -v '#' | sed -e 's#[ ][ ]*#:#g'` ; do
   ##echo $f
 
   if test "${p}" = "CMT"; then continue; fi
   if test "${prefix}" = "CMT"; then continue; fi
 
-  pp=`echo $f | sed -e 's#.*[(]##' -e 's#[)].*##'`
+  if test ! "${prefix}" = ""; then prefix="${prefix}/"; fi
+
+  pp=`echo $f | sed -e 's#:[(]no_auto_imports[)]##' -e 's#.*[(]##' -e 's#[)].*##'`
   ##echo "p=${p} prefix=${prefix} path=${pp}"
 
-  inpackage=`find ${pp}/${prefix}/${p} -name ${p}.tag | sed -e 's#//#/#g'`
+  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}"
+    echo "${p}.tag found in package ${pp}/${prefix}${p}"
     tagfiles="${tagfiles} ${inpackage}"
   fi
 
+  used_packages="${used_packages} ${prefix}${p}"
+
 done
 
 if test ! -d ${DOXYGEN_OUTPUT_DIRECTORY}; then mkdir -p ${DOXYGEN_OUTPUT_DIRECTORY}; fi
 
 ${cmtexe} filter ${ATLASDOXYGENROOT}/cmt/fragments/Doxyfile ../doc/Doxyfile
 
+a=`ls ../doc/*.h | grep -i mainpage.h`
+
+if test "${a}" = ""; then
+
+  cat <<EOF >../doc/mainpage.h
+/**
+
+@mainpage
+
+@htmlinclude used_packages.html
+
+@include requirements
+
+*/
+EOF
+
+fi
+
+ok=0
+doxygen_input=""
+for d in `echo ${DOXYGEN_INPUT}`; do
+  if test -d ${d}; then
+    for p in `echo ${DOXYGEN_FILE_PATTERNS}`; do
+      a=`eval ls ${d}/${p} 2>&1`
+      if test $? = 0; then
+        doxygen_input="${doxygen_input} ${d}"
+	break
+      fi
+    done
+  fi
+done
+
+if test "${doxygen_input}" = ""; then
+  echo "Empty input for Doxygen"
+  exit 0
+fi
+
 cat ../doc/Doxyfile | \
   sed -e 's#^TAGFILES.*#TAGFILES = '"${tagfiles}"'#' \
-      -e 's#^GENERATE_TAGFILE.*#GENERATE_TAGFILE = '"${package_tagfile}"'#'>t$$; mv t$$ ../doc/Doxyfile
+      -e 's#^GENERATE_TAGFILE.*#GENERATE_TAGFILE = '"${package_tagfile}"'#' \
+      -e 's#^INPUT[ ].*#INPUT = '"${doxygen_input}"'#'>t$$; mv t$$ ../doc/Doxyfile
+
+(echo "<center><table border='1'><tr><td><center><i>Used packages</i></center></td></tr>"; \
+ for f in `echo ${used_packages}`; do \
+   p=`basename ${f}`; \
+   echo "<tr><td><a href='../../${p}/html'>${f}</a></td></tr>"; \
+ done; \
+ echo "</table></center>") >|../doc/used_packages.html
 
 (cd ../doc; doxygen)
 

File cmt/fragments/doxygen_header

 ##
 
 ${CONSTITUENT} ::
-	@for d in $(DOXYGEN_INPUT); do \
-	  if test ! -d $${d}; then \
-	    info="directory"; \
-	    missing=$${d}; \
-	    error=1; \
-	    break; \
-	  else \
-	    info="files"; \
-	    error=1; \
-	    for p in $(DOXYGEN_FILE_PATTERNS); do \
-	      a=`eval ls $${d}/$${p} 2>&1`; \
-	      if test $$? = 0; then \
-		error=; \
-		break; \
-	      fi \
-	    done; \
-	    if test "$${error}" = 1; then break; fi; \
-	  fi; \
-	done; \
-	if test "$${error}" = 1; then \
-	  echo "Missing $${info} $${missing} for Doxygen input"; \
-	  exit 0; \
-	fi
-	@$(ATLASDOXYGENROOT)/cmt/doxygen.sh $(package) $(DOXYGEN_OUTPUT_DIRECTORY)
+	@$(ATLASDOXYGENROOT)/cmt/doxygen.sh $(package) $(DOXYGEN_OUTPUT_DIRECTORY) "$(DOXYGEN_FILE_PATTERNS)" "$(DOXYGEN_INPUT)"
 
 ${CONSTITUENT}clean ::
 	@if test ! -d ../doc; then \

File cmt/requirements

 
 #path_append PATH "" WIN32 "c:\doxygen-1.2.3\bin"
 
-#macro DOXYGEN_INPUT           "../src ../$(package) ../doc/MainPage.h"
-macro DOXYGEN_INPUT            "../src ../$(package)"
+macro DOXYGEN_INPUT            "../src ../$(package) ../doc"
 
 macro DOXYGEN_FILE_PATTERNS    "*.cxx *.h"
-macro DOXYGEN_EXAMPLE_PATH     "../doc"
-macro DOXYGEN_EXAMPLE_PATTERNS "*.cxx"
+macro DOXYGEN_EXAMPLE_PATH     "../doc ../cmt"
+macro DOXYGEN_EXAMPLE_PATTERNS "*.cxx *.html requirements"
 macro DOXYGEN_SORT_MEMBER_DOCS "NO"