API Proposal

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)

High-level API

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

#!python Bin(name,*sources,**kwargs)=>proj.AutoInstall(Program(name,sourcesorNone,**kwargs))=>proj.AutoInstall(Script(name,sourcesorNone,**kwargs))# depending on source file names (*.in will mean script sources).SBin(name,*sources,**kwargs)# same as Bin(name, *sources, **kwargs), but with install_dir="sbin"Data(name,*sources,**kwargs)=>proj.AutoInstall(SubstInFile(name,*sources,**kwargs))=>proj.AutoInstall(name)# if sources list is emptyConfig(name,*sources,**kwargs)# same as Data(name, *sources, **kwargs), but withinstall_dir="sysconf",machine_dependent=True

Texinfo

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']))).