[DEV] manage release and debug, better exlusion ...

This commit is contained in:
Edouard DUPIN 2016-04-07 21:30:16 +02:00
parent 46cb9c534d
commit 72d641ef97
2 changed files with 57 additions and 30 deletions

View File

@ -38,7 +38,7 @@ PROJECT_NAME = "Test Project"
# could be handy for archiving the generated documentation or if some version # could be handy for archiving the generated documentation or if some version
# control system is used. # control system is used.
PROJECT_NUMBER = 1.0.0 PROJECT_NUMBER =
# Using the PROJECT_BRIEF tag one can provide an optional one line description # Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a # for a project that appears at the top of each page and should give viewer a
@ -768,7 +768,7 @@ WARN_LOGFILE =
# spaces. # spaces.
# Note: If this tag is empty the current directory is searched. # Note: If this tag is empty the current directory is searched.
INPUT = src INPUT =
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@ -790,9 +790,6 @@ INPUT_ENCODING = UTF-8
FILE_PATTERNS = FILE_PATTERNS =
#FILE_PATTERNS += *.c *.cpp
FILE_PATTERNS += *.h *.hxx
FILE_PATTERNS += *.md *.markdown
# The RECURSIVE tag can be used to specify whether or not subdirectories should # The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well. # be searched for input files as well.
@ -823,7 +820,7 @@ EXCLUDE_SYMLINKS = NO
# Note that the wildcards are matched against the file with absolute path, so to # Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/* # exclude all test directories for example use the pattern */test/*
EXCLUDE_PATTERNS = debug.h EXCLUDE_PATTERNS =
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the # (namespaces, classes, functions, etc.) that should be excluded from the
@ -2379,4 +2376,4 @@ GENERATE_LEGEND = YES
DOT_CLEANUP = YES DOT_CLEANUP = YES
ALIASES += license="@note License:\n" ALIASES += license="@note License:\n"
ALIASES += not_in_doc="@brief No documentation done\n @internal\n"

View File

@ -40,13 +40,16 @@ class Module:
# Dependency list: # Dependency list:
self.depends = [] self.depends = []
self.define = [] self.define = []
self.version = [0,0] self.version = None
self.full_name = "No Title" self.full_name = "No Title"
self.website = "" self.website = ""
self.website_source = "" self.website_source = ""
self.path = [] self.path = []
self.data_path = [] self.data_path = []
self.sample_path = [] self.sample_path = []
self.exclude_symbole = []
self.file_patterns = []
self.exclude_file = []
# The module has been already build ... # The module has been already build ...
self.isbuild = False self.isbuild = False
@ -98,6 +101,10 @@ class Module:
data += "# -- doxy auto-added section\n" data += "# -- doxy auto-added section\n"
data += "# -----------------------------------\n" data += "# -----------------------------------\n"
data += 'PROJECT_NAME = "' + str(self.full_name) + '"\n' data += 'PROJECT_NAME = "' + str(self.full_name) + '"\n'
if self.version != None:
data += 'PROJECT_NUMBER = "' + tools.version_to_string(self.version) + '"\n'
data += 'OUTPUT_DIRECTORY = "' + str(os.path.join(target.get_final_path(), self.name)) + '"\n' data += 'OUTPUT_DIRECTORY = "' + str(os.path.join(target.get_final_path(), self.name)) + '"\n'
data += 'GENERATE_TAGFILE = "' + str(os.path.join(target.get_final_path(), self.name + ".tag")) + '"\n' data += 'GENERATE_TAGFILE = "' + str(os.path.join(target.get_final_path(), self.name + ".tag")) + '"\n'
for elem in self.data_path: for elem in self.data_path:
@ -109,6 +116,7 @@ class Module:
else: else:
data += os.path.join(tools.get_current_path(self.origin_file), elem) data += os.path.join(tools.get_current_path(self.origin_file), elem)
data += '"\n' data += '"\n'
for elem in self.sample_path: for elem in self.sample_path:
if len(elem) == 0: if len(elem) == 0:
continue continue
@ -118,25 +126,44 @@ class Module:
else: else:
data += os.path.join(tools.get_current_path(self.origin_file), elem) data += os.path.join(tools.get_current_path(self.origin_file), elem)
data += '"\n' data += '"\n'
if len(self.path) != 0:
data += 'INPUT = \n' for elem in self.path:
for elem in self.path: if len(elem) == 0:
if len(elem) == 0: continue
continue data += 'INPUT += "'
data += 'INPUT += "' if elem[0] == "/":
if elem[0] == "/": data += str(elem)
data += str(elem) else:
else: data += os.path.join(tools.get_current_path(self.origin_file), elem)
data += os.path.join(tools.get_current_path(self.origin_file), elem) data += '"\n'
data += '"\n'
for elem in self.exclude_symbole:
if len(elem) == 0:
continue
data += 'EXCLUDE_SYMBOLS += "' + str(elem) + '"\n'
for elem in self.file_patterns:
if len(elem) == 0:
continue
data += 'FILE_PATTERNS += ' + str(elem) + '\n'
for elem in self.exclude_file:
if len(elem) == 0:
continue
data += 'EXCLUDE_PATTERNS += "' + str(elem) + '"\n'
for elem in self.define: for elem in self.define:
if len(elem) == 0:
continue
data += 'PREDEFINED += ' + str(elem) + '=1\n' data += 'PREDEFINED += ' + str(elem) + '=1\n'
if len(self.sub_heritage_list.list_heritage) > 0:
data += 'TAGFILES =' for element in self.sub_heritage_list.list_heritage:
for element in self.sub_heritage_list.list_heritage: data += "TAGFILES += " + os.path.join(target.get_final_path(), element.name + ".tag")
data += " \\\n" if target.config["mode"] == "release":
data += ' ' + os.path.join(target.get_final_path(), element.name + ".tag") data += '=' + target.get_module(element.name).website
else:
data += '=' + os.path.join(target.get_final_path(), element.name, "html") data += '=' + os.path.join(target.get_final_path(), element.name, "html")
data += "\n"
data += '\n\n\n' data += '\n\n\n'
tools.file_write_data(filename_dox, data) tools.file_write_data(filename_dox, data)
multiprocess.run_command("doxygen " + filename_dox) multiprocess.run_command("doxygen " + filename_dox)
@ -165,12 +192,6 @@ class Module:
def set_website_sources(self, val): def set_website_sources(self, val):
self.website_source = val self.website_source = val
def set_path(self, val):
if type(val) == list:
tools.list_append_to(self.path, val, True)
else:
tools.list_append_to(self.path, [val], True)
def add_path(self, list): def add_path(self, list):
tools.list_append_to(self.path, list, True) tools.list_append_to(self.path, list, True)
@ -186,6 +207,15 @@ class Module:
def add_module_define(self, list): def add_module_define(self, list):
tools.list_append_to(self.define, list, True) tools.list_append_to(self.define, list, True)
def add_exclude_symbols(self, list):
tools.list_append_to(self.exclude_symbole, list, True)
def add_exclude_file(self, list):
tools.list_append_to(self.exclude_file, list, True)
def add_file_patterns(self, list):
tools.list_append_to(self.file_patterns, list, True)
def print_list(self, description, input_list): def print_list(self, description, input_list):
if type(input_list) == list: if type(input_list) == list:
if len(input_list) > 0: if len(input_list) > 0: