MakeTarget Class¶
This class is used as a representation of a single target within a Makefile
Class Description¶
-
class
MakeTarget¶ A class that represents a Make target.
Public Functions
-
__init__(src_txtlist = '')¶ Class initialiser.
- Parameters
src_txtlist: The source block of text we extract everything else from.
-
__repr__()¶ Show the representation as the target for a debugger.
-
target_noext()¶ Obtains the target file path without a file extension.
- Return
The target file path without a file extension.
-
sources_noheader()¶ Obtains the list of sources with the .h header files removed.
- Return
The list of sources with the .h header files removed.
-
sources_noext()¶ Obtain the list of sources with no file extensions.
- Return
The list of sources with no file extensions.
-
cmds_expand(usemake = False)¶ Try to expand the cmds_raw property into something readable.
- Return
A list of commands for the target that are expanded.
- Parameters
usemake: If true then we use make to do the expansion.
-
parse()¶ Parse the src_txtlist into all the fields.
Public Members
-
src_txtlist¶ The source block of text we extract everything else from.
-
target¶ Destination target file.
-
sources¶ Source files used to create the target.
-
cmds_raw¶ Raw version of the commands outputted by make.
Public Static Functions
-
parse_targets(txtdb, varlist = None)¶ Parse the Makefile text database into a list of targets.
- Return
A list of targets.
- Parameters
txtdb: The makefile database text to parse.varlist: This can be used to pass in a MakeVarList class instance for use with expansion later on.
-