From baa4f2d9d14d21195688bbba76647959d0032f03 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Mon, 11 May 2020 09:13:46 -0600 Subject: 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 --- bin/docs-update-generated.py | 20 ++++---- bin/scons-proc.py | 18 ++++--- doc/generated/builders.gen | 110 +++++++++++++++++++++---------------------- doc/generated/builders.mod | 10 +--- doc/generated/functions.mod | 10 +--- doc/generated/tools.mod | 10 +--- doc/generated/variables.mod | 10 +--- 7 files changed, 79 insertions(+), 109 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 = """\ """ -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 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.") diff --git a/doc/generated/builders.gen b/doc/generated/builders.gen index 20e5215..f115e5b 100644 --- a/doc/generated/builders.gen +++ b/doc/generated/builders.gen @@ -14,7 +14,7 @@ CFile() - env.CFile() + env.CFile() Builds a C source file given a lex (.l) or yacc (.y) input file. @@ -35,7 +35,7 @@ env.CFile(target = 'bar', source = 'bar.y') Command() - env.Command() + env.Command() The Command "Builder" is actually a function that looks like a Builder, @@ -52,7 +52,7 @@ for the calling syntax and details. CXXFile() - env.CXXFile() + env.CXXFile() Builds a C++ source file given a lex (.ll) or yacc (.yy) @@ -74,7 +74,7 @@ env.CXXFile(target = 'bar', source = 'bar.yy') DocbookEpub() - env.DocbookEpub() + env.DocbookEpub() A pseudo-Builder, providing a Docbook toolchain for EPUB output. @@ -95,7 +95,7 @@ env.DocbookEpub('manual') DocbookHtml() - env.DocbookHtml() + env.DocbookHtml() A pseudo-Builder, providing a Docbook toolchain for HTML output. @@ -112,7 +112,7 @@ env.DocbookHtml('manual') DocbookHtmlChunked() - env.DocbookHtmlChunked() + env.DocbookHtmlChunked() A pseudo-Builder, providing a Docbook toolchain for chunked HTML output. It supports the base.dir parameter. The @@ -147,7 +147,7 @@ your files get renamed only! DocbookHtmlhelp() - env.DocbookHtmlhelp() + env.DocbookHtmlhelp() A pseudo-Builder, providing a Docbook toolchain for HTMLHELP output. Its basic syntax is: @@ -183,7 +183,7 @@ your files get renamed only! DocbookMan() - env.DocbookMan() + env.DocbookMan() A pseudo-Builder, providing a Docbook toolchain for Man page output. Its basic syntax is: @@ -201,7 +201,7 @@ set from the refname entries in your XML source. DocbookPdf() - env.DocbookPdf() + env.DocbookPdf() A pseudo-Builder, providing a Docbook toolchain for PDF output. @@ -222,7 +222,7 @@ env.DocbookPdf('manual') DocbookSlidesHtml() - env.DocbookSlidesHtml() + env.DocbookSlidesHtml() A pseudo-Builder, providing a Docbook toolchain for HTML slides output. @@ -256,7 +256,7 @@ your files get renamed only! DocbookSlidesPdf() - env.DocbookSlidesPdf() + env.DocbookSlidesPdf() A pseudo-Builder, providing a Docbook toolchain for PDF slides output. @@ -276,7 +276,7 @@ env.DocbookSlidesPdf('manual') DocbookXInclude() - env.DocbookXInclude() + env.DocbookXInclude() A pseudo-Builder, for resolving XIncludes in a separate processing step. @@ -288,7 +288,7 @@ env.DocbookXInclude('manual_xincluded.xml', 'manual.xml') DocbookXslt() - env.DocbookXslt() + env.DocbookXslt() A pseudo-Builder, applying a given XSL transformation to the input file. @@ -304,7 +304,7 @@ to be set. DVI() - env.DVI() + env.DVI() Builds a .dvi file from a .tex, @@ -358,7 +358,7 @@ env.DVI(target = 'ccc.dvi', source = 'ccc.latex') Gs() - env.Gs() + env.Gs() A Builder for explicitly calling the gs executable. Depending on the underlying OS, the different names gs, @@ -374,7 +374,7 @@ env.Gs('cover.jpg','scons-scons.pdf', Install() - env.Install() + env.Install() Installs one or more source files or directories in the specified target, @@ -422,7 +422,7 @@ and the chapters on Installing Files and on Alias Targets). InstallAs() - env.InstallAs() + env.InstallAs() Installs one or more source files or directories to specific names, @@ -450,7 +450,7 @@ See the note under Install. InstallVersionedLib() - env.InstallVersionedLib() + env.InstallVersionedLib() Installs a versioned shared library. The symlinks appropriate to the architecture will be generated based on symlinks of the source library. @@ -469,7 +469,7 @@ See the note under Install. Jar() - env.Jar() + env.Jar() Builds a Java archive (.jar) file from the specified list of sources. @@ -513,7 +513,7 @@ env.Jar(target = 'bar.jar', Java() - env.Java() + env.Java() Builds one or more Java class files. The sources may be any combination of explicit @@ -588,7 +588,7 @@ env['ENV']['LANG'] = 'en_GB.UTF-8' JavaH() - env.JavaH() + env.JavaH() Builds C header and source files for implementing Java native methods. @@ -640,7 +640,7 @@ env.JavaH( Library() - env.Library() + env.Library() A synonym for the StaticLibrary @@ -650,7 +650,7 @@ builder method. LoadableModule() - env.LoadableModule() + env.LoadableModule() On most systems, this is the same as @@ -662,7 +662,7 @@ this creates a loadable module bundle. M4() - env.M4() + env.M4() Builds an output file from an M4 input file. This uses a default $M4FLAGS value of @@ -680,7 +680,7 @@ env.M4(target = 'foo.c', source = 'foo.c.m4') Moc() - env.Moc() + env.Moc() Builds an output file from a moc input file. Moc input files are either header files or cxx files. This builder is only available after using the @@ -696,7 +696,7 @@ env.Moc('foo.cpp') # generates foo.moc MOFiles() - env.MOFiles() + env.MOFiles() This builder belongs to msgfmt tool. The builder compiles PO files to MO files. @@ -746,7 +746,7 @@ Compile files for languages defined in LINGUAS file MSVSProject() - env.MSVSProject() + env.MSVSProject() Builds a Microsoft Visual Studio project file, and by default builds a solution file as well. @@ -1100,7 +1100,7 @@ env.MSVSProject(target='Bar' + env['MSVSPROJECTSUFFIX'], MSVSSolution() - env.MSVSSolution() + env.MSVSSolution() Builds a Microsoft Visual Studio solution file. This builds a Visual Studio solution file, based on the @@ -1161,7 +1161,7 @@ env.MSVSSolution( Object() - env.Object() + env.Object() A synonym for the StaticObject @@ -1171,7 +1171,7 @@ builder method. Package() - env.Package() + env.Package() Builds a Binary Package of the given source files. @@ -1246,7 +1246,7 @@ env.Package( PCH() - env.PCH() + env.PCH() Builds a Microsoft Visual C++ precompiled header. Calling this builder method @@ -1266,7 +1266,7 @@ env['PCH'] = env.PCH('StdAfx.cpp')[0] PDF() - env.PDF() + env.PDF() Builds a .pdf file from a .dvi input file @@ -1290,7 +1290,7 @@ env.PDF(target = 'bbb', source = 'bbb.dvi') POInit() - env.POInit() + env.POInit() This builder belongs to msginit tool. The builder initializes missing PO file(s) if $POAUTOINIT is set. If @@ -1391,7 +1391,7 @@ which has same efect as: PostScript() - env.PostScript() + env.PostScript() Builds a .ps file from a .dvi input file @@ -1415,7 +1415,7 @@ env.PostScript(target = 'bbb', source = 'bbb.dvi') POTUpdate() - env.POTUpdate() + env.POTUpdate() The builder belongs to xgettext tool. The builder updates target POT file if exists or creates one if it doesn't. The node is @@ -1580,7 +1580,7 @@ then the messages.pot will contain POUpdate() - env.POUpdate() + env.POUpdate() The builder belongs to msgmerge tool. The builder updates PO files with msgmerge(1), or initializes @@ -1692,7 +1692,7 @@ pre-configured via environment. Program() - env.Program() + env.Program() Builds an executable given one or more object files or C, C++, D, or Fortran source files. @@ -1721,7 +1721,7 @@ env.Program(target = 'foo', source = ['foo.o', 'bar.c', 'baz.f']) ProgramAllAtOnce() - env.ProgramAllAtOnce() + env.ProgramAllAtOnce() Builds an executable from D sources without first creating individual objects for each file. @@ -1747,7 +1747,7 @@ env.Program(target = 'foo', source = ['foo.o', 'bar.c', 'baz.f']) RES() - env.RES() + env.RES() Builds a Microsoft Visual C++ resource file. This builder method is only provided @@ -1768,7 +1768,7 @@ env.RES('resource.rc') RMIC() - env.RMIC() + env.RMIC() Builds stub and skeleton class files for remote objects @@ -1810,7 +1810,7 @@ env.RMIC(target = 'outdir3', RPCGenClient() - env.RPCGenClient() + env.RPCGenClient() Generates an RPC client stub (_clnt.c) file from a specified RPC (.x) source file. @@ -1828,7 +1828,7 @@ env.RPCGenClient('src/rpcif.x') RPCGenHeader() - env.RPCGenHeader() + env.RPCGenHeader() Generates an RPC header (.h) file from a specified RPC (.x) source file. @@ -1846,7 +1846,7 @@ env.RPCGenHeader('src/rpcif.x') RPCGenService() - env.RPCGenService() + env.RPCGenService() Generates an RPC server-skeleton (_svc.c) file from a specified RPC (.x) source file. @@ -1864,7 +1864,7 @@ env.RPCGenClient('src/rpcif.x') RPCGenXDR() - env.RPCGenXDR() + env.RPCGenXDR() Generates an RPC XDR routine (_xdr.c) file from a specified RPC (.x) source file. @@ -1882,7 +1882,7 @@ env.RPCGenClient('src/rpcif.x') SharedLibrary() - env.SharedLibrary() + env.SharedLibrary() Builds a shared library (.so on a POSIX system, @@ -1999,7 +1999,7 @@ when it is done linking it. SharedObject() - env.SharedObject() + env.SharedObject() Builds an object file for inclusion in a shared library. @@ -2046,7 +2046,7 @@ below, for more information. StaticLibrary() - env.StaticLibrary() + env.StaticLibrary() Builds a static library given one or more object files or C, C++, D or Fortran source files. @@ -2085,7 +2085,7 @@ will raise an error if there is any mismatch. StaticObject() - env.StaticObject() + env.StaticObject() Builds a static object file from one or more C, C++, D, or Fortran source files. @@ -2152,7 +2152,7 @@ below, for more information. Substfile() - env.Substfile() + env.Substfile() The Substfile builder creates a single text file from another file or set of files by concatenating them with $LINESEPARATOR and replacing text @@ -2237,7 +2237,7 @@ subst.Substfile('pgm2.c', [Value('#include "@foo@.h"'), Tar() - env.Tar() + env.Tar() Builds a tar archive of the specified files and/or directories. @@ -2278,7 +2278,7 @@ env.Tar('foo') Textfile() - env.Textfile() + env.Textfile() The Textfile builder generates a single text file. The source strings constitute the lines; @@ -2344,7 +2344,7 @@ blob.txt Translate() - env.Translate() + env.Translate() This pseudo-builder belongs to gettext toolset. The builder extracts internationalized messages from source files, updates POT @@ -2477,7 +2477,7 @@ running scons '.'. TypeLibrary() - env.TypeLibrary() + env.TypeLibrary() Builds a Windows type library (.tlb) file from an input IDL file (.idl). @@ -2504,7 +2504,7 @@ files. Uic() - env.Uic() + env.Uic() Builds a header file, an implementation file and a moc file from an ui file. and returns the corresponding nodes in the above order. @@ -2528,7 +2528,7 @@ env.Uic(target = Split('include/foo.h gen/uicfoo.cc gen/mocfoo.cc'), Zip() - env.Zip() + env.Zip() Builds a zip archive of the specified files and/or directories. diff --git a/doc/generated/builders.mod b/doc/generated/builders.mod index ae60653..c4265d1 100644 --- a/doc/generated/builders.mod +++ b/doc/generated/builders.mod @@ -121,12 +121,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. env.Zip"> - - @@ -241,7 +237,3 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. env.TypeLibrary"> env.Uic"> env.Zip"> - - diff --git a/doc/generated/functions.mod b/doc/generated/functions.mod index 9ff02a0..2e355f0 100644 --- a/doc/generated/functions.mod +++ b/doc/generated/functions.mod @@ -171,12 +171,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. env.WhereIs"> - - @@ -341,7 +337,3 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. env.Value"> env.VariantDir"> env.WhereIs"> - - diff --git a/doc/generated/tools.mod b/doc/generated/tools.mod index 3f8e22a..0920ce0 100644 --- a/doc/generated/tools.mod +++ b/doc/generated/tools.mod @@ -108,12 +108,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. zip"> - - @@ -215,7 +211,3 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. xgettext"> yacc"> zip"> - - diff --git a/doc/generated/variables.mod b/doc/generated/variables.mod index a7aa197..e4a798b 100644 --- a/doc/generated/variables.mod +++ b/doc/generated/variables.mod @@ -643,12 +643,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $ZIPSUFFIX"> - - @@ -1285,7 +1281,3 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $ZIPFLAGS"> $ZIPROOT"> $ZIPSUFFIX"> - - -- cgit v0.12