Home | Trees | Index | Help |
---|
|
|
|||
__init__(self,
path,
options=None,
ldflags=None)
Construct a new 'Compiler'. |
|||
Compile(self,
mode,
files,
dir,
options=[],
ldflags=[],
output=None,
timeout=-1)
Compile the 'files'. |
|||
ExecuteCommand(self,
dir,
command,
timeout=-1)
Execute 'command' in 'dir'. |
|||
GetCompilationCommand(self,
mode,
files,
options=[],
ldflags=[],
output=None)
Return the appropriate command for compiling 'files'. |
|||
ParseOutput(self,
output,
ignore_regexps=())
Turn the 'output' into a sqeuence of 'Diagnostic's. |
|||
GetPath(self)
Return the location of the executable. |
|||
GetOptions(self)
Return the list of compilation options. |
|||
SetOptions(self,
options)
Reset the list of compiler options. |
|||
GetLDFlags(self)
Return the list of link options. |
|||
SetLDFlags(self,
ldflags)
Reset the list of link options. |
|||
GetExecutableExtension(self)
Return the extension for executables. |
|||
GetObjectExtension(self)
Return the extension for object files. |
|||
_GetModeSwitches(self,
mode)
Return the compilation switches for the compilation 'mode'. |
|
|||
MODE_PREPROCESS | Preprocess the source files, but do not compile them. | ||
MODE_COMPILE | Compile the source files, but do not assemble them. | ||
MODE_ASSEMBLE | Compile the source files, but do not link them. | ||
MODE_LINK | Compile and link the source files. | ||
modes | The available compilation modes. |
|
Construct a new 'Compiler'. 'path' -- A string giving the location of the compiler executable. 'options' -- A list of strings indicating options to the compiler, or 'None' if there are no options. 'ldflags' -- A list of strings indicating ld flags to the compiler, or 'None' if there are no flags. |
Compile the 'files'. 'mode' -- The compilation mode (one of the 'Compiler.modes') that should be used to compile the 'files'. 'files' -- A sequence of strings giving the names of source files (including, in general, assembly files, object files, and libraries) that should be compiled. 'dir' -- The directory in which to run the compiler. 'options' -- A sequence of strings indicating additional options that should be provided to the compiler. 'ldflags' -- A sequence of strings indicating additional linker flags that should be provided to the compiler, if linking is done. 'output' -- The name of the file should be created by the compilation. If 'None', the compiler will use a default value. 'timeout' -- The maximum number of seconds the compiler is permitted to run. If 'timeout' is -1, the compiler is permitted to run forever. returns -- A tuple '(status, output)'. The 'status' is the exit status returned by the compiler, as indicated by 'waitpid'. The 'output' is a string containing the standard outpt and standard errror generated by the compiler. |
Execute 'command' in 'dir'. 'dir' -- The directory in which to execute the command. 'command' -- A sequence of strings, as returned by 'GetCompilationCommand'. 'timeout' -- The maximum number of seconds the compiler is permitted to run. If 'timeout' is -1, the compiler is permitted to run forever. returns -- A tuple '(status, output)'. The 'status' is the exit status returned by the compiler, as indicated by 'waitpid'. The 'output' is a string containing the standard output and standard errror generated by the compiler. |
Return the appropriate command for compiling 'files'. 'mode' -- The compilation mode (one of the 'Compiler.modes') that should be used to compile the 'files'. 'files' -- A sequence of strings giving the names of source files (including, in general, assembly files, object files, and libraries) that should be compiled. 'options' -- A sequence of strings indicating additional options that should be provided to the compiler. 'ldflags' -- A sequence of strings indicating additional linker flags that should be provided to the compiler, if linking is done. 'output' -- The name of the file should be created by the compilation. If 'None', the compiler will use a default value. (In some cases there may be multiple outputs. For example, when generating multiple object files from multiple source files, the compiler will create a variety of objects.) returns -- A sequence of strings indicating the arguments, including 'argv[0]', for the compilation command. |
Turn the 'output' into a sqeuence of 'Diagnostic's. 'output' -- A string containing the compiler's output. 'ignore_regexps' -- A sequence of regular expressions. If a diagnostic message matches one of these regular expressions, it will be ignored. returns -- A list of 'Diagnostic's corresponding to the messages indicated in 'output', in the order that they were emitted. |
Return the location of the executable. returns -- A string giving the location of the executable. This location is the one that was specified as the 'path' argument to '__init__'. |
Return the list of compilation options. returns -- A list of strings giving the compilation options specified when the 'Compiler' was constructed. |
Reset the list of compiler options. 'options' -- A list of strings indicating options to the compiler, or 'None' if there are no options. |
Return the list of link options. returns -- A list of strings giving the link options specified when the 'Compiler' was constructed. |
Reset the list of link options. 'ldflags' -- A list of strings indicating options to the linker, or 'None' if there are no flags. |
Return the extension for executables. returns -- The extension (including leading '.', if applicable) for executable files created by this compiler. |
Return the extension for object files. returns -- The extension (including leading '.', if applicable) for object files created by this compiler. |
Return the compilation switches for the compilation 'mode'. 'mode' -- The compilation mode (one of 'Compiler.modes'). returns -- A sequence of strings indicating the switches that are used to indicate the compilation mode. |
|
MODE_PREPROCESSPreprocess the source files, but do not compile them.
|
MODE_COMPILECompile the source files, but do not assemble them.
|
MODE_ASSEMBLECompile the source files, but do not link them.
|
MODE_LINKCompile and link the source files.
|
modesThe available compilation modes.
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 3.0alpha2 on Fri Sep 28 00:57:32 2007 | http://epydoc.sf.net |