Makeprojects
Loading...
Searching...
No Matches
makeprojects.makefile.BuildMakeFile Class Reference

Class to build Linux make files. More...

Inheritance diagram for makeprojects.makefile.BuildMakeFile:
Collaboration diagram for makeprojects.makefile.BuildMakeFile:

Public Member Functions

 __init__ (self, file_name, priority, configuration, verbose=False)
 Class to handle Linux make files.
 build (self)
 Build MakeFile using make.
 clean (self)
 Delete temporary files.
Public Member Functions inherited from makeprojects.build_objects.BuildObject
 __init__ (self, file_name, priority=None, configuration=None)
 Initializers for an BuildObject.
 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

 verbose = verbose
 Save the verbose flag.
Public Attributes inherited from makeprojects.build_objects.BuildObject
 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.

Protected Member Functions

 _test_linux (self)
 Return an error if not running under linux.

Detailed Description

Class to build Linux make files.

Constructor & Destructor Documentation

◆ __init__()

makeprojects.makefile.BuildMakeFile.__init__ ( self,
file_name,
priority,
configuration,
verbose = False )

Class to handle Linux make files.

Parameters
file_namePathname to the makefile to build
priorityPriority to build this object
configurationBuild configuration
verboseTrue if verbose output

Member Function Documentation

◆ _test_linux()

makeprojects.makefile.BuildMakeFile._test_linux ( self)
protected

Return an error if not running under linux.

Check if running under a linux like shell where make is available. If not, return a BuildError object.

Returns
None or a BuildError

◆ build()

makeprojects.makefile.BuildMakeFile.build ( self)

Build MakeFile using make.

For Linux hosts, invoke make for building a makefile.

The default target built is all.

Returns
List of BuildError objects

Reimplemented from makeprojects.build_objects.BuildObject.

◆ clean()

makeprojects.makefile.BuildMakeFile.clean ( self)

Delete temporary files.

This function is called by cleanme to remove temporary files.

The default target built is clean.

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 from makeprojects.build_objects.BuildObject.