From 03db857ef78c230131b4b4f8569c0fe2670f6ddc Mon Sep 17 00:00:00 2001 From: rbencina Date: Sun, 6 Sep 2015 12:43:06 +0000 Subject: [PATCH] checkfiledocs.py: blacklist mingw-include from doc check --- doc/utils/checkfiledocs.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/doc/utils/checkfiledocs.py b/doc/utils/checkfiledocs.py index 663f5fe..1330eca 100644 --- a/doc/utils/checkfiledocs.py +++ b/doc/utils/checkfiledocs.py @@ -23,12 +23,18 @@ paHtmlDocDirectory = os.path.join( paRootDirectory, "doc", "html" ) ## $ cd doc/utils ## $ python checkfiledocs.py +def oneOf_a_in_b(a, b): + for x in a: + if x in b: + return True + return False + # recurse from top and return a list of all with the given # extensions. ignore .svn directories. return absolute paths -def recursiveFindFiles( top, extensions, includePaths ): +def recursiveFindFiles( top, extensions, dirBlacklist, includePaths ): result = [] for (dirpath, dirnames, filenames) in os.walk(top): - if not '.svn' in dirpath: + if not oneOf_a_in_b(dirBlacklist, dirpath): for f in filenames: if os.path.splitext(f)[1] in extensions: if includePaths: @@ -44,9 +50,9 @@ def doxygenHtmlDocFileName( sourceFile ): return sourceFile.replace( '_', '__' ).replace( '.', '_8' ) + '.html' -sourceFiles = recursiveFindFiles( os.path.join(paRootDirectory,"src"), [ '.c', '.h', '.cpp' ], True ); -sourceFiles += recursiveFindFiles( os.path.join(paRootDirectory,"include"), [ '.c', '.h', '.cpp' ], True ); -docFiles = recursiveFindFiles( paHtmlDocDirectory, [ '.html' ], False ); +sourceFiles = recursiveFindFiles( os.path.join(paRootDirectory,'src'), [ '.c', '.h', '.cpp' ], ['.svn', 'mingw-include'], True ); +sourceFiles += recursiveFindFiles( os.path.join(paRootDirectory,'include'), [ '.c', '.h', '.cpp' ], ['.svn'], True ); +docFiles = recursiveFindFiles( paHtmlDocDirectory, [ '.html' ], ['.svn'], False ); -- 2.43.0