diff options
author | Mats Wichmann <mats@linux.com> | 2020-05-11 15:13:46 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2020-05-11 15:31:00 (GMT) |
commit | baa4f2d9d14d21195688bbba76647959d0032f03 (patch) | |
tree | 30ef3cd95f95cd446d4070cdbbc373fb02ab0e1d /bin | |
parent | 5f0548f83fea72c7d7bf431f320e717547fa30b4 (diff) | |
download | SCons-baa4f2d9d14d21195688bbba76647959d0032f03.zip SCons-baa4f2d9d14d21195688bbba76647959d0032f03.tar.gz SCons-baa4f2d9d14d21195688bbba76647959d0032f03.tar.bz2 |
doc generation: fix another src->SCons transition
Another regen of generated files, as there were a
couple of changes that affected those.
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'bin')
-rw-r--r-- | bin/docs-update-generated.py | 20 | ||||
-rw-r--r-- | bin/scons-proc.py | 18 |
2 files changed, 20 insertions, 18 deletions
diff --git a/bin/docs-update-generated.py b/bin/docs-update-generated.py index e26655a..3687896 100644 --- a/bin/docs-update-generated.py +++ b/bin/docs-update-generated.py @@ -23,7 +23,7 @@ def argpair(key): return arg def generate_all(): - """ Scan for XML files in the src directory and call scons-proc.py + """ Scan for XML files in the SCons directory and call scons-proc.py to generate the *.gen/*.mod files from it. """ flist = [] @@ -43,13 +43,17 @@ def generate_all(): print("Couldn't create destination folder %s! Exiting..." % gen_folder) return # Call scons-proc.py - cp = subprocess.run([sys.executable, - os.path.join('bin','scons-proc.py'), - '-b', argpair('builders'), - '-f', argpair('functions'), - '-t', argpair('tools'), - '-v', argpair('variables')] + flist, - shell=False) + cp = subprocess.run( + [ + sys.executable, + os.path.join('bin', 'scons-proc.py'), + '-b', argpair('builders'), + '-f', argpair('functions'), + '-t', argpair('tools'), + '-v', argpair('variables'), + ] + flist, + shell=False, + ) # No-op: scons-proc doesn't actually set an exit code at the moment. if cp.returncode: diff --git a/bin/scons-proc.py b/bin/scons-proc.py index 30832a0..9ec4efd 100644 --- a/bin/scons-proc.py +++ b/bin/scons-proc.py @@ -93,12 +93,12 @@ Regular_Entities_Header = """\ Link_Entities_Header = """\ <!-- - Entities that are links to the %s entries in the appendix. + Entities that are links to the %s entries --> """ -class SCons_XML(object): +class SCons_XML: def __init__(self, entries, **kw): self.values = entries for k, v in kw.items(): @@ -206,8 +206,6 @@ class SCons_XML(object): (v.prefix, v.idfunc(), v.tag, SConsDoc.dbxsd, v.entityfunc(), v.tag)) f.write('\n') - f.write(Warning) - f.write('\n') f.write(Link_Entities_Header % description) f.write('\n') for v in self.values: @@ -222,8 +220,6 @@ class SCons_XML(object): (v.prefix, v.idfunc(), v.prefix, v.idfunc(), SConsDoc.dbxsd, v.tag, v.entityfunc(), v.tag)) - f.write('\n') - f.write(Warning) f.close() class Proxy(object): @@ -232,8 +228,10 @@ class Proxy(object): self.__subject = subject def __getattr__(self, name): - """Retrieve an attribute from the wrapped object. If the named - attribute doesn't exist, AttributeError is raised""" + """Retrieve an attribute from the wrapped object. + + If the named attribute doesn't exist, AttributeError is raised + """ return getattr(self.__subject, name) def get(self): @@ -279,7 +277,7 @@ class Builder(SConsThing): # build term for env. method mterm = stf.newNode("term") - inst = stf.newSubNode(mterm, "parameter") + inst = stf.newSubNode(mterm, "replaceable") stf.setText(inst, "env") stf.setTail(inst, ".") # we could use <function> here, but it's a "method" @@ -415,7 +413,7 @@ write_output_files(h, buildersfiles, functionsfiles, toolsfiles, # Step 2: Validating all input files print("Validating files against SCons XSD...") -if SConsDoc.validate_all_xml(['src']): +if SConsDoc.validate_all_xml(['SCons']): print("OK") else: print("Validation failed! Please correct the errors above and try again.") |