Makeprojects
Loading...
Searching...
No Matches
makeprojects.build_objects.BuildObject Class Reference

Object describing something to build. More...

Inheritance diagram for makeprojects.build_objects.BuildObject:

Public Member Functions

 __init__ (self, file_name, priority=None, configuration=None)
 Initializers for an BuildObject.
 build (self)
 Perform the build operation.
 clean (self)
 Delete temporary files.
 run_command (self, cmd, verbose)
 Issue a command and return the generated BuildError.
 __repr__ (self)
 Convert the object into a string.
 __str__ (self)
 Convert the object into a string.

Public Attributes

 file_name = os.path.abspath(file_name)
 Name of file to build.
 priority = int(priority)
 Numeric priorty in ascending order.
 configuration = configuration
 Configuration if applicable.

Detailed Description

Object describing something to build.

When the directory is parsed, a list of BuildObjects is generated and then sorted by priority and then built.

Constructor & Destructor Documentation

◆ __init__()

makeprojects.build_objects.BuildObject.__init__ ( self,
file_name,
priority = None,
configuration = None )

Initializers for an BuildObject.

Parameters
file_nameName of the file to build.
priorityInteger priority, lower will be built first.
configurationConfiguration to build
Exceptions
TypeError
ValueError

Member Function Documentation

◆ __repr__()

makeprojects.build_objects.BuildObject.__repr__ ( self)

Convert the object into a string.

Returns
A full string.

◆ __str__()

makeprojects.build_objects.BuildObject.__str__ ( self)

Convert the object into a string.

Returns
A full string.

◆ build()

◆ clean()

makeprojects.build_objects.BuildObject.clean ( self)

Delete temporary files.

This function is called by cleanme to remove temporary files.

On exit, return 0 for no error, or a non zero error code if there was an error to report. None if not implemented or not applicable.

Returns
None if not implemented, otherwise an integer error code.

Reimplemented in makeprojects.codeblocks.BuildCodeBlocksFile, makeprojects.codewarrior.BuildCodeWarriorFile, makeprojects.doxygen.BuildDoxygenFile, makeprojects.makefile.BuildMakeFile, makeprojects.makerez.BuildRezFile, makeprojects.ninja.BuildNinjaFile, makeprojects.python.BuildPythonFile, makeprojects.slicer.BuildSlicerFile, makeprojects.visual_studio.BuildVisualStudioFile, makeprojects.watcom.BuildWatcomFile, and makeprojects.xcode.BuildXCodeFile.

◆ run_command()

makeprojects.build_objects.BuildObject.run_command ( self,
cmd,
verbose )

Issue a command and return the generated BuildError.

Parameters
cmdcommand line to execute
verboseTrue if verbose output is required
Returns
BuildError object with error condition, if any.