This page is intended for proposed API to be discussed and edited. Final, polished and agreed upon form belongs to APIReference page. Fragments moved to reference are deleted from proposal.
Core API (framework)
All high-level API functions can either be called as project object's methods, or from top-level. When called from top-level, they refer to primary project, which is first one defined in SConstruct. Calling any of those without calling Project first will raise an exception.
Exact set of templates will be determined by analyzing model programs. Here are few examples of how would they look like
1 Bin(name, *sources, **kwargs) 2 => proj.AutoInstall(Program(name, sources or None, **kwargs)) 3 => proj.AutoInstall(Script(name, sources or None, **kwargs)) 4 # depending on source file names (*.in will mean script sources). 5 6 SBin(name, *sources, **kwargs) 7 # same as Bin(name, *sources, **kwargs), but with install_dir="sbin" 8 9 10 Data(name, *sources, **kwargs) 11 => proj.AutoInstall(SubstInFile(name, *sources, **kwargs)) 12 => proj.AutoInstall(name) # if sources list is empty 13 14 Config(name, *sources, **kwargs) 15 # same as Data(name, *sources, **kwargs), but with 16 install_dir="sysconf", machine_dependent=True
Meta-builder combining Info, PostScript, PDF, DVI, HTML builders in one call.
Texinfo([target,] source, [default=...]) Compile Texinfo documentation to various formats. By default, all targets are generated, but all except Info are not built by default.
List of generated rules can be adjusted by setting targets explicitly; in this case, all targets will be built by default. List of targets that are build by default can be adjusted by default keyword argument, which, if given, should be a list of extensions (example: Texinfo('manual.texi', default=['info', 'ps','dvi']))).
Additional Builders and top-level functions
Builders and modifications to get Texinfo (see http://www.gnu.org/software/texinfo/texinfo.html) support:
PDF, PostScript, DVI
Modify to accept *.texi sources and use texi2dvi command.
Or maybe separate Texi2DVI builder?
Not sure if it will be actually needed, or if SharedLibrary() can be used instead (possibly wrapped version, to support building static libraries on systems not supporting shared ones).
TODO: check also libltdl, libtool/libltdl interaction (is there any actual?), behaviour of libltdl on platforms not supporting dynamic libraries and/or dlopen() equivalent.
Possibly convenience builder to easily alias a group of files with a glob expression.