diff options
Diffstat (limited to 'SCons/Tool')
-rw-r--r-- | SCons/Tool/compilation_db.py | 4 | ||||
-rw-r--r-- | SCons/Tool/compilation_db.xml | 14 | ||||
-rw-r--r-- | SCons/Tool/packaging/__init__.py | 2 | ||||
-rw-r--r-- | SCons/Tool/packaging/msi.py | 2 | ||||
-rw-r--r-- | SCons/Tool/tex.py | 25 |
5 files changed, 27 insertions, 20 deletions
diff --git a/SCons/Tool/compilation_db.py b/SCons/Tool/compilation_db.py index 52442de..d20d171 100644 --- a/SCons/Tool/compilation_db.py +++ b/SCons/Tool/compilation_db.py @@ -135,7 +135,7 @@ def write_compilation_db(target, source, env): entries = [] use_abspath = env['COMPILATIONDB_USE_ABSPATH'] in [True, 1, 'True', 'true'] - use_path_filter = env.subst('$COMPILATIONDB_USE_PATH_FILTER') + use_path_filter = env.subst('$COMPILATIONDB_PATH_FILTER') for s in __COMPILATION_DB_ENTRIES: entry = s.read() @@ -248,7 +248,7 @@ def generate(env, **kwargs): ) env['COMPILATIONDB_USE_ABSPATH'] = False - env['COMPILATIONDB_USE_PATH_FILTER'] = '' + env['COMPILATIONDB_PATH_FILTER'] = '' def exists(env): diff --git a/SCons/Tool/compilation_db.xml b/SCons/Tool/compilation_db.xml index 95d70db..40a104e 100644 --- a/SCons/Tool/compilation_db.xml +++ b/SCons/Tool/compilation_db.xml @@ -38,7 +38,7 @@ See its __doc__ string for a discussion of the format. <item>__COMPILATIONDB_ENV</item> --> <item>COMPILATIONDB_USE_ABSPATH</item> - <item>COMPILATIONDB_USE_PATH_FILTER</item> + <item>COMPILATIONDB_PATH_FILTER</item> </sets> </tool> @@ -63,10 +63,10 @@ env.CompilationDatabase('my_output.json') </para> <para> You should not specify source files. The &b-CompilationDatabase; builder instruments SCons to collect them from all - the C, C++, assembly source/target pairs. + the C, C++, assembly source/output pairs. </para> <para> - NOTE: You must load the &t-compilation_db; tool prior to specifying any part of your build or some source/target + NOTE: You must load the &t-compilation_db; tool prior to specifying any part of your build or some source/output files will not show up in your output file. </para> <para> @@ -96,15 +96,17 @@ env.CompilationDatabase('my_output.json') </summary> </cvar> - <cvar name="COMPILATIONDB_USE_PATH_FILTER"> + <cvar name="COMPILATIONDB_PATH_FILTER"> <summary> <para> This is a string which instructs &b-link-CompilationDatabase; to only include entries where the <literal>output</literal> member - matches the pattern in the filter string using fnmatch. + matches the pattern in the filter string using fnmatch, which + uses glob style wildcards. + </para> <para> - The default value is an empty string '', which means no entries will be filtered. + The default value is an empty string '', which disables filtering. </para> </summary> </cvar> diff --git a/SCons/Tool/packaging/__init__.py b/SCons/Tool/packaging/__init__.py index c45a96b..c378909 100644 --- a/SCons/Tool/packaging/__init__.py +++ b/SCons/Tool/packaging/__init__.py @@ -35,7 +35,7 @@ import SCons.Environment from SCons.Errors import UserError, SConsEnvironmentError from SCons.Script import AddOption, GetOption from SCons.Util import is_List, make_path_relative -from SCons.Variables import * +from SCons.Variables import EnumVariable from SCons.Warnings import warn, SConsWarning diff --git a/SCons/Tool/packaging/msi.py b/SCons/Tool/packaging/msi.py index defb5c6..458e81f 100644 --- a/SCons/Tool/packaging/msi.py +++ b/SCons/Tool/packaging/msi.py @@ -32,7 +32,7 @@ import SCons from SCons.Action import Action from SCons.Builder import Builder -from xml.dom.minidom import * +from xml.dom.minidom import Document from xml.sax.saxutils import escape from SCons.Tool.packaging import stripinstallbuilder diff --git a/SCons/Tool/tex.py b/SCons/Tool/tex.py index 1d61e2d..0ca7e2d 100644 --- a/SCons/Tool/tex.py +++ b/SCons/Tool/tex.py @@ -429,18 +429,23 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None return result # Now decide if latex will need to be run again due to newglossary command. - for ig in range(len(newglossary_suffix)): - if check_MD5(suffix_nodes[newglossary_suffix[ig][2]],newglossary_suffix[ig][2]) or (count == 1): + for ng in newglossary_suffix: + if check_MD5(suffix_nodes[ng[2]], ng[2]) or (count == 1): # We must run makeindex if Verbose: print("Need to run makeindex for newglossary") - newglfile = suffix_nodes[newglossary_suffix[ig][2]] - MakeNewGlossaryAction = SCons.Action.Action("$MAKENEWGLOSSARYCOM ${SOURCE.filebase}%s -s ${SOURCE.filebase}.ist -t ${SOURCE.filebase}%s -o ${SOURCE.filebase}%s" % (newglossary_suffix[ig][2],newglossary_suffix[ig][0],newglossary_suffix[ig][1]), "$MAKENEWGLOSSARYCOMSTR") + newglfile = suffix_nodes[ng[2]] + MakeNewGlossaryAction = SCons.Action.Action( + "$MAKENEWGLOSSARYCOM ${SOURCE.filebase}%s -s ${SOURCE.filebase}.ist -t ${SOURCE.filebase}%s -o ${SOURCE.filebase}%s" + % (ng[2], ng[0], ng[1]), + "$MAKENEWGLOSSARYCOMSTR", + ) result = MakeNewGlossaryAction(newglfile, newglfile, env) if result != 0: - check_file_error_message('%s (newglossary)' % env['MAKENEWGLOSSARY'], - newglossary_suffix[ig][0]) + check_file_error_message( + '%s (newglossary)' % env['MAKENEWGLOSSARY'], ng[0] + ) return result # Now decide if latex needs to be run yet again to resolve warnings. @@ -786,8 +791,8 @@ def tex_emitter_core(target, source, env, graphics_extensions): file_basename = os.path.join(targetdir, 'bu*.aux') file_list = glob.glob(file_basename) # remove the suffix '.aux' - for i in range(len(file_list)): - file_list.append(SCons.Util.splitext(file_list[i])[0]) + for fl in file_list.copy(): + file_list.append(SCons.Util.splitext(fl)[0]) # for multibib we need a list of files if suffix_list[-1] == 'multibib': for multibibmatch in multibib_re.finditer(content): @@ -797,8 +802,8 @@ def tex_emitter_core(target, source, env, graphics_extensions): baselist = multibibmatch.group(1).split(',') if Verbose: print("multibib list ", baselist) - for i in range(len(baselist)): - file_list.append(os.path.join(targetdir, baselist[i])) + for bl in baselist: + file_list.append(os.path.join(targetdir, bl)) # now define the side effects for file_name in file_list: for suffix in suffix_list[:-1]: |