Functions

Dispatchers

makeprojects.build

makeprojects.build(working_directory=None, args=None)

Invoke the buildme command line from within Python.

See also

makeprojects.buildme

Parameters
  • working_directoryNone for current working directory.

  • args – Argument list to pass to the command, None uses sys.argv.

Returns

Zero on success, system error code on failure

makeprojects.clean

makeprojects.clean(working_directory=None, args=None)

Invoke the cleanme command line from within Python.

See also

makeprojects.cleanme

Parameters
  • working_directoryNone for current working directory.

  • args – Argument list to pass to the command, None uses sys.argv

Returns

Zero on success, system error code on failure

makeprojects.rebuild

makeprojects.rebuild(working_directory=None, args=None)

Invoke the rebuildme command line from within Python.

See also

makeprojects.rebuildme

Parameters
  • working_directory – Directory to rebuild

  • args – Command line to use instead of sys.argv

Returns

Zero on no error, non-zero on error

Generators

makeprojects.new_solution

makeprojects.new_solution(name=None, platform=None, project_type=None)

Create a new instance of a full solution.

Convenience routine to create a Solution with a Project and three configurations ‘Debug’, ‘Release’, ‘Internal’

See also

core.Solution

Parameters
  • name – Name of the project

  • platform – Platform for the project

  • project_type – Type of project

Returns

None, a fully stocked Solution

makeprojects.new_project

Warning

doxygenfunction: Cannot find function “makeprojects::new_project” in doxygen xml output for project “makeprojects” from directory: temp/xml/

makeprojects.new_configuration

makeprojects.new_configuration(configuration_list)

Create a new instance of a core.Configuration.

Convenience routine to create a core.Configuration instance.

Parameters

configuration_list – Array of dict() records to describe configurations

Returns

None, a single Configuration or a list of valid Configuration records.

Configuration

config.save_default

makeprojects.config.save_default(working_directory=None, destinationfile=BUILD_RULES_PY)

Calls the internal function to save a default .projectsrc file.

Given a pathname, create and write out a default .projectsrc file that can be used as input to makeprojects to generate project files.

Parameters
  • working_directory – Directory to save the destination file

  • destinationfile – Pathname of where to save the default configuation file

config.find_default_build_rules

makeprojects.config.find_default_build_rules()

Search for the build_rules.py file.

Scan for the build_rules.py file starting from the current working directory and search downwards until the root directoy is it. If not found, search in the user’s home directory or for linux/macOS, in /etc

Returns

Pathname of the configuration file, or None if no file was found.

config.import_configuration

makeprojects.config.import_configuration(file_name=None, verbose=True)

Load in the configuration file.

Using the file PROJECTSRC, load it in and parse it as an INI file using the configparser python class.

Parameters
  • file_name – File to load for configuration

  • verbose – If True, print the loaded file’’s name.

Returns

An empty parser object or filled with a successfully loaded file

Clean

cleanme.dispatch

Warning

doxygenfunction: Cannot find function “makeprojects::cleanme::dispatch” in doxygen xml output for project “makeprojects” from directory: temp/xml/

cleanme.process

Warning

doxygenfunction: Cannot find function “makeprojects::cleanme::process” in doxygen xml output for project “makeprojects” from directory: temp/xml/

cleanme.main

makeprojects.cleanme.main(working_directory=None, args=None)

Command line shell for cleanme.

Entry point for the program cleanme, this function will either get the parameters from sys.argv or the paramater args.

  • --version, show version.

  • -r, Perform a recursive clean.

  • -v, Verbose output.

  • --generate-rules, Create build_rules.py and exit.

  • --rules-file, Override the configruration file.

  • -d, List of directories to clean.

Parameters
  • working_directory – Directory to operate on, or None for os.getcwd()

  • args – Command line to use instead of sys.argv

Returns

Zero on no error, non-zero on error

Build

buildme.build_rez_script

Warning

doxygenfunction: Cannot find function “makeprojects::buildme::build_rez_script” in doxygen xml output for project “makeprojects” from directory: temp/xml/

buildme.build_slicer_script

Warning

doxygenfunction: Cannot find function “makeprojects::buildme::build_slicer_script” in doxygen xml output for project “makeprojects” from directory: temp/xml/

buildme.build_doxygen

Warning

doxygenfunction: Cannot find function “makeprojects::buildme::build_doxygen” in doxygen xml output for project “makeprojects” from directory: temp/xml/

buildme.build_watcom_makefile

Warning

doxygenfunction: Cannot find function “makeprojects::buildme::build_watcom_makefile” in doxygen xml output for project “makeprojects” from directory: temp/xml/

buildme.build_makefile

Warning

doxygenfunction: Cannot find function “makeprojects::buildme::build_makefile” in doxygen xml output for project “makeprojects” from directory: temp/xml/

buildme.parse_sln_file

makeprojects.buildme.parse_sln_file(full_pathname)

Find build targets in .sln file.

Given a .sln file for Visual Studio 2003, 2005, 2008, 2010, 2012, 2013, 2015, 2017 or 2019, locate and extract all of the build targets available and return the list.

It will also determine which version of Visual Studio this solution file requires.

See also

build_visual_studio

Parameters

full_pathname – Pathname to the .sln file

Returns

tuple(list of configuration strings, integer Visual Studio version year)

buildme.build_visual_studio

Warning

doxygenfunction: Cannot find function “makeprojects::buildme::build_visual_studio” in doxygen xml output for project “makeprojects” from directory: temp/xml/

buildme.parse_mcp_file

makeprojects.buildme.parse_mcp_file(full_pathname)

