MPC(1)
π MPC(1) β¨ General Commands Manual π
πΈ NAME πΈ
mpc-ace, mwc-ace β generate project and workspace files π«Ά
π¦ SYNOPSIS π¦
mpc-ace [OPTION ...] [FILE ...]
mwc-ace [OPTION ...] [FILE ...]
β¨ DESCRIPTION β¨
okay so bestie, sit down, hydrate, because this one is the whole vibe. mpc-ace and mwc-ace β aka the Makefile, Project and Workspace Creator β generate platform and compiler specific files to automate the compilation process (like GNUmakefile and Makefile.am). it's giving "I will write your build system so you don't have to" and honestly? iconic. π
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 too, 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. lowkey convenient. π
π§ the option menu (no skips, we read ALL of them) π
-globalfile β specifies the global input file. Values stored within this file are applied to all projects. If not specified, defaults toconfig/global.mpb-includedirectory β 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.-tidll | 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 for make based workspace creators.
NOTE: This option has no effect when when used with mpc-ace
-templatefile β specifies the template name (with no extension). file should have a.mpdextension and sit in one of the include search directories.
NOTE: The -template option overrides the template file for all types specified
-relativename=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-baseproject β 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. Formwc-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, and vc71 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 mpc-ace to 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 make based project types are generated, they will be named such that they can coexist-feature_filefile β specifies the features file to read before processing. These feature names can be anything, but they should correspond to values used for therequiresandavoidskeywords. 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-featuresfeatures β 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.dotfiles for use with Graphvis. This option, which is only useful withmwc-ace, will result in the generation of.dotfiles for each workspace processed. Each.dotfile will contain information that can be fed to Graphvis to display the dependency information for the various projects found within the workspace.-excludedirectories β 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_modifierpattern β 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_modifier option
-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_dirnor-workers_portis used,-workers_diris assumed.-workers_portβ The port number for the parent listener.-versionβ print the MPC version and exit-intodirectory β place all output files in a mirrored directory structure starting at directory-gfeature_filefile β specifies the global feature file. The default value isglobal.featuresunder theconfigdirectory-languagecplusplus | csharp | java | vb β specify the language preference. The default iscplusplus-typeautomake | 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 -ti option 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 π
Okay so listen, bestie π β the old way of doing things was all environment variables, and honestly? Not it. So they introduced a whole configuration file. Enter MPC.cfg, and she is serving. This file can hold settings that hand command line options to MPC, control logging, and point MPC at dynamic project types.
She lives in the config directory of MPC, iykyk. Here are the keywords you're allowed to use in there π
command_lineβ this is how you feed extra command line options to MPC. Whatever value you put here gets prepended to the options that get passed along tomwc-aceormpc-ace. Lowkey powerful.default_typeβ drop a single project type in here (the kind you'd normally specify with the-typeoption) and it becomes your default project type. No more typing it every single time. Periodt.dynamic_typesβ a comma separated list of directories where MPC goes hunting for Perl modules that implement extra MPC project types, base projects, or template files. This one can augment or replace functionality in MPC, which is giving main character energy fr. For every suitable directory it finds, it adds a modules include path so Perl can find the modules, adds a config include path so base projects get located, and adds a template include path so MPC templates get found. Three for one, we love that.includesβ basically the-includecommand line option's sibling. It takes a comma separated list of paths and adds them to the MPC include search paths.loggingβ the vibe control for your output. Here's the breakdown:- contains
info=1β informational messages get printed - contains
warn=1β warning messages get printed - contains
diag=1β diagnostic messages get printed - contains
debug=1β debug messages get printed - contains
detail=1β detail messages get printed
- contains
And if it contains none of these? mpc-ace will not print out any information or warnings when it's processing projects or workspaces. Silence. π€« But heads up β errors are always printed if any are encountered. No hiding those, bestie, they will find you.
verbose_orderingβ set this andmwc-acewill warn you about references to projects in theafterkeyword that haven't been processed yet. Your little accountability buddy π«Ά
β¨ ENVIRONMENT VARIABLES β¨
These two can affect mwc-ace and mpc-ace, so pay attention π
MPC_DEPENDENCY_COMBINED_STATIC_LIBRARYβ see the help on the-staticparameter above. That's the whole assignment, go read it πMPC_GHS_UNIXβ this one only matters when you're generatingghsproject files. By default, theghstype just assumes it's for Windows. Which, rude, but okay. If that's not your situation, set this environment variable before running MPC. Timing is everything, bestie β°
Not me reminding you again that env vars are the old way β the config file is right there, she's cute, she's organized, she's waiting. But these two are still real and still do things, so no cap.
Okay that's the whole page, bestie πΈ You just read the <rainbow>MPC(1)</rainbow> manual β source MPC, with whatever version and date stamp your local install is carrying (go peek at the bottom of your own copy if you need the exact numbers, I'm not about to make them up π). Now go configure something iconic. π
π¦ where this page comes from
- debian bookworm: mpc-ace 7.0.8+dfsg-2 Β· DOC
- debian trixie: mpc-ace 8.0.2+dfsg-2 Β· DOC
- ubuntu jammy: mpc-ace 7.0.6+dfsg-2 Β· DOC
- ubuntu noble: mpc-ace 7.1.2+dfsg-2.1build2 Β· DOC
- ubuntu noble: mpc-ace 7.1.2+dfsg-2.1ubuntu0.1 Β· DOC
- ubuntu questing: mpc-ace 8.0.2+dfsg-2
- ubuntu resolute: mpc-ace 8.0.5+dfsg-2 Β· DOC
- ubuntu stonking: mpc-ace 8.0.5+dfsg-2build1 Β· DOC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms