Running the Workspace Generator
-------------------------------

The most common way to use the Make Project Creator is to run the
workspace generator (mwc.pl).  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.


Usage: mwc.pl [-global <file>] [-include <directory>] [-recurse]
              [-ti <dll | lib | dll_exe | lib_exe>:<file>] [-hierarchy]
              [-template <file>] [-relative NAME=VAR] [-base <project>]
              [-noreldefs] [-notoplevel] [-static]
              [-value_template <NAME+=VAL | NAME=VAL | NAME-=VAL>]
              [-value_project <NAME+=VAL | NAME=VAL | NAME-=VAL>]
              [-feature_file <file name>] [-make_coexistence]
              [-exclude <directories>] [-name_modifier <pattern>]
              [-apply_project]
              [-type <automake | borland | em3 | ghs | gnuace | make |
                      nmake | va4 | vc6 | vc7 | vc71>]
              [files]

       -base           Add <project> as a base project to each generated
                       project file.
       -exclude        Use this option to exclude directories when searching
                       for input files.
       -feature_file   Specifies the feature file to read before processing.
                       The default feature file is default.features under the
                       config directory.
       -global         Specifies the global input file.  Values stored
                       within this file are applied to all projects.
       -hierarchy      Generate a workspace in a hierarchical fashion.
       -include        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.
       -ti             Specifies the template input file (with no extension)
                       for the specific type as shown above
                       (ex. -ti dll_exe:vc8exe)
       -template       Specifies the template name (with no extension).
       -static         Specifies that only static projects will be generated.
                       By default, only dynamic projects will be generated.
       -recurse        Recurse from the current directory and generate from
                       all found input files.
       -relative       Any $() variable in an mpc 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.
       -make_coexistence If multiple 'make' based project types are
                       generated, they will be named such that they can coexist.
       -name_modifier  Modify output names.  The pattern passed to this
                       parameter will have the '*' portion replaced with the
                       actual output name.  Ex. *_Static
       -apply_project  When used in conjunction with -name_modifier, it applies
                       the name modifier to the project name also.
       -noreldefs      Do not try to generate default relative definitions.
       -notoplevel     Do not generate the top level target file.  Files
                       are still process, but no top level file is created.
       -value_template This option allows modification of a template input
                       name value pair.  Use += to add VAL to the NAME's
                       value.  Use -= to subtract and = to override the value.
                       It is important to note that this will only modify
                       existing template input name value pairs and can not
                       be used to introduce new name value pairs.
       -value_project  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.
       -type           Specifies the type of project file to generate.  This
                       option can be used multiple times to generate multiple
                       types.  If -type is not used, it defaults to 'gnuace'.

The default global input file
(ACE_wrappers/bin/MakeProjectCreator/config/global.mpb) is used if -global
is not specified on the command line.

Two include directories are used by default
(ACE_wrappers/bin/MakeProjectCreator/config and
ACE_wrappers/bin/MakeProjectCreator/templates).

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 -ti option.  The file must have a 'mpt' extension
and must reside within the include search directories.  NOTE: the 'lib' and
the 'lib_exe' template input files are only used if the project creator makes
a separate project file for dynamic libraries and static libraries.

The -exclude option is used to exclude directories when searching for input
files.  NOTE: This option has no effect when used with mpc.pl.

The -hierarchy option is used to force the generation of a hierarchical
workspace at each directory level in between the toplevel directory and the
location of the mpc file that is being processed.  NOTE: This option only
has an effect when passed to mwc.pl.

The -template option is used to override the default template name.  This
file should have a .mpd extension and sit in one of the include search
directories.  NOTE: The -template option overrides the template file for all
types specified.

The -static option can be used to generate only static project files.

The -static_only option has been replaced by the -static option.  Currently,
MPC only supports generating dynamic projects or static projects, but not
both during the same run.  To generate them both you must run MPC twice, once
with the -static option and once without.  Additionally, the vc6, em3, vc7,
vc71 and va4 project names will no longer automatically have _Static
appended to the project name when generating static projects.  This can
still be achieved by using the -name_modifier option.

