[Dart-dev] DART/branches Revision: 13000

dart at ucar.edu dart at ucar.edu
Mon Mar 4 11:20:14 MST 2019


nancy at ucar.edu
2019-03-04 11:20:14 -0700 (Mon, 04 Mar 2019)
302
make this script look to see how many levels down we
are running this from so it gets the right number of
parent dirs.  also try making the documentation directory
in a ../documentation parallel to the work directory
instead of putting all the files into DART/documentation
which is a long ways away.




Modified: DART/branches/recam/documentation/doxygen/gendocs
===================================================================
--- DART/branches/recam/documentation/doxygen/gendocs	2019-03-04 18:15:03 UTC (rev 12999)
+++ DART/branches/recam/documentation/doxygen/gendocs	2019-03-04 18:20:14 UTC (rev 13000)
@@ -24,12 +24,31 @@
 
 model=`pwd | sed -e 's;/work;;' -e 's;^.*/;;' `
 umodel=`echo $model | tr '[a-z]' '[A-Z]' `
-toppath=`cd ../../../; pwd`
 
-destdir=$toppath/documentation/doxygen/$model
+# figure out how far down we are in the directory hierarchy.
+if [ -f        ../../../CHANGELOG ]; then
+   toppath=`cd ../../../; pwd`
+elif [ -f   ../../../../CHANGELOG ]; then
+   toppath=`cd ../../../../; pwd`
+elif [ -f   ../../CHANGELOG ]; then
+   toppath=`cd ../../; pwd`
+elif [ -f   ../../../../../CHANGELOG ]; then
+   toppath=`cd ../../../../../; pwd`
+elle
+   echo cannot find the top level DART directory
+   echo based on the current working directory.
+   exit -1
+fi
 
+# the first option puts all docs under DART/documentation.
+# try putting them into models/bob/documentation instead?
+# (this script needs to be run from a work directory)
+#destdir=$toppath/documentation/doxygen/$model
+destdir=../documentation
+doxygen_dir=$toppath/documentation/doxygen
+
 echo Generating documentation for all executables in the current directory
-echo for the model ${model}.   All html files will be located under the directory
+echo for ${model}.   All html files will be located under the directory
 echo $destdir
 
 if [ ! -d $destdir ]; then mkdir -p $destdir; fi
@@ -50,7 +69,7 @@
   # flist -> multiline path_names_xx content with \ after every
   # line except the last one
 
-  sed -e "s;THISDESTDIR;${destdir};" -e "s/THISEXECUTABLE/$exename/" -e "s/THISMODEL/$model/" -e "/^INPUT  /r flist" $template > doxygen-$exename
+  sed -e "s;THISDESTDIR;${destdir};" -e "s/THISEXECUTABLE/$exename/" -e "s/THISMODEL/$model/" -e "/^INPUT  /r flist" $doxygen_dir/$template > doxygen-$exename
 
   doxygen doxygen-$exename
   


More information about the Dart-dev mailing list