소스 검색

doc/doxygen/dev: improve script files

Nathalie Furmento 10 년 전
부모
커밋
eb8f932cc4
3개의 변경된 파일20개의 추가작업 그리고 6개의 파일을 삭제
  1. 6 4
      doc/doxygen/dev/checkDoc.sh
  2. 2 2
      doc/doxygen/dev/starpu_check_documented.py
  3. 12 0
      doc/doxygen/dev/starpu_check_undocumented.sh

+ 6 - 4
doc/doxygen/dev/checkDoc.sh

@@ -1,6 +1,8 @@
 #!/bin/bash
 
-x=$(grep ingroup chapters/api/*|awk -F':' '{print $2}'| awk 'NF != 2')
+dirname=$(dirname $0)
+
+x=$(grep ingroup $dirname/../chapters/api/*.doxy $dirname/../chapters/api/sc_hypervisor/*.doxy |awk -F':' '{print $2}'| awk 'NF != 2')
 if test -n "$x" ; then
     echo Errors on group definitions
     echo $x
@@ -8,11 +10,11 @@ fi
 
 echo
 echo "Defined groups"
-grep ingroup chapters/api/*|awk -F':' '{print $2}'| awk 'NF == 2'|sort|uniq
+grep ingroup $dirname/../chapters/api/*.doxy $dirname/../chapters/api/sc_hypervisor/*.doxy|awk -F':' '{print $2}'| awk 'NF == 2'|sort|uniq
 echo
 
-for f in ../../build/doc/doxygen/latex/*tex ; do
-    x=$(grep $(basename $f .tex) refman.tex)
+for f in $dirname/../../../build/doc/doxygen/latex/*tex ; do
+    x=$(grep $(basename $f .tex) $dirname/../refman.tex)
     if test -z "$x" ; then
 	echo Error. $f not included in refman.tex
     fi

+ 2 - 2
doc/doxygen/dev/starpu_check_documented.py

@@ -30,9 +30,9 @@ for docfile in os.listdir(docfile_dir):
     if docfile.count(".doxy"):
         loadFunctionsAndDatatypes(functions, datatypes, docfile_dir+docfile)
 
-incfiles=dirname+"/../../../include/*.h " + dirname + "/../../../mpi/include/*.h " + dirname + "/../../../starpufft/*h " + dirname + "/../../../sc_hypervisor/include/*.h " + dirname + "/../../../include/starpu_config.h.in"
+incfiles=dirname+"/../../../include/*.h " + dirname + "/../../../mpi/include/*.h " + dirname + "/../../../starpufft/include/*.h " + dirname + "/../../../sc_hypervisor/include/*.h " + dirname + "/../../../include/starpu_config.h.in"
 for function in functions:
-    x = os.system("fgrep -l \"" + function[0] + "\" " + incfiles + " > /dev/null")
+    x = os.system("sed 's/ *STARPU_ATTRIBUTE_UNUSED *//g' " + incfiles + "| sed 's/ STARPU_WARN_UNUSED_RESULT//g' | fgrep \"" + function[0] + "\" > /dev/null")
     if x != 0:
         print "Function <" + bcolors.FAILURE + function[0] + bcolors.NORMAL + "> documented in <" + function[1] + "> does not exist in StarPU's API"
 

+ 12 - 0
doc/doxygen/dev/starpu_check_undocumented.sh

@@ -28,6 +28,18 @@ STARPU_H_FILES=$(find $dirname/../../../include $dirname/../../../mpi/include -n
 SC_H_FILES=$(find $dirname/../../../sc_hypervisor/include -name '*.h')
 SRC="$dirname/../../../src $dirname/../../../mpi/src $dirname/../../../sc_hypervisor/src"
 
+if [ "$1" == "--starpu" ]
+then
+    SC_H_FILES="$0"
+    shift
+else
+    if [ "$1" == "--sc" ]
+    then
+	STARPU_H_FILES="$0"
+	shift
+    fi
+fi
+
 if [ "$1" == "--func" ] || [ "$1" == "" ] ; then
     starpu_functions=$(spatch -very_quiet -sp_file $dirname/starpu_funcs.cocci $STARPU_H_FILES)
     sc_functions=$(spatch -very_quiet -sp_file $dirname/sc_funcs.cocci $SC_H_FILES)