The -name_modifier option can be used to modify the generated workspace or
project name.  The parameter to the -name_modifier option is a pattern where
an asterisk (*) within the pattern is replaced by the actual workspace or
project name.  Thus, passing -name_modifier '*_Static' to mwc.pl will result
in all workspace and project names ending in _Static. (Ex. ACE_Static.dsw,
ACE_Static.dsp, etc.)

The -apply_project option, when used in conjunction with the -name_modifier
option, causes MPC to apply the name modifier to the project name in
addition to the workspace and project file names.  This option has no effect
outside the scope of the -name_modifier option.

The -noreldefs option says not to generate default relative definitions for
ACE_ROOT and TAO_ROOT (which would come from environment variables).

The -notoplevel option tells mwc.pl to generate all projects for a
workspace, but do not generate the top level workspace file.  For mpc.pl, it
says process the mpc files, but do not generate the project files.

The -recurse option is used to search for all files that could be processed
from the current directory and its sub-directories.  If directories are
passed in a comma separated list (e.g -recurse=examples,apps,TAO), then
those directories will be excluded when searching for project or workspace
files.

The -type option can be used multiple times on the same command line to
generate projects of different types per mpc file.  The default type is
always gnuace.  NOTE: The -ti option overrides the template input file for all
types specified.

The -feature_file specifies a file to be read that enables or disables
features.  These feature names can be anything, but they should correspond
to values used for the 'requires' and 'avoids' keywords.  If a feature is
required and is not enable 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.

Running only the Project Generator
----------------------------------

Most of what is stated about the Workspace Generator applies to the Project
Generator 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.


Usage: mpc.pl [-global <file>] [-include <directory>] [-recurse]
              [-ti <dll | lib | dll_exe | lib_exe>:<file>] [-hierarchy]
              [-template <file>] [-relative NAME=VAR] [-base <project>]
              [-noreldefs] [-notoplevel] [-static]
              [-value_template <NAME+=VAL | NAME=VAL | NAME-=VAL>]
              [-value_project <NAME+=VAL | NAME=VAL | NAME-=VAL>]
              [-feature_file <file name>] [-make_coexistence]
              [-exclude <directories>] [-name_modifier <pattern>]
              [-apply_project]
              [-type <automake | borland | em3 | ghs | gnuace | make |
                      nmake | va4 | vc6 | vc7 | vc71>]
              [files]

       -base           Add <project> as a base project to each generated
                       project file.
       -exclude        Use this option to exclude directories when searching
                       for input files.
       -feature_file   Specifies the feature file to read before processing.
                       The default feature file is default.features under the
                       config directory.
       -global         Specifies the global input file.  Values stored
                       within this file are applied to all projects.
       -hierarchy      Generate a workspace in a hierarchical fashion.
       -include        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.
       -ti             Specifies the template input file (with no extension)
                       for the specific type as shown above
                       (ex. -ti dll_exe:vc8exe)
       -template       Specifies the template name (with no extension).
       -static         Specifies that only static projects will be generated.
                       By default, only dynamic projects will be generated.
       -recurse        Recurse from the current directory and generate from
                       all found input files.
       -relative       Any $() variable in an mpc 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.
       -make_coexistence If multiple 'make' based project types are
                       generated, they will be named such that they can coexist.
       -name_modifier  Modify output names.  The pattern passed to this
                       parameter will have the '*' portion replaced with the
                       actual output name.  Ex. *_Static
       -apply_project  When used in conjunction with -name_modifier, it applies
                       the name modifier to the project name also.
       -noreldefs      Do not try to generate default relative definitions.
       -notoplevel     Do not generate the top level target file.  Files
                       are still process, but no top level file is created.
       -value_template This option allows modification of a template input
                       name value pair.  Use += to add VAL to the NAME's
                       value.  Use -= to subtract and = to override the value.
                       It is important to note that this will only modify
                       existing template input name value pairs and can not
                       be used to introduce new name value pairs.
       -value_project  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.
       -type           Specifies the type of project file to generate.  This
                       option can be used multiple times to generate multiple
                       types.  If -type is not used, it defaults to 'gnuace'.
