|
|
Type |
Build Tool |
---|---|
automake |
GNU Automake. |
bcb2007 |
Borland C++ Builder 2007. |
bcb2009 |
CodeGear C++ Builder 2009. |
bds4 |
Support for Borland Developer Studio 4 is incomplete. |
bmake |
Borland Make. |
cc |
Code Composer Studio 2.0 |
Eclipse CDT 6 (for Eclipse "Galileo" 3.5) |
|
Eclipse CDT 7 (for Eclipse "Helios" 3.6) |
|
em3 |
eMbedded Visual C++ 3.00 and 4.00. |
ghs |
Green Hills C++ Builder. |
gnuace |
GNU Make for ACE/TAO/CIAO only (ACE/TAO/CIAO extension). |
html |
html pages are generated for visualization of project information. |
make |
Generic make. The makefiles generated by this project type can be used with any version of make. However, due to configuration issues, it should not be used with ACE or TAO. |
nmake |
Microsoft NMake. |
RPM packaging .spec files. |
|
sle |
Support for Visual SlickEdit is incomplete. |
vc6 |
Visual C++ 6.0. |
vc7 |
Visual Studio .NET 2002. |
vc71 |
Visual Studio .NET 2003. |
vc8 |
Visual Studio 2005. |
vc9 |
Visual Studio 2008. |
vc10 |
Visual Studio 2010. |
Wind River Workbench 2.6. |
|
Wind River Workbench 3.0. |
|
wix |
Wix toolset for .msi creation. |
Option |
Description |
---|---|
-base |
This option allows the user to force every project to inherit from a specified base project. This option can be used multiple times to force multiple inheritance upon a project. |
-complete |
This hidden option can be used to generate a tcsh complete command that allows a user of the tcsh shell to complete on options as well as file names. |
-exclude |
If this option is used with mwc.pl , the directories or mwc files provided in a comma separated list will be excluded when searching for mpc files. Each element provided for exclusion should be relative to the starting directory. This option has no effect when used with mpc.pl. |
-expand_vars |
This option instructs MPC to perform direct replacement of $() variables with the values from the environment (if the -use_env option is used) or the values specified by the -relative option. |
-feature_file |
This option allows the user to override the default feature file (MPC/config/ default.features or ACE_wrappers/bin/MakeProjectCreator/config/default.features ) which may or may not exist. This file can be used to override feature values specified in the global.features file located in the config directory. Feature files are described in the Feature File section. |
-features |
Specifies the feature list to set before processing. This is a comma separated list and should contain no spaces. The -features option can be used multiple times on the same command line, the effect is the same as if the parameters had been specified with a single -features options, with the parameters joined by commas. |
-for_eclipse |
Allows generated makefiles to be used with Eclipse. |
-gendot |
A .dot file, for use with Graphviz, will be created for each workspace processed. |
-genins |
This option instructs MPC to generate an “install” file after processing each project. These “install” files can be used with the prj_install.pl script which will copy portions of the project related files into a user specified location. |
-gfeature_file |
Specifies the global feature file. The default global feature file is global.features found in the config directory. |
-global |
This option specifies the global input file. Values stored within this base project are applied to all generated projects. The default value is ACE_wrappers/bin/MakeProjectCreator/global.mpb or MPC/config/global.mpb. |
-hierarchy |
If this option is used with mwc.pl , it will generate a workspace at each directory between the directory in which it is run and the location of a processed mpc file. This option has no effect when used with mpc.pl and is the default for “make” based workspace types. |
-include |
Include search directories are added with this option. These search directories are used when locating base projects, template input files and templates. It can be used multiple times on the same command line. |
-into |
This option specifies that all generated project files will be placed in a mirrored directory structure. If any project within the workspace is referenced via a full path, use of this option is likely to cause problems. |
-language |
This option is used to specify which language to assume when generating projects. The default language is cplusplus, but csharp, java and vb are also supported. |
-make_coexistence |
Make based project types that normally name the workspace Makefile (bmake or nmake ) will name the generated output files such that they can coexist within the same directory. In essence, the bmake and nmake workspace names will not be Makefile, but the name of the workspace followed by the project type (.bmake or .nmake ). |
-name_modifier |
This option allows the user to modify the output names of projects and workspaces. These are usually determined by either the mpc or mwc file, but can be modified using a pattern replacement. The parameter passed to this option will be used as the pattern and any asterisks (*) found in the pattern will be replaced with the project or workspace name depending on which type of file is being created. |
-apply_project |
This option is only useful with the -name_modifier option. When used in conjunction with -name_modifier, the pattern will be applied to the project name in addition to the project or workspace name. |
-nocomments |
Comments will not be placed in the generated workspace files. |
-noreldefs |
This option specifies that the default relative definitions should not be generated. See the -relative option below. |
-notoplevel |
This option tells mwc.pl to generate all workspace related project files, but do not generate the associated workspace. This option tells mpc.pl to process all mpc files passed in, but it will not generate any project files. |
-recurse |
Search from the current directory for any input files and process them from the directory in which they are located. |
-relative |
Relative paths are used to replace variables enclosed with $(). By default, any environment variable that ends in _ROOT will be automatically used as a relative path replacement. For more information see the -relative Option.. |
-relative_file |
This option allows you to override the default relative definitions file, which is default.rel under the MPC config directory.. |
-static |
Specifies that static project files will be generated from the MPC projects. The default is to generate dynamic project files. |
-template |
This option allows a user to specify an alternate template. Each project type has its own template and this option allows a user to override the default template. |
-ti |
Each project type has a set of template input files. With this option the default template input file can be overridden for a particular project type. For more information see the -ti Option.. |
-type |
This option specifies the type of project or workspace to be generated. It can be specified multiple times to generate different project types for a single set of input files. |
-use_env |
This option instructs MPC to replace all $() instances with the corresponding environment variable value instead of using values provided by the -relative option. |
-value_project |
Use this option to override an mpc project assignment from the command line. This can be used to introduce new name value pairs to a project. However, it must be a valid project assignment. For more information see the -value_project Option.. |
-value_template |
This option can be used to override existing template input variable values from the command line. It can not be used to introduce new template input name value pairs. For more information see the -value_template Option.. |
-version |
The MPC version is printed and no files are processed. |
mwc.pl -relative PROJ_TOP=/usr/projects/top
project {
includes += $(PROJ_TOP)
}
CPPFLAGS += -I..
mpc.pl -type vc71 -ti lib:vc7dsplib -ti dll:vc7dspdll
mwc.pl -value_project includes+=/include/path
mwc.pl -type vc71 -value_template configurations=Release
/foo/bar_root = /foo/bar_root/MPC/config
Keyword |
Description |
---|---|
command_line |
Provide additional command line options to MPC. The value of this setting will be prepended to the options passed to mwc.pl or mpc.pl. |
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 modules include path for Perl to find modules, add a config include path to locate base projects and a template include 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 contains warn=1, warning messages will be printed. If it contains diag=1, diagnostic messages will be printed. If it contains debug=1, debug message will be printed. And lastly, if it contains detail=1, detail messages will be printed. If it contains none of these, MPC will not print out any information or warnings when processing projects or workspaces. Errors are always printed if any are encountered. The default value is warn=1, diag=1, detail=1. |
main_functions |
Provide additional main functions to be recognized in conjunction with automatic executable project recognition. The value assigned should be of the form <language>:<func name>[, <language>:<func name>]*. A function can be specified for all languages by only providing the function name. |
verbose_ordering |
If this is set, mwc.pl will warn the user about references to projects in the after keyword that have not been processed. |
workspace(optional name): optional_base_workspace {
file.mpc
directory
other.mwc
exclude(vc6, vc7, vc71, vc8, vc9, vc10, nmake) {
this_directory
}
exclude(prop:microsoft) {
non_microsoft
}
specific(rpmspec) {
rpm_version = 1.0
}
}
workspace {
...
static {
cmdline += -static
directory/foo.mpc
}
exclude(gnuace, make) {
some.mpc
}
// Associate the name "other" with dir3
associate(other) {
dir3
}
}
project(optional name): base_project, another_base_project {
exename = client
includes += directory_name other_directory
libpaths += /usr/X11R6/lib
Header_Files {
file1.h
file2.h
fileN.h
}
Source_Files {
file1.cpp
file2.cpp
fileN.cpp
}
}
Keyword |
Description |
---|---|
after |
Specifies that this project must be built after 1 or more project names listed. An extended syntax is available
in order to associate name-value pairs with a
dependency: <project
name[:name=value]> |
avoids |
Specifies which features should be disabled in order to generate the project file. Under the GNUACE type, it also specifies which make macros should not be set to build the target. |
custom_only |
This setting instructs MPC to create projects that only contain custom generation targets. Any files included in the projects will be provided by custom component lists defined through the use of Define_Custom. |
dependent_upon |
This keyword can only be used as a header component scoped setting (ie. inside the scope of Header_Files). It determines which file the header file is dependent upon for vc8, and vc9 only. |
dllout |
If defined, specifies where the dynamic libraries will be placed. This overrides libout in the dynamic case. |
dynamicflags |
Specifies preprocessor flags passed to the compiler when building a dynamic library. |
exename |
Determines that the project will be an executable and the name of the executable target. |
exeout |
Specifies where executables will be placed. |
includes |
Specifies one or more directories to supply to the compiler for use as include search paths. |
libout |
Specifies where the dynamic and static libraries will be placed. |
libpaths |
Specifies one or more directories to supply to the compiler for use as library search paths. |
libs |
Specifies one or more libraries to link into the target. Library modifiers may be added when being processed in the template file. For example, library modifiers are added when using the vc6 project type. |
lit_libs |
This is the same as libs except that a library modifier will not be added. |
macros |
Values supplied here will be passed directly to the compiler as command line defined macros. |
managed |
Specifies that the source files should be compiled as managed C++. This is only supported by the nmake, vc7, vc71, vc8, vc9, and vc10 project types. |
no_pch |
It specifies that precompiled headers should not be used for the source files listed within the scope of it’s setting. This keyword can only be used as a source component scoped setting (i.e., inside the scope of Source_Files). |
pch_header |
The name of the precompiled header file. See the discussion below this table for more information. |
pch_source |
The name of the precompiled source file. See the discussion below this table for more information. |
postbuild |
If this is defined in the project, the value will be interpreted as commands to run after the project has been successfully built. The <% %> construct (see Template Files) can be used within this value to access template variables and functions of the template parser. See Common Pseudo Variables for a list of pseudo variables that are also available. |
postclean |
If this is defined in the project, the value will be interpreted as commands to run after the project has been cleaned. It should be noted that this setting is not supported by all project types. As with postbuild, the <% %> construct (see Template Files) can be used within this value to access template variables and functions of the template parser. See Common Pseudo Variables for a list of pseudo variables that are also available. |
prebuild |
If this is defined in the project, the value will be interpreted as commands to run before the project has been built. As with postbuild, the <% %> construct (see Template Files) can be used within this value to access template variables and functions of the template parser. See Common Pseudo Variables for a list of pseudo variables that are also available. |
pure_libs |
This is similar to lit_libs except that no prefix or extension is added to the names specified. |
recurse |
If set to 1, MPC will recurse into directories listed under component listings (such as Source_Files, Header_Files, etc.) and add any component corresponding files to the list. This keyword can be used as a global project setting or a component scoped setting. |
recursive_includes |
This is similar to includes in that it provides include paths to the compiler. However, each path supplied will be recursively searched for sub-directories which will also be provided as include paths to the compiler. |
recursive_libpaths |
This is similar to libpaths in that it provides library search paths to the linker. However, each path supplied will be recursively searched for sub-directories which will also be provided as library search paths to the linker. |
requires |
Specifies which features should be enabled in order to generate the project file. Under the GNUACE type, it also specifies which make macros should be set to build the target. |
sharedname |
Determines that the project will be a library and the name of the dynamic library target. See the discussion below this table for more information. |
staticflags |
Specifies preprocessor flags passed to the compiler when building a static library. |
staticname |
Determines that the project will be a library and the name of the static library target. |
tagchecks |
For GNUACE Make only, specifies one or more names to search for in the macros specified by tagname. |
tagname |
Specifies the GNUACE Make macro to check before building the target. |
version |
Specifies the version number for the library or executable. |
webapp |
Determines whether the project is a Web Application. A web application project will have no project file written but the information will be included in the workspace if web applications are supported by the project type. |
specific(rpmspec) {
rpm_description = \ns {
This description
spans multiple lines.
}
}
Name |
Default Value |
---|---|
Source_Files |
Defaults to all files in the directory that have the following extensions: cpp, cxx, cc, c, and C. |
Header_Files |
Defaults to all files in the directory that have the following extensions: h, hpp, hxx, and hh. |
Inline_Files |
Defaults to all files in the directory that have the following extensions: i and inl. |
Template_Files |
Defaults to all files in the directory that end in the following: _T.cpp, _T.cxx, _T.cc, _T.c, and _T.C. |
Documentation_Files |
Defaults to all files in the directory that match the following: README, readme, .doc, .html and .txt. |
Resource_Files |
Defaults to all files in the directory that match the project name and have an rc extension. |
Source_Files {
file1.cpp
file2.cpp
}
Source_Files(MACRO_NAME) {
BlockA {
file1.cpp
file2.cpp
}
BlockB {
file3.cpp
file4.cpp
}
}
verbatim(<project type>, <location>) {
...
}
verbatim(gnuace, bottom) {
all: foo
}
expand(VAR_NAME) {
$ENV_VAR
last_resort_value
}
specific(prop:windows) {
lit_libs += qt-mt230nc
} else {
lit_libs += qt-mt
}
Project Type |
borland |
make |
microsoft |
windows |
---|---|---|---|---|
automake |
|
Yes |
|
|
bcb2007 |
Yes |
|
|
Yes |
bcb2009 |
Yes |
|
|
Yes |
bds4 |
Yes |
|
|
Yes |
bmake |
Yes |
Yes |
|
Yes |
cc |
|
|
|
Yes |
em3 |
|
|
Yes |
Yes |
ghs |
|
|
|
Depends |
make |
|
Yes |
|
|
nmake |
|
Yes |
Yes |
Yes |
vc6 |
|
|
Yes |
Yes |
vc7 |
|
|
Yes |
Yes |
vc71 |
|
|
Yes |
Yes |
vc8 |
|
|
Yes |
Yes |
vc9 |
|
|
Yes |
Yes |
vc10 |
|
|
Yes |
Yes |
wix |
|
|
|
Yes |
conditional(<project type|property> [, <project type|property> ...]) {
source1.cpp
...
}
conditional(<project type|property> [, <project type|property> ...]) {
source1.cpp
...
} else {
source2.cpp
...
}
project {
Define_Custom(MOC) {
automatic = 0
command = $(QTDIR)/bin/moc
output_option = -o
inputext = .h
pre_extension = _moc
source_outputext = .cpp
keyword mocflags = commandflags
}
// Custom Component
MOC_Files {
QtReactor.h
}
Source_Files {
QtReactor_moc.cpp
}
}
Define_Custom(QtMOC) : MOC {
}
Keyword |
Description |
---|---|
automatic_in |
If set to 1, then attempt to automatically determine which files belong to the set of input files for the custom type. If set to 0, then no files are automatically added to the input files. |
automatic_out |
If set to 1, then attempt to automatically determine which generated files belong to the set of components (Source_Files, Inline_Files , Header_Files, Template_Files, Resource_Files and Documentation_Files) based on type files that the command generates. If omitted, then automatic_out is assumed to be 1. |
command |
The name of the command that should be used to process the input files for the custom type. |
commandflags |
Any options that should be passed to the command. |
dependent |
If this is given a value, then a dependency upon that value will be given to all of the generated files. The default for this is unset and no dependency will be generated. |
dependent_libs |
If this is given a value, then a dependency upon that library value will be given to all of the generated files. The format for this entry should be the basename for the library (no library prefix, postfix, or extension) preceded by any relative or absolute path to the library. The typical use for this would be so that a project is rebuilt when a library needs to be rebuilt for its dependent executable. The default for this is unset and no dependency will be generated. |
inputext |
This is a comma separated list of input file extensions that belong to the command. |
keyword <name> |
This is a special assignment that allows the user to map <name> into the project level namespace. The value (if any) that is assigned to this construct must be one of the keywords that can be used within a Define_Custom clause. The result of this assignment is the ability modify the value of keywords that are normally only accessible within the scope of a custom component (e.g. command, commandflags, etc.). |
libpath |
If the command requires a library that is not in the normal library search path, this keyword can be used to ensure that the command is able to find the library that it needs to run. |
output_option |
If the command takes an option to specify a single file output name, then set it here. Otherwise, this should be omitted. |
output_follows_input |
This setting defaults to 1 and indicates that output files from the custom command will end up in the same directory as the input files. If this is set to 0, it is assumed that the output files will go into the same directory as the .mpc file. |
pch_postrule |
If this is set to 1, then a rule will be added to the custom rule that will modify the source output files to include the precompiled header file. |
postcommand |
This allows users to create arbitrary commands that will be run after the main command is run to process the custom input files. |
pre_extension |
If the command produces multiple files of the same extension, this comma separated list can be used to specify them. For example, tao_idl creates two types of files per extension (C.h, S.h, C.cpp, S.cpp, etc.) This applies to all extension types. |
source_pre_extension |
This is the same as pre_extension except that it only applies to source files. |
inline_pre_extension |
This is the same as pre_extension except that it only applies to inline files. |
header_pre_extension |
This is the same as pre_extension except that it only applies to header files. |
template_pre_extension |
This is the same as pre_extension except that it only applies to template files. |
resource_pre_extension |
This is the same as pre_extension except that it only applies to resource files. |
documentation_pre_extension |
This is the same as pre_extension except that it only applies to documentation files. |
generic_pre_extension |
This is the same as pre_extension except that it only applies to generic files. |
pre_filename |
The syntax for this is the same as pre_extension, but the values specified are prepended to the file name instead of the extension. This applies to all extension types. |
source_pre_filename |
This is the same as pre_filename except that it only applies to source files. |
inline_pre_filename |
This is the same as pre_filename except that it only applies to inline files. |
header_pre_filename |
This is the same as pre_filename except that it only applies to header files. |
template_pre_filename |
This is the same as pre_filename except that it only applies to template files. |
resource_pre_filename |
This is the same as pre_filename except that it only applies to resource files. |
documentation_pre_filename |
This is the same as pre_filename except that it only applies to documentation files. |
generic_pre_filename |
This is the same as pre_filename except that it only applies to generic files. |
pre_dirname |
The syntax for this is the same as pre_filename, but the value specified is prepended to the directory portion of the file name instead of the file name itself. If a separate directory is desired, the pre_dirname setting should end in a slash. |
source_pre_dirname |
This is the same as pre_dirname except that it only applies to source files. |
inline_pre_dirname |
This is the same as pre_dirname except that it only applies to inline files. |
header_pre_dirname |
This is the same as pre_dirname except that it only applies to header files. |
template_pre_dirname |
This is the same as pre_dirname except that it only applies to template files. |
resource_pre_dirname |
This is the same as pre_dirname except that it only applies to resource files. |
documentation_pre_dirname |
This is the same as pre_dirname except that it only applies to documentation files. |
generic_pre_dirname |
This is the same as pre_dirname except that it only applies to generic files. |
source_outputext |
This is a comma separated list of possible source file output extensions. If the command does not produce source files, then this can be omitted. |
inline_outputext |
This is a comma separated list of possible inline file output extensions. If the command does not produce inline files, then this can be omitted. |
header_outputext |
This is a comma separated list of possible header file output extensions. If the command does not produce header files, then this can be omitted. |
template_outputext |
This is a comma separated list of possible template file output extensions. If the command does not produce template files, then this can be omitted. |
resource_outputext |
This is a comma separated list of possible resource file output extensions. If the command does not produce resource files, then this can be omitted. |
documentation_outputext |
This is a comma separated list of possible documentation file output extensions. If the command does not produce documentation files, then this can be omitted. |
generic_outputext |
If the command does not generate any of the other output types listed above, then the extensions should be listed under this. |
project {
Define_Custom(Quogen) {
automatic = 0
command = perl quogen.pl
commandflags = --debuglevel=1 --language=c++ \
--kernel_language=c++
inputext = .prp
keyword quogenflags = commandflags
}
Quogen_Files {
foo.prp >> hello.h hello.cpp
}
Source_Files {
hello.cpp
}
}
Quogen_Files {
foo.prp >> hello.h hello.cpp << foo.in
}
project {
Define_Custom(TEST) {
optional(keyword) {
flag_keyword(option) += value [, value]
}
}
}
Define_Custom(IDL) {
...
inputext = .idl
source_pre_extension = C, S
header_pre_extension = C, S
inline_pre_extension = C, S
source_outputext = .cpp, .cxx, .cc, .C
header_outputext = .h, .hpp, .hxx, .hh
inline_outputext = .inl, .i
keyword idlflags = commandflags
optional(source_pre_extension) {
commandflags(-GA) += A
}
optional(template_outputext) {
commandflags(!-Sc) += S_T.cpp, S_T.cxx, S_T.cc, S_T.C
}
optional(header_pre_extension) {
commandflags(!-Sc) += S_T
}
optional(inline_pre_extension) {
commandflags(!-Sc) += S_T
}
}
MOC_Files {
commandflags += -nw
gendir = moc_generated
QtReactor.h
}
Source_Files {
moc_generated/QtReactor_moc.cpp
}
project: taoidldefaults {
specific(!automake) {
tao_idlflags += -Sc -hs _s.h -si _s.i -ss _s.cpp -hc .h -ci .i -cs .cpp
}
// This allows "make idl_stubs" to work
verbatim(gnuace, macros) {
IDL_CLIENT_HDR_EXT ?= .h
IDL_CLIENT_INL_EXT ?= .i
IDL_CLIENT_SRC_EXT ?= .cpp
IDL_SERVER_HDR_EXT ?= _s.h
IDL_SERVER_INL_EXT ?= _s.i
IDL_SERVER_SRC_EXT ?= _s.cpp
}
Modify_Custom(IDL) {
source_pre_extension = , _s
header_pre_extension = , _s
inline_pre_extension = , _s
inline_outputext = .i
}
}
Variable |
Description |
---|---|
<%input%> |
The input file to the command. |
<%input_basename%> |
The basename of the input file to the command. |
<%input_dirname%> |
The directory name of the input file to the command. |
<%input_noext%> |
The input file to the command with the extension stripped off. |
<%input_ext%> |
This gives the file extension of the input file (if there is one). |
<%output%> |
The output file created by the original command. |
<%output_basename%> |
The basename of the output file to the command. |
<%output_dirname%> |
The directory name of the output file to the command. |
<%output_noext%> |
The output file created by the original command with the extension stripped off. |
<%output_ext%> |
This gives the file extension of the output file (if there is one). |
The output file can be referenced as a generic output file, or it can be referenced as a component file using one of the following variables. If it does not match the specific type the value will be empty. |
|
<%documentation_file%> |
The output file if it is a documentation file. |
<%header_file%> |
The output file if it has a header file extension. |
<%inline_file%> |
The output file if it has an inline file extension. |
<%resource_file%> (<%resx_file%> for C# and VB) |
The output file if it has a resource file extension. |
<%source_file%> |
The output file if it has a source file extension. |
<%template_file%> |
The output file if it is a template file. |
<%documentation_file_noext%> |
The output file without an extension if it is a documentation file. |
<%header_file_noext%> |
The output file without an extension if it has a header file extension. |
<%inline_file_noext%> |
The output file without an extension if it has an inline file extension. |
<%resource_file_noext%> (<%resx_file_noext%> for C# and VB) |
The output file without an extension if it has a resource file extension. |
<%source_file_noext%> |
The output file without an extension if it has a source file extension. |
<%template_file_noext%> |
The output file without an extension if it is a template file. |
The extensions of the input and output files are also available as pseudo variables. |
|
<%input_ext%> |
The extension of the input file (if it has one). |
<%output_ext%> |
The extension of the output file (if it has one). |
Variable |
Description |
---|---|
<%and%> |
A platform and project non-specific representation of a command conditional and. |
<%cat%> |
A platform non-specific command to print a file to the terminal. |
<%cmdsep%> |
A project and platform non-specific command separator which always runs right-hand side of the command. For example, in the following psuedo commmand string, both the <%cat%> and <%mv%> commands would be run. <%cat%> <%source_file%> <%gt%> foo <%cmdsep%> <%mv%> foo other_dir |
<%cmp%> |
A platform non-specific command to compare two files. |
<%cp%> |
A platform non-specific command to copy a file. |
<%crlf%> |
A platform non-specific line ending. |
<%equote%> |
A project non-specific escaped double quote. |
<%gendir%> |
The output directory specified by the gendir setting. This variable is not available to postbuild, postclean, orprebuild. |
<%gt%> |
A platform and project non-specific representation of a greater than sign. |
<%lt%> |
A platform and project non-specific representation of a less than sign. |
<%mkdir%> |
A platform non-specific command to make a directory. |
<%mv%> |
A platform non-specific command to move a file. |
<%nul%> |
A platform non-specific null device. |
<%pathsep%> |
A platform non-specific path separator (; or :). |
<%or%> |
A platform and project non-specific representation of a command conditional or. |
<%os%> |
Returns either win32 or unix. |
<%prj_type%> |
The project type as supplied by the -type command line option. |
<%quote%> |
A project non-specific representation of a double quote. |
<%rm%> |
A platform non-specific command to delete a file. |
<%rmdir%> |
A platform non-specific recursive directory delete command. |
<%slash%> |
A platform non-specific directory separator. |
<%temporary%> |
A temporary file name. The generated temporary file name contains no directory portion and is the same for each use within the same variable setting. |
The following variables will be set to the known extension for Windows based project types and empty on non-Windows based project types. |
|
<%bat%> |
The extension for batch files. |
<%cmd%> |
The extension for command files. |
<%exe%> |
The extension for executable files. |
boost = 0
bzip2 = 0
java = 0
mfc = 0
python = 0
qt = 0
rpc = 0
swig_java = 0
swig_perl = 0
swig_php = 0
swig_python = 0
swig_ruby = 0
swig_tcl = 0
uses_wchar = 0
xalan = 0
xerces = 0
xerces2 = 0
xerces3 = 0
ziparchive = 0
zlib = 0
zzip = 0
// ziparchive.mpb
feature(ziparchive) {
includes += $(ZIPARCHIVEROOT)
libpaths += $(ZIPARCHIVEROOT)/lib
libs += ziparch
}
project: taoserver {
}
Auto_Disconnect.cpp Loopback_Supplier.h RTEC_Initializer.cpp
Auto_Disconnect.h Low_Priority_Setup.cpp RTEC_Initializer.h
Auto_Disconnect.inl Low_Priority_Setup.h rtec_perf_export.h
Auto_Functor.cpp Low_Priority_Setup.inl RTEC_Perf.mpc
Auto_Functor.h Makefile RTPOA_Setup.cpp
Auto_Functor.inl ORB_Holder.cpp RTPOA_Setup.h
Client_Group.cpp ORB_Holder.h RTPOA_Setup.inl
Client_Group.h ORB_Holder.inl RTServer_Setup.cpp
Client_Group.inl ORB_Shutdown.cpp RTServer_Setup.h
Client_Options.cpp ORB_Shutdown.h RTServer_Setup.inl
Client_Options.h ORB_Shutdown.inl Send_Task.cpp
Client_Pair.cpp ORB_Task_Activator.cpp Send_Task.h
Client_Pair.h ORB_Task_Activator.h Send_Task_Stopper.cpp
Client_Pair.inl ORB_Task_Activator.inl Send_Task_Stopper.h
Consumer.cpp ORB_Task.cpp Send_Task_Stopper.inl
Consumer.h ORB_Task.h Servant_var.cpp
Control.cpp ORB_Task.inl Servant_var.h
Control.h Peer_Base.cpp Servant_var.inl
EC_Destroyer.cpp Peer_Base.h Shutdown.cpp
EC_Destroyer.h PriorityBand_Setup.cpp Shutdown.h
EC_Destroyer.inl PriorityBand_Setup.h Shutdown.inl
Federated_Test.idl PriorityBand_Setup.inl Supplier.cpp
Implicit_Deactivator.cpp RIR_Narrow.cpp Supplier.h
Implicit_Deactivator.h RIR_Narrow.h SyncScope_Setup.cpp
Implicit_Deactivator.inl RT_Class.cpp SyncScope_Setup.h
Loopback_Consumer.cpp RT_Class.h SyncScope_Setup.inl
Loopback_Consumer.h RT_Class.inl TAO_RTEC_Perf.dsp
Loopback.cpp RTClient_Setup.cpp TAO_RTEC_Perf.dsw
Loopback.h RTClient_Setup.h Task_Activator.cpp
Loopback_Pair.cpp RTClient_Setup.inl Task_Activator.h
Loopback_Pair.h RTCORBA_Setup.cpp Task_Activator.inl
Loopback_Pair.inl RTCORBA_Setup.h
Loopback_Supplier.cpp RTCORBA_Setup.inl
project(RTEC_Perf): strategies, rtcorbaevent, minimum_corba {
sharedname = TAO_RTEC_Perf
idlflags += -Wb,export_macro=TAO_RTEC_Perf_Export \
-Wb,export_include=rtec_perf_export.h
dllflags += TAO_RTEC_PERF_BUILD_DLL
Template_Files {
Auto_Disconnect.cpp
Auto_Functor.cpp
Low_Priority_Setup.cpp
RIR_Narrow.cpp
Servant_var.cpp
Shutdown.cpp
Task_Activator.cpp
}
}
project(RTEC_Perf): strategies, rtcorbaevent, minimum_corba {
sharedname = TAO_RTEC_Perf
idlflags += -Wb,export_macro=TAO_RTEC_Perf_Export \
-Wb,export_include=rtec_perf_export.h
dllflags += TAO_RTEC_PERF_BUILD_DLL
Template_Files {
Auto_Disconnect.cpp
Auto_Functor.cpp
Low_Priority_Setup.cpp
RIR_Narrow.cpp
Servant_var.cpp
Shutdown.cpp
Task_Activator.cpp
}
<%if(exename)%>BIN = <%exename%><%else%>LIB = <%sharedname%><%endif%>
<%if(exename)%>
BIN = <%exename%>
<%else%>
LIB = <%sharedname%>
<%endif%>
FILES=<%foreach(fvar, idl_files source_files header_files)%> <%fvar%><%endfor%>
FILES=<%foreach(idl_files source_files header_files)%> <%idl_file%><%endfor%>
<%foreach(filelist)%> <%filelist%><%endfor%>
Keyword |
Description |
---|---|
basename |
Evaluates the variable name and removes the directory portion from that value. |
basenoextension |
This is similar to basename except that the extension is also removed from the variable name value. |
comment |
The value passed to comment is ignored and can be any set of characters, except a new line or a closing parenthesis. |
compares |
This function returns true if the variable value (first parameter) is equal to the string value (second parameter). |
contains |
This function returns true if the variable value (first parameter) contains the regular expression (second parameter). |
deref |
Dereference the variable passed as a parameter, treating its value as another variable name and returning that variable's value. |
dirname |
Evaluates the variable name and removes the basename from that value. |
duplicate_index |
This function returns a number based on the number of times a file with the same name (but different directory) is seen within a project. The function returns false upon the first occurrence of a file. |
else |
Used with the if statement. An else block will be evaluated if the statement does not evaluate to true. |
endfor |
Used with foreach. This ends foreach block. |
endif |
Used with the if statement. This ends an if or if/else block. |
ends_with |
This function returns true if the variable value (first parameter) ends with the regular expression (second parameter). |
eval |
This is similar to eval in perl. The template variable passed to this function will be evaluated within the context of the current template. |
extensions |
Returns a list of extensions based on the component name parameter (e.g., source_files, header_files, etc.) |
flag_overrides |
This is directly related to overriding the project-wide settings in an mpc file. It takes two variable names that are comma separated. The first corresponds to a file name and the second is any variable name. |
foreach |
The given variable names are evaluated in a list context which is space separated. |
forfirst |
Used with foreach. The literal value passed to forfirst will be placed on the first iteration of foreach. |
forlast |
Used with foreach. The literal value passed to forlast will be placed on the last iteration of foreach. |
fornotfirst |
Used with foreach. The literal value passed to fornotfirst will be placed on each iteration of foreach except for the first. |
fornotlast |
Used with foreach. The literal value passed to fornotlast will be placed on each iteration of foreach except for the last. |
full_path |
Returns full path of the value of the variable name passed a the parameter. |
has_extension |
Returns true is the variable value has a file extension. |
if |
Used to determine if a variable is defined. The not operator (! ) can be used to invert the if check. This construct will only check for values defined within an mpc or mpt file. Default values (even those implemented by the project creators) are not considered in the if statement. |
keyname_used |
This function is used to associate a key with a variable value. If the key has been associated with a variable value more than once, either through physical repetition of the key in the template or through evaluation of a foreach context, the count of association will be appended to the output. |
lc |
Return the given variable value in all lower case characters. |
marker |
This is directly related to the verbatim keyword from the mpc syntax. This can be used to designate markers within a template. Ex. <%marker(local)%>. |
multiple |
This function returns true if the array parameter contains multiple values. |
noextension |
Evaluates the variable name value as a file name and removes the extension from that value including the period. |
normalize |
Convert spaces, dashes, slashes, dollar signs, parenthesis and dots in the given variable value to underscores. |
remove_from |
This function will remove a file in a component list. It requires three parameters. The first parameter is a component name (e.g., Source_Files), the second parameter is a regular expression pattern and the third parameter is a project or template variable name. The fourth and optional parameter allows you to alter the project or template variable value by removing the end matching portion. If the value of the project or template variable (i.e., parameter three) after being modified by parameter four and having the regular expression pattern (i.e., parameter two) appended to it matches any value within the compent list (named by parameter one), it will be removed from that component list and passed back. any |
reverse |
This function reverses the order of the array parameter values. |
scope |
This is used to set the scope of execution of a function that will operate on the template output. A scope is begun by passing "enter" as the first parameter and a function name as the second parameter. Currently, the only function name supported is "escape". The third parameter specifies a string on which the function will operate. Any template text that matches the string parameter while within this scope will be transformed by the function parameter. A scope is then ended by passing "leave". |
set |
This function is used to set or create a template variable. This function takes two parameters; the first is the template variable name and the second is the variable value. |
sort |
This function sorts the array parameter values. |
starts_with |
This function returns true if the variable value (first parameter) starts with the regular expression (second parameter). |
transdir |
Replaces values within the directory portion of a variable value with something that can be used as a relative path. The current working directory is removed and ".." is replaced with "dotdot". |
translate_vars |
The first parameter to this function is the name of a variable. The second, optional, parameter is the operating system for which the project is being generated (e.g., linux, solaris, win32, etc.) It replaces $(...) found within the value of the variable with the equivalent environment variable reference based on the operating system. |
uc |
Return the given variable value in all upper case characters. |
ucw |
Return the given variable value with the first letter of each word in upper case. Words are separated by spaces or underscores. |
uniq |
This function returns the unique set of the array parameter values. |
Value |
Description |
---|---|
am_version |
Implemented by the Automake project creator module, converts the version setting into a suitable value for automake. |
ciao |
Implemented by the GNUACE project creator module, specifies that the project uses CIAO. |
compilers |
Implemented by the Make project creator module, provides the compiler name based on the current project language. |
cppdir |
This value is implemented by the BMake project creator module. It returns a semicolon separated list of directories taken from each value in the Source_Files list. |
custom_types |
Contains a list of the custom build types. See Custom Types for more details. |
cwd |
The full current working directory. |
forcount |
This only has a value within the context of a foreach and provides a 1 based count, by default, of the index of the elements in foreach. |
guid |
This value is implemented by the VC7 and WIX project creator modules. It returns a guid value based on the project that is usable within VC7, VC71, VC8, VC9, VC10 and WIX project files. |
language |
This value is implemented by the VC7 and Make project creator modules. It returns the current language setting for the project. |
make_file_name |
This value is implemented by the VC6 and EM3 project creator modules. It returns the project name with the make file extension that corresponds to the particular project type. |
project_file |
This variable contains the name of the output file for the current project being generated. |
project_name |
This variable contains the name of the current project being generated. |
rcdir |
This value is implemented by the BMake project creator module. It returns a semicolon separated list of directories taken from each value in the Resource_Files list. |
source_directory |
This value is implemented by the WIX project creator module. It converts the variable portion of the binary output directory (either exeout, dllout, or libout) to a suitable value for WIX. |
tao |
Implemented by the GNUACE project creator module, specifies that the project uses TAO. |
vcversion |
This value is implemented by the VC7ProjectCreator. It returns the version number of the type of project being generated. 7.00 is return for vc7, 7.10 is return for vc71 and 8.00 is returned for vc8, 9.00 is returned for vc9, 10.00 is returned for vc10. |
vpath |
This value is implemented by the GNUACEProjectCreator. It returns a value, based on the location of the source files, that specifies the VPATH setting for GNU Make. |
document_template.pl v1.3
Usage: document_template.pl <template> [<html output> [language]]
html output - This defaults to the name of the template file with the .mpd
extension replaced with .html.
language - This defaults to the language for which the template is designed.
It can be any of the valid language settings for MPC:
cplusplus csharp java vb
Value |
Description |
---|---|
dependencies |
The files on which the processing of the custom input file depends. |
gendir |
The output directory associated with a particular input file. This field has no meaning when accessed directly through the custom_type. It should always be used within the context of a flag_overrides (see Template File Keywords). |
input_files |
The input files associated with the custom type. |
inputexts |
The input file extensions associated with the custom type. |
non_source_output_files |
All output files generated from the custom input file that are not considered source code files by MPC. |
output_files |
All output files generated from the custom input file. |
source_output_files |
All output files generated from the custom input file that are considered source code files by MPC. |
<%if(custom_types)%>
<%foreach(custom_types)%>
<%foreach(custom_type->input_files)%>
<%foreach(custom_type->input_file->output_files)%>
<%custom_type->input_file->output_file%>: <%custom_type->input_file%>
<%custom_type->command%> <%custom_type->commandflags%> $@
<%endfor%>
<%endfor%>
<%endfor%>
<%endif%>
Value |
Description |
---|---|
command |
The effective command, taking into account the flag_overrides. |
command->outopt |
The output_option for this particular command, taking into account the flag_overrides. |
command->outfile |
The first output file for this particular command (for use with outopt). |
command->flags |
The commandflags for this particular command, taking into account the flag_overrides. |
command->gdir |
The gendir for this particular command. |
Field Name |
Description |
---|---|
files |
The input files associated with the group. |
component_name |
The name of the set of multiple groups of files. |
<%if(grouped_source_files)%>
<%comment(Get back each set of grouped files)%>
<%foreach(grouped_source_files)%>
<%comment(This will provide the name of the group)%>
<%grouped_source_file%> = \
<%comment(Get all the source files in a single group)%>
<%foreach(grouped_source_file->files)%>
<%grouped_source_file->file)%><%fornotlast(" \\")%>
<%endfor%>
<%endfor%>
ifndef <%grouped_source_files->component_name%>
<%grouped_source_files->component_name%> = \
<%foreach(grouped_source_files)%>
<%grouped_source_file%><%fornotlast(" \\")%>
<%endfor%>
endif
<%endif%>
variable_name = value1 "value 2"
variable_name += another_value
// mpt file
configurations = Release Debug
common_defines = WIN32 _CONSOLE
Release {
compile_flags = /W3 /GX /O2 /MD /GR
defines = NDEBUG
}
Debug {
compile_flags = /W3 /Gm /GX /Zi /Od /MDd /GR /Gy
defines = _DEBUG
}
conditional_include "vcfullmacros"
<%foreach(configurations)%>
Name = <%configuration%>
<%compile_flags%><%foreach(defines common_defines)%> /D <%define%>=1<%endfor%>
<%endfor%>
Name = Release
/W3 /GX /O2 /MD /GR /D NDEBUG=1 /D WIN32=1 /D _CONSOLE=1
Name = Debug
/W3 /Gm /GX /Zi /Od /MDd /GR /Gy /D _DEBUG=1 /D WIN32=1 /D _CONSOLE=1
//=======================================================================
// This project has been generated by MPC.
// CAUTION! Hand edit only if you know what you are doing!
//=======================================================================
// Section 1 - PROJECT OPTIONS
ctags:*
debugSwitches:-nw
//end-proj-opts
// Section 2 - MAKEFILE
Makefile.<%project_name%>
// Section 3 - OPTIONS
//end-options
// Section 4 - TARGET FILE
<%if(exename)%>
<%exename%>
<%else%>
<%if(sharedname)%>
<%sharedname%>
<%else%>
<%if(staticname)%>
<%staticname%>
<%endif%>
<%endif%>
<%endif%>
// Section 5 - SOURCE FILES
<%foreach(source_files)%>
<%source_file%>
<%endfor%>
//end-srcfiles
// Section 6 - INCLUDE DIRECTORIES
<%foreach(includes)%>
<%include%>
<%endfor%>
//end-include-dirs
// Section 7 - LIBRARY DIRECTORIES
<%foreach(libpaths)%>
<%libpath%>
<%endfor%>
//end-library-dirs
// Section 8 - DEFINITIONS
<%foreach(macros defines)%>
-D<%macro%>
<%endfor%>
<%if(pch_header)%>
<%foreach(pch_defines)%>
-D<%pch_define%>
<%endfor%>
<%endif%>
//end-defs
// Section 9 - C FLAGS
<%cflags("-g")%>
// Section 10 - LIBRARY FLAGS
<%libflags%>
// Section 11 - SRC DIRECTORY
.
// Section 12 - OBJ DIRECTORY
<%objdir(".")%>
// Section 13 - BIN DIRECTORY
<%if(exeout)%><%exeout%><%else%>.<%endif%>
// User targets section. Following lines will be
// inserted into Makefile right after the generated cleanall target.
// The Project File editor does not edit these lines - edit the .vpj
// directly. You should know what you are doing.
// Section 14 - USER TARGETS
<%marker(top)%>
<%marker(macros)%>
<%marker(local)%>
<%marker(bottom)%>
//end-user-targets
// Section 15 - LIBRARY FILES
<%foreach(libs lit_libs pure_libs)%>
<%lib%>
<%endfor%>
//end-library-files
package FictionalProjectCreator;
# ************************************************************
# Description : A Fictional Project Creator
# Author : Chad Elliott
# Create Date : 10/01/2004
# ************************************************************
# ************************************************************
# Pragmas
# ************************************************************
use strict;
use MakeProjectBase;
use ProjectCreator;
use vars qw(@ISA);
@ISA = qw(MakeProjectBase ProjectCreator);
# ************************************************************
# Subroutine Section
# ************************************************************
sub convert_slashes {
#my $self = shift;
return 0;
}
sub project_file_extension {
#my $self = shift;
return '.fic';
}
sub get_dll_exe_template_input_file {
#my $self = shift;
return 'fictionalexe';
}
sub get_dll_template_input_file {
#my $self = shift;
return 'fictionaldll';
}
sub get_template {
#my $self = shift;
return 'fictional';
}
1;
package FictionalWorkspaceCreator;
# ************************************************************
# Description : A Fictional Workspace Creator
# Author : Chad Elliott
# Create Date : 10/01/2004
# ************************************************************
# ************************************************************
# Pragmas
# ************************************************************
use strict;
use FictionalProjectCreator;
use WorkspaceCreator;
use vars qw(@ISA);
@ISA = qw(WorkspaceCreator);
# ************************************************************
# Subroutine Section
# ************************************************************
sub workspace_file_name {
my $self = shift;
return $self->get_modified_workspace_name($self->get_workspace_name(), '.fws');
}
sub pre_workspace {
my($self, $fh) = @_;
my $crlf = $self->crlf();
print $fh '<?xml version="1.0" encoding="UTF-8"?>', $crlf,
'<!-- MPC Command -->', $crlf,
"<!-- $0 @ARGV -->", $crlf;
}
sub write_comps {
my($self, $fh) = @_;
my $projects = $self->get_projects();
my @list = $self->sort_dependencies($projects);
my $crlf = $self->crlf();
print $fh '<projects>', $crlf;
foreach my $project (@list) {
print $fh " <project path=\"$project\"/>$crlf";
}
print $fh "</projects>$crlf";
}
1;