.TH "MPC" "1" .SH "NAME" mpc-ace, mwc-ace \(em generate project and workspace files .SH "SYNOPSIS" .PP \fBmpc-ace\fR [\fIOPTION\fR \&...] [\fIFILE\fR \&...] .PP \fBmwc-ace\fR [\fIOPTION\fR \&...] [\fIFILE\fR \&...] .SH "DESCRIPTION" .PP \fBmpc-ace\fR and \fBmwc-ace\fR, the Makefile, Project and Workspace Creator generate platform and compiler specific files to automate the compilation process (e.g. \fBGNUmakefile\fP and \fBMakefile.am\fP). .PP The most common way to use the Make Project Creator is to run the workspace generator (\fBmwc-ace\fR). This script will generate projects and a single workspace that contains the generated projects. If no input \fIFILE\fR (\fB.mwc\fP file) is specified, it will recurse into the directory in which the script was started. It looks for \fB.mpc\fP files and generates a project or projects for each one found. .PP Most of what is stated about \fBmwc-ace\fR applies to \fBmpc-ace\fR except that it only generates projects. If an input \fIFILE\fR (\fB.mpc\fP file) is not provided, the project creator will attempt to create a default project in the directory from which the script was started. .IP "\fB-global\fR \fIfile\fR" 10 specifies the global input file. Values stored within this file are applied to all projects. If not specified, defaults to \fBconfig/global.mpb\fP .IP "\fB-include\fR \fIdirectory\fR" 10 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 (\fBconfig\fP and \fBtemplates\fP) .IP "\fB-recurse\fR" 10 recurse from the current directory and generate from all found input files. .IP "\fB-ti dll | lib | dll_exe | lib_exe:\fR\fIfile\fR" 10 specifies the template input file (with no extension) for the specific type, e.g. \fB-ti dll_exe:vc8exe\fR. Each project creator has a default template input file for each type of project (\fBdll_exe\fR, \fBlib_exe\fR, \fBdll\fR, \fBlib\fR). You can override the default template input file name with the \fB-ti\fR option. The file must have a \fBmpt\fP extension and must reside within the include search directories. NOTE: the \fBlib\fR and the \fBlib_exe\fR template input files are only used when MPC is generating static projects .IP "\fB-hierarchy\fR" 10 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 \fB.mpc\fP file that is being processed. This is the default for \fBmake\fR based workspace creators. NOTE: This option has no effect when when used with \fBmpc-ace\fR .IP "\fB-template\fR \fIfile\fR" 10 specifies the template name (with no extension). \fIfile\fR should have a \fB.mpd\fP extension and sit in one of the include search directories. NOTE: The \fB-template\fR option overrides the template file for all types specified .IP "\fB-relative\fR \fIname\fR=\fIvar\fR" 10 any \fB$()\fP variable in an mpc file that is matched to \fIname\fR is replaced by \fIvar\fR only if \fIvar\fR can be made into a relative path based on the current working directory .IP "\fB-base\fR \fIproject\fR" 10 add \fIproject\fR as a base project to each generated project file. Do not provide a file extension, the \fB.mpb\fP extension will be tried first; if that fails the \fB.mpc\fP extension will be tried .IP "\fB-nocomments\fR" 10 do not place comments in the generated files .IP "\fB-noreldefs\fR" 10 do not try to generate default relative definitions for \fB*_ROOT\fP, which come from environment variables .IP "\fB-notoplevel\fR" 10 do not generate the top level target file. Files are still processed, but no top level file is created. For \fBmwc-ace\fR, it says process all projects for a workspace, but do not generate the top level workspace file. For \fBmpc-ace\fR, it says process the \fB.mpc\fP files, but do not generate the project files .IP "\fB-static\fR" 10 specifies that only static projects are generated. By default, only dynamic projects will be generated. This parameter was previously \fB-static_only\fR. Currently, \fBmpc-ace\fR only supports generating dynamic projects or static projects, but not both during the same run. To generate them both you must run \fBmpc-ace\fR twice, once with the \fB-static\fR option and once without. Additionally, the \fBvc6\fR, \fBem3\fR, \fBvc7\fR, \fBvc71\fR and \fBvc8\fR project names will no longer automatically have \fB_Static\fP appended to the project name when generating static projects. This can still be achieved by using the \fB-name_modifier\fR option. .IP "" 10 When generating static projects, inter-project dependencies will not be generated for libraries within \fBvc6\fR, \fBem3\fR, \fBvc7\fR, and \fBvc71\fR workspaces. 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 force \fBmpc-ace\fR to generate inter-project dependencies for libraries within a single workspace .IP "\fB-genins\fR" 10 generate \fB.ins\fP files after processing each project that can be used in conjunction with the \fBprj_install.pl\fR script to install different parts of the project (such as header files) into an alternate location .IP "\fB-use_env\fR" 10 use environment variables for all uses of \fB$()\fP instead of the relative replacement values .IP "\fB-value_template\fR \fIname\fR\fB+=\fR\fIval\fR | \fIname\fR\fB=\fR\fIval\fR | \fIname\fR\fB-=\fR\fIval\fR" 10 this option allows modification of a template input name pair. Use \fB+=\fR to add \fIval\fR to the \fIname\fR's value. Use \fB-=\fR to subtract and \fB=\fR 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) .IP "\fB-value_project\fR \fIname\fR\fB+=\fR\fIval\fR | \fIname\fR\fB=\fR\fIval\fR | \fIname\fR\fB-=\fR\fIval\fR" 10 this option allows modification of a project variable assignment. Use \fB+=\fR to add \fIval\fR to the \fIname\fR's value. Use \fB-=\fR to subtract and \fB=\fR 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 .IP "\fB-make_coexistence\fR" 10 if multiple \fBmake\fR based project types are generated, they will be named such that they can coexist .IP "\fB-feature_file\fR \fIfile\fR" 10 specifies the features file to read before processing. These feature names can be anything, but they should correspond to values used for the \fBrequires\fP and \fBavoids\fP keywords. 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 is \fBdefault.features\fP under the \fBconfig\fP directory .IP "\fB-expand_vars\fR" 10 perform direct expansion, instead of performing relative replacement with either \fB-use_env\fR or \fB-relative\fR options .IP "\fB-features\fR \fIfeatures\fR" 10 specifies the feature list to set before processing. Values specified by this option overwrite values from features files, e.g. \fB-features "qos=1,ssl=0"\fR .IP "\fB-gendot\fR" 10 generate .dot files for use with \fBGraphvis\fR. This option, which is only useful with \fBmwc-ace\fR, 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. .IP "\fB-exclude\fR \fIdirectories\fR" 10 use this option to exclude directories or files when searching for input files. NOTE: This option has no effect when used with \fBmpc-ace\fR .IP "\fB-name_modifier\fR \fIpattern\fR" 10 modify generated workspace or project names. The \fIpattern\fR passed to this parameter will have the \fB*\fP portion replaced with the actual output name. For example \fB-name_modifier '*_Static'\fR will result in all workspace and project names ending in \fB_Static\fP, e.g. \fBFOO_Static.dsw\fP and \fBFOO_Static.dsp\fP .IP "\fB-apply_project\fR" 10 when used in conjunction with \fB-name_modifier\fR, it applies the name modifier to the project name also. NOTE: this option has no effect without the \fB-name_modifier\fR option .IP "\fB-workers\fR" 10 Specifies number of child processes to use to generate projects. .IP "\fB-workers_dir\fR" 10 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. .IP "\fB-workers_port\fR" 10 The port number for the parent listener. .IP "\fB-version\fR" 10 print the MPC version and exit .IP "\fB-into\fR \fIdirectory\fR" 10 place all output files in a mirrored directory structure starting at \fIdirectory\fR .IP "\fB-gfeature_file\fR \fIfile\fR" 10 specifies the global feature file. The default value is \fBglobal.features\fP under the \fBconfig\fP directory .IP "\fB-language cplusplus | csharp | java | vb\fR" 10 specify the language preference. The default is \fBcplusplus\fR .IP "\fB-type automake | bcb2007 | bcb2009 | bds4 | bmake | cc | em3 | ghs | html | make | nmake | sle | vc6 | vc7 | vc71 | vc8 | vc9 | vc10 | wb26\fR" 10 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 \fB-ti\fR option overrides the template input file for all types specified .SS "MPC Codebase Configuration File" .PP 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. .PP For example, if $MPC_ROOT/mwc-ace is run under /foo/bar_root/src and $MPC_ROOT/config/base.cfg contained: .PP /foo/bar_root = /foo/bar_root/MPC/config .PP 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. .PP You may reference environment variables, accessed by $NAME, on either side of the equals sign. .SS "MPC Configuration File" .PP 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. .PP The following keywords are allowed in the configuration file, which will be read from the 'config' directory of MPC. .PP .IP "\fBcommand_line\fR" 10 provide additional command line options to MPC. The value of this setting will be prepended to the options passed to \fBmwc-ace\fR or \fBmpc-ace\fR .IP "\fBdefault_type\fR" 10 provide a single project type (as specified by the \-type option) as the default project type .IP "\fBdynamic_types\fR" 10 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 \fBmodules\fP include path for Perl to find modules, add a \fBconfig\fP include path to locate base projects and a \fBtemplate\fP include path to find MPC templates. .IP "\fBincludes\fR" 10 similar to the \-include command line option, it adds the list of comma separated paths to the MPC include search paths. .IP "logging" 10 if this setting contains \fBinfo=1\fP, informational messages will be printed. If it contains \fBwarn=1\fP, warning messages will be printed. If it contains \fBdiag=1\fP, diagnostic messages will be printed. If it contains \fBdebug=1\fP, debug messages will be printed. And lastly, if it contains \fBdetail=1\fP, detail messages will be printed. If it contains none of these, \fBmpc-ace\fR will not print out any information or warnings when processing projects or workspaces. Errors are always printed if any are encountered. .IP "verbose_ordering" 10 if this is set, \fBmwc-ace\fR will warn the user about references to projects in the \fBafter\fP keyword that have not been processed .SS "ENVIRONMENT VARIABLES" .PP The following environment variable could affect \fBmwc-ace\fR and \fBmpc-ace\fR: .IP "MPC_DEPENDENCY_COMBINED_STATIC_LIBRARY" 10 see the help on \fB-static\fR parameter above .IP "MPC_GHS_UNIX" 10 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 .\" created by instant / docbook-to-man