Commits

Anonymous committed 0de3eac

Protecting against missing directory or files

  • Participants
  • Parent commits a7703fe

Comments (0)

Files changed (2)

+2002-11-12  Christian Arnault  <carnault@lxplus032.cern.ch>
+
+	* cmt/fragments/doxygen_header: Protecting against missing directory or files
+
 2002-11-07  Christian Arnault  <carnault@lxplus032.cern.ch>
 
 	* requirements: Rename Doxygen to AtlasDoxygen

File cmt/fragments/doxygen_header

+
+##
+## DOXYGEN_INPUT            "../src ../$(package)"
+## DOXYGEN_FILE_PATTERNS    "*.cxx *.h"
+##
 
 ${CONSTITUENT} ::
-	@if test ! -d ../doc; then mkdir -p ../doc; fi
-	cd ../doc; \
-	$(cmtexe) filter $(DOXYGENROOT)/cmt/fragments/Doxyfile ../doc/Doxyfile; \
-	doxygen
+	@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"; \
+	else \
+	  if test ! -d ../doc; then mkdir -p ../doc; fi; \
+	  cd ../doc; \
+	  $(cmtexe) filter $(ATLASDOXYGENROOT)/cmt/fragments/Doxyfile ../doc/Doxyfile; \
+	  doxygen; \
+	fi
 
+${CONSTITUENT}clean ::
+	@if test ! -d ../doc; then \
+	  /bin/rm -f Doxyfile; \
+	fi
 
+