mpc-ace1
Generate project and workspace files
Usage
mpc-ace [OPTION ...]
[FILE ...]
mwc-ace [OPTION ...]
[FILE ...]
Overview
mpc-ace and mwc-ace, the Makefile, Project and Workspace Creator generate platform and compiler specific files to automate the compilation process (e.g. GNUmakefile and Makefile.am).
The most common way to use the Make Project Creator is to run the workspace generator (mwc-ace). This script will generate projects and a single workspace that contains the generated projects. If no input FILE (.mwc file) is specified, it will recurse into the directory in which the script was started. It looks for .mpc files and generates a project or projects for each one found.
Most of what is stated about mwc-ace applies to mpc-ace except that it only generates projects. If an input FILE (.mpc file) is not provided, the project creator will attempt to create a default project in the directory from which the script was started.
-
-global file -
specifies the global input file. Values stored within this file are applied to all projects. If not specified, defaults to
config/global.mpb
-
-include directory -
specifies a directory to search when looking for base projects, template input files and templates. This option can be used multiple times to add directories. Two include directories are used by default (
configandtemplates)
-
-recurse -
recurse from the current directory and generate from all found input files.
- -ti dll | lib | dll_exe | lib_exe:file
-
specifies the template input file (with no extension) for the specific type, e.g. -ti dll_exe:vc8exe. Each project creator has a default template input file for each type of project (
dll_exe,lib_exe,dll,lib). You can override the default template input file name with the-tioption. The file must have amptextension and must reside within the include search directories. NOTE: theliband thelib_exetemplate input files are only used when MPC is generating static projects
-
-hierarchy -
generate a workspace in a hierarchical fashion. Forces the generation of a hierarchical workspace at each directory level in between the toplevel directory and the location of the
.mpcfile that is being processed. This is the default formakebased workspace creators. NOTE: This option has no effect when when used withmpc-ace
-
-template file -
specifies the template name (with no extension). file should have a
.mpdextension and sit in one of the include search directories. NOTE: The-templateoption overrides the template file for all types specified
-
-relative name=var -
any $() variable in an mpc file that is matched to name is replaced by var only if var can be made into a relative path based on the current working directory
-
-base project -
add project as a base project to each generated project file. Do not provide a file extension, the
.mpbextension will be tried first; if that fails the.mpcextension will be tried
-
-nocomments -
do not place comments in the generated files
-
-noreldefs -
do not try to generate default relative definitions for
*_ROOT, which come from environment variables
-
-notoplevel -
do not generate the top level target file. Files are still processed, but no top level file is created. For
mwc-ace, it says process all projects for a workspace, but do not generate the top level workspace file. Formpc-ace, it says process the.mpcfiles, but do not generate the project files
-
-static -
specifies that only static projects are generated. By default, only dynamic projects will be generated. This parameter was previously
-static_only. Currently,mpc-aceonly supports generating dynamic projects or static projects, but not both during the same run. To generate them both you must runmpc-acetwice, once with the-staticoption and once without. Additionally, thevc6,em3,vc7,vc71andvc8project names will no longer automatically have_Staticappended to the project name when generating static projects. This can still be achieved by using the-name_modifieroption.
-
When generating static projects, inter-project dependencies will not be generated for libraries within
vc6,em3,vc7, andvc71workspaces. The reason is due to the fact that each static library that depended upon another would be combined at the library creation stage, resulting in extremely large libraries. Dependencies are handled correctly by vc8 and later. This behavior can be modified by setting the MPC_DEPENDENCY_COMBINED_STATIC_LIBRARY environment variable. It will forcempc-aceto generate inter-project dependencies for libraries within a single workspace
-
-genins -
generate
.insfiles after processing each project that can be used in conjunction with theprj_install.plscript to install different parts of the project (such as header files) into an alternate location
-
-use_env -
use environment variables for all uses of $() instead of the relative replacement values
-value_templatename+=val | name=val | name-=val-
this option allows modification of a template input name pair. Use += to add val to the name's value. Use
-=to subtract and = to override the value. If a template variable value will contain spaces, it is best to enclose the whole setting in double quotes and use single quotes within the value to retain spaces (if it is necessary)
-value_projectname+=val | name=val | name-=val-
this option allows modification of a project variable assignment. Use += to add val to the name's value. Use
-=to subtract and = to override the value. This can be used to introduce new name value pairs to a project. However, it must be a valid project assignment
-
-make_coexistence -
if multiple
makebased project types are generated, they will be named such that they can coexist
-
-feature_file file -
specifies the features file to read before processing. These feature names can be anything, but they should correspond to values used for the
requiresandavoidskeywords. If a feature is required and is not enabled then the project will not be created. If a feature is to be avoided and it is enabled then the project will not be created. The default feature file isdefault.featuresunder theconfigdirectory
-
-expand_vars -
perform direct expansion, instead of performing relative replacement with either
-use_envor-relativeoptions
-
-features features -
specifies the feature list to set before processing. Values specified by this option overwrite values from features files, e.g. -features "qos=1,ssl=0"
-
-gendot -
generate .dot files for use with
Graphvis. This option, which is only useful withmwc-ace, will result in the generation of .dot files for each workspace processed. Each .dot file will contain information that can be fed to Graphvis to display the dependency information for the various projects found within the workspace.
-
-exclude directories -
use this option to exclude directories or files when searching for input files. NOTE: This option has no effect when used with
mpc-ace
-
-name_modifier pattern -
modify generated workspace or project names. The pattern passed to this parameter will have the * portion replaced with the actual output name. For example -name_modifier '*_Static' will result in all workspace and project names ending in
_Static, e.g.FOO_Static.dswandFOO_Static.dsp
-
-apply_project -
when used in conjunction with
-name_modifier, it applies the name modifier to the project name also. NOTE: this option has no effect without the-name_modifieroption
-
-workers -
Specifies number of child processes to use to generate projects.
-
-workers_dir -
The directory for storing temporary output files from the child processes. The default is '/tmp/mpc' If neither -workers_dir nor -workers_port is used, -workers_dir is assumed.
-
-workers_port -
The port number for the parent listener.
-
-version -
print the MPC version and exit
-
-into directory -
place all output files in a mirrored directory structure starting at directory
-
-gfeature_file file -
specifies the global feature file. The default value is
global.featuresunder theconfigdirectory
- -language cplusplus | csharp | java | vb
-
specify the language preference. The default is
cplusplus
- -type automake | bcb2007 | bcb2009 | bds4 | bmake | cc | em3 | ghs | html | make | nmake | sle | vc6 | vc7 | vc71 | vc8 | vc9 | vc10 | wb26
-
specifies the type of project file to generate. This option can be used multiple times to generate multiple types. There is no longer a default. NOTE: The
-tioption overrides the template input file for all types specified
MPC Codebase Configuration File
This configuration file can be used to specify alternate locations for the MPC Configuration File. If a base.cfg is found underneath the 'config' directory where MPC is executed, it will be read to determine the location of MPC.cfg based on the directory in which MPC was started.
For example, if $MPC_ROOT/mwc-ace is run under /foo/bar_root/src and $MPC_ROOT/config/base.cfg contained:
/foo/bar_root = /foo/bar_root/MPC/config
MPC would attempt to open and read /foo/bar_root/MPC/config/MPC.cfg as the MPC Configuration File. If the base configuration file is not present, MPC will try to use $MPC_ROOT/config/MPC.cfg as the MPC Configuration File.
You may reference environment variables, accessed by $NAME, on either side of the equals sign.
MPC Configuration File
In an effort to move away from the use of environment variables, a configuration file has been introduced. The configuration file (MPC.cfg) can contain settings to provide command line options, control logging and direct MPC to dynamic project types.
The following keywords are allowed in the configuration file, which will be read from the 'config' directory of MPC.
command_line-
provide additional command line options to MPC. The value of this setting will be prepended to the options passed to
mwc-aceormpc-ace
default_type-
provide a single project type (as specified by the -type option) as the default project type
dynamic_types-
this comma separated list points to directories in which MPC will search for Perl modules to implement additional MPC project types, base projects or template files. This setting can be used to augment or replace functionality in MPC. For each suitable directory found, it will add a
modulesinclude path for Perl to find modules, add aconfiginclude path to locate base projects and atemplateinclude path to find MPC templates.
includes-
similar to the -include command line option, it adds the list of comma separated paths to the MPC include search paths.
- logging
-
if this setting contains
info=1, informational messages will be printed. If it containswarn=1, warning messages will be printed. If it containsdiag=1, diagnostic messages will be printed. If it containsdebug=1, debug messages will be printed. And lastly, if it containsdetail=1, detail messages will be printed. If it contains none of these,mpc-acewill not print out any information or warnings when processing projects or workspaces. Errors are always printed if any are encountered.
- verbose_ordering
-
if this is set,
mwc-acewill warn the user about references to projects in theafterkeyword that have not been processed
Environment variables
The following environment variable could affect mwc-ace and mpc-ace:
- MPC_DEPENDENCY_COMBINED_STATIC_LIBRARY
-
see the help on
-staticparameter above
- MPC_GHS_UNIX
-
this environment variable is only meaningful when generating the ghs project files. By default, the ghs type assumes that it is for Windows. If this is not the case, set this environment variable prior to running MPC
History
- Debian 13 (Trixie) to Debian 9 (Stretch): the text shown here
- Debian 8 (Jessie)
- Debian 7 (Wheezy)
- Debian 6.0 (Squeeze)
- Debian 5.0 (Lenny)
- Debian 4.0 (Etch)
-gendot since Debian 5.0 (Lenny);
-gfeature_file since Debian 5.0 (Lenny);
-nocomments since Debian 5.0 (Lenny);
-workers since Debian 8 (Jessie);
-workers_dir since Debian 8 (Jessie);
-workers_port since Debian 8 (Jessie).