Extract configurations from a Metrowerks CodeWarrior project file.

Given an .mcp file for Metrowerks Codewarrior, determine which version of Codewarrrior was used to build it.

It will parse Freescale Codewarrior for Nintendo (59), Metrowerks Codewarrior 9.0 for Windows (50) and Metrowerks Codewarrior 10.0 for macOS (58)

See also

build_codewarrior

Parameters

full_pathname – Pathname to the .mcp file

Returns

tuple(list of configuration strings, integer CodeWarrior Version)

buildme.build_codewarrior

Warning

doxygenfunction: Cannot find function “makeprojects::buildme::build_codewarrior” in doxygen xml output for project “makeprojects” from directory: temp/xml/

buildme.parse_xcodeproj_file

makeprojects.buildme.parse_xcodeproj_file(full_pathname)

Extract configurations from an XCode project file.

Given a .xcodeproj directory for XCode for macOS locate and extract all of the build targets available and return the list.

See also

build_xcode

Parameters

full_pathname – Pathname to the .xcodeproj folder

Returns

list of configuration strings

buildme.build_xcode

Warning

doxygenfunction: Cannot find function “makeprojects::buildme::build_xcode” in doxygen xml output for project “makeprojects” from directory: temp/xml/

buildme.parse_codeblocks_file

makeprojects.buildme.parse_codeblocks_file(full_pathname)

Extract configurations from a Codeblocks project file.

Given a .cbp file for Codeblocks locate and extract all of the build targets available and return the list.

See also

build_codeblocks

Parameters

full_pathname – Pathname to the .cdp file

Returns

list of configuration strings

buildme.build_codeblocks

Warning

doxygenfunction: Cannot find function “makeprojects::buildme::build_codeblocks” in doxygen xml output for project “makeprojects” from directory: temp/xml/

buildme.add_build_rules

makeprojects.buildme.add_build_rules(projects, file_name, args, build_rules=None)

Add a build_rules.py to the build list.

Given a build_rules.py to parse, check it for a BUILD_LIST and use that for scanning for functions to call. If BUILD_LIST doesn’t exist, use buildme.BUILD_LIST instead.

All valid entries will be appended to the projects list.

See also

add_project

Parameters
  • projects – List of projects to build.

  • file_name – Pathname to the build_rules.py file.

  • args – Args for determining verbosity for output.

  • build_rules – Preloaded build_rules.py object.

buildme.add_project

makeprojects.buildme.add_project(projects, processed, file_name, args)

Detect the project type and add it to the list.

Parameters
  • projects – List of projects to build.

  • processed – List of directories already processed.

  • file_name – Pathname to the build_rules.py file.

  • args – Args for determining verbosity for output.

Returns

True if the file was buildable, False if not.

buildme.get_projects

Warning

doxygenfunction: Cannot find function “makeprojects::buildme::get_projects” in doxygen xml output for project “makeprojects” from directory: temp/xml/

buildme.process

Warning

doxygenfunction: Cannot find function “makeprojects::buildme::process” in doxygen xml output for project “makeprojects” from directory: temp/xml/

buildme.main

makeprojects.buildme.main(working_directory=None, args=None)

Command line shell for buildme.

Entry point for the program buildme, this function will either get the parameters from sys.argv or the paramater args.

  • --version, show version.

  • -r, Perform a recursive rebuild.

  • -v, Verbose output.

  • --generate-rules, Create build_rules.py and exit.

  • --rules-file, Override the configruration file.

  • -f, Stop building on the first build failure.

  • -d, List of directories to rebuild.

  • -docs, Compile Doxyfile files.

  • Additional terms are considered specific files to build.

Parameters
  • working_directory – Directory to operate on, or None.

  • args – Command line to use instead of sys.argv.

Returns

Zero on no error, non-zero on error

Rebuild

rebuild.main

makeprojects.rebuildme.main(working_directory=None, args=None)

Invoke the command line rebuildme.

Entry point for the program rebuildme, this function will either get the parameters from sys.argv or the paramater args.

  • --version, show version.

  • -r, Perform a recursive rebuild.

  • -v, Verbose output.

  • --generate-rules, Create build_rules.py and exit.

  • --rules-file, Override the configruration file.

  • -f, Stop building on the first build failure.

  • -d, List of directories to rebuild.

  • -docs, Compile Doxyfile files.

  • Additional terms are considered specific files to build.

Parameters
  • working_directory – Directory to rebuild, or None for os.getcwd()

  • args – Command line to use instead of sys.argv

Returns

Zero on no error, non-zero on error

Enums

enums.get_installed_visual_studio

makeprojects.enums.get_installed_visual_studio()

Find installed Visual Studio version.

Scan the host computer and return the IDETypes for the most recent version of Visual Studio that’s installed.

Returns

IDETypes value or None

enums.get_installed_xcode

makeprojects.enums.get_installed_xcode()

Find installed Xcode version.

Scan the host computer and return the IDETypes for the most recent version of XCode that’s installed.

Returns

IDETypes value or None

enums.platformtype_short_code

makeprojects.enums.platformtype_short_code(configurations)

Iterate over a list of Configurations to determine the short code.

For files that create multiple platforms, determine if it matches a known expandable PlatformType

Parameters

configurations – List of configurations to scan

Returns

Either ‘’ or the generic short code of the group or the first code in the configuration list.

Core

core.source_file_filter

makeprojects.core.source_file_filter(file_list, file_type_list)

Prune the file list for a specific type.

Parameters
  • file_list – list of SourceFile entries.

  • file_type_list – FileTypes to match.

Returns

list of matching SourceFile entries.