bout_runners.make.make

Module containing the MakeProject class.

Classes

Make(makefile_root_path, makefile_name)

Class for making the project.

Exceptions

MakeError

Error class indicating that this is a Make error.

class bout_runners.make.make.Make(makefile_root_path: Optional[pathlib.Path] = None, makefile_name: None = None)[source]

Class for making the project.

Examples

>>> from bout_runners.make.make import Make
... from pathlib import Path
... path = Path('path', 'to', 'makefile_root_path')
... make_obj = Make(makefile_root_path=path)
... make_obj.run_make(force=True)
Attributes
makefile_root_pathPath

The path to the Makefile

makefile_namestr

The name of the Makefile

makefile_pathPath

Path to the makefile

exec_namestr

The name of the executable

Methods

run_make(force=False)

Runs make in the self.makefile_root_path

run_clean()

Runs make clean in the self.makefile_root_path

Call the make file.

Parameters
makefile_root_pathNone or Path or str

Root path of make file If None, the path of the root caller of MakeProject will be called

makefile_nameNone or str

If set to None, it tries the following names, in order: ‘GNUmakefile’, ‘makefile’ and ‘Makefile’

Methods

run_clean()

Run make clean.

run_make([force])

Execute the makefile.

run_clean() → None[source]

Run make clean.

run_make(force: bool = False) → None[source]

Execute the makefile.

If an executable is found, nothing will be done unless ‘force’ is set to True

Parameters
forcebool

If True, make clean will be called prior to make

exception bout_runners.make.make.MakeError[source]

Error class indicating that this is a Make error.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.