Makeprojects
Loading...
Searching...
No Matches
makeprojects.buildme Namespace Reference

Module that contains the code for the command line buildme. More...

Functions

 create_parser ()
 Create the parser to process the command line for buildme.
 add_build_rules (projects, file_name, args, build_rules=None)
 Add a build_rules.py to the build list.
 add_project (projects, processed, file_name, args)
 Detect the project type and add it to the list.
 process_projects (results, projects, args)
 Process a list of projects.
 process_files (results, processed, files, args)
 Process a list of files.
 process_directories (results, processed, directories, args)
 Process a list of directories.
 process_dependencies (results, processed, dependencies, args)
 Process a mixed string list of both directories and files.
 main (working_directory=None, args=None)
 Command line shell for buildme.

Detailed Description

Module that contains the code for the command line buildme.

Scan the current directory and all project files will be built.

Full documentation is here, 👷 Buildme

See also
main
makeprojects.cleanme
makeprojects.rebuildme

Function Documentation

◆ 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 makeprojects.python.BUILD_LIST instead.

All valid entries will be appended to the projects list.

Parameters
projectsList of projects to build.
file_namePathname to the build_rules.py file.
argsArgs for determining verbosity for output.
build_rulesPreloaded build_rules.py object.
See also
add_project

◆ add_project()

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

Detect the project type and add it to the list.

Parameters
projectsList of projects to build.
processedList of directories already processed.
file_namePathname to the build_rules.py file.
argsArgs for determining verbosity for output.
Returns
True if the file was buildable, False if not.

◆ create_parser()

makeprojects.buildme.create_parser ( )

Create the parser to process the command line for buildme.

The returned object has these member variables

  • version boolean if version is requested
  • recursive boolean for directory recursion
  • verbose boolean for verbose output
  • preview boolean for previewing the build process
  • generate_build_rules boolean create build rules and exit
  • rules_file string override build_rules.py
  • fatal boolean abort if error occurs in processing
  • directories string array of directories to process
  • files string array of project files to process
  • configurations string array of configurations to process
  • documentation boolean if Doxygen is be executed
  • args string array of unknown parameters
Returns
argparse.ArgumentParser() object

◆ 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.
  • -n, Preview build commands
  • --generate-rules, Create build_rules.py and exit.
  • --rules-file, Override the configruration file.
  • -q, Quit after the first error
  • -f, List of files to build.
  • -d, List of directories to build.
  • -c, List of configurations to build
  • -docs, Compile Doxyfile files.
  • Additional terms are considered specific files or configurations to build.
Parameters
working_directoryDirectory to operate on, or None.
argsCommand line to use instead of sys.argv.
Returns
Zero on no error, non-zero on error

◆ process_dependencies()

makeprojects.buildme.process_dependencies ( results,
processed,
dependencies,
args )

Process a mixed string list of both directories and files.

Iterate over the dependencies list and test each object if it's a directory, and if so, dispatch to the directory handler, otherwise, process as a file.

Parameters
resultslist object to append BuildError objects
processedList of directories already processed.
dependenciesiterable list of files/directories to process
argsparsed argument list for verbosity
Returns
True if processing should abort, False if not.

◆ process_directories()

makeprojects.buildme.process_directories ( results,
processed,
directories,
args )

Process a list of directories.

Parameters
resultslist object to append BuildError objects
processedList of directories already processed.
directoriesiterable list of directories to process
argsparsed argument list for verbosity
Returns
True if processing should abort, False if not.

◆ process_projects()

makeprojects.buildme.process_projects ( results,
projects,
args )

Process a list of projects.

Sort the projects by priority and build all of them.