]> Repos - portaudio/commitdiff
checkfiledocs.py: blacklist mingw-include from doc check
authorrbencina <rbencina@0f58301d-fd10-0410-b4af-bbb618454e57>
Sun, 6 Sep 2015 12:43:06 +0000 (12:43 +0000)
committerrbencina <rbencina@0f58301d-fd10-0410-b4af-bbb618454e57>
Sun, 6 Sep 2015 12:43:06 +0000 (12:43 +0000)
doc/utils/checkfiledocs.py

index 663f5fe873deb77c1260d0f06cbf2e62e770fbde..1330eca55efb8855985d28930ce0959e5367727e 100644 (file)
@@ -23,12 +23,18 @@ paHtmlDocDirectory = os.path.join( paRootDirectory, "doc", "html" )
 ##  $ cd doc/utils\r
 ##  $ python checkfiledocs.py\r
 \r
+def oneOf_a_in_b(a, b):\r
+    for x in a:\r
+        if x in b:\r
+            return True\r
+    return False\r
+\r
 # recurse from top and return a list of all with the given\r
 # extensions. ignore .svn directories. return absolute paths\r
-def recursiveFindFiles( top, extensions, includePaths ):\r
+def recursiveFindFiles( top, extensions, dirBlacklist, includePaths ):\r
     result = []\r
     for (dirpath, dirnames, filenames) in os.walk(top):\r
-        if not '.svn' in dirpath:\r
+        if not oneOf_a_in_b(dirBlacklist, dirpath):\r
             for f in filenames:\r
                 if os.path.splitext(f)[1] in extensions:\r
                     if includePaths:\r
@@ -44,9 +50,9 @@ def doxygenHtmlDocFileName( sourceFile ):
     return sourceFile.replace( '_', '__' ).replace( '.', '_8' ) + '.html'\r
 \r
 \r
-sourceFiles = recursiveFindFiles( os.path.join(paRootDirectory,"src"), [ '.c', '.h', '.cpp' ], True );\r
-sourceFiles += recursiveFindFiles( os.path.join(paRootDirectory,"include"), [ '.c', '.h', '.cpp' ], True );\r
-docFiles = recursiveFindFiles( paHtmlDocDirectory, [ '.html' ], False );\r
+sourceFiles = recursiveFindFiles( os.path.join(paRootDirectory,'src'), [ '.c', '.h', '.cpp' ], ['.svn', 'mingw-include'], True );\r
+sourceFiles += recursiveFindFiles( os.path.join(paRootDirectory,'include'), [ '.c', '.h', '.cpp' ], ['.svn'], True );\r
+docFiles = recursiveFindFiles( paHtmlDocDirectory, [ '.html' ], ['.svn'], False );\r
 \r
 \r
 \r