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

Module that contains the code for the command line "makeprojects". More...

Functions

 create_parser ()
 Create the parser to process the command line for buildme.
 get_project_list (parsed, build_rules_list, working_directory)
 From the command line or the build rules, determine the project target list.
 process (working_directory, parsed)
 Process a solution.
 process_project_configurations (parsed, working_directory, entry, args)
 Generate project file with configurations.
 process_project_types (parsed, working_directory, entry, args)
 Process a dict entry with the -n, -p, -g parameters already set.
 process_project_ides (parsed, working_directory, entry, args)
 Process a dict entry with the -n and -p parameters already set.
 process_project_platforms (parsed, working_directory, entry, args)
 Process a dict entry with the -n parameter already set.
 process_proj_names (parsed, working_directory, entry)
 Process a dict entry to generate project files.
 process_makeprojects (parsed, working_directory)
 Process using default behavior from MAKEPROJECTS.
 main (working_directory=None, args=None)
 Main entry point when invoked as a tool.

Detailed Description

Module that contains the code for the command line "makeprojects".

Scan the current directory and generate one or more project files based on the source code found.

If build_rules.py is found, it will be scanned for information on how to generate the IDE for different platforms and configurations if needed.

See also
makeprojects.cleanme
makeprojects.buildme
makeprojects.rebuildme

Function Documentation

◆ create_parser()

makeprojects.__main__.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 clean 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
  • args string array of unknown parameters
Returns
argparse.ArgumentParser() object

◆ main()

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

Main entry point when invoked as a tool.

When makeprojects is invoked as a tool, this main() function is called with the current working directory. Arguments will be obtained using the argparse class.

Parameters
working_directoryDirectory to operate on or None.
argsCommand line to use instead of sys.argv.
Returns
Zero if no error, non-zero on error

◆ process()

makeprojects.__main__.process ( working_directory,
parsed )

Process a solution.

Parameters
working_directoryDirectory to process.
parsedArgs for determining verbosity for output
Returns
Zero on no error, non zero integer on error

◆ process_makeprojects()

makeprojects.__main__.process_makeprojects ( parsed,
working_directory )

Process using default behavior from MAKEPROJECTS.

Check if there is a build_rules.py in the current directory and if so, if there's a MAKEPROJECTS value, use it to process all the project files. If not, traverse the directory until the first file with MAKEPROJECTS and GENERIC = True, and then process.

Parameters
parsedAn ArgumentParser object with attribute generate_build_rules
working_directoryDirectory to store the build_rules.py
Returns
None or an integer error code

◆ process_proj_names()

makeprojects.__main__.process_proj_names ( parsed,
working_directory,
entry )

Process a dict entry to generate project files.

Given a dict with keys to generate a project, create all the project files for all requested IDEs

Parameters
parsedAn ArgumentParser object with attribute generate_build_rules
working_directoryDirectory to store the build_rules.py
entryDictionary of keys to use to create the project files
Returns
Integer error code

◆ process_project_configurations()

makeprojects.__main__.process_project_configurations ( parsed,
working_directory,
entry,
args )

Generate project file with configurations.

Given a dict with keys to generate a project, create all the project files for all requested IDEs

Assume -n, -p, -t and -g are preset

Parameters
parsedAn ArgumentParser object with attribute generate_build_rules
working_directoryDirectory to store the build_rules.py
entryDictionary of keys to use to create the project files
argsArguments so far
Returns
Integer error code

◆ process_project_ides()

makeprojects.__main__.process_project_ides ( parsed,
working_directory,
entry,
args )

Process a dict entry with the -n and -p parameters already set.

Given a dict with keys to generate a project, create all the project files for all requested IDEs

Parameters
parsedAn ArgumentParser object with attribute generate_build_rules
working_directoryDirectory to store the build_rules.py
entryDictionary of keys to use to create the project files
argsArguments so far
Returns
Integer error code

◆ process_project_platforms()

makeprojects.__main__.process_project_platforms ( parsed,
working_directory,
entry,
args )

Process a dict entry with the -n parameter already set.

Given a dict with keys to generate a project, create all the project files for all requested IDEs

Parameters
parsedAn ArgumentParser object with attribute generate_build_rules
working_directoryDirectory to store the build_rules.py
entryDictionary of keys to use to create the project files
argsArguments so far
Returns
Integer error code

◆ process_project_types()

makeprojects.__main__.process_project_types ( parsed,
working_directory,
entry,
args )

Process a dict entry with the -n, -p, -g parameters already set.

Given a dict with keys to generate a project, create all the project files for all requested IDEs

Parameters
parsedAn ArgumentParser object with attribute generate_build_rules
working_directoryDirectory to store the build_rules.py
entryDictionary of keys to use to create the project files
argsArguments so far
Returns
Integer error code