summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2002-07-09 12:30:46 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2002-07-09 12:30:46 +0000
commit01a9424e6be1b3be3f5cff7662731b5612fada84 (patch)
treecf5aff95e00f458a65068feb44e5afd08c59e13e
parentf3778d16b9f9db3ca772a23f59c14f2ab69fca24 (diff)
downloadATCD-01a9424e6be1b3be3f5cff7662731b5612fada84.tar.gz
ChangeLogTag: Tue Jul 9 07:24:06 2002 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog100
-rw-r--r--ChangeLogs/ChangeLog-03a100
-rw-r--r--bin/MakeProjectCreator/README121
-rw-r--r--bin/MakeProjectCreator/USAGE92
-rw-r--r--bin/MakeProjectCreator/config/aceexe.mpb6
-rw-r--r--bin/MakeProjectCreator/config/acelib.mpb6
-rw-r--r--bin/MakeProjectCreator/config/aceversion.mpb3
-rw-r--r--bin/MakeProjectCreator/config/avstreamsexe.mpb5
-rw-r--r--bin/MakeProjectCreator/config/client.mpb3
-rw-r--r--bin/MakeProjectCreator/config/global.mpb5
-rw-r--r--bin/MakeProjectCreator/config/messaging.mpb4
-rw-r--r--bin/MakeProjectCreator/config/namingexe.mpb4
-rw-r--r--bin/MakeProjectCreator/config/notify.mpb4
-rw-r--r--bin/MakeProjectCreator/config/notifytest.mpb6
-rw-r--r--bin/MakeProjectCreator/config/orbsvcsexe.mpb4
-rw-r--r--bin/MakeProjectCreator/config/orbsvcslib.mpb5
-rw-r--r--bin/MakeProjectCreator/config/rt_client.mpb4
-rw-r--r--bin/MakeProjectCreator/config/rt_server.mpb4
-rw-r--r--bin/MakeProjectCreator/config/rteventexe.mpb4
-rw-r--r--bin/MakeProjectCreator/config/server.mpb5
-rw-r--r--bin/MakeProjectCreator/config/strategies.mpb4
-rw-r--r--bin/MakeProjectCreator/config/taoexe.mpb9
-rw-r--r--bin/MakeProjectCreator/config/taolib.mpb7
-rw-r--r--bin/MakeProjectCreator/config/taolib_with_idl.mpb4
-rw-r--r--bin/MakeProjectCreator/config/taoversion.mpb3
-rw-r--r--bin/MakeProjectCreator/modules/BorlandProjectCreator.pm71
-rw-r--r--bin/MakeProjectCreator/modules/BorlandWorkspaceCreator.pm82
-rw-r--r--bin/MakeProjectCreator/modules/Creator.pm340
-rw-r--r--bin/MakeProjectCreator/modules/Driver.pm273
-rw-r--r--bin/MakeProjectCreator/modules/EM3ProjectCreator.pm79
-rw-r--r--bin/MakeProjectCreator/modules/EM3WorkspaceCreator.pm43
-rw-r--r--bin/MakeProjectCreator/modules/GHSProjectCreator.pm79
-rw-r--r--bin/MakeProjectCreator/modules/GHSWorkspaceCreator.pm76
-rw-r--r--bin/MakeProjectCreator/modules/GNUProjectCreator.pm158
-rw-r--r--bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm70
-rw-r--r--bin/MakeProjectCreator/modules/GUID.pm52
-rw-r--r--bin/MakeProjectCreator/modules/NMakeProjectCreator.pm85
-rw-r--r--bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm84
-rw-r--r--bin/MakeProjectCreator/modules/Parser.pm152
-rw-r--r--bin/MakeProjectCreator/modules/ProjectCreator.pm1301
-rw-r--r--bin/MakeProjectCreator/modules/TemplateInputReader.pm101
-rw-r--r--bin/MakeProjectCreator/modules/TemplateParser.pm823
-rw-r--r--bin/MakeProjectCreator/modules/VA4ProjectCreator.pm129
-rw-r--r--bin/MakeProjectCreator/modules/VA4WorkspaceCreator.pm76
-rw-r--r--bin/MakeProjectCreator/modules/VC6ProjectCreator.pm229
-rw-r--r--bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm114
-rw-r--r--bin/MakeProjectCreator/modules/VC7ProjectCreator.pm119
-rw-r--r--bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm134
-rw-r--r--bin/MakeProjectCreator/modules/WorkspaceCreator.pm419
-rw-r--r--bin/MakeProjectCreator/templates/bor.mpd81
-rw-r--r--bin/MakeProjectCreator/templates/bordll.mpt3
-rw-r--r--bin/MakeProjectCreator/templates/borexe.mpt2
-rw-r--r--bin/MakeProjectCreator/templates/em3vcp.mpd232
-rw-r--r--bin/MakeProjectCreator/templates/em3vcpdll.mpt46
-rw-r--r--bin/MakeProjectCreator/templates/em3vcpdllexe.mpt45
-rw-r--r--bin/MakeProjectCreator/templates/em3vcplib.mpt48
-rw-r--r--bin/MakeProjectCreator/templates/em3vcplibexe.mpt48
-rw-r--r--bin/MakeProjectCreator/templates/ghs.mpd16
-rw-r--r--bin/MakeProjectCreator/templates/gnu.mpd125
-rw-r--r--bin/MakeProjectCreator/templates/gnudll.mpt1
-rw-r--r--bin/MakeProjectCreator/templates/gnuexe.mpt1
-rw-r--r--bin/MakeProjectCreator/templates/nmake.mpd202
-rw-r--r--bin/MakeProjectCreator/templates/nmakedll.mpt62
-rw-r--r--bin/MakeProjectCreator/templates/nmakeexe.mpt53
-rw-r--r--bin/MakeProjectCreator/templates/va4icc.mpd142
-rw-r--r--bin/MakeProjectCreator/templates/va4iccdll.mpt4
-rw-r--r--bin/MakeProjectCreator/templates/va4iccdllexe.mpt4
-rw-r--r--bin/MakeProjectCreator/templates/va4icclib.mpt4
-rw-r--r--bin/MakeProjectCreator/templates/va4icclibexe.mpt5
-rw-r--r--bin/MakeProjectCreator/templates/vc6dsp.mpd218
-rw-r--r--bin/MakeProjectCreator/templates/vc6dspdll.mpt27
-rw-r--r--bin/MakeProjectCreator/templates/vc6dspdllexe.mpt28
-rw-r--r--bin/MakeProjectCreator/templates/vc6dsplib.mpt31
-rw-r--r--bin/MakeProjectCreator/templates/vc6dsplibexe.mpt31
-rw-r--r--bin/MakeProjectCreator/templates/vc7.mpd217
-rw-r--r--bin/MakeProjectCreator/templates/vc7dll.mpt48
-rw-r--r--bin/MakeProjectCreator/templates/vc7exe.mpt45
-rwxr-xr-xbin/mpc.pl97
-rwxr-xr-xbin/mwc.pl97
79 files changed, 7564 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c3ca37206d7..40a1cf6f698 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,103 @@
+Tue Jul 9 07:24:06 2002 Chad Elliott <elliott_c@ociweb.com>
+
+ * bin/mpc.pl:
+ * bin/mwc.pl:
+
+ The starting point for creating workspaces and projects.
+
+ * bin/MakeProjectCreator/README:
+ * bin/MakeProjectCreator/USAGE:
+
+ A bit of lite documentation on the Make Project Creator.
+
+ * bin/MakeProjectCreator/config/aceexe.mpb:
+ * bin/MakeProjectCreator/config/acelib.mpb:
+ * bin/MakeProjectCreator/config/aceversion.mpb:
+ * bin/MakeProjectCreator/config/avstreamsexe.mpb:
+ * bin/MakeProjectCreator/config/client.mpb:
+ * bin/MakeProjectCreator/config/global.mpb:
+ * bin/MakeProjectCreator/config/messaging.mpb:
+ * bin/MakeProjectCreator/config/namingexe.mpb:
+ * bin/MakeProjectCreator/config/notify.mpb:
+ * bin/MakeProjectCreator/config/notifytest.mpb:
+ * bin/MakeProjectCreator/config/orbsvcsexe.mpb:
+ * bin/MakeProjectCreator/config/orbsvcslib.mpb:
+ * bin/MakeProjectCreator/config/rt_client.mpb:
+ * bin/MakeProjectCreator/config/rt_server.mpb:
+ * bin/MakeProjectCreator/config/rteventexe.mpb:
+ * bin/MakeProjectCreator/config/server.mpb:
+ * bin/MakeProjectCreator/config/strategies.mpb:
+ * bin/MakeProjectCreator/config/taoexe.mpb:
+ * bin/MakeProjectCreator/config/taolib.mpb:
+ * bin/MakeProjectCreator/config/taolib_with_idl.mpb:
+ * bin/MakeProjectCreator/config/taoversion.mpb:
+
+ Base projects for most of ACE and TAO.
+
+
+ * bin/MakeProjectCreator/modules/Driver.pm:
+ * bin/MakeProjectCreator/modules/Creator.pm:
+ * bin/MakeProjectCreator/modules/WorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/GUID.pm:
+ * bin/MakeProjectCreator/modules/Parser.pm:
+ * bin/MakeProjectCreator/modules/ProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/TemplateInputReader.pm:
+ * bin/MakeProjectCreator/modules/TemplateParser.pm:
+
+ The main modules of the Make Project Creator which provide most of
+ the functionalty.
+
+ * bin/MakeProjectCreator/modules/BorlandProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/BorlandWorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/EM3ProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/EM3WorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/GHSProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/GHSWorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/GNUProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/NMakeProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/VA4ProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/VA4WorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/VC6ProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/VC7ProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm:
+
+ Subclassed workspace and project creators.
+
+ * bin/MakeProjectCreator/templates/bor.mpd:
+ * bin/MakeProjectCreator/templates/bordll.mpt:
+ * bin/MakeProjectCreator/templates/borexe.mpt:
+ * bin/MakeProjectCreator/templates/em3vcp.mpd:
+ * bin/MakeProjectCreator/templates/em3vcpdll.mpt:
+ * bin/MakeProjectCreator/templates/em3vcpdllexe.mpt:
+ * bin/MakeProjectCreator/templates/em3vcplib.mpt:
+ * bin/MakeProjectCreator/templates/em3vcplibexe.mpt:
+ * bin/MakeProjectCreator/templates/ghs.mpd:
+ * bin/MakeProjectCreator/templates/gnu.mpd:
+ * bin/MakeProjectCreator/templates/gnudll.mpt:
+ * bin/MakeProjectCreator/templates/gnuexe.mpt:
+ * bin/MakeProjectCreator/templates/nmake.mpd:
+ * bin/MakeProjectCreator/templates/nmakedll.mpt:
+ * bin/MakeProjectCreator/templates/nmakeexe.mpt:
+ * bin/MakeProjectCreator/templates/va4icc.mpd:
+ * bin/MakeProjectCreator/templates/va4iccdll.mpt:
+ * bin/MakeProjectCreator/templates/va4iccdllexe.mpt:
+ * bin/MakeProjectCreator/templates/va4icclib.mpt:
+ * bin/MakeProjectCreator/templates/va4icclibexe.mpt:
+ * bin/MakeProjectCreator/templates/vc6dsp.mpd:
+ * bin/MakeProjectCreator/templates/vc6dspdll.mpt:
+ * bin/MakeProjectCreator/templates/vc6dspdllexe.mpt:
+ * bin/MakeProjectCreator/templates/vc6dsplib.mpt:
+ * bin/MakeProjectCreator/templates/vc6dsplibexe.mpt:
+ * bin/MakeProjectCreator/templates/vc7.mpd:
+ * bin/MakeProjectCreator/templates/vc7dll.mpt:
+ * bin/MakeProjectCreator/templates/vc7exe.mpt:
+
+ Template and template input files for all of the different project
+ creators.
+
Tue Jul 9 07:21:29 2002 Chad Elliott <elliott_c@ociweb.com>
* ace/Map_T.h:
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index c3ca37206d7..40a1cf6f698 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,103 @@
+Tue Jul 9 07:24:06 2002 Chad Elliott <elliott_c@ociweb.com>
+
+ * bin/mpc.pl:
+ * bin/mwc.pl:
+
+ The starting point for creating workspaces and projects.
+
+ * bin/MakeProjectCreator/README:
+ * bin/MakeProjectCreator/USAGE:
+
+ A bit of lite documentation on the Make Project Creator.
+
+ * bin/MakeProjectCreator/config/aceexe.mpb:
+ * bin/MakeProjectCreator/config/acelib.mpb:
+ * bin/MakeProjectCreator/config/aceversion.mpb:
+ * bin/MakeProjectCreator/config/avstreamsexe.mpb:
+ * bin/MakeProjectCreator/config/client.mpb:
+ * bin/MakeProjectCreator/config/global.mpb:
+ * bin/MakeProjectCreator/config/messaging.mpb:
+ * bin/MakeProjectCreator/config/namingexe.mpb:
+ * bin/MakeProjectCreator/config/notify.mpb:
+ * bin/MakeProjectCreator/config/notifytest.mpb:
+ * bin/MakeProjectCreator/config/orbsvcsexe.mpb:
+ * bin/MakeProjectCreator/config/orbsvcslib.mpb:
+ * bin/MakeProjectCreator/config/rt_client.mpb:
+ * bin/MakeProjectCreator/config/rt_server.mpb:
+ * bin/MakeProjectCreator/config/rteventexe.mpb:
+ * bin/MakeProjectCreator/config/server.mpb:
+ * bin/MakeProjectCreator/config/strategies.mpb:
+ * bin/MakeProjectCreator/config/taoexe.mpb:
+ * bin/MakeProjectCreator/config/taolib.mpb:
+ * bin/MakeProjectCreator/config/taolib_with_idl.mpb:
+ * bin/MakeProjectCreator/config/taoversion.mpb:
+
+ Base projects for most of ACE and TAO.
+
+
+ * bin/MakeProjectCreator/modules/Driver.pm:
+ * bin/MakeProjectCreator/modules/Creator.pm:
+ * bin/MakeProjectCreator/modules/WorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/GUID.pm:
+ * bin/MakeProjectCreator/modules/Parser.pm:
+ * bin/MakeProjectCreator/modules/ProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/TemplateInputReader.pm:
+ * bin/MakeProjectCreator/modules/TemplateParser.pm:
+
+ The main modules of the Make Project Creator which provide most of
+ the functionalty.
+
+ * bin/MakeProjectCreator/modules/BorlandProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/BorlandWorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/EM3ProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/EM3WorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/GHSProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/GHSWorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/GNUProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/NMakeProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/VA4ProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/VA4WorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/VC6ProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/VC7ProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm:
+
+ Subclassed workspace and project creators.
+
+ * bin/MakeProjectCreator/templates/bor.mpd:
+ * bin/MakeProjectCreator/templates/bordll.mpt:
+ * bin/MakeProjectCreator/templates/borexe.mpt:
+ * bin/MakeProjectCreator/templates/em3vcp.mpd:
+ * bin/MakeProjectCreator/templates/em3vcpdll.mpt:
+ * bin/MakeProjectCreator/templates/em3vcpdllexe.mpt:
+ * bin/MakeProjectCreator/templates/em3vcplib.mpt:
+ * bin/MakeProjectCreator/templates/em3vcplibexe.mpt:
+ * bin/MakeProjectCreator/templates/ghs.mpd:
+ * bin/MakeProjectCreator/templates/gnu.mpd:
+ * bin/MakeProjectCreator/templates/gnudll.mpt:
+ * bin/MakeProjectCreator/templates/gnuexe.mpt:
+ * bin/MakeProjectCreator/templates/nmake.mpd:
+ * bin/MakeProjectCreator/templates/nmakedll.mpt:
+ * bin/MakeProjectCreator/templates/nmakeexe.mpt:
+ * bin/MakeProjectCreator/templates/va4icc.mpd:
+ * bin/MakeProjectCreator/templates/va4iccdll.mpt:
+ * bin/MakeProjectCreator/templates/va4iccdllexe.mpt:
+ * bin/MakeProjectCreator/templates/va4icclib.mpt:
+ * bin/MakeProjectCreator/templates/va4icclibexe.mpt:
+ * bin/MakeProjectCreator/templates/vc6dsp.mpd:
+ * bin/MakeProjectCreator/templates/vc6dspdll.mpt:
+ * bin/MakeProjectCreator/templates/vc6dspdllexe.mpt:
+ * bin/MakeProjectCreator/templates/vc6dsplib.mpt:
+ * bin/MakeProjectCreator/templates/vc6dsplibexe.mpt:
+ * bin/MakeProjectCreator/templates/vc7.mpd:
+ * bin/MakeProjectCreator/templates/vc7dll.mpt:
+ * bin/MakeProjectCreator/templates/vc7exe.mpt:
+
+ Template and template input files for all of the different project
+ creators.
+
Tue Jul 9 07:21:29 2002 Chad Elliott <elliott_c@ociweb.com>
* ace/Map_T.h:
diff --git a/bin/MakeProjectCreator/README b/bin/MakeProjectCreator/README
new file mode 100644
index 00000000000..cf0caab108b
--- /dev/null
+++ b/bin/MakeProjectCreator/README
@@ -0,0 +1,121 @@
+Project Delcarations
+--------------------
+
+project(project_name) : baseproject, anotherbaseproject {
+ exename = foo
+ includes += "."
+ libpaths = directory
+ idlflags -= -Sc
+
+ Source_Files {
+ file1.cpp
+ file2.cpp
+ .
+ .
+ fileN.cpp
+ }
+
+ Header_Files {
+ file1.h
+ file2.h
+ .
+ .
+ fileN.h
+ }
+}
+
+
+The (project_name) part of the project declaration is optional. If it is
+left off, the project name will default to the directory name. Inheritance
+is optional.
+
+
+Project Keywords
+----------------
+exename Specifies the name of the executable that will be created
+sharedname Specifies the name of the shared library that will be created
+staticname Specifies the name of the static library that will be created
+dllout (Windows Only) Specifies where the dll will be placed
+libout (Windows Only) Specifies where the lib will be placed
+install Specifies where the executable (or library non-Windows) will go
+idlflags Specifies the idl flags to be used when processing idl files
+idlpreprocessor Simple assignment used in the gnu template only
+pch_header Specifies the precompiled header file name
+pch_source Specifies the precompiled source file name
+ssl Specifies that the project will use ssl
+tao Specifies that the project will use TAO
+version Specifies the version number for the library or executable
+
+libpaths Specifies 1 or more locations to find libraries
+includes Specifies 1 or more locations to find include files
+libs Specifies 1 or more libraries to link into the exe or library
+defaultlibs Specifies 1 or more default libraries to link in
+depends Specifies 1 or more projects upon which this project depends
+dllflags (Windows Only) Specifies preprocessor flags needed for dll's
+libflags (Windows Only) Specifies preprocessor flags needed for lib's
+
+
+Special Keywords Available to Templates
+---------------------------------------
+project_name This contains the name of the project.
+project_file This contains the name of the output file.
+guid This is used by the VC7 project and workspace creator.
+configurations When used within a foreach context, this info (each
+ configuration) is gathered for use with the VC7 workspace
+ creator.
+
+
+Defaulting Behavior
+-------------------
+1) If a project name is not specified
+
+ it will be defaulted to the name of the current directory
+
+2) If a particular list is not specified (Source_Files, Header_Files, etc.)
+
+ all of the files in the directory will be added to the corresponding list
+ by extension
+
+3) If idl files exist in the directory and
+ the IDL_Files components are left defaulted (i.e. not listed) and
+ none of the idl generated files are listed in the corresponding lists
+
+ the project is assumed to be a TAO project, the idl files are added to
+ the IDL_Files list and all of the (would be) generated files will be
+ added to the front of the corresponding lists (source, inline and
+ header lists)
+
+4) If files are listed in the Source_Files list and
+ a corresponding header or inline file exists
+
+ the corresponding file will be added to the corresponding list (if it
+ isn't already there)
+
+5) If a sharedname is specified and staticname is not
+
+ staticname is assigned the sharedname value (the same applies if
+ staticname is specified and sharedname is not)
+
+6) If a target name is not listed (exename, sharedname or staticname)
+
+ it is assumed that the target is a library and the name chosen matches
+ the name of the current directory
+
+7) If pch_header is not specified and a header file matches *_pch.h
+
+ it is assumed to be the precompiled header file (the same applies to
+ pch_source)
+
+8) If -relative is not used to set ACE_ROOT and the ACE_ROOT environment
+ variable is set
+
+ it will be used to set the relative value for ACE_ROOT. If -relative is
+ not used to set TAO_ROOT, it will be set from the TAO_ROOT environment
+ variable. If that is not set, the relative value of ACE_ROOT plus /TAO.
+
+Processing Order
+----------------
+1) Project file is read
+2) Template input file is read
+3) Template file is read
+4) Output project is written
diff --git a/bin/MakeProjectCreator/USAGE b/bin/MakeProjectCreator/USAGE
new file mode 100644
index 00000000000..e66edecf08a
--- /dev/null
+++ b/bin/MakeProjectCreator/USAGE
@@ -0,0 +1,92 @@
+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>]
+ [-ti <dll | lib | dll_exe | lib_exe>:<file>]
+ [-template <file>] [-dynamic_only] [-static_only]
+ [-type <bor | em3 | gnu | nma | va4 | vc6 | vc7>]
+ [files]
+
+ -global Specifies the global input file. Values stored
+ within this file are applied to all projects.
+ -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).
+ -dynamic_only Specifies that only dynamic projects will be generated.
+ -static_only Specifies that only static projects will be generated.
+ -type Specifies the type of project file to generate. This
+ option can be used multiple times to generate multiple
+ types.
+
+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) if -include is not used.
+
+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 -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
+directores. NOTE: The -template option overrides the template file for all
+types specified.
+
+The -dynamic_only option can be used to avoid generating static project
+files. This currently only applies to the vc6 type.
+
+The -static_only option can be used to avoid generating dynamic project
+files. This currently only applies to the vc6 type.
+
+The -type option can be used multiple times on the same command line to
+generate projects of different types per mpc file. NOTE: The -ti option
+overrides the template input file for all types specified.
+
+
+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>]
+ [-ti <dll | lib | dll_exe | lib_exe>:<file>]
+ [-template <file>] [-dynamic_only] [-static_only]
+ [-type <bor | em3 | ghs | gnu | nma | va4 | vc6 | vc7>]
+ [files]
+
+ -global Specifies the global input file. Values stored
+ within this file are applied to all projects.
+ -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).
+ -dynamic_only Specifies that only dynamic projects will be generated.
+ -static_only Specifies that only static projects will be generated.
+ -type Specifies the type of project file to generate. This
+ option can be used multiple times to generate multiple
+ types.
diff --git a/bin/MakeProjectCreator/config/aceexe.mpb b/bin/MakeProjectCreator/config/aceexe.mpb
new file mode 100644
index 00000000000..d722f20a544
--- /dev/null
+++ b/bin/MakeProjectCreator/config/aceexe.mpb
@@ -0,0 +1,6 @@
+project: aceversion {
+ depends += ace
+ includes += $(ACE_ROOT)
+ libpaths += $(ACE_ROOT)/ace
+ libflags += ACE_AS_STATIC_LIBS
+}
diff --git a/bin/MakeProjectCreator/config/acelib.mpb b/bin/MakeProjectCreator/config/acelib.mpb
new file mode 100644
index 00000000000..d722f20a544
--- /dev/null
+++ b/bin/MakeProjectCreator/config/acelib.mpb
@@ -0,0 +1,6 @@
+project: aceversion {
+ depends += ace
+ includes += $(ACE_ROOT)
+ libpaths += $(ACE_ROOT)/ace
+ libflags += ACE_AS_STATIC_LIBS
+}
diff --git a/bin/MakeProjectCreator/config/aceversion.mpb b/bin/MakeProjectCreator/config/aceversion.mpb
new file mode 100644
index 00000000000..8a5707d3155
--- /dev/null
+++ b/bin/MakeProjectCreator/config/aceversion.mpb
@@ -0,0 +1,3 @@
+project {
+ version = 5.2.4
+}
diff --git a/bin/MakeProjectCreator/config/avstreamsexe.mpb b/bin/MakeProjectCreator/config/avstreamsexe.mpb
new file mode 100644
index 00000000000..645cfd57f0d
--- /dev/null
+++ b/bin/MakeProjectCreator/config/avstreamsexe.mpb
@@ -0,0 +1,5 @@
+project {
+ depends += AV CosProperty CosNaming Svc_Utils IORTable PortableServer
+ libs += TAO_AV TAO_CosProperty TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_PortableServer
+}
+
diff --git a/bin/MakeProjectCreator/config/client.mpb b/bin/MakeProjectCreator/config/client.mpb
new file mode 100644
index 00000000000..6b398fc9da9
--- /dev/null
+++ b/bin/MakeProjectCreator/config/client.mpb
@@ -0,0 +1,3 @@
+project(client) : taoexe {
+ exename = client
+} \ No newline at end of file
diff --git a/bin/MakeProjectCreator/config/global.mpb b/bin/MakeProjectCreator/config/global.mpb
new file mode 100644
index 00000000000..cf432adf891
--- /dev/null
+++ b/bin/MakeProjectCreator/config/global.mpb
@@ -0,0 +1,5 @@
+project {
+ defaultlibs = ACE
+ dllout = $(ACE_ROOT)/bin
+ libout = .
+}
diff --git a/bin/MakeProjectCreator/config/messaging.mpb b/bin/MakeProjectCreator/config/messaging.mpb
new file mode 100644
index 00000000000..8dfef76c14b
--- /dev/null
+++ b/bin/MakeProjectCreator/config/messaging.mpb
@@ -0,0 +1,4 @@
+project : server {
+ depends += Messaging
+ libs += TAO_Messaging
+}
diff --git a/bin/MakeProjectCreator/config/namingexe.mpb b/bin/MakeProjectCreator/config/namingexe.mpb
new file mode 100644
index 00000000000..9ed6a25ee5b
--- /dev/null
+++ b/bin/MakeProjectCreator/config/namingexe.mpb
@@ -0,0 +1,4 @@
+project : server, orbsvcsexe {
+ depends += CosNaming Svc_Utils IORTable
+ libs += TAO_CosNaming TAO_Svc_Utils TAO_IORTable
+}
diff --git a/bin/MakeProjectCreator/config/notify.mpb b/bin/MakeProjectCreator/config/notify.mpb
new file mode 100644
index 00000000000..ec7c0021297
--- /dev/null
+++ b/bin/MakeProjectCreator/config/notify.mpb
@@ -0,0 +1,4 @@
+project {
+ depends += CosNotification ETCL CosNaming Svc_Utils IORTable DynamicAny PortableServer TAO
+ libs += TAO_CosNotification TAO_ETCL TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_DynamicAny TAO_PortableServer TAO
+}
diff --git a/bin/MakeProjectCreator/config/notifytest.mpb b/bin/MakeProjectCreator/config/notifytest.mpb
new file mode 100644
index 00000000000..6ce2b4f6636
--- /dev/null
+++ b/bin/MakeProjectCreator/config/notifytest.mpb
@@ -0,0 +1,6 @@
+project: orbsvcsexe, notify {
+ depends += "Notify Lib"
+ libs += NotifyTests
+ libpaths += $(TAO_ROOT)/orbsvcs/tests/Notify/lib
+ includes += $(TAO_ROOT)/orbsvcs/tests/Notify/lib
+} \ No newline at end of file
diff --git a/bin/MakeProjectCreator/config/orbsvcsexe.mpb b/bin/MakeProjectCreator/config/orbsvcsexe.mpb
new file mode 100644
index 00000000000..afd750ca5a1
--- /dev/null
+++ b/bin/MakeProjectCreator/config/orbsvcsexe.mpb
@@ -0,0 +1,4 @@
+project : taoexe {
+ includes += $(TAO_ROOT)/orbsvcs
+ libpaths += $(TAO_ROOT)/orbsvcs/orbsvcs
+}
diff --git a/bin/MakeProjectCreator/config/orbsvcslib.mpb b/bin/MakeProjectCreator/config/orbsvcslib.mpb
new file mode 100644
index 00000000000..2db60b09c75
--- /dev/null
+++ b/bin/MakeProjectCreator/config/orbsvcslib.mpb
@@ -0,0 +1,5 @@
+project : taolib_with_idl {
+ includes += $(TAO_ROOT)/orbsvcs
+ libpaths += $(TAO_ROOT)/orbsvcs/orbsvcs
+ idlflags += -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs
+}
diff --git a/bin/MakeProjectCreator/config/rt_client.mpb b/bin/MakeProjectCreator/config/rt_client.mpb
new file mode 100644
index 00000000000..08143c2ca37
--- /dev/null
+++ b/bin/MakeProjectCreator/config/rt_client.mpb
@@ -0,0 +1,4 @@
+project : client {
+ depends += RTCORBA
+ libs += TAO_RTCORBA
+}
diff --git a/bin/MakeProjectCreator/config/rt_server.mpb b/bin/MakeProjectCreator/config/rt_server.mpb
new file mode 100644
index 00000000000..603b031b57d
--- /dev/null
+++ b/bin/MakeProjectCreator/config/rt_server.mpb
@@ -0,0 +1,4 @@
+project : server {
+ depends += RTPortableServer RTCORBA
+ libs += TAO_RTCORBA TAO_RTPortableServer
+}
diff --git a/bin/MakeProjectCreator/config/rteventexe.mpb b/bin/MakeProjectCreator/config/rteventexe.mpb
new file mode 100644
index 00000000000..c2fbb8dc552
--- /dev/null
+++ b/bin/MakeProjectCreator/config/rteventexe.mpb
@@ -0,0 +1,4 @@
+project: orbsvcsexe {
+ depends += RTEvent Svc_Utils PortableServer
+ libs += TAO_RTEvent TAO_Svc_Utils TAO_PortableServer
+}
diff --git a/bin/MakeProjectCreator/config/server.mpb b/bin/MakeProjectCreator/config/server.mpb
new file mode 100644
index 00000000000..1502c4b8c4e
--- /dev/null
+++ b/bin/MakeProjectCreator/config/server.mpb
@@ -0,0 +1,5 @@
+project(server) : taoexe {
+ depends += PortableServer
+ exename = server
+ libs += TAO_PortableServer
+}
diff --git a/bin/MakeProjectCreator/config/strategies.mpb b/bin/MakeProjectCreator/config/strategies.mpb
new file mode 100644
index 00000000000..1fdf735b933
--- /dev/null
+++ b/bin/MakeProjectCreator/config/strategies.mpb
@@ -0,0 +1,4 @@
+project {
+ depends += Strategies
+ libs += TAO_Strategies
+}
diff --git a/bin/MakeProjectCreator/config/taoexe.mpb b/bin/MakeProjectCreator/config/taoexe.mpb
new file mode 100644
index 00000000000..412d6d6ff2d
--- /dev/null
+++ b/bin/MakeProjectCreator/config/taoexe.mpb
@@ -0,0 +1,9 @@
+project : aceexe, taoversion {
+ depends += tao TAO_IDL_EXE
+ tao = 1
+ includes += $(TAO_ROOT) $(TAO_ROOT)/tao
+ libpaths += $(TAO_ROOT)/tao
+ idlflags = -Ge 1 -Sc
+ libflags += TAO_AS_STATIC_LIBS
+ libs += TAO
+}
diff --git a/bin/MakeProjectCreator/config/taolib.mpb b/bin/MakeProjectCreator/config/taolib.mpb
new file mode 100644
index 00000000000..51811ffdd52
--- /dev/null
+++ b/bin/MakeProjectCreator/config/taolib.mpb
@@ -0,0 +1,7 @@
+project : acelib, taoversion {
+ depends += tao
+ tao = 1
+ includes += $(TAO_ROOT) $(TAO_ROOT)/tao
+ libpaths += $(TAO_ROOT)/tao
+ libflags += TAO_AS_STATIC_LIBS
+}
diff --git a/bin/MakeProjectCreator/config/taolib_with_idl.mpb b/bin/MakeProjectCreator/config/taolib_with_idl.mpb
new file mode 100644
index 00000000000..92b88da392a
--- /dev/null
+++ b/bin/MakeProjectCreator/config/taolib_with_idl.mpb
@@ -0,0 +1,4 @@
+project : taolib {
+ depends += TAO_IDL_EXE
+ idlflags = -Ge 1 -Gs
+}
diff --git a/bin/MakeProjectCreator/config/taoversion.mpb b/bin/MakeProjectCreator/config/taoversion.mpb
new file mode 100644
index 00000000000..dcdb52a1f82
--- /dev/null
+++ b/bin/MakeProjectCreator/config/taoversion.mpb
@@ -0,0 +1,3 @@
+project {
+ version = 1.2.4
+}
diff --git a/bin/MakeProjectCreator/modules/BorlandProjectCreator.pm b/bin/MakeProjectCreator/modules/BorlandProjectCreator.pm
new file mode 100644
index 00000000000..420203f7972
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/BorlandProjectCreator.pm
@@ -0,0 +1,71 @@
+package BorlandProjectCreator;
+
+# ************************************************************
+# Description : Not a complete implementation for Borland
+# Author : Chad Elliott
+# Create Date : 3/14/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+use ProjectCreator;
+
+use vars qw(@ISA);
+@ISA = qw(ProjectCreator);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub translate_value {
+ my($self) = shift;
+ my($key) = shift;
+ my($val) = shift;
+
+ if ($key eq 'depends' && $val ne "") {
+ my($arr) = $self->create_array($val);
+ $val = "";
+ foreach my $entry (@$arr) {
+ $val .= "\"" . $self->project_file_name($entry) . "\" ";
+ }
+ $val =~ s/\s+$//;
+ }
+ return $val;
+}
+
+
+sub project_file_name {
+ my($self) = shift;
+ my($name) = shift;
+
+ if (!defined $name) {
+ $name = $self->project_name();
+ }
+
+ return "Makefile" . ($name eq "" ? "" : ".$name") . ".bor";
+}
+
+
+sub get_dll_exe_template_input_file {
+ my($self) = shift;
+ return "borexe";
+}
+
+
+sub get_dll_template_input_file {
+ my($self) = shift;
+ return "bordll";
+}
+
+
+sub get_template {
+ my($self) = shift;
+ return "bor";
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/BorlandWorkspaceCreator.pm b/bin/MakeProjectCreator/modules/BorlandWorkspaceCreator.pm
new file mode 100644
index 00000000000..e20e08de73e
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/BorlandWorkspaceCreator.pm
@@ -0,0 +1,82 @@
+package BorlandWorkspaceCreator;
+
+# ************************************************************
+# Description : A Borland Workspace (Makefile.bor) creator
+# Author : Chad Elliott
+# Create Date : 7/02/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+use File::Basename;
+
+use BorlandProjectCreator;
+use WorkspaceCreator;
+
+use vars qw(@ISA);
+@ISA = qw(WorkspaceCreator);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub workspace_file_name {
+ my($self) = shift;
+ return "Makefile.bor";
+}
+
+
+sub pre_workspace {
+ my($self) = shift;
+ my($fh) = shift;
+ my($crlf) = $self->crlf();
+
+ print $fh "#----------------------------------------------------------------------------$crlf" .
+ "# Borland Workspace$crlf" .
+ "#----------------------------------------------------------------------------$crlf" .
+ "$crlf";
+}
+
+
+sub write_comps {
+ my($self) = shift;
+ my($fh) = shift;
+ my($projects) = $self->get_projects();
+ my($pjs) = $self->get_project_info();
+ my(@list) = $self->sort_dependencies($projects, $pjs);
+ my($crlf) = $self->crlf();
+
+ print $fh "!include <\$(ACE_ROOT)\include\makeinclude\make_flags.bor>" .
+ "$crlf$crlf" .
+ "all:$crlf";
+ foreach my $project (@list) {
+ my($dir) = dirname($project);
+ my($chdir) = 0;
+ my($back) = 1;
+
+ ## If the directory isn't "." then we need
+ ## to figure out how to get back to our starting point
+ if ($dir ne ".") {
+ $chdir = 1;
+ my($length) = length($dir);
+ for(my $i = 0; $i < $length; $i++) {
+ if (substr($dir, $i, 1) eq "/") {
+ $back++;
+ }
+ }
+ }
+
+ ## These commands will work. In practicality, only the
+ ## default configuration can be built at the top level.
+ print $fh ($chdir ? "\t\@cd $dir$crlf" : "") .
+ "\t\$(MAKE) -\$(MAKEFLAGS) \$(MAKE_FLAGS) -f " . basename($project) . $crlf .
+ ($chdir ? "\t\@cd " . ("../" x $back) . $crlf : "");
+ }
+}
+
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/Creator.pm b/bin/MakeProjectCreator/modules/Creator.pm
new file mode 100644
index 00000000000..d2dbbfc5811
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/Creator.pm
@@ -0,0 +1,340 @@
+package Creator;
+
+# ************************************************************
+# Description : Base class for workspace and project creators
+# Author : Chad Elliott
+# Create Date : 5/13/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+use Cwd;
+use FileHandle;
+use File::Basename;
+
+use Parser;
+
+use vars qw(@ISA);
+@ISA = qw(Parser);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub new {
+ my($class) = shift;
+ my($global) = shift;
+ my($inc) = shift;
+ my($template) = shift;
+ my($ti) = shift;
+ my($relative) = shift;
+ my($type) = shift;
+ my($self) = Parser::new($class);
+
+ $self->{'relative'} = $relative;
+ $self->{'template'} = $template;
+ $self->{'ti'} = $ti;
+ $self->{'global_cfg'} = $global;
+ $self->{'grammar_type'} = $type;
+ $self->{'type_check'} = $type . '_defined';
+ $self->{'global_read'} = 0;
+ $self->{'include_path'} = $inc;
+
+ return $self;
+}
+
+
+sub generate_default_input {
+ my($self) = shift;
+ $self->parse_line(undef, "$self->{'grammar_type'} {");
+ $self->parse_line(undef, "}");
+ return 1;
+}
+
+
+sub parse_file {
+ my($self) = shift;
+ my($input) = shift;
+ my($typecheck) = $self->{'type_check'};
+ my($oline) = $self->line_number();
+
+ ## Read the input file and get the last line number
+ my($status, $errorString) = $self->read_file($input);
+ my($linenumber) = $self->line_number();
+
+ if (!$status) {
+ print STDERR "$input: line $linenumber: $errorString\n";
+ }
+ elsif ($status && $self->{$typecheck}) {
+ ## If we are at the end of the file and the type we are looking at
+ ## is still defined, then we have an error
+ print STDERR "$input: line $linenumber: ERROR: Did not " .
+ "find the end of the $self->{'grammar_type'}\n";
+ $status = 0;
+ }
+ $self->line_number($oline);
+
+ return $status;
+}
+
+
+sub generate {
+ my($self) = shift;
+ my($input) = shift;
+ my($status) = 1;
+
+ ## Allow subclasses to reset values before
+ ## each call to generate().
+ $self->reset_values();
+
+ ## Read the global configuration file
+ if (!$self->{'global_read'}) {
+ $status = $self->read_global_configuration();
+ $self->{'global_read'} = 1;
+ }
+
+ if ($status) {
+ ## An empty input file name says that we
+ ## should generate a default input file and use that
+ if ($input eq "") {
+ $status = $self->generate_default_input();
+ }
+ else {
+ $status = $self->parse_file($input);
+ }
+ }
+
+ return $status;
+}
+
+
+sub parse_known {
+ my($self) = shift;
+ my($line) = shift;
+ my($status) = 1;
+ my($errorString) = "";
+ my($type) = $self->{'grammar_type'};
+ my(@values) = ();
+ my($typecheck) = $self->{'type_check'};
+
+ ##
+ ## Each regexp that looks for the '{' looks for it at the
+ ## end of the line. It is purposely this way to decrease
+ ## the amount of extra lines in each file. This
+ ## allows for the most compact file as human readably
+ ## possible.
+ ##
+ if ($line eq "") {
+ }
+ elsif ($line =~ /^$type\s*(\([^\)]+\))?\s*(:.*)?\s*{$/) {
+ my($name) = $1;
+ my($parents) = $2;
+ if ($self->{$typecheck}) {
+ $errorString = "ERROR: Did not find the end of the $type";
+ $status = 0;
+ }
+ else {
+ if (defined $parents) {
+ my(@parents) = ();
+ foreach my $parent (split(/[:,]/, $parents)) {
+ $parent =~ s/^\s+//;
+ $parent =~ s/\s+$//;
+ if ($parent ne "") {
+ push(@parents, $parent);
+ }
+ }
+ $parents = \@parents;
+ }
+ push(@values, $type, $name, $parents);
+ }
+ }
+ elsif ($line =~ /^}$/) {
+ if ($self->{$typecheck}) {
+ push(@values, $type, $line);
+ }
+ else {
+ $errorString = "ERROR: Did not find the beginning of the $type";
+ $status = 0;
+ }
+ }
+ elsif (!$self->{$typecheck}) {
+ $errorString = "ERROR: No $type was defined";
+ $status = 0;
+ }
+ elsif ($line =~ /^(\w+)\s*=\s*(.*)?/) {
+ my($name) = lc($1);
+ my($value) = $2;
+ push(@values, "assignment", $name, $value);
+ }
+ elsif ($line =~ /^(\w+)\s*\+=\s*(.*)?/) {
+ my($name) = lc($1);
+ my($value) = $2;
+ push(@values, "assign_add", $name, $value);
+ }
+ elsif ($line =~ /^(\w+)\s*\-=\s*(.*)?/) {
+ my($name) = lc($1);
+ my($value) = $2;
+ push(@values, "assign_sub", $name, $value);
+ }
+ elsif ($line =~ /^(\w+)\s*(\([^\)]+\))?\s*{$/) {
+ my($comp) = lc($1);
+ my($name) = $2;
+
+ if (defined $name) {
+ $name =~ s/^\(\s*//;
+ $name =~ s/\s*\)$//;
+ }
+ else {
+ $name = "default";
+ }
+ push(@values, "component", $comp, $name);
+ }
+ else {
+ $errorString = "ERROR: Unrecognized line: $line";
+ $status = -1;
+ }
+
+ return $status, $errorString, @values;
+}
+
+
+sub base_directory {
+ my($self) = shift;
+ return basename(getcwd());
+}
+
+
+sub generate_default_file_list {
+ my($self) = shift;
+ my($dir) = shift;
+ my($dh) = new FileHandle();
+ my(@files) = ();
+
+ if (!defined $dir) {
+ $dir = ".";
+ }
+
+ if (opendir($dh, $dir)) {
+ @files = grep(!/^\.\.?$/, readdir($dh));
+ if ($self->sort_files()) {
+ @files = sort { $self->file_sorter($a, $b) } @files;
+ }
+
+ ## Prefix each file name with the directory
+ ## only if it's not .
+ if ($dir ne ".") {
+ for(my $i = 0; $i <= $#files; $i++) {
+ $files[$i] = "$dir/$files[$i]";
+ }
+ }
+
+ closedir($dh);
+ }
+ return @files;
+}
+
+
+sub get_global_cfg {
+ my($self) = shift;
+ return $self->{'global_cfg'};
+}
+
+
+sub get_include_path {
+ my($self) = shift;
+ return $self->{'include_path'};
+}
+
+
+sub search_include_path {
+ my($self) = shift;
+ my($file) = shift;
+ my($found) = undef;
+ my($includes) = $self->get_include_path();
+ foreach my $include (@$includes) {
+ if (-r "$include/$file") {
+ $found = "$include/$file";
+ last;
+ }
+ }
+ return $found;
+}
+
+
+sub get_template_override {
+ my($self) = shift;
+ return $self->{'template'};
+}
+
+
+sub get_ti_override {
+ my($self) = shift;
+ return $self->{'ti'};
+}
+
+
+sub get_relative {
+ my($self) = shift;
+ return $self->{'relative'};
+}
+
+
+sub windows_crlf {
+ my($self) = shift;
+ if ($^O eq 'MSWin32') {
+ return "\n";
+ }
+ else {
+ return "\r\n";
+ }
+}
+
+
+sub transform_file_name {
+ my($self) = shift;
+ my($name) = shift;
+
+ $name =~ s/\s/_/g;
+ return $name;
+}
+
+# ************************************************************
+# Virtual Methods To Be Overridden
+# ************************************************************
+
+sub crlf {
+ my($self) = shift;
+ return "\n";
+}
+
+
+sub reset_values {
+ my($self) = shift;
+}
+
+
+sub sort_files {
+ my($self) = shift;
+ return 1;
+}
+
+
+sub file_sorter {
+ my($self) = shift;
+ my($left) = shift;
+ my($right) = shift;
+ return $left cmp $right;
+}
+
+
+sub read_global_configuration {
+ my($self) = shift;
+ my($input) = shift;
+ return 1;
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/Driver.pm b/bin/MakeProjectCreator/modules/Driver.pm
new file mode 100644
index 00000000000..bd4bc0ea324
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/Driver.pm
@@ -0,0 +1,273 @@
+package Driver;
+
+# ************************************************************
+# Description : Functionality to call a workspace or project creator
+# Author : Chad Elliott
+# Create Date : 5/28/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub new {
+ my($class) = shift;
+ my($path) = shift;
+ my($name) = shift;
+ my(@creators) = @_;
+ my($self) = bless {'path' => $path,
+ 'name' => $name,
+ 'version' => 0.8,
+ 'types' => {},
+ 'creators' => \@creators,
+ }, $class;
+ return $self;
+}
+
+
+sub usageAndExit {
+ my($self) = shift;
+ my($line) = shift;
+ my($base) = $self->{'name'};
+
+ if (defined $line) {
+ print STDERR "$line\n";
+ }
+ print STDERR "$base v$self->{'version'}\n" .
+ "Usage: $base [-global <file>] [-include <directory>]\n" .
+ (" " x (length($base) + 8)) .
+ "[-ti <dll | lib | dll_exe | lib_exe>:<file>]\n" .
+ (" " x (length($base) + 8)) . "[-template <file>] " .
+ "[-dynamic_only] [-static_only]\n" .
+ (" " x (length($base) + 8)) . "[-relative NAME=VAR]\n" .
+ (" " x (length($base) + 8)) . "[-type <";
+
+ my(@keys) = sort keys %{$self->{'types'}};
+ for(my $i = 0; $i <= $#keys; $i++) {
+ print STDERR "$keys[$i]";
+ if ($i != $#keys) {
+ print STDERR " | ";
+ }
+ }
+ print STDERR ">]\n" .
+ (" " x (length($base) + 8)) . "[files]\n\n";
+
+ print STDERR
+" -global Specifies the global input file. Values stored\n" .
+" within this file are applied to all projects.\n" .
+" -include Specifies a directory to search when looking for base\n" .
+" projects, template input files and templates. This\n" .
+" option can be used multiple times to add directories.\n" .
+" -ti Specifies the template input file (with no extension)\n" .
+" for the specific type as shown above\n" .
+" (ex. -ti dll_exe:vc8exe)\n" .
+" -template Specifies the template name (with no extension).\n" .
+" -dynamic_only Specifies that only dynamic projects will be generated.\n" .
+" -static_only Specifies that only static projects will be generated.\n" .
+" -relative Any \$() variable in an mpc that is matched to NAME\n" .
+" is replaced by VAR only if VAR can be made into a\n" .
+" relative path based on the current working directory.\n" .
+" -type Specifies the type of project file to generate. This\n" .
+" option can be used multiple times to generate multiple\n" .
+" types.\n";
+
+ exit(0);
+}
+
+
+sub completion_command {
+ my($self) = shift;
+ my($str) = "complete $self->{'name'} " .
+ "'c/-/(global include type template relative " .
+ "ti dynamic_only static_only)/' " .
+ "'c/dll:/f/' 'c/dll_exe:/f/' 'c/lib_exe:/f/' 'c/lib:/f/' " .
+ "'n/-ti/(dll lib dll_exe lib_exe)/:' 'n/-type/(";
+
+ my(@keys) = sort keys %{$self->{'types'}};
+ for(my $i = 0; $i <= $#keys; $i++) {
+ $str .= $keys[$i];
+ if ($i != $#keys) {
+ $str .= " ";
+ }
+ }
+ $str .= ")/'";
+ return $str;
+}
+
+
+sub run {
+ my($self) = shift;
+ my(@args) = @_;
+ my($global) = undef;
+ my(@include) = ();
+ my(@input) = ();
+ my(@generators) = ();
+ my($status) = 0;
+ my($default) = undef;
+ my($template) = undef;
+ my(%ti) = ();
+ my($dynamic) = 1;
+ my($static) = 1;
+ my($signif) = 3;
+ my(%relative) = ();
+
+ ## Dynamically load in each perl module and set up
+ ## the type tags and project creators
+ my($creators) = $self->{'creators'};
+ foreach my $creator (@$creators) {
+ my($tag) = lc(substr($creator, 0, $signif));
+ $self->{'types'}->{$tag} = $creator;
+ if (!defined $default) {
+ $default = $creator;
+ }
+ require "$creator.pm";
+ }
+
+ for(my $i = 0; $i <= $#args; $i++) {
+ my($arg) = $args[$i];
+ if ($arg eq '-complete') {
+ print $self->completion_command() . "\n";
+ return $status;
+ }
+ elsif ($arg eq '-type') {
+ $i++;
+ if (!defined $args[$i]) {
+ $self->usageAndExit("-type requires an argument");
+ }
+
+ my($type) = lc(substr($args[$i], 0, $signif));
+ if (defined $self->{'types'}->{$type}) {
+ my($call) = $self->{'types'}->{$type};
+ push(@generators, $call);
+ }
+ else {
+ $self->usageAndExit("Invalid type: $args[$i]");
+ }
+ }
+ elsif ($arg eq '-global') {
+ $i++;
+ $global = $args[$i];
+ if (!defined $global) {
+ $self->usageAndExit("-global requires a file name argument");
+ }
+ }
+ elsif ($arg eq '-include') {
+ $i++;
+ my($include) = $args[$i];
+ if (!defined $include) {
+ $self->usageAndExit("-include requires a directory argument");
+ }
+ push(@include, $include);
+ }
+ elsif ($arg eq '-template') {
+ $i++;
+ $template = $args[$i];
+ if (!defined $template) {
+ $self->usageAndExit("-template requires a file name argument");
+ }
+ }
+ elsif ($arg eq '-relative') {
+ $i++;
+ my($rel) = $args[$i];
+ if (!defined $rel) {
+ $self->usageAndExit("-relative requires a variable assignment argument");
+ }
+ else {
+ if ($rel =~ /(\w+)\s*=\s*(.*)/) {
+ my($name) = $1;
+ my($val) = $2;
+ $val =~ s/^\s+//;
+ $val =~ s/\s+$//;
+ $relative{$name} = $val;
+ }
+ else {
+ $self->usageAndExit("Invalid option to -relative");
+ }
+ }
+ }
+ elsif ($arg eq '-ti') {
+ $i++;
+ my($tmpi) = $args[$i];
+ if (!defined $tmpi) {
+ $self->usageAndExit("-ti requires a template input argument");
+ }
+ else {
+ if ($tmpi =~ /(dll|lib|dll_exe|lib_exe):(.*)/) {
+ my($key) = $1;
+ my($name) = $2;
+ $ti{$key} = $name;
+ }
+ else {
+ $self->usageAndExit("Invalid -ti argument: $tmpi");
+ }
+ }
+ }
+ elsif ($arg eq '-dynamic_only') {
+ $static = 0;
+ $dynamic = 1;
+ }
+ elsif ($arg eq '-static_only') {
+ $static = 1;
+ $dynamic = 0;
+ }
+ elsif ($arg =~ /^-/) {
+ $self->usageAndExit();
+ }
+ else {
+ push(@input, $arg);
+ }
+ }
+
+ ## Set up default values
+ if (!defined $input[0]) {
+ push(@input, "");
+ }
+ if (!defined $generators[0]) {
+ push(@generators, $default);
+ }
+ if (!defined $global) {
+ $global = $self->{'path'} . "/config/global.mpb";
+ }
+ if (!defined $include[0]) {
+ push(@include, $self->{'path'} . "/config");
+ push(@include, $self->{'path'} . "/templates");
+ }
+ if (!defined $relative{'ACE_ROOT'} && defined $ENV{ACE_ROOT}) {
+ $relative{'ACE_ROOT'} = $ENV{ACE_ROOT};
+ }
+ if (!defined $relative{'TAO_ROOT'}) {
+ if (defined $ENV{TAO_ROOT}) {
+ $relative{'TAO_ROOT'} = $ENV{TAO_ROOT};
+ }
+ else {
+ $relative{'TAO_ROOT'} = "$relative{ACE_ROOT}/TAO";
+ }
+ }
+
+ ## Generate the files
+ foreach my $file (@input) {
+ foreach my $name (@generators) {
+ my($generator) = $name->new($global, \@include, $template,
+ \%ti, $dynamic, $static, \%relative);
+ print "Generating output using " .
+ ($file eq "" ? "default input" : $file) . "\n";
+ print "Start Time: " . scalar(localtime(time())) . "\n";
+ if (!$generator->generate($file)) {
+ print STDERR "Unable to process: $file\n";
+ $status++;
+ }
+ print " End Time: " . scalar(localtime(time())) . "\n";
+ }
+ }
+
+ return $status;
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/EM3ProjectCreator.pm b/bin/MakeProjectCreator/modules/EM3ProjectCreator.pm
new file mode 100644
index 00000000000..8a3806f49d0
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/EM3ProjectCreator.pm
@@ -0,0 +1,79 @@
+package EM3ProjectCreator;
+
+# ************************************************************
+# Description : An eMbedded Visual C++ 3.00 Project Creator
+# Author : Chad Elliott
+# Create Date : 7/3/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+use VC6ProjectCreator;
+
+use vars qw(@ISA);
+@ISA = qw(VC6ProjectCreator);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub fill_value {
+ my($self) = shift;
+ my($name) = shift;
+ my($value) = undef;
+
+ if ($name eq "make_file_name") {
+ $value = $self->base_project_name() . ".vcn";
+ }
+
+ return $value;
+}
+
+
+sub project_file_name {
+ my($self) = shift;
+ return $self->project_name() . ".vcp";
+}
+
+
+sub static_project_file_name {
+ my($self) = shift;
+ return $self->project_name() . $self->get_static_append() . ".vcp";
+}
+
+
+sub get_dll_exe_template_input_file {
+ my($self) = shift;
+ return "em3vcpdllexe";
+}
+
+
+sub get_lib_exe_template_input_file {
+ my($self) = shift;
+ return "em3vcplibexe";
+}
+
+
+sub get_lib_template_input_file {
+ my($self) = shift;
+ return "em3vcplib";
+}
+
+
+sub get_dll_template_input_file {
+ my($self) = shift;
+ return "em3vcpdll";
+}
+
+
+sub get_template {
+ my($self) = shift;
+ return "em3vcp";
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/EM3WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/EM3WorkspaceCreator.pm
new file mode 100644
index 00000000000..56fdb137a35
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/EM3WorkspaceCreator.pm
@@ -0,0 +1,43 @@
+package EM3WorkspaceCreator;
+
+# ************************************************************
+# Description : An eMbedded v3 Workspace Creator
+# Author : Chad Elliott
+# Create Date : 7/3/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+use EM3ProjectCreator;
+use VC6WorkspaceCreator;
+
+use vars qw(@ISA);
+@ISA = qw(VC6WorkspaceCreator);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+
+sub workspace_file_name {
+ my($self) = shift;
+ return $self->get_workspace_name() . ".vcw";
+}
+
+
+sub pre_workspace {
+ my($self) = shift;
+ my($fh) = shift;
+ my($crlf) = $self->crlf();
+
+ print $fh "Microsoft eMbedded Visual Tools Workspace File, Format Version 3.00$crlf" .
+ "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!$crlf" .
+ "$crlf";
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/GHSProjectCreator.pm b/bin/MakeProjectCreator/modules/GHSProjectCreator.pm
new file mode 100644
index 00000000000..c370bfbda73
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/GHSProjectCreator.pm
@@ -0,0 +1,79 @@
+package GHSProjectCreator;
+
+# ************************************************************
+# Description : Not a complete implementation for GHS
+# Author : Chad Elliott
+# Create Date : 4/19/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+use ProjectCreator;
+
+use vars qw(@ISA);
+@ISA = qw(ProjectCreator);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub translate_value {
+ my($self) = shift;
+ my($key) = shift;
+ my($val) = shift;
+
+ if ($key eq 'depends' && $val ne "") {
+ my($arr) = $self->create_array($val);
+ $val = "";
+ foreach my $entry (@$arr) {
+ $val .= "\"" . $self->project_file_name($entry) . "\" ";
+ }
+ $val =~ s/\s+$//;
+ }
+ return $val;
+}
+
+
+sub file_sorter {
+ my($self) = shift;
+ my($left) = shift;
+ my($right) = shift;
+ return lc($left) cmp lc($right);
+}
+
+
+sub project_file_name {
+ my($self) = shift;
+ my($name) = shift;
+
+ if (!defined $name) {
+ $name = $self->project_name();
+ }
+
+ return "ghs/$name.bld";
+}
+
+
+sub get_dll_exe_template_input_file {
+ my($self) = shift;
+ return "ghsexe";
+}
+
+
+sub get_dll_template_input_file {
+ my($self) = shift;
+ return "ghsdll";
+}
+
+
+sub get_template {
+ my($self) = shift;
+ return "ghs";
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/GHSWorkspaceCreator.pm b/bin/MakeProjectCreator/modules/GHSWorkspaceCreator.pm
new file mode 100644
index 00000000000..3ff4ae8dfdb
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/GHSWorkspaceCreator.pm
@@ -0,0 +1,76 @@
+package GHSWorkspaceCreator;
+
+# ************************************************************
+# Description : An incomplete GHS Workspace creator
+# Author : Chad Elliott
+# Create Date : 7/3/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+use File::Basename;
+
+use GHSProjectCreator;
+use WorkspaceCreator;
+
+use vars qw(@ISA);
+@ISA = qw(WorkspaceCreator);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub workspace_file_name {
+ my($self) = shift;
+ return "ghs/default.bld";
+}
+
+
+sub pre_workspace {
+ my($self) = shift;
+ my($fh) = shift;
+ my($crlf) = $self->crlf();
+
+ print $fh "#!build$crlf" .
+ "default:$crlf";
+}
+
+
+sub write_comps {
+ my($self) = shift;
+ my($fh) = shift;
+ my($gen) = shift;
+ my($projects) = $self->get_projects();
+ my($pjs) = $self->get_project_info();
+ my(@list) = $self->sort_dependencies($projects, $pjs);
+ my($crlf) = $self->crlf();
+
+ ## Print out the projet
+ print $fh "\tnobuild$crlf" .
+ "\t:cx_option=noexceptions$crlf" .
+ "\t:cx_option=std_namespaces$crlf" .
+ "\t:cx_template_option=noautomatic$crlf" .
+ "\t:language=cxx$crlf" .
+ "\t:cx_mode=ansi$crlf" .
+ "\t:cx_lib=scnoe$crlf";
+
+ foreach my $project (@list) {
+ ## Convert all /'s to \
+ $project =~ s/\//\\/g;
+
+ print $fh "..\\$project$crlf";
+ if ($gen->exe_target()) {
+ print $fh "\tprogram$crlf";
+ }
+ else {
+ print $fh "\tlibrary$crlf";
+ }
+ }
+}
+
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/GNUProjectCreator.pm b/bin/MakeProjectCreator/modules/GNUProjectCreator.pm
new file mode 100644
index 00000000000..63fdcac01c8
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/GNUProjectCreator.pm
@@ -0,0 +1,158 @@
+package GNUProjectCreator;
+
+# ************************************************************
+# Description : A GNU Project Creator
+# Author : Chad Elliott
+# Create Date : 3/13/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+use File::Basename;
+
+use ProjectCreator;
+
+use vars qw(@ISA);
+@ISA = qw(ProjectCreator);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub sort_files {
+ my($self) = shift;
+ return 0;
+}
+
+
+sub translate_value {
+ my($self) = shift;
+ my($key) = shift;
+ my($val) = shift;
+
+ if ($key eq 'depends' && $val ne "") {
+ my($arr) = $self->create_array($val);
+ $val = "";
+ foreach my $entry (@$arr) {
+ $val .= "\"" . $self->project_file_name($entry) . "\" ";
+ }
+ $val =~ s/\s+$//;
+ }
+ return $val;
+}
+
+
+sub convert_slashes {
+ my($self) = shift;
+ return 0;
+}
+
+
+sub fill_value {
+ my($self) = shift;
+ my($name) = shift;
+ my($value) = undef;
+ my($crlf) = $self->crlf();
+
+ if ($name eq "gnu_source_files") {
+ my(%vpath) = ();
+ my($tag) = 'source_files';
+ my($names) = $self->{$tag};
+
+ $value = "";
+ foreach my $name (keys %$names) {
+ my($comps) = $$names{$name};
+
+ foreach my $key (sort keys %$comps) {
+ my($a) = $$comps{$key};
+ my(@arr) = @$a;
+ my($cpy) = $key;
+
+ $cpy =~ s/^\d+_//;
+ $value .= "$crlf$crlf$cpy = \\";
+ for(my $i = 0; $i <= $#arr; $i++) {
+ my($item) = $arr[$i];
+ my($dname) = dirname($item);
+
+ $item =~ s/\.[^\.]+$//;
+ if ($dname ne ".") {
+ $vpath{$dname} = 1;
+ }
+ $value .= "$crlf $item" . ($i != $#arr ? " \\" : "");
+ }
+ }
+ }
+ foreach my $name (keys %$names) {
+ my($fname) = "";
+ my($comps) = $$names{$name};
+ foreach my $key (sort keys %$comps) {
+ $fname = $key;
+ $fname =~ s/^\d+_//;
+ last;
+ }
+
+ if ($name ne "default") {
+ $fname = "FILES";
+ $value .= "$crlf$crlf" . "ifndef $name$crlf" .
+ " $name = \\$crlf";
+ my(@keys) = sort keys %$comps;
+ for(my $i = 0; $i <= $#keys; $i++) {
+ $keys[$i] =~ s/^\d+_//;
+ my($key) = $keys[$i];
+ $value .= " $key" . ($i != $#keys ? " \\" : "") . $crlf;
+ }
+ $value .= "endif # $name";
+
+ foreach my $key (@keys) {
+ $value .= "$crlf$crlf" . "ifneq (,\$(findstring $key, \$($name)))$crlf" .
+ " $fname += \$($key)$crlf" .
+ "endif # $key";
+ }
+ }
+ }
+ my(@vkeys) = sort keys %vpath;
+ if ($#vkeys >= 0) {
+ $value .= "$crlf$crlf" . "VPATH = .";
+ foreach my $key (@vkeys) {
+ $value .= ":$key";
+ }
+ }
+ }
+
+ return $value;
+}
+
+
+sub project_file_name {
+ my($self) = shift;
+ my($name) = shift;
+
+ if (!defined $name) {
+ $name = $self->project_name();
+ }
+
+ return "Makefile" . ($name eq "" ? "" : ".$name");
+}
+
+
+sub get_dll_exe_template_input_file {
+ my($self) = shift;
+ return "gnuexe";
+}
+
+
+sub get_dll_template_input_file {
+ my($self) = shift;
+ return "gnudll";
+}
+
+
+sub get_template {
+ my($self) = shift;
+ return "gnu";
+}
+
+1;
diff --git a/bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm b/bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm
new file mode 100644
index 00000000000..505819a649f
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm
@@ -0,0 +1,70 @@
+package GNUWorkspaceCreator;
+
+# ************************************************************
+# Description : A GNU Workspace (Makefile) creator
+# Author : Chad Elliott
+# Create Date : 5/13/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+use File::Basename;
+
+use GNUProjectCreator;
+use WorkspaceCreator;
+
+use vars qw(@ISA);
+@ISA = qw(WorkspaceCreator);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub workspace_file_name {
+ my($self) = shift;
+ return "Makefile";
+}
+
+
+sub pre_workspace {
+ my($self) = shift;
+ my($fh) = shift;
+ my($crlf) = $self->crlf();
+
+ print $fh "#----------------------------------------------------------------------------$crlf" .
+ "# GNU Workspace$crlf" .
+ "#----------------------------------------------------------------------------$crlf" .
+ "$crlf";
+}
+
+
+sub write_comps {
+ my($self) = shift;
+ my($fh) = shift;
+ my($projects) = $self->get_projects();
+ my($pjs) = $self->get_project_info();
+ my(@list) = $self->sort_dependencies($projects, $pjs);
+ my($crlf) = $self->crlf();
+
+ ## Print out the projet Makefile
+ print $fh "include \$(ACE_ROOT)/include/makeinclude/macros.GNU$crlf" .
+ "TARGETS_NESTED := \$(TARGETS_NESTED:.nested=)$crlf" .
+ "$crlf" .
+ "\$(TARGETS_NESTED):$crlf" .
+ "ifeq (Windows,\$(findstring Windows,\$(OS)))$crlf";
+ foreach my $project (@list) {
+ print $fh "\t\@cmd /c \"\$(MAKE) -f " . basename($project) . " -C " . dirname($project) . " \$(\@)\"$crlf";
+ }
+ print $fh "else$crlf";
+ foreach my $project (@list) {
+ print $fh "\t\@\$(MAKE) -f " . basename($project) . " -C " . dirname($project) . " \$(\@);$crlf";
+ }
+ print $fh "endif$crlf";
+}
+
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/GUID.pm b/bin/MakeProjectCreator/modules/GUID.pm
new file mode 100644
index 00000000000..e53f6ea1b08
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/GUID.pm
@@ -0,0 +1,52 @@
+package GUID;
+
+# ************************************************************
+# Description : Generate GUID's for VC7 projects and workspaces
+# Author : Chad Elliott
+# Create Date : 5/14/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub new {
+ my($class) = shift;
+ my($self) = bless {
+ }, $class;
+ return $self;
+}
+
+
+sub generate {
+ my($self) = shift;
+ my($str) = shift;
+ my($time) = time(); ## 32 bits
+ my($hash) = 0; ## 32 bits
+ my($rand1) = int(rand(0xffff)); ## 16 bits
+ my($rand2) = int(rand(0xffff)); ## 16 bits
+ my($rand3) = int(rand(0xffff)); ## 16 bits
+ my($rand4) = $$ + int(rand(0xff)); ## 16 bits
+
+
+ ## Hash the input string
+ my($length) = length($str);
+ for(my $i = 0; $i < $length; $i++) {
+ my($high) = $hash & 0xf8000000;
+ $hash <<= 5;
+ $hash ^= ($high >> 27);
+ $hash ^= ord(substr($str, $i, 1));
+ }
+
+ return sprintf("%08X-%04X-%04X-%04X-%04X%08X",
+ $hash, $rand1, $rand2, $rand3, $rand4, $time);
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/NMakeProjectCreator.pm b/bin/MakeProjectCreator/modules/NMakeProjectCreator.pm
new file mode 100644
index 00000000000..724d0fec9ff
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/NMakeProjectCreator.pm
@@ -0,0 +1,85 @@
+package NMakeProjectCreator;
+
+# ************************************************************
+# Description : An NMake Project Creator
+# Author : Chad Elliott
+# Create Date : 5/31/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+use ProjectCreator;
+
+use vars qw(@ISA);
+@ISA = qw(ProjectCreator);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub translate_value {
+ my($self) = shift;
+ my($key) = shift;
+ my($val) = shift;
+
+ if ($key eq 'depends' && $val ne "") {
+ my($arr) = $self->create_array($val);
+ $val = "";
+ foreach my $entry (@$arr) {
+ $val .= "\"" . $self->project_file_name($entry) . "\" ";
+ }
+ $val =~ s/\s+$//;
+ }
+ return $val;
+}
+
+
+sub file_sorter {
+ my($self) = shift;
+ my($left) = shift;
+ my($right) = shift;
+ return lc($left) cmp lc($right);
+}
+
+
+sub crlf {
+ my($self) = shift;
+ return $self->windows_crlf();
+}
+
+
+sub project_file_name {
+ my($self) = shift;
+ my($name) = shift;
+
+ if (!defined $name) {
+ $name = $self->project_name();
+ }
+
+ return "$name.mak";
+}
+
+
+sub get_dll_exe_template_input_file {
+ my($self) = shift;
+ return "nmakeexe";
+}
+
+
+sub get_dll_template_input_file {
+ my($self) = shift;
+ return "nmakedll";
+}
+
+
+sub get_template {
+ my($self) = shift;
+ return "nmake";
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm b/bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm
new file mode 100644
index 00000000000..fc0e4fb59b5
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm
@@ -0,0 +1,84 @@
+package NMakeWorkspaceCreator;
+
+# ************************************************************
+# Description : A NMake Workspace (Makefile) creator
+# Author : Chad Elliott
+# Create Date : 6/10/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+use File::Basename;
+
+use NMakeProjectCreator;
+use WorkspaceCreator;
+
+use vars qw(@ISA);
+@ISA = qw(WorkspaceCreator);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+
+sub crlf {
+ my($self) = shift;
+ return $self->windows_crlf();
+}
+
+
+sub workspace_file_name {
+ my($self) = shift;
+ return "Makefile";
+}
+
+
+sub pre_workspace {
+ my($self) = shift;
+ my($fh) = shift;
+ my($crlf) = $self->crlf();
+
+ print $fh "# Microsoft Developer Studio Generated NMAKE File$crlf$crlf";
+}
+
+
+sub write_comps {
+ my($self) = shift;
+ my($fh) = shift;
+ my($projects) = $self->get_projects();
+ my($pjs) = $self->get_project_info();
+ my(@list) = $self->sort_dependencies($projects, $pjs);
+ my($crlf) = $self->crlf();
+
+ print $fh "ALL:$crlf";
+ foreach my $project (@list) {
+ my($dir) = dirname($project);
+ my($chdir) = 0;
+ my($back) = 1;
+
+ ## If the directory isn't "." then we need
+ ## to figure out how to get back to our starting point
+ if ($dir ne ".") {
+ $chdir = 1;
+ my($length) = length($dir);
+ for(my $i = 0; $i < $length; $i++) {
+ if (substr($dir, $i, 1) eq "/") {
+ $back++;
+ }
+ }
+ }
+
+ ## These commands will work. In practicality, only the
+ ## default configuration can be built at the top level.
+ print $fh ($chdir ? "\tcd $dir$crlf" : "") .
+ "\t\$(MAKE) /f " . basename($project) . " CFG=\"\$(CFG)\"$crlf" .
+ ($chdir ? "\tcd " . ("../" x $back) . $crlf : "");
+ }
+}
+
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/Parser.pm b/bin/MakeProjectCreator/modules/Parser.pm
new file mode 100644
index 00000000000..674f2276afd
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/Parser.pm
@@ -0,0 +1,152 @@
+package Parser;
+
+# ************************************************************
+# Description : A basic parser that requires a parse_line override
+# Author : Chad Elliott
+# Create Date : 5/16/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+use FileHandle;
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub new {
+ my($class) = shift;
+ my($self) = bless {'line_number' => 0,
+ }, $class;
+ return $self;
+}
+
+
+sub strip_line {
+ my($self) = shift;
+ my($line) = shift;
+
+ $self->{'line_number'}++;
+ $line =~ s/\/\/.*//;
+ $line =~ s/^\s+//;
+ $line =~ s/\s+$//;
+
+ return $line;
+}
+
+
+sub process_special {
+ my($self) = shift;
+ my($line) = shift;
+ my($length) = length($line);
+
+ for(my $i = 0; $i < $length; $i++) {
+ my($ch) = substr($line, $i, 1);
+ if ($ch eq "\\" && $i + 1 < $length) {
+ substr($line, $i, 1) = "";
+ $length--;
+ }
+ elsif ($ch eq '"') {
+ substr($line, $i, 1) = "";
+ $length--;
+ $i--;
+ }
+ }
+ return $line;
+}
+
+
+sub read_file {
+ my($self) = shift;
+ my($input) = shift;
+ my($ih) = new FileHandle();
+ my($status) = 1;
+ my($errorString) = "";
+
+ $self->{'line_number'} = 0;
+ if (open($ih, $input)) {
+ while(<$ih>) {
+ my($line) = $self->strip_line($_);
+
+ ($status, $errorString) = $self->parse_line($ih, $line);
+
+ if (!$status) {
+ last;
+ }
+ }
+ close($ih);
+ }
+ else {
+ $errorString = "ERROR: Unable to open for reading";
+ $status = 0;
+ }
+
+ return $status, $errorString;
+}
+
+
+sub line_number {
+ my($self) = shift;
+ my($number) = shift;
+
+ if (defined $number) {
+ $self->{'line_number'} = $number;
+ }
+
+ return $self->{'line_number'};
+}
+
+
+sub create_array {
+ my($self) = shift;
+ my($line) = shift;
+ my(@array) = ();
+ my($length) = length($line);
+ my($prev) = 0;
+ my($double) = 0;
+
+ for(my $i = 0; $i <= $length; $i++) {
+ my($ch) = substr($line, $i, 1);
+ if (!$double && ($ch eq "" || $ch =~ /\s/)) {
+ my($val) = substr($line, $prev, $i - $prev);
+ $val =~ s/^\s+//;
+ $val =~ s/\s+$//;
+ if ($val =~ /^\"(.*)\"$/) {
+ $val = $1;
+ }
+ push(@array, $val);
+ for(; $i < $length; $i++) {
+ if (substr($line, $i, 1) !~ /\s/) {
+ $i--;
+ last;
+ }
+ }
+ $prev = $i + 1;
+ }
+ elsif ($double && $ch eq "\\" && $i + 1 < $length) {
+ substr($line, $i, 1) = "";
+ $length--;
+ }
+ elsif ($ch eq '"') {
+ $double ^= 1;
+ }
+ }
+ return \@array;
+}
+
+
+# ************************************************************
+# Virtual Methods To Be Overridden
+# ************************************************************
+
+sub parse_line {
+ my($self) = shift;
+ my($ih) = shift;
+ my($line) = shift;
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/ProjectCreator.pm b/bin/MakeProjectCreator/modules/ProjectCreator.pm
new file mode 100644
index 00000000000..b12217aea06
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/ProjectCreator.pm
@@ -0,0 +1,1301 @@
+package ProjectCreator;
+
+# ************************************************************
+# Description : Base class for all project creators
+# Author : Chad Elliott
+# Create Date : 3/13/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+use FileHandle;
+use File::Path;
+use File::Basename;
+
+use Creator;
+use TemplateInputReader;
+use TemplateParser;
+
+use vars qw(@ISA);
+@ISA = qw(Creator);
+
+# ************************************************************
+# Data Section
+# ************************************************************
+
+my($BaseClassExtension) = "mpb";
+my($ProjectCreatorExtension) = "mpc";
+my($TemplateExtension) = "mpd";
+my($TemplateInputExtension) = "mpt";
+
+## Valid names for assignments within a project
+my(%validNames) = ('exename' => 1,
+ 'sharedname' => 1,
+ 'staticname' => 1,
+ 'libpaths' => 1,
+ 'install' => 1,
+ 'includes' => 1,
+ 'idlflags' => 1,
+ 'idlpreprocessor' => 1,
+ 'defaultlibs' => 1,
+ 'depends' => 1,
+ 'libs' => 1,
+ 'pch_header' => 1,
+ 'pch_source' => 1,
+ 'ssl' => 1,
+ 'tao' => 1,
+ 'dllout' => 1,
+ 'libout' => 1,
+ 'dllflags' => 1,
+ 'libflags' => 1,
+ 'version' => 1,
+ );
+
+## Deal with these components in a special way
+my(@specialComponents) = ('header_files', 'inline_files');
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub new {
+ my($class) = shift;
+ my($global) = shift;
+ my($inc) = shift;
+ my($template) = shift;
+ my($ti) = shift;
+ my($dynamic) = shift;
+ my($static) = shift;
+ my($relative) = shift;
+ my($self) = Creator::new($class, $global, $inc,
+ $template, $ti, $relative, 'project');
+
+ $self->{$self->{'type_check'}} = 0;
+ $self->{'global_assign'} = {};
+ $self->{'files_written'} = [];
+ $self->{'project_info'} = [];
+ $self->{'reading_global'} = 0;
+ $self->{'reading_parent'} = [];
+ $self->{'dexe_template_input'} = undef;
+ $self->{'lexe_template_input'} = undef;
+ $self->{'lib_template_input'} = undef;
+ $self->{'dll_template_input'} = undef;
+ $self->{'idl_defaulted'} = 0;
+ $self->{'writing_type'} = 0;
+ $self->{'want_dynamic_projects'} = $dynamic;
+ $self->{'want_static_projects'} = $static;
+
+ ## Valid component names within a project along with the valid file extensions
+ my(%vc) = ('source_files' => [ "\\.cpp", "\\.cxx", "\\.cc", "\\.c", "\\.C", ],
+ 'template_files' => [ "_T\\.cpp", "_T\\.cxx", "_T\\.cc", "_T\\.c", "_T\\.C", ],
+ 'header_files' => [ "\\.h", "\\.hxx", "\\.hh", ],
+ 'inline_files' => [ "\\.i", "\\.inl", ],
+ 'idl_files' => [ "\\.idl", ],
+ 'documentation_files' => [ "\\.doc", "\\.txt", ],
+ 'resource_files' => [ "\\.rc", ],
+ );
+
+ ## Exclude these extensions when auto generating the component values
+ my(%ec) = ('source_files' => [ "_T\\.cpp", "_T\\.cxx", "_T\\.cc", "_T\\.C", ],
+ );
+
+ $self->{'valid_components'} = \%vc;
+ $self->{'exclude_components'} = \%ec;
+ $self->{'skeleton_endings'} = [ "C", "S" ];
+
+ ## Allow subclasses to override the default extensions
+ $self->set_component_extensions();
+
+ return $self;
+}
+
+
+sub read_global_configuration {
+ my($self) = shift;
+ my($input) = $self->get_global_cfg();
+ my($status) = 1;
+
+ if (defined $input) {
+ $self->{'reading_global'} = 1;
+ $status = $self->parse_file($input);
+ $self->{'reading_global'} = 0;
+ }
+
+ return $status;
+}
+
+
+sub parse_line {
+ my($self) = shift;
+ my($ih) = shift;
+ my($line) = shift;
+ my($type) = $self->{'grammar_type'};
+ my($status,
+ $errorString,
+ @values) = $self->parse_known($line);
+
+ ## parse_known() passes back an array of values
+ ## that make up the contents of the line parsed.
+ ## The array can have 0 to 3 items. The first,
+ ## if defined, is always an identifier of some
+ ## sort.
+
+ if ($status && defined $values[0]) {
+ if ($values[0] eq $type) {
+ my($name) = $values[1];
+ my($typecheck) = $self->{'type_check'};
+ if (defined $name && $name eq "}") {
+ ## Project Ending
+ my($rp) = $self->{'reading_parent'};
+ if (!defined $$rp[0] && !$self->{'reading_global'}) {
+ ## Fill in all the default values
+ $self->generate_defaults();
+
+ ## End of project; Write out the file.
+ $self->write_project();
+
+ foreach my $key (keys %{$self->{'valid_components'}}) {
+ delete $self->{$key};
+ }
+ $self->{'assign'} = {};
+ }
+ $self->{$typecheck} = 0;
+ $self->{'idl_defaulted'} = 0;
+ }
+ else {
+ ## Project Beginning
+ ## Deal with the inheritance hiearchy first
+ my($parents) = $values[2];
+ if (defined $parents) {
+ foreach my $parent (@$parents) {
+ ## Read in the parent onto ourself
+ my($file) = $self->search_include_path(
+ "$parent.$BaseClassExtension");
+ if (!defined $file) {
+ $file = $self->search_include_path(
+ "$parent.$ProjectCreatorExtension");
+ }
+
+ if (defined $file) {
+ my($rp) = $self->{'reading_parent'};
+ push(@$rp, 1);
+ $status = $self->parse_file($file);
+ pop(@$rp);
+
+ if (!$status) {
+ $errorString = "ERROR: Invalid parent: $parent";
+ }
+ }
+ else {
+ $status = 0;
+ $errorString = "ERROR: Unable to locate parent: $parent";
+ }
+ }
+ }
+
+ ## Set up some initial values
+ if (defined $name) {
+ $name =~ s/^\(\s*//;
+ $name =~ s/\s*\)$//;
+ $self->process_assignment('project_name', $name);
+ }
+ $self->{$typecheck} = 1;
+
+ ## Copy each value from global_assign into assign
+ if (!$self->{'reading_global'}) {
+ foreach my $key (keys %{$self->{'global_assign'}}) {
+ $self->{'assign'}->{$key} = $self->{'global_assign'}->{$key};
+ }
+ }
+ }
+ }
+ elsif ($values[0] eq "assignment") {
+ my($name) = $values[1];
+ my($value) = $values[2];
+ if (defined $validNames{$name}) {
+ $self->process_assignment($name, $value);
+ }
+ else {
+ $errorString = "ERROR: Invalid assignment name: $name";
+ $status = 0;
+ }
+ }
+ elsif ($values[0] eq "assign_add") {
+ my($name) = $values[1];
+ my($value) = $values[2];
+ if (defined $validNames{$name}) {
+ $self->process_assignment_add($name, $value);
+ }
+ else {
+ $errorString = "ERROR: Invalid addition name: $name";
+ $status = 0;
+ }
+ }
+ elsif ($values[0] eq "assign_sub") {
+ my($name) = $values[1];
+ my($value) = $values[2];
+ if (defined $validNames{$name}) {
+ $self->process_assignment_sub($name, $value);
+ }
+ else {
+ $errorString = "ERROR: Invalid subtraction name: $name";
+ $status = 0;
+ }
+ }
+ elsif ($values[0] eq "component") {
+ my($comp) = $values[1];
+ my($name) = $values[2];
+ if (defined $name) {
+ $name =~ s/^\(\s*//;
+ $name =~ s/\s*\)$//;
+ }
+ else {
+ $name = 'default';
+ }
+
+ my($vc) = $self->{'valid_components'};
+ if (defined $$vc{$comp}) {
+ if ($self->parse_components($ih, $comp, $name)) {
+ }
+ else {
+ $errorString = "ERROR: Unable to process $comp";
+ $status = 0;
+ }
+ }
+ else {
+ $errorString = "ERROR: Invalid component name: $comp";
+ $status = 0;
+ }
+ }
+ else {
+ $errorString = "ERROR: Unrecognized line: $line";
+ $status = 0;
+ }
+ }
+ elsif ($status == -1) {
+ $status = 0;
+ }
+
+ return $status, $errorString;
+}
+
+
+sub parse_components {
+ my($self) = shift;
+ my($fh) = shift;
+ my($tag) = shift;
+ my($name) = shift;
+ my($current) = '000_FILES';
+ my($status) = 1;
+ my($names) = {};
+ my($comps) = {};
+ my($order) = 0;
+ my($set) = 0;
+
+ if (defined $self->{$tag}) {
+ $names = $self->{$tag};
+ }
+ else {
+ $self->{$tag} = $names;
+ }
+ if (defined $$names{$name}) {
+ $comps = $$names{$name};
+ }
+ else {
+ $$names{$name} = $comps;
+ }
+ if (!defined $$comps{$current}) {
+ $$comps{$current} = [];
+ }
+
+ while(<$fh>) {
+ my($line) = $self->strip_line($_);
+
+ if ($line eq "") {
+ }
+ elsif ($line =~ /^(\w+)\s*{$/) {
+ if (!defined $current || !$set) {
+ if (defined $current && !defined $$comps{$current}->[0]) {
+ ## The default components name was never used
+ ## so we remove it from the components
+ delete $$comps{$current};
+ }
+ $current = sprintf("%03d_$1", $order);
+ $set = 1;
+ $order++;
+ if (!defined $$comps{$current}) {
+ $$comps{$current} = [];
+ }
+ }
+ else {
+ $status = 0;
+ last;
+ }
+ }
+ elsif ($line =~ /^}/) {
+ if (defined $current && $set) {
+ $current = undef;
+ }
+ else {
+ ## This is not an error,
+ ## this is the end of the components
+ last;
+ }
+ }
+ elsif (defined $current) {
+ my($array) = $$comps{$current};
+ push(@$array, $line);
+ }
+ else {
+ $status = 0;
+ last;
+ }
+ }
+
+ return $status;
+}
+
+
+sub process_assignment {
+ my($self) = shift;
+ my($name) = shift;
+ my($value) = shift;
+ my($tag) = ($self->{'reading_global'} ? 'global_assign' : 'assign');
+ my($assign) = $self->{$tag};
+
+ if (!defined $assign) {
+ $assign = {};
+ $self->{$tag} = $assign;
+ }
+
+ if (defined $value) {
+ $value =~ s/^\s+//;
+ $value =~ s/\s+$//;
+
+ if ($self->convert_slashes()) {
+ $value =~ s/\//\\/g;
+ }
+ }
+
+ $$assign{$name} = $value;
+}
+
+
+sub process_assignment_add {
+ my($self) = shift;
+ my($name) = shift;
+ my($value) = shift;
+ my($nval) = $self->get_assignment($name);
+ if (defined $nval) {
+ $nval = "$value $nval";
+ }
+ else {
+ $nval = $value;
+ }
+ $self->process_assignment($name, $nval);
+}
+
+
+sub process_assignment_sub {
+ my($self) = shift;
+ my($name) = shift;
+ my($value) = shift;
+ my($nval) = $self->get_assignment($name);
+
+ if (defined $nval) {
+ my($parts) = $self->create_array($nval);
+ $nval = "";
+ foreach my $part (@$parts) {
+ if ($part ne $value && $part ne "") {
+ $nval .= "$part ";
+ }
+ }
+ $self->process_assignment($name, $nval);
+ }
+}
+
+
+sub read_template_input {
+ my($self) = shift;
+ my($status) = 1;
+ my($errorString) = "";
+ my($file) = undef;
+ my($tag) = undef;
+ my($ti) = $self->get_ti_override();
+ my($override) = 0;
+
+ if ($self->exe_target()) {
+ if ($self->{'writing_type'} == 1) {
+ $tag = 'lexe_template_input';
+ if (!defined $self->{$tag}) {
+ if (defined $$ti{'lib_exe'}) {
+ $file = $$ti{'lib_exe'};
+ $override = 1;
+ }
+ else {
+ $file = $self->get_lib_exe_template_input_file();
+ }
+ }
+ }
+ else {
+ $tag = 'dexe_template_input';
+ if (!defined $self->{$tag}) {
+ if (defined $$ti{'dll_exe'}) {
+ $file = $$ti{'dll_exe'};
+ $override = 1;
+ }
+ else {
+ $file = $self->get_dll_exe_template_input_file();
+ }
+ }
+ }
+ }
+ else {
+ if ($self->{'writing_type'} == 1) {
+ $tag = 'lib_template_input';
+ if (!defined $self->{$tag}) {
+ if (defined $$ti{'lib'}) {
+ $file = $$ti{'lib'};
+ $override = 1;
+ }
+ else {
+ $file = $self->get_lib_template_input_file();
+ }
+ }
+ }
+ else {
+ $tag = 'dll_template_input';
+ if (!defined $self->{$tag}) {
+ if (defined $$ti{'dll'}) {
+ $file = $$ti{'dll'};
+ $override = 1;
+ }
+ else {
+ $file = $self->get_dll_template_input_file();
+ }
+ }
+ }
+ }
+
+ if (defined $file) {
+ my($file) = $self->search_include_path("$file.$TemplateInputExtension");
+ if (defined $file) {
+ $self->{$tag} = new TemplateInputReader();
+ ($status, $errorString) = $self->{$tag}->read_file($file);
+ }
+ else {
+ if ($override) {
+ $status = 0;
+ $errorString = "Unable to locate template input file.";
+ }
+ }
+ }
+
+ return $status, $errorString;
+}
+
+
+sub add_idl_generated {
+ my($self) = shift;
+ my($tag) = shift;
+ my($idl) = shift;
+ my($names) = $self->{$tag};
+ my($vc) = $self->{'valid_components'};
+ my($wanted) = $$vc{$tag}->[0];
+ my(@added) = ();
+
+ $wanted =~ s/\\//;
+ foreach my $name (keys %$names) {
+ my($comps) = $$names{$name};
+ foreach my $key (keys %$comps) {
+ my($array) = $$comps{$key};
+ foreach my $i (@$idl) {
+ my($file) = $i;
+ $file =~ s/\.idl$//;
+ foreach my $ending (@{$self->{'skeleton_endings'}}) {
+ push(@added, "$file$ending$wanted");
+ }
+ }
+ ## Put the generated files at the front
+ if (defined $added[0]) {
+ unshift(@$array, @added);
+ }
+ }
+ }
+}
+
+
+sub generate_default_target_names {
+ my($self) = shift;
+ my($base) = shift;
+
+ if (!$self->exe_target()) {
+ my($sharedname) = $self->get_assignment('sharedname');
+ if (defined $sharedname &&
+ !defined $self->get_assignment('staticname')) {
+ $self->process_assignment('staticname', $sharedname);
+ }
+ my($staticname) = $self->get_assignment('staticname');
+ if (defined $staticname &&
+ !defined $self->get_assignment('sharedname')) {
+ $self->process_assignment('sharedname', $staticname);
+ $sharedname = $staticname;
+ }
+ if (!defined $sharedname) {
+ $self->process_assignment('sharedname', $base);
+ }
+ if (!defined $staticname) {
+ $self->process_assignment('staticname', $base);
+ }
+ }
+}
+
+
+sub generate_default_pch_filenames {
+ my($self) = shift;
+ my($files) = shift;
+ my($vc) = $self->{'valid_components'};
+ my($gc) = $$vc{'header_files'};
+ my($found) = 0;
+
+ if (!defined $self->get_assignment('pch_header')) {
+ foreach my $file (@$files) {
+ foreach my $ext (@$gc) {
+ if ($file =~ /(.*_pch$ext)/) {
+ $self->process_assignment('pch_header', $1);
+ $found = 1;
+ last;
+ }
+ }
+ if ($found) {
+ last;
+ }
+ }
+ }
+
+ if (!defined $self->get_assignment('pch_source')) {
+ $gc = $$vc{'source_files'};
+ $found = 0;
+ foreach my $file (@$files) {
+ foreach my $ext (@$gc) {
+ if ($file =~ /(.*_pch$ext)/) {
+ $self->process_assignment('pch_source', $1);
+ $found = 1;
+ last;
+ }
+ }
+ if ($found) {
+ last;
+ }
+ }
+ }
+}
+
+
+sub is_special_tag {
+ my($self) = shift;
+ my($tag) = shift;
+
+ foreach my $t (@specialComponents) {
+ if ($tag eq $t) {
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+
+sub escape_regex_special {
+ my($self) = shift;
+ my($name) = shift;
+
+ $name =~ s/\\/\\\\/g;
+ $name =~ s/\$/\\\$/g;
+ $name =~ s/\[/\\\[/g;
+ $name =~ s/\]/\\\]/g;
+ $name =~ s/\(/\\\(/g;
+ $name =~ s/\)/\\\)/g;
+
+ return $name;
+}
+
+
+sub sift_files {
+ my($self) = shift;
+ my($files) = shift;
+ my($exts) = shift;
+ my($pchh) = shift;
+ my($pchc) = shift;
+ my($tag) = shift;
+ my($array) = shift;
+ my(@saved) = ();
+ my($ec) = $self->{'exclude_components'};
+
+ foreach my $file (@$files) {
+ foreach my $ext (@$exts) {
+ ## Always exclude the precompiled header and cpp
+ if ($file =~ /$ext$/ && (!defined $pchh || $file ne $pchh) &&
+ (!defined $pchc || $file ne $pchc)) {
+ my($exclude) = 0;
+ if (defined $$ec{$tag}) {
+ my($excludes) = $$ec{$tag};
+ foreach my $exc (@$excludes) {
+ if ($file =~ /$exc$/) {
+ $exclude = 1;
+ last;
+ }
+ }
+ }
+ elsif ($tag eq 'resource_files') {
+ ## Save these files for later. There may
+ ## be more than one and we want to try and
+ ## find the one that corresponds to this project
+ $exclude = 1;
+ push(@saved, $file);
+ }
+
+ if (!$exclude) {
+ push(@$array, $file);
+ }
+ last;
+ }
+ }
+ }
+
+ ## Now deal with the saved files
+ if (defined $saved[0]) {
+ my($pjname) = $self->escape_regex_special(
+ $self->get_assignment('project_name'));
+ foreach my $save (@saved) {
+ my($file) = $self->escape_regex_special($save);
+ if ($pjname =~ /$file/ || $file =~ /$pjname/) {
+ push(@$array, $file);
+ }
+ }
+ }
+}
+
+
+sub generate_default_components {
+ my($self) = shift;
+ my($files) = shift;
+ my($passed) = shift;
+ my($vc) = $self->{'valid_components'};
+ my(@tags) = (defined $passed ? $passed : keys %$vc);
+ my($pchh) = $self->get_assignment('pch_header');
+ my($pchc) = $self->get_assignment('pch_source');
+
+ foreach my $tag (@tags) {
+ my($exts) = $$vc{$tag};
+ if (defined $$exts[0]) {
+ if (defined $self->{$tag}) {
+ ## If the tag is defined, then process directories
+ my($names) = $self->{$tag};
+ foreach my $name (keys %$names) {
+ my($comps) = $$names{$name};
+ foreach my $comp (keys %$comps) {
+ my($array) = $$comps{$comp};
+ if (defined $passed) {
+ $self->sift_files($files, $exts, $pchh, $pchc, $tag, $array);
+ }
+ else {
+ my(@built) = ();
+ foreach my $file (@$array) {
+ if (-d $file) {
+ my(@gen) = $self->generate_default_file_list($file);
+ $self->sift_files(\@gen, $exts, $pchh, $pchc, $tag, \@built);
+ }
+ else {
+ push(@built, $file);
+ }
+ }
+ $$comps{$comp} = \@built;
+ }
+ }
+ }
+ }
+ else {
+ ## Generate default values for undefined tags
+ my($names) = {};
+ $self->{$tag} = $names;
+ my($comps) = {};
+ $$names{'default'} = $comps;
+ $$comps{'000_FILES'} = [];
+ my($array) = $$comps{'000_FILES'};
+
+ if (!$self->is_special_tag($tag)) {
+ $self->sift_files($files, $exts, $pchh, $pchc, $tag, $array);
+ if ($tag eq 'idl_files' && defined $$array[0]) {
+ $self->{'idl_defaulted'} = 1;
+ $self->process_assignment('tao', 1);
+ }
+ }
+ }
+ }
+ }
+}
+
+
+sub generated_source_extensions {
+ my($self) = shift;
+ my($tag) = shift;
+ my($vc) = $self->{'valid_components'};
+ my($gc) = $$vc{$tag};
+ my(@gen) = ();
+
+ foreach my $e (@$gc) {
+ foreach my $ending (@{$self->{'skeleton_endings'}}) {
+ push(@gen, "$ending$e");
+ }
+ }
+ return @gen;
+}
+
+
+sub generated_source_listed {
+ my($self) = shift;
+ my($tag) = shift;
+ my($idl) = shift;
+ my($names) = $self->{$tag};
+ my(@gen) = $self->generated_source_extensions($tag);
+ my(@found) = ();
+
+ ## Find out which generated source files are listed
+ foreach my $name (keys %$names) {
+ my($comps) = $$names{$name};
+ foreach my $key (keys %$comps) {
+ my($array) = $$comps{$key};
+ foreach my $val (@$array) {
+ foreach my $ext (@gen) {
+ foreach my $i (@$idl) {
+ my($ifile) = $self->escape_regex_special($i);
+ if ($val =~ /$ifile$ext$/) {
+ push(@found, $val);
+ }
+ }
+ }
+ }
+ }
+ }
+ return (defined $found[0]);
+}
+
+
+sub generate_default_idl_generated {
+ my($self) = shift;
+ my($tags) = shift;
+
+ if ($self->{'idl_defaulted'}) {
+ ## After all source and headers have been defaulted, see if we
+ ## need to add the idl generated .h, .i and .cpp files
+ if (defined $self->{'idl_files'}) {
+ ## Build up the list of idl files
+ my(@idl) = ();
+ my($names) = $self->{'idl_files'};
+ foreach my $name (keys %$names) {
+ my($comps) = $$names{$name};
+ foreach my $key (keys %$comps) {
+ my($array) = $$comps{$key};
+ foreach my $val (@$array) {
+ my($f) = $val;
+ $f =~ s/\.idl$//;
+ push(@idl, $f);
+ }
+ }
+ }
+
+ foreach my $type (@$tags) {
+ if (!$self->generated_source_listed($type, \@idl)) {
+ $self->add_idl_generated($type, \@idl);
+ }
+ }
+ }
+ }
+}
+
+
+sub add_source_corresponding_component_files {
+ my($self) = shift;
+ my($tag) = shift;
+# my($names) = $self->{'source_files'};
+ my(@all) = ();
+ my($vc) = $self->{'valid_components'};
+
+ foreach my $filetag ('source_files', 'template_files') {
+ my($names) = $self->{$filetag};
+ foreach my $name (keys %$names) {
+ my($comps) = $$names{$name};
+ foreach my $comp (keys %$comps) {
+ push(@all, @{$$comps{$comp}});
+ }
+ }
+ }
+
+ ## for each cpp file, we add a corresponding header or inline file
+ ## if it exists and is not already in the list of headers
+ my($names) = $self->{$tag};
+ foreach my $name (keys %$names) {
+ my($comps) = $$names{$name};
+ foreach my $comp (keys %$comps) {
+ my($array) = $$comps{$comp};
+ foreach my $cpp (@all) {
+ my($found) = 0;
+ my($c) = $cpp;
+ $c =~ s/\.[^\.]+$//;
+ foreach my $file (@$array) {
+ my($w) = $file;
+ my($added) = $c;
+ if ($w =~ /(\.[^\.]+)$/) {
+ $added .= $1;
+ }
+
+ if ($added eq $w) {
+ $found = 1;
+ last;
+ }
+ }
+
+ if (!$found) {
+ my($added) = 0;
+ foreach my $e (@{$$vc{$tag}}) {
+ my($ext) = $e;
+ $ext =~ s/\\//g;
+
+ ## If the file is readable
+ if (-r "$c$ext") {
+ push(@$array, "$c$ext");
+ $added = 1;
+ last;
+ }
+ }
+ if (!$added) {
+ ## If we did not add the file in the above loop,
+ ## we must check to see if the file *would be* generated
+ ## from idl. If so, we will add the file with the default
+ ## (i.e. first) file extension.
+ foreach my $ending (@{$self->{'skeleton_endings'}}) {
+ if ($c =~ /$ending$/) {
+ my($ext) = $$vc{$tag}->[0];
+ $ext =~ s/\\//g;
+ push(@$array, "$c$ext");
+ last;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+sub generate_defaults {
+ my($self) = shift;
+ my($base) = $self->base_directory();
+
+ ## Generate default project name
+ if (!defined $self->get_assignment('project_name')) {
+ $self->process_assignment('project_name', $base);
+ }
+
+ $self->generate_default_target_names($base);
+
+ my(@files) = $self->generate_default_file_list();
+ $self->generate_default_pch_filenames(\@files);
+
+ ## Generate default components, but @specialComponents
+ ## are skipped in the initial default components generation
+ $self->generate_default_components(\@files);
+
+ ## Generate the default idl generated list of source files
+ ## only if we defaulted the idl file list
+ $self->generate_default_idl_generated(['source_files']);
+
+ ## Add @specialComponents files based on the
+ ## source_components (i.e. .h and .i or .inl based on .cpp)
+ foreach my $tag (@specialComponents) {
+ $self->add_source_corresponding_component_files($tag);
+ }
+
+ ## Now, if the @specialComponents are still empty
+ ## then take any file that matches the components extension
+ foreach my $tag (@specialComponents) {
+ my($names) = $self->{$tag};
+ if (defined $names) {
+ foreach my $name (keys %$names) {
+ my($comps) = $$names{$name};
+ foreach my $comp (keys %$comps) {
+ my($array) = $$comps{$comp};
+ if (!defined $$array[0]) {
+ $self->generate_default_components(\@files, $tag);
+ }
+ }
+ }
+ }
+ }
+}
+
+
+sub project_name {
+ my($self) = shift;
+ return $self->get_assignment('project_name');
+}
+
+
+sub lib_target {
+ my($self) = shift;
+ return (defined $self->get_assignment('sharedname') ||
+ defined $self->get_assignment('staticname'));
+}
+
+
+sub exe_target {
+ my($self) = shift;
+ return (defined $self->get_assignment('exename'));
+}
+
+
+sub get_assignment {
+ my($self) = shift;
+ my($name) = shift;
+ my($tag) = ($self->{'reading_global'} ? 'global_assign' : 'assign');
+ return $self->{$tag}->{$name};
+}
+
+
+sub get_component_list {
+ my($self) = shift;
+ my($tag) = shift;
+ my($names) = $self->{$tag};
+ my(@list) = ();
+
+ foreach my $name (keys %$names) {
+ my($comps) = $$names{$name};
+ foreach my $key (sort keys %$comps) {
+ my($array) = $$comps{$key};
+ push(@list, @$array);
+ }
+ }
+
+ if ($self->convert_slashes()) {
+ for(my $i = 0; $i <= $#list; $i++) {
+ $list[$i] =~ s/\//\\/g;
+ }
+ }
+
+ if ($self->sort_files()) {
+ @list = sort { $self->file_sorter($a, $b) } @list;
+ }
+
+ return @list;
+}
+
+
+sub write_output_file {
+ my($self) = shift;
+ my($name) = shift;
+ my($status) = 0;
+ my($error) = "";
+ my($dir) = dirname($name);
+ my($fh) = new FileHandle();
+ my($tover) = $self->get_template_override();
+ my($template) = (defined $tover ? $tover : $self->get_template()) .
+ ".$TemplateExtension";
+ my($tfile) = $self->search_include_path($template);
+
+ if (defined $tfile) {
+ if ($dir ne ".") {
+ mkpath($dir, 0, 0777);
+ }
+
+ ## Read in the template values for the
+ ## specific target and project type
+ ($status, $error) = $self->read_template_input();
+
+ if ($status) {
+ my($tp) = new TemplateParser($self);
+
+ ## Set the project_file assignment for the template parser
+ $self->process_assignment('project_file', $name);
+
+ ($status, $error) = $tp->parse_file($tfile);
+
+ if ($status) {
+ if (open($fh, ">$name")) {
+ my($lines) = $tp->get_lines();
+ foreach my $line (@$lines) {
+ print $fh "$line";
+ }
+ close($fh);
+ my($fw) = $self->{'files_written'};
+ push(@$fw, $name);
+ }
+ else {
+ $error = "ERROR: Unable to open $name for output.";
+ $status = 0;
+ }
+ }
+ }
+ }
+ else {
+ $error = "ERROR: Unable to locate the template file: $template.";
+ $status = 0;
+ }
+
+ return $status, $error;
+}
+
+
+sub write_project {
+ my($self) = shift;
+ my($status) = 1;
+ my($error) = "";
+ my($name) = $self->transform_file_name($self->project_file_name());
+ my($prjname) = $self->get_assignment('project_name');
+
+ ## Writing the non-static file so set it to 0
+ if ($self->{'want_dynamic_projects'}) {
+ $self->{'writing_type'} = 0;
+ $self->process_assignment('project_name',
+ $prjname . $self->get_type_append());
+ ($status, $error) = $self->write_output_file($name);
+ }
+
+ if ($status && $self->{'want_static_projects'} &&
+ $self->separate_static_project()) {
+ ## Set the project name back to what it originally was
+ $self->process_assignment('project_name', $prjname);
+ $name = $self->transform_file_name($self->static_project_file_name());
+
+ ## Writing the static file so set it to 1
+ $self->{'writing_type'} = 1;
+ $self->process_assignment('project_name',
+ $prjname . $self->get_type_append());
+ ($status, $error) = $self->write_output_file($name);
+ }
+
+ if (!$status) {
+ print STDERR "$error\n";
+ }
+
+ return $status;
+}
+
+
+sub get_files_written {
+ my($self) = shift;
+ return $self->{'files_written'};
+}
+
+
+sub get_project_info {
+ my($self) = shift;
+ return $self->{'project_info'};
+}
+
+
+sub get_writing_type {
+ my($self) = shift;
+ return $self->{'writing_type'};
+}
+
+
+sub set_component_extensions {
+ my($self) = shift;
+ my($vc) = $self->{'valid_components'};
+ my($ec) = $self->{'exclude_components'};
+
+ foreach my $key (keys %$vc) {
+ my($ov) = $self->override_valid_component_extensions($key);
+ if (defined $ov) {
+ $$vc{$key} = $ov;
+ }
+ }
+
+ foreach my $key (keys %$ec) {
+ my($ov) = $self->override_exclude_component_extensions($key);
+ if (defined $ov) {
+ $$ec{$key} = $ov;
+ }
+ }
+}
+
+
+sub reset_values {
+ my($self) = shift;
+ $self->{'files_written'} = [];
+ $self->{'project_info'} = [];
+}
+
+
+sub get_template_input {
+ my($self) = shift;
+
+ if ($self->lib_target()) {
+ if ($self->{'writing_type'} == 1) {
+ return $self->{'lib_template_input'};
+ }
+ else {
+ return $self->{'dll_template_input'};
+ }
+ }
+
+ if ($self->{'writing_type'} == 1) {
+ return $self->{'lexe_template_input'};
+ }
+ else {
+ return $self->{'dexe_template_input'};
+ }
+}
+
+
+sub update_project_info {
+ my($self) = shift;
+ my($tparser) = shift;
+ my($append) = shift;
+ my($names) = shift;
+ my($sep) = shift;
+ my($pi) = $self->get_project_info();
+ my($value) = "";
+ my($arr) = ($append && defined $$pi[0] ? pop(@$pi) : []);
+
+ ## Set up the hash table when we are starting a new project_info
+ if ($append == 0) {
+ $self->{'project_info_hash_table'} = {};
+ }
+
+ ## Append the values of all names into one string
+ my(@narr) = @$names;
+ for(my $i = 0; $i <= $#narr; $i++) {
+ my($key) = $narr[$i];
+ $value .= $self->translate_value($key,
+ $tparser->get_value_with_default($key)) .
+ (defined $sep && $i != $#narr ? $sep : "");
+ }
+
+ ## If we haven't seen this value yet, put it on the array
+ if (!defined $self->{'project_info_hash_table'}->{"@narr $value"}) {
+ $self->{'project_info_hash_table'}->{"@narr $value"} = 1;
+ $self->save_project_value("@narr", $value);
+ push(@$arr, $value);
+ }
+
+ ## Always push the array back onto the project_info
+ push(@$pi, $arr);
+
+ return $value;
+}
+
+
+# ************************************************************
+# Virtual Methods To Be Overridden
+# ************************************************************
+
+sub specific_lookup {
+ my($self) = shift;
+ my($key) = shift;
+ return undef;
+}
+
+
+sub save_project_value {
+ my($self) = shift;
+ my($name) = shift;
+ my($value) = shift;
+}
+
+
+sub get_type_append {
+ my($self) = shift;
+ return "";
+}
+
+
+sub translate_value {
+ my($self) = shift;
+ my($key) = shift;
+ my($val) = shift;
+ return $val;
+}
+
+
+sub convert_slashes {
+ my($self) = shift;
+ return 1;
+}
+
+
+sub fill_value {
+ my($self) = shift;
+ my($name) = shift;
+ return undef;
+}
+
+
+sub separate_static_project {
+ my($self) = shift;
+ return 0;
+}
+
+
+sub project_file_name {
+ my($self) = shift;
+ return undef;
+}
+
+
+sub static_project_file_name {
+ my($self) = shift;
+ return undef;
+}
+
+
+sub override_valid_component_extensions {
+ my($self) = shift;
+ my($comp) = shift;
+ return undef;
+}
+
+
+sub override_exclude_component_extensions {
+ my($self) = shift;
+ my($comp) = shift;
+ return undef;
+}
+
+
+sub get_dll_exe_template_input_file {
+ my($self) = shift;
+ return undef;
+}
+
+
+sub get_lib_exe_template_input_file {
+ my($self) = shift;
+ return undef;
+}
+
+
+sub get_lib_template_input_file {
+ my($self) = shift;
+ return undef;
+}
+
+
+sub get_dll_template_input_file {
+ my($self) = shift;
+ return undef;
+}
+
+
+sub get_template {
+ my($self) = shift;
+ return undef;
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/TemplateInputReader.pm b/bin/MakeProjectCreator/modules/TemplateInputReader.pm
new file mode 100644
index 00000000000..09ee7621f93
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/TemplateInputReader.pm
@@ -0,0 +1,101 @@
+package TemplateInputReader;
+
+# ************************************************************
+# Description : Reads the template input and stores the values
+# Author : Chad Elliott
+# Create Date : 5/16/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+use Parser;
+
+use vars qw(@ISA);
+@ISA = qw(Parser);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub new {
+ my($class) = shift;
+ my($self) = Parser::new($class);
+
+ $self->{'values'} = {};
+ $self->{'cindex'} = 0;
+ $self->{'current'} = [ $self->{'values'} ];
+
+ return $self;
+}
+
+
+sub parse_line {
+ my($self) = shift;
+ my($ih) = shift;
+ my($line) = shift;
+ my($status) = 1;
+ my($errorString) = "";
+ my($current) = $self->{'current'};
+
+ if ($line eq "") {
+ }
+ elsif ($line =~ /^([\w\s]+)\s*{$/) {
+ ## Entering a new scope
+ my($name) = $1;
+ $name =~ s/\s+$//;
+ if (!defined $$current[$self->{'cindex'}]->{$name}) {
+ $$current[$self->{'cindex'}]->{$name} = {};
+ }
+ push(@$current, $$current[$self->{'cindex'}]->{$name});
+ $self->{'cindex'}++;
+ }
+ elsif ($line =~ /^}$/) {
+ if ($self->{'cindex'} > 0) {
+ pop(@$current);
+ $self->{'cindex'}--;
+ }
+ else {
+ $status = 0;
+ $errorString = "ERROR: Unmatched curly brace";
+ }
+ }
+ elsif ($line =~ /^(\w+)\s*=\s*(.*)?/) {
+ my($name) = $1;
+ my($value) = $2;
+
+ if (defined $value) {
+ $value = $self->create_array($value);
+ }
+ else {
+ $value = "";
+ }
+
+ if (!defined $$current[$self->{'cindex'}]->{$name}) {
+ $$current[$self->{'cindex'}]->{$name} = $value;
+ }
+ else {
+ $status = 0;
+ $errorString = "ERROR: Redifinition of '$name'";
+ }
+ }
+ else {
+ $status = 0;
+ $errorString = "ERROR: Unrecognized line: $line";
+ }
+
+ return $status, $errorString;
+}
+
+
+sub get_value {
+ my($self) = shift;
+ my($tag) = shift;
+ return $self->{'values'}->{$tag};
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/TemplateParser.pm b/bin/MakeProjectCreator/modules/TemplateParser.pm
new file mode 100644
index 00000000000..e16ceae33a0
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/TemplateParser.pm
@@ -0,0 +1,823 @@
+package TemplateParser;
+
+# ************************************************************
+# Description : Parses the template and fills in missing values
+# Author : Chad Elliott
+# Create Date : 5/17/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+use Cwd;
+
+use Parser;
+
+use vars qw(@ISA);
+@ISA = qw(Parser);
+
+# ************************************************************
+# Data Section
+# ************************************************************
+
+my(@keywords) = ('if', 'else', 'endif',
+ 'noextension', 'dirname', 'basename', 'basenoextension',
+ 'foreach', 'forfirst', 'fornotfirst',
+ 'fornotlast', 'forlast', 'endfor',
+ 'comment'
+ );
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub new {
+ my($class) = shift;
+ my($prjc) = shift;
+ my($self) = Parser::new($class);
+
+ $self->{'prjc'} = $prjc;
+ $self->{'values'} = {};
+ $self->{'defaults'} = {};
+ $self->{'lines'} = [];
+ $self->{'built'} = "";
+ $self->{'sstack'} = [];
+ $self->{'lstack'} = [];
+ $self->{'if_skip'} = 0;
+
+ $self->{'foreach'} = {};
+ $self->{'foreach'}->{'count'} = -1;
+ $self->{'foreach'}->{'nested'} = 0;
+ $self->{'foreach'}->{'names'} = [];
+ $self->{'foreach'}->{'text'} = [];
+ $self->{'foreach'}->{'scope'} = [];
+ $self->{'foreach'}->{'temp_scope'} = [];
+ $self->{'foreach'}->{'processing'} = 0;
+
+ return $self;
+}
+
+
+sub basename {
+ my($self) = shift;
+ my($file) = shift;
+ for(my $i = length($file) - 1; $i >= 0; $i--) {
+ my($ch) = substr($file, $i, 1);
+ if ($ch eq '/' || $ch eq '\\') {
+ ## The template file may use this value (<%basename_found%>)
+ ## to determine whether a basename removed the directory or not
+ $self->{'values'}->{'basename_found'} = 1;
+ return substr($file, $i + 1);
+ }
+ }
+ delete $self->{'values'}->{'basename_found'};
+ return $file;
+}
+
+
+sub dirname {
+ my($self) = shift;
+ my($file) = shift;
+ for(my $i = length($file) - 1; $i != 0; $i--) {
+ my($ch) = substr($file, $i, 1);
+ if ($ch eq '/' || $ch eq '\\') {
+ ## The template file may use this value (<%dirname_found%>)
+ ## to determine whether a dirname removed the basename or not
+ $self->{'values'}->{'dirname_found'} = 1;
+ return substr($file, 0, $i);
+ }
+ }
+ delete $self->{'values'}->{'dirname_found'};
+ return ".";
+}
+
+
+sub strip_line {
+ my($self) = shift;
+ my($line) = shift;
+
+ ## Override strip_line() from Parser.
+ ## We need to preserve leading space and
+ ## there is no comment string in templates.
+ $self->{'line_number'}++;
+ $line =~ s/\s+$//;
+
+ return $line;
+}
+
+
+sub is_keyword {
+ my($self) = shift;
+ my($name) = shift;
+
+ foreach my $key (@keywords) {
+ if ($name eq $key) {
+ return 1;
+ }
+ }
+ return 0;
+}
+
+
+## Append the current value to the line that is being
+## built. This line may be a foreach line or a general
+## line without a foreach.
+sub append_current {
+ my($self) = shift;
+ my($value) = shift;
+ my($index) = $self->{'foreach'}->{'count'};
+
+ if ($index >= 0) {
+ $self->{'foreach'}->{'text'}->[$index] .= $value;
+ }
+ else {
+ $self->{'built'} .= $value;
+ }
+}
+
+
+sub set_current_values {
+ my($self) = shift;
+ my($name) = shift;
+
+ ## If any value within a foreach matches the name
+ ## of a hash table within the template input we will
+ ## set the values of that hash tablein the current scope
+ my($ti) = $self->{'prjc'}->get_template_input();
+ if (defined $ti) {
+ my($counter) = $self->{'foreach'}->{'count'};
+ my($value) = $ti->get_value($name);
+ if (defined $value && $counter >= 0 &&
+ UNIVERSAL::isa($value, 'HASH')) {
+ $self->{'foreach'}->{'temp_scope'}->[$counter] = $value;
+ }
+ }
+}
+
+
+sub relative {
+ my($self) = shift;
+ my($value) = shift;
+ my($rel) = $self->{'prjc'}->get_relative();
+ my(@keys) = keys %$rel;
+
+ if (defined $value && defined $keys[0] && $value =~ /\$/) {
+ if (UNIVERSAL::isa($value, 'ARRAY')) {
+ my(@built) = ();
+ foreach my $val (@$value) {
+ push(@built, $self->relative($val));
+ }
+ $value = \@built;
+ }
+ else {
+ my($cwd) = getcwd();
+ my($start) = 0;
+ while(substr($value, $start) =~ /(\$\(([^)]+)\))/) {
+ my($whole) = $1;
+ my($name) = $2;
+ my($val) = $$rel{$name};
+ if (defined $val) {
+ $val =~ s/\\/\//g;
+ if (index($cwd, $val) == 0) {
+ my($count) = 0;
+ substr($cwd, 0, length($val)) = "";
+ while($cwd =~ /^\\/) {
+ $cwd =~ s/^\///;
+ }
+ my($length) = length($cwd);
+ for(my $i = 0; $i < $length; $i++) {
+ if (substr($cwd, $i, 1) eq '/') {
+ $count++;
+ }
+ }
+ $val = "../" x $count;
+ $val =~ s/\/$//;
+ $value =~ s/\$\([^)]+\)/$val/;
+ }
+ }
+ $start += length($whole);
+ }
+ }
+ }
+
+ return $value;
+}
+
+
+sub get_value {
+ my($self) = shift;
+ my($name) = shift;
+ my($value) = undef;
+ my($counter) = $self->{'foreach'}->{'count'};
+
+ ## First, check the temporary scope (set inside a foreach)
+ if ($counter >= 0) {
+ while(!defined $value && $counter >= 0) {
+ my($scope) = $self->{'foreach'}->{'temp_scope'}->[$counter];
+ $value = $$scope{$name};
+ $counter--;
+ }
+ $counter = $self->{'foreach'}->{'count'};
+ }
+
+ if (!defined $value) {
+ ## Next, check for a template value
+ my($ti) = $self->{'prjc'}->get_template_input();
+ if (defined $ti) {
+ $value = $ti->get_value($name);
+ }
+
+ if (!defined $value) {
+ ## Next, check the inner to outer foreach
+ ## scopes for overriding values
+ while(!defined $value && $counter >= 0) {
+ my($scope) = $self->{'foreach'}->{'scope'}->[$counter];
+ $value = $$scope{$name};
+ $counter--;
+ }
+
+ ## Then get the value from the project creator
+ if (!defined $value) {
+ $value = $self->{'prjc'}->get_assignment($name);
+
+ ## Then get it from our known values
+ if (!defined $value) {
+ $value = $self->{'values'}->{$name};
+ }
+ }
+ }
+ }
+
+ return $self->relative($value);
+}
+
+
+sub get_value_with_default {
+ my($self) = shift;
+ my($name) = shift;
+ my($value) = $self->get_value($name);
+
+ if (defined $value) {
+ if (UNIVERSAL::isa($value, 'ARRAY')) {
+ $value = "@$value";
+ }
+ }
+ else {
+ $value = $self->{'defaults'}->{$name};
+ if (!defined $value) {
+ ## Call back onto the project creator to allow
+ ## it to fill in the value before defaulting to an empty string.
+ $value = $self->{'prjc'}->fill_value($name);
+ if (!defined $value) {
+# print "DEBUG: WARNING: $name defaulting to empty string\n";
+ $value = "";
+ }
+ }
+ else {
+# print "DEBUG: WARNING: $name using default value of $value\n";
+ }
+ $value = $self->relative($value);
+ }
+
+ return $value;
+}
+
+
+sub process_foreach {
+ my($self) = shift;
+ my($index) = $self->{'foreach'}->{'count'};
+ my($name) = $self->{'foreach'}->{'names'}->[$index];
+ my($text) = $self->{'foreach'}->{'text'}->[$index];
+ my($status) = 1;
+ my($errorString) = "";
+ my(@values) = ();
+ my($names) = $self->create_array($name);
+
+ $name = undef;
+ foreach my $n (@$names) {
+ my($vals) = $self->get_value($n);
+ if (defined $vals && $vals ne "") {
+ if (!UNIVERSAL::isa($vals, 'ARRAY')) {
+ $vals = $self->create_array($vals);
+ }
+ push(@values, @$vals);
+ }
+ if (!defined $name) {
+ $name = $n;
+ }
+ }
+
+ ## Reset the text (it will be regenerated by calling parse_line
+ $self->{'foreach'}->{'text'}->[$index] = "";
+
+ if (defined $values[0]) {
+ my($inner) = $name;
+ my($scope) = $self->{'foreach'}->{'scope'}->[$index];
+
+ $inner =~ s/s$//;
+ $$scope{'forlast'} = 0;
+ $$scope{'fornotlast'} = 1;
+ $$scope{'forfirst'} = 1;
+ $$scope{'fornotfirst'} = 0;
+
+ for(my $i = 0; $i <= $#values; $i++) {
+ my($value) = $values[$i];
+
+ ## Set the corresponding values in the temporary scope
+ $self->set_current_values($value);
+
+ ## Set the special values that only exist
+ ## within a foreach
+ if ($i != 0) {
+ $$scope{'forfirst'} = 0;
+ $$scope{'fornotfirst'} = 1;
+ }
+ if ($i == $#values) {
+ $$scope{'forlast'} = 1;
+ $$scope{'fornotlast'} = 0;
+ }
+ $$scope{$inner} = $value;
+
+ ## A tiny hack for VC7
+ if ($inner eq 'configuration') {
+ $self->{'prjc'}->update_project_info($self, 1,
+ ['configuration', 'platform'],
+ '|');
+ }
+
+ ## Now parse the line of text, each time
+ ## with different values
+ $self->{'foreach'}->{'processing'}++;
+ ($status, $errorString) = $self->parse_line(undef, $text);
+ $self->{'foreach'}->{'processing'}--;
+ if (!$status) {
+ last;
+ }
+ }
+ }
+
+ return $status, $errorString;
+}
+
+
+sub handle_end {
+ my($self) = shift;
+ my($name) = shift;
+ my($status) = 1;
+ my($errorString) = "";
+ my($sstack) = $self->{'sstack'};
+ my($lstack) = $self->{'lstack'};
+ my($end) = pop(@$sstack);
+ pop(@$lstack);
+
+ if (!defined $end) {
+ $status = 0;
+ $errorString = "ERROR: Unmatched $name\n";
+ }
+ elsif ($end eq 'endif') {
+ $self->{'if_skip'} = 0;
+ }
+ elsif ($end eq 'endfor') {
+ my($index) = $self->{'foreach'}->{'count'};
+ ($status, $errorString) = $self->process_foreach();
+ if ($status) {
+ $self->{'foreach'}->{'count'}--;
+ $self->append_current($self->{'foreach'}->{'text'}->[$index]);
+ }
+ }
+
+ return $status, $errorString;
+}
+
+
+sub handle_if {
+ my($self) = shift;
+ my($val) = shift;
+ my($sstack) = $self->{'sstack'};
+ my($lstack) = $self->{'lstack'};
+ my($name) = 'endif';
+
+ push(@$lstack, $self->line_number() . " $val");
+ if (!$self->{'if_skip'}) {
+ my($true) = 1;
+ push(@$sstack, $name);
+ if ($val =~ /^!(.*)/) {
+ $val = $1;
+ $val =~ s/^\s+//;
+ $true = 0;
+ }
+ if (!defined $self->get_value($val)) {
+ $self->{'if_skip'} = $true;
+ }
+ else {
+ $self->{'if_skip'} = !$true;
+ }
+ }
+ else {
+ push(@$sstack, "*$name");
+ }
+}
+
+
+sub handle_else {
+ my($self) = shift;
+ my($sstack) = $self->{'sstack'};
+ my(@scopy) = @$sstack;
+ my($name) = "endif";
+
+ ## This method does not take into account that
+ ## multiple else clauses could be supplied to a single if.
+ ## Someday, this may be fixed.
+ if (defined $scopy[$#scopy] && $scopy[$#scopy] eq $name) {
+ $self->{'if_skip'} ^= 1;
+ }
+}
+
+
+sub handle_foreach {
+ my($self) = shift;
+ my($val) = shift;
+ my($sstack) = $self->{'sstack'};
+ my($lstack) = $self->{'lstack'};
+ my($name) = 'endfor';
+
+ push(@$lstack, $self->line_number());
+ if (!$self->{'if_skip'}) {
+ push(@$sstack, $name);
+ $self->{'foreach'}->{'count'}++;
+
+ my($index) = $self->{'foreach'}->{'count'};
+ $self->{'foreach'}->{'names'}->[$index] = $val;
+ $self->{'foreach'}->{'text'}->[$index] = "";
+ $self->{'foreach'}->{'scope'}->[$index] = {};
+ }
+ else {
+ push(@$sstack, "*$name");
+ }
+}
+
+
+sub handle_special {
+ my($self) = shift;
+ my($name) = shift;
+ my($val) = shift;
+
+ ## If $name (fornotlast, forfirst, etc.) is set to 1
+ ## Then we append the $val onto the current string that's
+ ## being built.
+ if ($self->get_value($name)) {
+ $self->append_current($val);
+ }
+}
+
+
+sub handle_noextension {
+ my($self) = shift;
+ my($name) = shift;
+
+ if (!$self->{'if_skip'}) {
+ my($val) = $self->get_value_with_default($name);
+ $val =~ s/\.[^\.]+$//;
+ $self->append_current($val);
+ }
+}
+
+
+sub handle_dirname {
+ my($self) = shift;
+ my($name) = shift;
+
+ if (!$self->{'if_skip'}) {
+ my($val) = $self->dirname($self->get_value_with_default($name));
+ $self->append_current($val);
+ }
+}
+
+
+sub handle_basename {
+ my($self) = shift;
+ my($name) = shift;
+
+ if (!$self->{'if_skip'}) {
+ my($val) = $self->basename($self->get_value_with_default($name));
+ $self->append_current($val);
+ }
+}
+
+
+sub handle_basenoextension {
+ my($self) = shift;
+ my($name) = shift;
+
+ if (!$self->{'if_skip'}) {
+ my($val) = $self->basename($self->get_value_with_default($name));
+ $val =~ s/\.[^\.]+$//;
+ $self->append_current($val);
+ }
+}
+
+
+## Given a line that starts with an identifier, we split
+## then name from the possible value stored inside ()'s and
+## we stop looking at the line when we find the %> ending
+sub split_name_value {
+ my($self) = shift;
+ my($line) = shift;
+ my($length) = length($line);
+ my($name) = undef;
+ my($val) = undef;
+
+ for(my $i = 0; $i < $length; $i++) {
+ my($ch) = substr($line, $i, 1);
+ if (!defined $name && $ch eq '(') {
+ $name = substr($line, 0, $i);
+ $val = "";
+ }
+ elsif (!defined $name && $ch eq '%') {
+ if (substr($line, $i + 1, 1) eq ">") {
+ $name = substr($line, 0, $i);
+ last;
+ }
+ }
+ elsif (defined $val && $ch ne ')') {
+ $val .= $ch;
+ }
+ elsif (defined $val && $ch eq ')') {
+ if (substr($line, $i + 1, 2) eq "%>") {
+ last;
+ }
+ else {
+ $val .= $ch;
+ }
+ }
+ }
+ return $name, $val;
+}
+
+
+sub process_name {
+ my($self) = shift;
+ my($line) = shift;
+ my($length) = 0;
+ my($status) = 1;
+ my($errorString) = "";
+
+ if ($line eq "") {
+ }
+ elsif ($line =~ /^(\w+)(\(([^\)]+|\".*\")\))?%>/) {
+ my($name, $val) = $self->split_name_value($line);
+
+ $length += length($name);
+ if (defined $val) {
+ $length += length($val) + 2;
+ }
+
+ if ($self->is_keyword($name)) {
+ if ($name eq 'endif' || $name eq 'endfor') {
+ ($status, $errorString) = $self->handle_end($name);
+ }
+ elsif ($name eq 'if') {
+ $self->handle_if($val);
+ }
+ elsif ($name eq 'else') {
+ $self->handle_else();
+ }
+ elsif ($name eq 'foreach') {
+ $self->handle_foreach($val);
+ }
+ elsif ($name eq 'fornotlast' || $name eq 'forlast' ||
+ $name eq 'fornotfirst' || $name eq 'forfirst') {
+ $self->handle_special($name, $self->process_special($val));
+ }
+ elsif ($name eq 'comment') {
+ ## Ignore the contents of the comment
+ }
+ elsif ($name eq 'noextension') {
+ $self->handle_noextension($val);
+ }
+ elsif ($name eq 'dirname') {
+ $self->handle_dirname($val);
+ }
+ elsif ($name eq 'basename') {
+ $self->handle_basename($val);
+ }
+ elsif ($name eq 'basenoextension') {
+ $self->handle_basenoextension($val);
+ }
+ }
+ else {
+ if (!$self->{'if_skip'}) {
+ if (defined $val && !defined $self->{'defaults'}->{$name}) {
+ $self->{'defaults'}->{$name} = $self->process_special($val);
+ }
+
+ $val = $self->get_value_with_default($name);
+ $self->append_current($val);
+ }
+ }
+ }
+ else {
+ my($error) = $line;
+ my($length) = length($line);
+ for(my $i = 0; $i < $length; $i++) {
+ my($part) = substr($line, $i, 2);
+ if ($part eq "%>") {
+ $error = substr($line, 0, $i + 2);
+ last;
+ }
+ }
+ $status = 0;
+ $errorString = "ERROR: Unable to parse line starting at $error";
+ }
+
+ return $status, $errorString, $length;
+}
+
+
+sub collect_data {
+ my($self) = shift;
+ my($prjc) = $self->{'prjc'};
+
+ ## Collect the components into {'values'} somehow
+ foreach my $key (keys %{$prjc->{'valid_components'}}) {
+ my(@list) = $prjc->get_component_list($key);
+ if (defined $list[0]) {
+ $self->{'values'}->{$key} = "@list";
+ }
+ }
+
+ ## A tiny hack (mainly for VC6 projects)
+ ## for the workspace generator. It needs to know the
+ ## target names to match up with the project name.
+ $prjc->update_project_info($self, 0, ['project_name']);
+
+ ## This is for all projects
+ $prjc->update_project_info($self, 1, ['depends']);
+
+ ## VC7 Projects need to know the GUID.
+ ## We need to save this value in our know values
+ ## since each guid generated will be different. We need
+ ## this to correspond to the same guid used in the workspace.
+ my($guid) = $prjc->update_project_info($self, 1, ['guid']);
+ $self->{'values'}->{'guid'} = $guid;
+}
+
+
+sub is_only_keyword {
+ my($self) = shift;
+ my($line) = shift;
+ my($status) = 0;
+
+ ## Does the line contain only a keyword?
+ if ($line =~ /^<%(.*)%>$/) {
+ my($part) = $1;
+ if ($part !~ /%>/) {
+ foreach my $keyword (@keywords) {
+ if ($part =~ /^$keyword/) {
+ $status = 1;
+ last;
+ }
+ }
+ }
+ }
+ return $status;
+}
+
+
+sub parse_line {
+ my($self) = shift;
+ my($ih) = shift;
+ my($line) = shift;
+ my($status) = 1;
+ my($errorString) = "";
+ my($length) = length($line);
+ my($name) = 0;
+ my($crlf) = $self->{'prjc'}->crlf();
+ my($clen) = length($crlf);
+ my($startempty) = ($line eq "" ? 1 : 0);
+ my($append_name) = 0;
+
+ ## If processing a foreach or the line only
+ ## contains a keyword, then we do
+ ## not need to add a newline to the end.
+ if ($self->{'foreach'}->{'processing'} == 0 &&
+ !$self->is_only_keyword($line)) {
+ $line .= $crlf;
+ $length += $clen;
+ }
+
+ if ($self->{'foreach'}->{'count'} < 0) {
+ $self->{'built'} = "";
+ }
+
+ for(my $i = 0; $i < $length; $i++) {
+ my($part) = substr($line, $i, 2);
+ if ($part eq "<%") {
+ $i++;
+ $name = 1;
+ }
+ elsif ($part eq "%>") {
+ $i++;
+ $name = 0;
+ if ($append_name) {
+ $append_name = 0;
+ if (!$self->{'if_skip'}) {
+ $self->append_current($part);
+ }
+ }
+ }
+ elsif ($name) {
+ my($substr) = substr($line, $i);
+ my($efcheck) = ($substr =~ /^endfor\%\>/);
+ my($focheck) = ($substr =~ /^foreach\(/);
+
+ if ($focheck && $self->{'foreach'}->{'count'} >= 0) {
+ $self->{'foreach'}->{'nested'}++;
+ }
+
+ if ($self->{'foreach'}->{'count'} < 0 ||
+ $self->{'foreach'}->{'processing'} > $self->{'foreach'}->{'nested'} ||
+ (($efcheck || $focheck) &&
+ $self->{'foreach'}->{'nested'} == $self->{'foreach'}->{'processing'})) {
+ my($nlen) = 0;
+ ($status,
+ $errorString,
+ $nlen) = $self->process_name($substr);
+
+ if ($status && $nlen == 0) {
+ $errorString = "ERROR: Could not parse this line at column $i";
+ $status = 0;
+ }
+ if (!$status) {
+ last;
+ }
+
+ $i += ($nlen - 1);
+ }
+ else {
+ $name = 0;
+ if (!$self->{'if_skip'}) {
+ $self->append_current("<%" . substr($line, $i, 1));
+ $append_name = 1;
+ }
+ }
+
+ if ($efcheck && $self->{'foreach'}->{'nested'} > 0) {
+ $self->{'foreach'}->{'nested'}--;
+ }
+ }
+ else {
+ if (!$self->{'if_skip'}) {
+ $self->append_current(substr($line, $i, 1));
+ }
+ }
+ }
+
+ if ($self->{'foreach'}->{'count'} < 0) {
+ ## If the line started out empty and we're not
+ ## skipping from the start or the built up line is not empty
+ if ($startempty ||
+ ($self->{'built'} ne $crlf && $self->{'built'} ne "")) {
+ my($lines) = $self->{'lines'};
+ push(@$lines, $self->{'built'});
+ }
+ }
+
+ return $status, $errorString;
+}
+
+
+sub parse_file {
+ my($self) = shift;
+ my($input) = shift;
+
+ $self->collect_data();
+ my($status, $errorString) = $self->read_file($input);
+
+ if ($status) {
+ my($sstack) = $self->{'sstack'};
+ if (defined $$sstack[0]) {
+ my($lstack) = $self->{'lstack'};
+ $status = 0;
+ $errorString = "ERROR: missing an $$sstack[0] starting at $$lstack[0]";
+ }
+ }
+
+ if (!$status) {
+ my($linenumber) = $self->line_number();
+ $errorString = "$input: line $linenumber: $errorString\n";
+ }
+
+ return $status, $errorString;
+}
+
+
+sub get_lines {
+ my($self) = shift;
+ return $self->{'lines'};
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/VA4ProjectCreator.pm b/bin/MakeProjectCreator/modules/VA4ProjectCreator.pm
new file mode 100644
index 00000000000..dd2a99640ca
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/VA4ProjectCreator.pm
@@ -0,0 +1,129 @@
+package VA4ProjectCreator;
+
+# ************************************************************
+# Description : A VA4 Project Creator
+# Author : Chad Elliott
+# Create Date : 7/8/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+use ProjectCreator;
+
+use vars qw(@ISA);
+@ISA = qw(ProjectCreator);
+
+# ************************************************************
+# Data Section
+# ************************************************************
+
+my($sname) = "_Static";
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub translate_value {
+ my($self) = shift;
+ my($key) = shift;
+ my($val) = shift;
+
+ if ($key eq 'depends' && $val ne "") {
+ my($wt) = $self->get_writing_type();
+ my($arr) = $self->create_array($val);
+ $val = "";
+ foreach my $entry (@$arr) {
+ $val .= "\"" . ($wt == 1 ? $self->static_project_file_name($entry) :
+ $self->project_file_name($entry)) . "\" ";
+ }
+ $val =~ s/\s+$//;
+ }
+ return $val;
+}
+
+
+sub convert_slashes {
+ my($self) = shift;
+ return 0;
+}
+
+
+sub file_sorter {
+ my($self) = shift;
+ my($left) = shift;
+ my($right) = shift;
+ return lc($left) cmp lc($right);
+}
+
+
+sub crlf {
+ my($self) = shift;
+ return $self->windows_crlf();
+}
+
+
+sub separate_static_project {
+ my($self) = shift;
+ return 1;
+}
+
+
+sub project_file_name {
+ my($self) = shift;
+ my($name) = shift;
+
+ if (!defined $name) {
+ $name = $self->project_name();
+ }
+
+ return "$name.icc";
+}
+
+
+sub static_project_file_name {
+ my($self) = shift;
+ my($name) = shift;
+
+ if (!defined $name) {
+ $name = $self->project_name();
+ }
+
+ return "$name$sname.icc";
+}
+
+
+sub get_dll_exe_template_input_file {
+ my($self) = shift;
+ return "va4iccdllexe";
+}
+
+
+sub get_lib_exe_template_input_file {
+ my($self) = shift;
+ return "va4icclibexe";
+}
+
+
+sub get_lib_template_input_file {
+ my($self) = shift;
+ return "va4icclib";
+}
+
+
+sub get_dll_template_input_file {
+ my($self) = shift;
+ return "va4iccdll";
+}
+
+
+sub get_template {
+ my($self) = shift;
+ return "va4icc";
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/VA4WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/VA4WorkspaceCreator.pm
new file mode 100644
index 00000000000..f1eebf02842
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/VA4WorkspaceCreator.pm
@@ -0,0 +1,76 @@
+package VA4WorkspaceCreator;
+
+# ************************************************************
+# Description : A VA4 Workspace Creator
+# Author : Chad Elliott
+# Create Date : 5/13/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+use VA4ProjectCreator;
+use WorkspaceCreator;
+
+use vars qw(@ISA);
+@ISA = qw(WorkspaceCreator);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+
+sub crlf {
+ my($self) = shift;
+ return $self->windows_crlf();
+}
+
+
+sub workspace_file_name {
+ my($self) = shift;
+ return $self->get_workspace_name() . ".icp";
+}
+
+
+sub pre_workspace {
+ my($self) = shift;
+ my($fh) = shift;
+ my($crlf) = $self->crlf();
+
+ print $fh "// Visual Age C++ 4 workspace file$crlf$crlf";
+}
+
+
+sub write_comps {
+ my($self) = shift;
+ my($fh) = shift;
+ my($projects) = $self->get_projects();
+ my($pjs) = $self->get_project_info();
+ my(@list) = $self->sort_dependencies($projects, $pjs);
+ my($crlf) = $self->crlf();
+
+ foreach my $project (@list) {
+ my($base) = $project;
+ $base =~ s/\.[^\.]+//;
+ my($ics) = "$base.ics";
+
+ print $fh "subproject $base icc \"$project\", ics \"$ics\"$crlf" .
+ "{$crlf" .
+ "}$crlf";
+ }
+
+ print $fh "build buildAll$crlf" .
+ "{$crlf";
+ foreach my $project (@list) {
+ my($base) = $project;
+ $base =~ s/\.[^\.]+//;
+ print $fh " use $base$crlf";
+ }
+ print $fh "}$crlf$crlf";
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm b/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm
new file mode 100644
index 00000000000..17093fa3cab
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm
@@ -0,0 +1,229 @@
+package VC6ProjectCreator;
+
+# ************************************************************
+# Description : A VC6 Project Creator
+# Author : Chad Elliott
+# Create Date : 3/14/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+use ProjectCreator;
+
+use vars qw(@ISA);
+@ISA = qw(ProjectCreator);
+
+# ************************************************************
+# Data Section
+# ************************************************************
+
+my($dynamiclib) = "DLL";
+my($staticlib) = "LIB";
+my($dynamicexe) = "EXE";
+my($staticexe) = "Static EXE";
+my($sname) = "_Static";
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub remove_type_append {
+ my($self) = shift;
+ my($str) = shift;
+
+ foreach my $type ($staticexe, $dynamicexe, $staticlib, $dynamiclib) {
+ if ($str =~ /(.*)\s+$type$/) {
+ $str = $1;
+ last;
+ }
+ }
+
+ return $str;
+}
+
+
+sub base_project_name {
+ my($self) = shift;
+ return $self->transform_file_name(
+ $self->remove_type_append($self->project_name()) .
+ ($self->get_writing_type() == 1 ? $sname : ""));
+}
+
+
+sub get_static_append {
+ my($self) = shift;
+ return $sname;
+}
+
+
+sub get_type_append {
+ my($self) = shift;
+ my($type) = "";
+ if ($self->lib_target()) {
+ ## Set the type_append preserving whitespace
+ if ($self->get_writing_type() == 1) {
+ $type = " $staticlib";
+ }
+ else {
+ $type = " $dynamiclib";
+ }
+ }
+ else {
+ ## Set the type_append preserving whitespace
+ if ($self->get_writing_type() == 1) {
+ $type = " $staticexe";
+ }
+ else {
+ $type = " $dynamicexe";
+ }
+ }
+ return $type;
+}
+
+
+sub translate_value {
+ my($self) = shift;
+ my($key) = shift;
+ my($val) = shift;
+
+ if ($key eq 'depends' && $val ne "") {
+ my($arr) = $self->create_array($val);
+ my($app) = $dynamiclib;
+ $val = "";
+
+ ## Only write dependencies for non-static projects
+ ## and static exe projects
+ my($wt) = $self->get_writing_type();
+ if ($wt == 0 || $self->exe_target()) {
+ if ($wt == 1) {
+ $app = $staticlib;
+ }
+ foreach my $entry (@$arr) {
+ my($dep) = $app;
+ ## Hack for executable dependencies
+ if ($entry =~ /exe/i) {
+ if ($wt == 1) {
+ $dep = $staticexe;
+ }
+ else {
+ $dep = $dynamicexe;
+ }
+ }
+
+ $val .= "\"$entry $dep\" ";
+ }
+ $val =~ s/\s+$//;
+ }
+ }
+ return $val;
+}
+
+
+sub file_sorter {
+ my($self) = shift;
+ my($left) = shift;
+ my($right) = shift;
+ return lc($left) cmp lc($right);
+}
+
+
+sub crlf {
+ my($self) = shift;
+ return $self->windows_crlf();
+}
+
+
+sub fill_value {
+ my($self) = shift;
+ my($name) = shift;
+ my($value) = undef;
+
+ if ($name eq "make_file_name") {
+ $value = $self->base_project_name() . ".mak";
+ }
+
+ return $value;
+}
+
+
+sub separate_static_project {
+ my($self) = shift;
+ return 1;
+}
+
+
+sub project_file_name {
+ my($self) = shift;
+ return $self->project_name() . ".dsp";
+}
+
+
+sub static_project_file_name {
+ my($self) = shift;
+ return $self->project_name() . "$sname.dsp";
+}
+
+
+sub override_valid_component_extensions {
+ my($self) = shift;
+ my($comp) = shift;
+ my($array) = undef;
+
+ if ($comp eq 'source_files') {
+ my(@exts) = ("\\.cpp", "\\.cxx", "\\.c");
+ $array = \@exts;
+ }
+
+ return $array;
+}
+
+
+sub override_exclude_component_extensions {
+ my($self) = shift;
+ my($comp) = shift;
+ my($array) = undef;
+
+ if ($comp eq 'source_files') {
+ my(@exts) = ("_T\\.cpp", "_T\\.cxx");
+ $array = \@exts;
+ }
+
+ return $array;
+}
+
+
+sub get_dll_exe_template_input_file {
+ my($self) = shift;
+ return "vc6dspdllexe";
+}
+
+
+sub get_lib_exe_template_input_file {
+ my($self) = shift;
+ return "vc6dsplibexe";
+}
+
+
+sub get_lib_template_input_file {
+ my($self) = shift;
+ return "vc6dsplib";
+}
+
+
+sub get_dll_template_input_file {
+ my($self) = shift;
+ return "vc6dspdll";
+}
+
+
+sub get_template {
+ my($self) = shift;
+ return "vc6dsp";
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm
new file mode 100644
index 00000000000..b69ee0280d2
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm
@@ -0,0 +1,114 @@
+package VC6WorkspaceCreator;
+
+# ************************************************************
+# Description : A VC6 Workspace Creator
+# Author : Chad Elliott
+# Create Date : 5/13/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+use VC6ProjectCreator;
+use WorkspaceCreator;
+
+use vars qw(@ISA);
+@ISA = qw(WorkspaceCreator);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+
+sub crlf {
+ my($self) = shift;
+ return $self->windows_crlf();
+}
+
+
+sub workspace_file_name {
+ my($self) = shift;
+ return $self->get_workspace_name() . ".dsw";
+}
+
+
+sub pre_workspace {
+ my($self) = shift;
+ my($fh) = shift;
+ my($crlf) = $self->crlf();
+
+ print $fh "Microsoft Developer Studio Workspace File, Format Version 6.00$crlf" .
+ "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!$crlf" .
+ "$crlf";
+}
+
+
+sub write_comps {
+ my($self) = shift;
+ my($fh) = shift;
+ my($projects) = $self->get_projects();
+ my($pjs) = $self->get_project_info();
+ my($crlf) = $self->crlf();
+
+ foreach my $project (@$projects) {
+ my($pi) = $$pjs{$project};
+ my($name, $deps) = @$pi;
+
+ ## Convert all /'s to \
+ $project =~ s/\//\\/g;
+
+ print $fh "###############################################################################$crlf" .
+ "$crlf" .
+ "Project: \"$name\"=$project - Package Owner=<4>$crlf" .
+ "$crlf" .
+ "Package=<5>$crlf" .
+ "{{{$crlf" .
+ "}}}$crlf" .
+ "$crlf" .
+ "Package=<4>$crlf" .
+ "{{{$crlf";
+
+ if (defined $deps && $deps ne "") {
+ my($darr) = $self->create_array($deps);
+ foreach my $dep (@$darr) {
+ ## Avoid cirular dependencies
+ if ($name ne $dep) {
+ print $fh " Begin Project Dependency$crlf" .
+ " Project_Dep_Name $dep$crlf" .
+ " End Project Dependency$crlf";
+ }
+ }
+ }
+
+ print $fh "}}}$crlf" .
+ "$crlf";
+ }
+}
+
+
+sub post_workspace {
+ my($self) = shift;
+ my($fh) = shift;
+ my($crlf) = $self->crlf();
+
+ print $fh "###############################################################################$crlf" .
+ "$crlf" .
+ "Global:$crlf" .
+ "$crlf" .
+ "Package=<5>$crlf" .
+ "{{{$crlf" .
+ "}}}$crlf" .
+ "$crlf" .
+ "Package=<3>$crlf" .
+ "{{{$crlf" .
+ "}}}$crlf" .
+ "$crlf" .
+ "###############################################################################$crlf" .
+ "$crlf";
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm b/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm
new file mode 100644
index 00000000000..c2307044ae2
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm
@@ -0,0 +1,119 @@
+package VC7ProjectCreator;
+
+# ************************************************************
+# Description : A VC7 Project Creator
+# Author : Chad Elliott
+# Create Date : 4/23/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+use GUID;
+use ProjectCreator;
+
+use vars qw(@ISA);
+@ISA = qw(ProjectCreator);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub translate_value {
+ my($self) = shift;
+ my($key) = shift;
+ my($val) = shift;
+
+ if ($key eq 'depends' && $val ne "") {
+ my($arr) = $self->create_array($val);
+ $val = "";
+ foreach my $entry (@$arr) {
+ $val .= "\"" . $self->project_file_name($entry) . "\" ";
+ }
+ $val =~ s/\s+$//;
+ }
+ return $val;
+}
+
+
+sub specific_lookup {
+ my($self) = shift;
+ my($tag) = shift;
+ my($val) = undef;
+
+ if (defined $self->{'guid_names'} &&
+ defined $self->{'guid_names'}->{$tag}) {
+ $val = $self->{'guid_names'}->{$tag};
+ }
+
+ return $val;
+}
+
+
+sub save_project_value {
+ my($self) = shift;
+ my($name) = shift;
+ my($value) = shift;
+
+ if ($name eq 'guid') {
+ if (!defined $self->{'guid_names'}) {
+ $self->{'guid_names'} = {};
+ }
+ $self->{'guid_names'}->{$self->project_file_name()} = $value;
+ }
+}
+
+
+sub crlf {
+ my($self) = shift;
+ return $self->windows_crlf();
+}
+
+
+sub fill_value {
+ my($self) = shift;
+ my($name) = shift;
+ my($value) = undef;
+
+ if ($name eq "guid") {
+ my($guid) = new GUID();
+ $value = $guid->generate($self->project_file_name());
+ }
+ return $value;
+}
+
+
+sub project_file_name {
+ my($self) = shift;
+ my($name) = shift;
+
+ if (!defined $name) {
+ $name = $self->project_name();
+ }
+
+ return "$name.vcproj";
+}
+
+
+sub get_dll_exe_template_input_file {
+ my($self) = shift;
+ return "vc7exe";
+}
+
+
+sub get_dll_template_input_file {
+ my($self) = shift;
+ return "vc7dll";
+}
+
+
+sub get_template {
+ my($self) = shift;
+ return "vc7";
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm
new file mode 100644
index 00000000000..db5be6cacbe
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm
@@ -0,0 +1,134 @@
+package VC7WorkspaceCreator;
+
+# ************************************************************
+# Description : A VC7 Workspace Creator
+# Author : Chad Elliott
+# Create Date : 5/14/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+use VC7ProjectCreator;
+use WorkspaceCreator;
+
+use vars qw(@ISA);
+@ISA = qw(WorkspaceCreator);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+
+sub crlf {
+ my($self) = shift;
+ return $self->windows_crlf();
+}
+
+
+sub workspace_file_name {
+ my($self) = shift;
+ return $self->get_workspace_name() . ".sln";
+}
+
+
+sub pre_workspace {
+ my($self) = shift;
+ my($fh) = shift;
+ my($crlf) = $self->crlf();
+
+ print $fh "Microsoft Visual Studio Solution File, Format Version 7.00$crlf";
+}
+
+
+sub write_comps {
+ my($self) = shift;
+ my($fh) = shift;
+ my($gen) = shift;
+ my($projects) = $self->get_projects();
+ my($guid) = '8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942';
+ my($pjs) = $self->get_project_info();
+ my(@list) = $self->sort_dependencies($projects, $pjs);
+ my($crlf) = $self->crlf();
+
+ ## $guid above is the VC7 Project GUID. It should not change.
+
+ ## Project Information
+ foreach my $project (@list) {
+ my($pi) = $$pjs{$project};
+ my($name, $deps, $pguid) = @$pi;
+
+ ## Convert all /'s to \
+ my($cpy) = $project;
+ $cpy =~ s/\//\\/g;
+ print $fh "Project(\"{$guid}\") = \"$name\", \"$cpy\", \"{$pguid}\"$crlf" .
+ "EndProject$crlf";
+ }
+
+ ## Project Configurations
+ print $fh "Global$crlf" .
+ "\tGlobalSection(SolutionConfiguration) = preSolution$crlf";
+
+ my(%configs) = ();
+ foreach my $project (@list) {
+ my($pi) = $$pjs{$project};
+ my($name, $deps, $pguid, @cfgs) = @$pi;
+ foreach my $cfg (@cfgs) {
+ $cfg =~ s/\|.*//;
+ $configs{$cfg} = 1;
+ }
+ }
+ my($count) = 0;
+ foreach my $key (sort keys %configs) {
+ print $fh "\t\tConfigName.$count = $key$crlf";
+ $count++;
+ }
+
+ ## Project Dependencies
+ print $fh "\tEndGlobalSection$crlf" .
+ "\tGlobalSection(ProjectDependencies) = postSolution$crlf";
+ foreach my $project (@list) {
+ my($pi) = $$pjs{$project};
+ my($name, $deps, $pguid) = @$pi;
+ if (defined $deps && $deps ne "") {
+ my($darr) = $self->create_array($deps);
+ my($i) = 0;
+ foreach my $dep (@$darr) {
+ my($val) = $gen->specific_lookup($dep);
+ if (!defined $val) {
+ $val = $dep;
+ }
+ if ($pguid ne $val) {
+ print $fh "\t\t{$pguid}.$i = {$val}$crlf";
+ $i++;
+ }
+ }
+ }
+ }
+ print $fh "\tEndGlobalSection$crlf" .
+ "\tGlobalSection(ProjectConfiguration) = postSolution$crlf";
+
+ ## Project Configuration Names
+ foreach my $project (@list) {
+ my($pi) = $$pjs{$project};
+ my($name, $deps, $pguid, @cfgs) = @$pi;
+ foreach my $cfg (sort @cfgs) {
+ my($c) = $cfg;
+ $c =~ s/\|.*//;
+ print $fh "\t\t{$pguid}.$c.ActiveCfg = $cfg$crlf" .
+ "\t\t{$pguid}.$c.Build.0 = $cfg$crlf";
+ }
+ }
+ print $fh "\tEndGlobalSection$crlf" .
+ "\tGlobalSection(ExtensibilityGlobals) = postSolution$crlf" .
+ "\tEndGlobalSection$crlf" .
+ "\tGlobalSection(ExtensibilityAddIns) = postSolution$crlf" .
+ "\tEndGlobalSection$crlf" .
+ "EndGlobal$crlf";
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/WorkspaceCreator.pm
new file mode 100644
index 00000000000..227703f45b9
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/WorkspaceCreator.pm
@@ -0,0 +1,419 @@
+package WorkspaceCreator;
+
+# ************************************************************
+# Description : Base class for all workspace creators
+# Author : Chad Elliott
+# Create Date : 5/13/2002
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+use Cwd;
+use FileHandle;
+use File::Path;
+use File::Basename;
+
+use Creator;
+
+use vars qw(@ISA);
+@ISA = qw(Creator);
+
+# ************************************************************
+# Data Section
+# ************************************************************
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub new {
+ my($class) = shift;
+ my($global) = shift;
+ my($inc) = shift;
+ my($template) = shift;
+ my($ti) = shift;
+ my($dynamic) = shift;
+ my($static) = shift;
+ my($relative) = shift;
+ my($self) = Creator::new($class, $global, $inc,
+ $template, $ti, $relative, 'workspace');
+ my($typecheck) = $self->{'type_check'};
+
+ $self->{'workspace_name'} = undef;
+ $self->{$typecheck} = 0;
+ $self->{'projects'} = [];
+ $self->{'project_info'} = {};
+ $self->{'reading_parent'} = [];
+ $self->{'project_files'} = [];
+ $self->{'dynamic'} = $dynamic;
+ $self->{'static'} = $static;
+
+ return $self;
+}
+
+
+sub parse_line {
+ my($self) = shift;
+ my($ih) = shift;
+ my($line) = shift;
+ my($status,
+ $errorString,
+ @values) = $self->parse_known($line);
+
+ ## Was the line recognized?
+ if ($status && defined $values[0]) {
+ if ($values[0] eq $self->{'grammar_type'}) {
+ my($name) = $values[1];
+ my($typecheck) = $self->{'type_check'};
+ if (defined $name && $name eq "}") {
+ my($rp) = $self->{'reading_parent'};
+ if (!defined $$rp[0]) {
+ ## Fill in all the default values
+ $self->generate_defaults();
+
+ ## End of project; Have subclass write out the file
+ $self->write_workspace();
+
+ $self->{'workspace_name'} = undef;
+ $self->{'projects'} = [];
+ $self->{'project_info'} = {};
+ $self->{'project_files'} = [];
+ }
+ $self->{$typecheck} = 0;
+ }
+ else {
+ ## Project Beginning
+ ## Deal with the inheritance hiearchy first
+ my($parents) = $values[2];
+ if (defined $parents) {
+ foreach my $parent (@$parents) {
+ ## Read in the parent onto ourself
+ my($file) = $self->search_include_path("$parent.mwc");
+
+ if (defined $file) {
+ my($rp) = $self->{'reading_parent'};
+ push(@$rp, 1);
+ $self->parse_file("$parent.mwc");
+ pop(@$rp);
+ if (!$status) {
+ $errorString = "ERROR: Invalid parent: $parent";
+ }
+ }
+ else {
+ $status = 0;
+ $errorString = "ERROR: Unable to locate parent: $parent";
+ }
+ }
+ }
+
+ ## Set up some initial values
+ if (defined $name) {
+ $name =~ s/^\(\s*//;
+ $name =~ s/\s*\)$//;
+ $self->{'workspace_name'} = $name;
+ }
+ $self->{$typecheck} = 1;
+ }
+ }
+ else {
+ $errorString = "ERROR: Unrecognized line: $line";
+ $status = 0;
+ }
+ }
+ elsif ($status == -1) {
+ my($project_files) = $self->{'project_files'};
+ push(@$project_files, $line);
+ $status = 1;
+ }
+
+ return $status, $errorString;
+}
+
+
+sub search_for_files {
+ my($self) = shift;
+ my($files) = shift;
+ my($exts) = shift;
+ my($array) = shift;
+
+ foreach my $file (@$files) {
+ if (-d $file) {
+ my(@f) = $self->generate_default_file_list($file);
+ $self->search_for_files(\@f, $exts, $array);
+ }
+ else {
+ foreach my $ext (@$exts) {
+ if ($file =~ /$ext$/) {
+ unshift(@$array, $file);
+ last;
+ }
+ }
+ }
+ }
+}
+
+
+sub generate_default_components {
+ my($self) = shift;
+ my($files) = shift;
+ my($pjf) = $self->{'project_files'};
+ my(@exts) = ("\\.mpc");
+ if (defined $$pjf[0]) {
+ ## If we have files, then process directories
+ my(@built) = ();
+ foreach my $file (@$pjf) {
+ if (-d $file) {
+ my(@found) = ();
+ my(@gen) = $self->generate_default_file_list($file);
+ $self->search_for_files(\@gen, \@exts, \@found);
+ push(@built, @found);
+ }
+ else {
+ push(@built, $file);
+ }
+ }
+ $self->{'project_files'} = \@built;
+ }
+ else {
+ ## Add all of the mpc files in this directory
+ ## and in the subdirectories.
+ $self->search_for_files($files, \@exts, $pjf);
+
+ ## If no files were found, then we push the empty
+ ## string, so the Project Creator will generate
+ ## the default project file.
+ if (!defined $$pjf[0]) {
+ push(@$pjf, "");
+ }
+ }
+}
+
+
+sub generate_defaults {
+ my($self) = shift;
+ my($base) = $self->base_directory();
+
+ ## Generate default workspace name
+ if (!defined $self->{'workspace_name'}) {
+ $self->{'workspace_name'} = $base;
+ }
+
+ my(@files) = $self->generate_default_file_list();
+
+ ## Generate default components
+ $self->generate_default_components(\@files);
+}
+
+
+sub get_workspace_name {
+ my($self) = shift;
+ return $self->{'workspace_name'};
+}
+
+
+sub write_workspace {
+ my($self) = shift;
+
+ ## Generate the project files
+ my($status, $generator) = $self->generate_project_files();
+ if ($status) {
+ my($fh) = new FileHandle();
+ my($name) = $self->transform_file_name($self->workspace_file_name());
+ my($dir) = dirname($name);
+
+ if ($dir ne ".") {
+ mkpath($dir, 0, 0777);
+ }
+ if (open($fh, ">$name")) {
+ $self->pre_workspace($fh);
+ $self->write_comps($fh, $generator);
+ $self->post_workspace($fh);
+ close($fh);
+ }
+ else {
+ print STDERR "ERROR: Unable to open $name for output\n";
+ $status = 0;
+ }
+ }
+ else {
+ print STDERR "ERROR: Unable to generate all of the project files\n";
+ $status = 0;
+ }
+
+ return $status;
+}
+
+
+sub generate_project_files {
+ my($self) = shift;
+ my($status) = 0;
+ my(@projects) = ();
+ my(%pi) = ();
+ my($generator) = $self->project_creator();
+ my($cwd) = getcwd();
+
+ foreach my $file (@{$self->{'project_files'}}) {
+ my($dir) = dirname($file);
+ my($gen) = [];
+
+ ## We must change to the subdirectory for
+ ## which this project file is intended
+ if (chdir($dir)) {
+ $status = $generator->generate(basename($file));
+
+ ## If any one project file fails, then stop
+ ## processing altogether.
+ if (!$status) {
+ return $status;
+ }
+
+ ## Get the individual project information and
+ ## generated file name(s)
+ $gen = $generator->get_files_written();
+ chdir($cwd);
+ }
+ my($gpi) = $generator->get_project_info();
+ my($c) = 0;
+ foreach my $pj (@$gen) {
+ my($full) = ($dir ne "." ? "$dir/" : "") . $pj;
+ push(@projects, $full);
+ $pi{$full} = $$gpi[$c];
+ $c++;
+ }
+ }
+
+ $self->{'projects'} = \@projects;
+ $self->{'project_info'} = \%pi;
+
+ return $status, $generator;
+}
+
+
+sub get_projects {
+ my($self) = shift;
+ return $self->{'projects'};
+}
+
+
+sub get_project_info {
+ my($self) = shift;
+ return $self->{'project_info'};
+}
+
+
+sub get_dynamic {
+ my($self) = shift;
+ return $self->{'dynamic'};
+}
+
+
+sub get_static {
+ my($self) = shift;
+ return $self->{'static'};
+}
+
+
+sub sort_dependencies {
+ my($self) = shift;
+ my($projects) = shift;
+ my($pjs) = shift;
+ my(@list) = @$projects;
+ my(%prepend) = ();
+
+ foreach my $project (@list) {
+ my($dname) = dirname($project);
+ if ($dname ne ".") {
+ $prepend{basename($project)} = dirname($project);
+ }
+ }
+
+ ## Put the projects in the order specified
+ ## by the project dpendencies.
+ for(my $i = 0; $i <= $#list; $i++) {
+ my($project) = $list[$i];
+ my($pi) = $$pjs{$project};
+ my($name, $deps) = @$pi;
+
+ if ($deps ne "") {
+ my($darr) = $self->create_array($deps);
+ my($moved) = 0;
+ foreach my $dep (@$darr) {
+ my($base) = basename($dep);
+ my($full) = (defined $prepend{$base} ?
+ "$prepend{$base}/" : "") . $base;
+ if ($project ne $full) {
+ ## See if the dependency is listed after this project
+ for(my $j = $i; $j <= $#list; $j++) {
+ if ($list[$j] eq $full) {
+ ## If so, move it in front of the current project
+ splice(@list, $i, 0, $full);
+ splice(@list, $j + 1, 1);
+ $moved = 1;
+ $j--;
+ }
+ }
+ }
+ }
+ if ($moved) {
+ $i--;
+ }
+ }
+ }
+ return @list;
+}
+
+
+sub project_creator {
+ my($self) = shift;
+ my($str) = "$self";
+
+ ## NOTE: If the subclassed WorkspaceCreator name prefix does not
+ ## match the name prefix of the ProjectCreator, this code
+ ## will not work and the subclassed WorkspaceCreator will
+ ## need to override this method.
+
+ $str =~ s/Workspace/Project/;
+ $str =~ s/=HASH.*//;
+ return $str->new($self->get_global_cfg(),
+ $self->get_include_path(),
+ $self->get_template_override(),
+ $self->get_ti_override(),
+ $self->get_dynamic(),
+ $self->get_static(),
+ $self->get_relative());
+}
+
+
+# ************************************************************
+# Virtual Methods To Be Overridden
+# ************************************************************
+
+sub workspace_file_name {
+ my($self) = shift;
+ return "";
+}
+
+
+sub pre_workspace {
+ my($self) = shift;
+ my($fh) = shift;
+}
+
+
+sub write_comps {
+ my($self) = shift;
+ my($fh) = shift;
+ my($gens) = shift;
+}
+
+
+sub post_workspace {
+ my($self) = shift;
+ my($fh) = shift;
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/templates/bor.mpd b/bin/MakeProjectCreator/templates/bor.mpd
new file mode 100644
index 00000000000..4da186b39a6
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/bor.mpd
@@ -0,0 +1,81 @@
+# Makefile for building the <%if(exename)%><%exename%> exe<%endif%><%if(sharedname)%><%sharedname%> library<%endif%> with Borland C++ Builder
+
+NAME = <%if(exename)%><%exename%><%endif%><%if(sharedname)%><%sharedname%><%endif%>
+
+<%if(idl_files)%>
+TAO_IDL = $(CORE_BINDIR)\tao_idl -g $(CORE_BINDIR)\gperf.exe<%if(idlflags)%> <%idlflags%><%endif%>
+<%endif%>
+
+<%if(source_files)%>
+OBJFILES = \
+<%foreach(source_files)%>
+ $(OBJDIR)\<%noextension(source_file)%>.obj<%fornotlast(" \\")%>
+<%endfor%>
+<%endif%>
+<%if(ssl)%>
+
+SSL_LIBS =<%foreach(ssl_libs)%> <%ssl_lib%>.lib<%endfor%>
+<%else%>
+SSL_LIBS =
+<%endif%>
+
+LIBFILES = $(SSL_LIBS) \
+<%foreach(libs defaultlibs)%>
+ $(CORE_BINDIR)\<%lib%>.lib<%fornotlast(" \\")%>
+<%endfor%>
+<%if(idl_files)%>
+
+IDLFILES = \
+<%foreach(idl_files)%>
+ $(IDLDIR)\<%noextension(idl_file)%>.idl<%fornotlast(" \\")%>
+<%endfor%>
+<%endif%>
+<%if(resource_files)%>
+
+RESOURCE =<%foreach(resource_files)%> $(OBJDIR)\<%noextension(resource_file)%>.res<%endfor%>
+<%endif%>
+
+!ifdef STATIC
+LIB_FLAGS =<%foreach(libflags)%> -D<%libflag%>=1<%endfor%>
+DLL_FLAGS =
+!else
+LIB_FLAGS =
+DLL_FLAGS =<%foreach(dllflags)%> -D<%dllflag%>=1<%endfor%>
+!endif
+
+CFLAGS =<%foreach(includes)%> -I<%include%><%endfor%> $(DLL_FLAGS) $(LIB_FLAGS)
+CPPDIR = .
+INCDIR_NAME = .
+<%if(idl_files)%>
+IDLDIR = .
+<%endif%>
+<%if(header_files)%>
+
+INCLUDES = \
+<%foreach(header_files template_files)%>
+ <%header_file%><%fornotlast(" \\")%>
+<%endfor%>
+<%endif%>
+<%if(exename)%>
+<%if(install)%>
+
+INSTALL_THIS_TARGET = 1
+<%endif%>
+
+!include <$(ACE_ROOT)\include\makeinclude\build_exe.bor>
+<%endif%>
+<%if(sharedname)%>
+
+!include <$(ACE_ROOT)\include\makeinclude\build_core_library.bor>
+<%endif%>
+<%if(idl_files)%>
+
+#
+# IDL Build rules
+#
+
+<%foreach(idl_files)%>
+$(IDLDIR)\<%noextension(idl_file)%>S.cpp $(IDLDIR)\<%noextension(idl_file)%>C.cpp: $(IDLDIR)\<%noextension(idl_file)%>.idl
+ $(TAO_IDL) $**
+<%endfor%>
+<%endif%>
diff --git a/bin/MakeProjectCreator/templates/bordll.mpt b/bin/MakeProjectCreator/templates/bordll.mpt
new file mode 100644
index 00000000000..2003fd023fa
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/bordll.mpt
@@ -0,0 +1,3 @@
+type_is_binary = 1
+type_is_dynamic = 1
+common_defines = WIN32
diff --git a/bin/MakeProjectCreator/templates/borexe.mpt b/bin/MakeProjectCreator/templates/borexe.mpt
new file mode 100644
index 00000000000..bdeff91fc31
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/borexe.mpt
@@ -0,0 +1,2 @@
+type_is_binary = 1
+common_defines = WIN32
diff --git a/bin/MakeProjectCreator/templates/em3vcp.mpd b/bin/MakeProjectCreator/templates/em3vcp.mpd
new file mode 100644
index 00000000000..98ba9aaad29
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/em3vcp.mpd
@@ -0,0 +1,232 @@
+# Microsoft eMbedded Visual Tools Project File - Name="<%project_name%>" - Package Owner=<4>
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
+# ** DO NOT EDIT **
+
+<%foreach(platform_longs)%>
+# TARGTYPE "<%platform("Win32")%> (<%platform_long%>) <%type_description("Dynamic-Link Library")%>" <%type_code%>
+<%endfor%>
+
+CFG=<%project_name%> - <%platform("Win32")%> (<%default_platform_long%>) <%default_configuration%>
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE run the tool that generated this project file and specify the
+!MESSAGE nmake output type. You can then use the following command:
+!MESSAGE
+!MESSAGE NMAKE /f "<%make_file_name%>".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "<%make_file_name%>" CFG="<%project_name%> - <%platform%> (<%default_platform_long%>) <%default_configuration%>"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+<%foreach(platform_longs)%>
+<%foreach(configurations)%>
+!MESSAGE "<%project_name%> - <%platform%> (<%platform_long%>) <%configuration%>" (based on "<%platform%> (<%platform_long%>) <%type_description%>")
+<%endfor%>
+<%endfor%>
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+# PROP ATL_Project <%atl_project("2")%>
+
+<%foreach(platform_longs)%>
+<%foreach(configurations)%>
+!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%platform%> (<%platform_long%>) <%configuration%>"
+
+# PROP Use_MFC <%use_mfc("0")%>
+# PROP Use_Debug_Libraries <%use_debug_libraries("1")%>
+<%if(exename)%>
+# PROP Output_Dir "<%output_dir%>\<%machine%>"
+<%endif%>
+<%if(type_is_static)%>
+# PROP Output_Dir "<%output_dir%>\<%machine%>"
+<%endif%>
+<%if(type_is_dynamic)%>
+# PROP Output_Dir "<%libout%>\<%machine%>"
+<%endif%>
+# PROP Intermediate_Dir "<%intermediate_dir%>\<%machine%>"
+# PROP CPU_ID "{<%cpu_id%>}"
+# PROP Platform_ID "{<%platform_id%>}"
+<%if(type_is_dynamic)%>
+# PROP Ignore_Export_Lib 0
+<%endif%>
+# PROP Target_Dir ""
+<%if(type_is_static)%>
+LINK32=link.exe -lib
+<%endif%>
+RSC=rc.exe
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CePlatform)"<%foreach(defines common_defines cpu_defines)%> /d <%define%>=1<%endfor%><%foreach(includes)%> /i "<%include%>"<%endfor%> /r
+CPP=<%cpp("cl.exe")%>
+# ADD CPP /nologo <%compile_flags%> <%foreach(includes)%>/I "<%include%>" <%endfor%>/D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) <%foreach(defines common_defines cpu_defines)%>/D <%define%>=1 <%endfor%><%if(type_is_dynamic)%><%foreach(dllflags)%>/D <%dllflag%>=1 <%endfor%><%endif%><%if(need_libflags)%><%foreach(libflags)%>/D <%libflag%>=1 <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%> <%endfor%><%if(pch_source)%>/Yu<%else%>/YX<%endif%>"<%pch_header%>" /Fp"<%intermediate_dir%>\<%noextension(pch_header)%>.pch" <%endif%>/FR /M$(CECrtMT) /FD /c
+<%if(compile_flags_removed)%>
+# SUBTRACT CPP <%compile_flags_removed%>
+<%endif%>
+BSC32=bscmake.exe
+# ADD BSC32 /nologo <%if(sharedname)%>/o"<%libout%>\<%sharedname%>.bsc"<%endif%>
+<%if(type_is_binary)%>
+LINK32=link.exe
+# ADD LINK32 <%systemlibs("winsock.lib commctrl.lib coredll.lib iphlpapi.lib")%> <%if(ssl)%><%foreach(ssl_libs)%><%ssl_lib%>.lib <%endfor%><%endif%>/INCREMENTAL:<%incremental("NO")%> <%foreach(libs defaultlibs)%><%lib%><%lib_modifier%>.lib <%endfor%><%foreach(libpaths)%>/libpath:"<%libpath%>\<%machine%>" <%endfor%>/nologo /base:"<%base("0x00100000")%>" /stack:<%stack("0x10000,0x1000")%> /entry:"_DllMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /version:<%version("1.0")%> /subsystem:$(CESubsystem) /align:"<%align("4096")%>" <%if(type_is_dynamic)%> /dll<%endif%> <%if(use_debug_libraries)%>/debug<%endif%> <%if(pdb)%><%if(sharedname)%>/pdb:<%sharedname%><%lib_modifier%>.pdb <%endif%><%endif%>/machine:<%machine%> /out:"<%if(sharedname)%><%dllout%>\<%machine%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(exename)%><%if(install)%><%install%>\<%endif%><%machine%>\<%exename%>.exe<%endif%>"
+<%if(link_flags_removed)%>
+# SUBTRACT LINK32 <%link_flags_removed%>
+<%endif%>
+<%endif%>
+<%if(type_is_static)%>
+LIB32=link.exe -lib
+# ADD LIB32 /nologo /out:"<%libout%>\<%machine%>\<%staticname%><%lib_modifier%>.lib"
+<%endif%>
+
+<%endfor%>
+!ENDIF
+<%endfor%>
+
+
+# Begin Target
+
+<%foreach(platform_longs)%>
+<%foreach(configurations)%>
+# Name "<%project_name%> - <%platform%> (<%platform_long%>) <%configuration%>"
+<%endfor%>
+<%endfor%>
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;cxx;c"
+<%if(pch_source)%>
+<%if(pch_header)%>
+# Begin Source File
+
+SOURCE=.\<%pch_source%>
+# ADD CPP /Yc"<%pch_header%>"
+# End Source File
+<%endif%>
+<%endif%>
+<%foreach(source_files)%>
+# Begin Source File
+
+SOURCE=.\<%source_file%>
+# End Source File
+<%endfor%>
+# End Group
+<%if(header_files)%>
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hh"
+<%foreach(header_files)%>
+# Begin Source File
+
+SOURCE=.\<%header_file%>
+# End Source File
+<%endfor%>
+# End Group
+<%endif%>
+<%if(inline_files)%>
+# Begin Group "Inline Files"
+
+# PROP Default_Filter "i;inl"
+<%foreach(inline_files)%>
+# Begin Source File
+
+SOURCE=.\<%inline_file%>
+# End Source File
+<%endfor%>
+# End Group
+<%endif%>
+<%if(template_files)%>
+# Begin Group "Template Files"
+
+# PROP Default_Filter ""
+<%foreach(template_files)%>
+# Begin Source File
+
+SOURCE=.\<%template_file%>
+# PROP Exclude_From_Build 1
+# End Source File
+<%endfor%>
+# End Group
+<%endif%>
+<%if(documentation_files)%>
+# Begin Group "Documentation"
+
+# PROP Default_Filter ""
+<%foreach(documentation_files)%>
+# Begin Source File
+
+SOURCE=.\<%documentation_file%>
+# End Source File
+<%endfor%>
+# End Group
+<%endif%>
+<%if(resource_files)%>
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "rc;ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+<%foreach(resource_files)%>
+# Begin Source File
+
+SOURCE=.\<%resource_file%>
+# End Source File
+<%endfor%>
+# End Group
+<%endif%>
+<%if(idl_files)%>
+# Begin Group "IDL Files"
+
+# PROP Default_Filter "idl"
+<%foreach(idl_files)%>
+# Begin Source File
+
+SOURCE=.\<%idl_file%>
+
+<%foreach(platform_longs)%>
+<%foreach(configurations)%>
+!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%platform%> (<%platform_long%>) <%configuration%>"
+
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputPath)
+InputPath=.\<%idl_file%>
+InputName=<%noextension(idl_file)%>
+
+BuildCmds= \
+ <%tao_idl_exe("$(ACE_ROOT)\\bin\\tao_idl")%> <%idlflags("-Sc")%> $(InputPath)
+
+"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+<%endfor%>
+!ENDIF
+<%endfor%>
+
+# End Source File
+<%endfor%>
+# End Group
+<%endif%>
+# End Target
+# End Project
diff --git a/bin/MakeProjectCreator/templates/em3vcpdll.mpt b/bin/MakeProjectCreator/templates/em3vcpdll.mpt
new file mode 100644
index 00000000000..7cff5904b7b
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/em3vcpdll.mpt
@@ -0,0 +1,46 @@
+configurations = Release Debug
+platform_longs = "WCE ARM" "WCE x86"
+default_configuration = Debug
+default_platform_long = "WCE ARM"
+type_is_binary = 1
+type_is_dynamic = 1
+common_defines = UNICODE _UNICODE
+pch_defines = ACE_USING_PCH
+ssl_libs = libeay32 ssleay32
+
+WCE x86 {
+ type_code = 0x8302
+ cpu_id = D6518FF3-710F-11D3-99F2-00105A0DF099
+ platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA
+ machine = IX86
+ cpu_defines = _i386_ _X86_ x86
+}
+
+WCE ARM {
+ type_code = 0x8502
+ cpu_id = D6518FFC-710F-11D3-99F2-00105A0DF099
+ platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA
+ machine = ARM
+ cpp = clarm.exe
+ cpu_defines = ARM _ARM_
+}
+
+Release {
+ use_debug_libraries = 0
+ compile_flags = /W3 /GX /O2 /MD /Zi /Ob2
+ defines = NDEBUG
+ compile_flags_removed = /YX
+ output_dir = Release
+ intermediate_dir = Release
+}
+
+Debug {
+ use_debug_libraries = 1
+ compile_flags = /W3 /Gm /GX /Zi /Od /MDd /Gy
+ defines = _DEBUG
+ compile_flags_removed = /Fr /YX
+ intermediate_dir = Debug
+ lib_modifier = d
+ pdb = 1
+}
+
diff --git a/bin/MakeProjectCreator/templates/em3vcpdllexe.mpt b/bin/MakeProjectCreator/templates/em3vcpdllexe.mpt
new file mode 100644
index 00000000000..49c10e676b4
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/em3vcpdllexe.mpt
@@ -0,0 +1,45 @@
+type_description = "Application"
+platform_longs = "WCE ARM" "WCE x86"
+default_configuration = Debug
+default_platform_long = "WCE ARM"
+configurations = Release Debug
+type_is_binary = 1
+common_defines = UNICODE _UNICODE
+pch_defines = ACE_USING_PCH
+ssl_libs = libeay32 ssleay32
+
+WCE x86 {
+ type_code = 0x8301
+ cpu_id = D6518FF3-710F-11D3-99F2-00105A0DF099
+ platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA
+ machine = IX86
+ cpu_defines = _i386_ _X86_ x86
+}
+
+WCE ARM {
+ type_code = 0x8501
+ cpu_id = D6518FFC-710F-11D3-99F2-00105A0DF099
+ platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA
+ machine = ARM
+ cpp = clarm.exe
+ cpu_defines = ARM _ARM_
+}
+
+Release {
+ use_debug_libraries = 0
+ compile_flags = /W3 /GX /O2 /MD
+ defines = NDEBUG
+ compile_flags_removed = /YX
+ output_dir = Release
+ intermediate_dir = Release
+}
+
+Debug {
+ use_debug_libraries = 1
+ compile_flags = /W3 /Gm /GX /Zi /Od /MDd /GR /Gy
+ defines = _DEBUG
+ compile_flags_removed = /YX
+ intermediate_dir = Debug
+ lib_modifier = d
+}
+
diff --git a/bin/MakeProjectCreator/templates/em3vcplib.mpt b/bin/MakeProjectCreator/templates/em3vcplib.mpt
new file mode 100644
index 00000000000..15885196b55
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/em3vcplib.mpt
@@ -0,0 +1,48 @@
+type_description = "Static Library"
+platform_longs = "WCE ARM" "WCE x86"
+default_configuration = "Static Debug"
+default_platform_long = "WCE ARM"
+configurations = "Static Release" "Static Debug"
+common_defines = UNICODE _UNICODE
+type_is_static = 1
+need_libflags = 1
+pch_defines = ACE_USING_PCH
+
+WCE x86 {
+ type_code = 0x8304
+ cpu_id = D6518FF3-710F-11D3-99F2-00105A0DF099
+ platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA
+ machine = IX86
+ cpu_defines = _i386_ _X86_ x86
+}
+
+WCE ARM {
+ type_code = 0x8504
+ cpu_id = D6518FFC-710F-11D3-99F2-00105A0DF099
+ platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA
+ machine = ARM
+ cpp = clarm.exe
+ cpu_defines = ARM _ARM_
+}
+
+Static Release {
+ use_debug_libraries = 0
+ compile_flags = /G5 /W3 /GX /O2 /MD /Zi
+ defines = NDEBUG
+ compile_flags_removed = /YX
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+ lib_modifier = s
+}
+
+Static Debug {
+ use_debug_libraries = 1
+ compile_flags = /G5 /W3 /Gm /GX /Zi /Od /Gy /MDd
+ defines = _DEBUG
+ compile_flags_removed = /Fr /YX
+ output_dir = Static_Debug
+ intermediate_dir = Static_Debug
+ lib_modifier = sd
+ pdb = 1
+}
+
diff --git a/bin/MakeProjectCreator/templates/em3vcplibexe.mpt b/bin/MakeProjectCreator/templates/em3vcplibexe.mpt
new file mode 100644
index 00000000000..872751a6017
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/em3vcplibexe.mpt
@@ -0,0 +1,48 @@
+type_description = "Application"
+platform_longs = "WCE ARM" "WCE x86"
+default_configuration = "Static Debug"
+default_platform_long = "WCE ARM"
+configurations = "Static Release" "Static Debug"
+type_is_binary = 1
+common_defines = UNICODE _UNICODE
+pch_defines = ACE_USING_PCH
+ssl_libs = libeay32 ssleay32
+
+WCE x86 {
+ type_code = 0x8301
+ cpu_id = D6518FF3-710F-11D3-99F2-00105A0DF099
+ platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA
+ machine = IX86
+ cpu_defines = _i386_ _X86_ x86
+}
+
+WCE ARM {
+ type_code = 0x8501
+ cpu_id = D6518FFC-710F-11D3-99F2-00105A0DF099
+ platform_id = 8A9A2F80-6887-11D3-842E-005004848CBA
+ machine = ARM
+ cpp = clarm.exe
+ cpu_defines = ARM _ARM_
+}
+
+Static Release {
+ use_debug_libraries = 0
+ compile_flags = /W3 /GX /O2 /MD
+ defines = NDEBUG
+ compile_flags_removed = /YX
+ lib_modifier = s
+ need_libflags = 1
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+}
+
+Static Debug {
+ use_debug_libraries = 1
+ compile_flags = /W3 /Gm /GX /Zi /Od /MDd /GR /Gy
+ defines = _DEBUG
+ compile_flags_removed = /YX
+ lib_modifier = sd
+ need_libflags = 1
+ output_dir = Static_Debug
+ intermediate_dir = Static_Debug
+}
diff --git a/bin/MakeProjectCreator/templates/ghs.mpd b/bin/MakeProjectCreator/templates/ghs.mpd
new file mode 100644
index 00000000000..fbfb6a0a870
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/ghs.mpd
@@ -0,0 +1,16 @@
+#!build
+default:
+<%if(exename)%>
+ program
+<%endif%>
+<%if(sharedname)%>
+ library
+ :cx_pch_option=automatic
+ :outputname=<%libout%>\<%sharedname%>.lib
+ :object_dir=obj
+ :cx_pch_dir=pch
+<%endif%>
+<%foreach(source_files)%>
+..\<%source_file%>
+ C++
+<%endfor%>
diff --git a/bin/MakeProjectCreator/templates/gnu.mpd b/bin/MakeProjectCreator/templates/gnu.mpd
new file mode 100644
index 00000000000..c922e6f87c1
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/gnu.mpd
@@ -0,0 +1,125 @@
+#----------------------------------------------------------------------------
+# GNU Makefile
+#----------------------------------------------------------------------------
+
+MAKEFILE = <%project_file%>
+DEPENDENCY_FILE = .depend.<%project_file%>
+<%if(exename)%>
+BIN = <%exename%>
+<%endif%>
+<%if(staticname)%>
+LIB = lib<%staticname%>.a
+<%endif%>
+<%if(sharedname)%>
+SHLIB = lib<%sharedname%>.$(SOEXT)
+<%endif%>
+<%if(tao)%>
+
+ifndef TAO_ROOT
+ TAO_ROOT = $(ACE_ROOT)/TAO
+endif
+<%endif%>
+<%if(idl_files)%>
+
+IDL_FILES =<%foreach(idl_files)%> <%noextension(idl_file)%><%endfor%>
+IDL_SRC = $(foreach ext, C.cpp S.cpp, $(foreach file, $(IDL_FILES), $(file)$(ext)))
+<%endif%>
+
+<%gnu_source_files%>
+
+#----------------------------------------------------------------------------
+# Include macros and targets
+#----------------------------------------------------------------------------
+include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
+<%if(tao)%>
+include $(TAO_ROOT)/rules.tao.GNU
+<%endif%>
+
+<%if(exename)%>
+OBJS = $(addsuffix .o, $(notdir $(FILES)))
+SRC = $(addsuffix .cpp,$(FILES))
+<%endif%>
+<%if(sharedname)%>
+LSRC = $(addsuffix .cpp,$(FILES))
+<%endif%>
+ACELIB =<%foreach(defaultlibs)%> -l<%defaultlib%><%endfor%>
+
+include $(ACE_ROOT)/include/makeinclude/macros.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
+<%if(install)%>
+
+INSTALL_CHECK = <%install%>
+ifeq ($(INSTALL_CHECK),)
+ INSTALL = $(INSTALL_CHECK)
+else
+<%if(exename)%>
+ INSBIN = $(INSTALL_CHECK)
+ INSTALL = $(VBIN:%=$(INSBIN)/%$(EXEEXT))
+<%endif%>
+<%if(sharedname)%>
+ INSLIB = $(INSTALL_CHECK)
+<%endif%>
+endif
+<%endif%>
+<%if(sharedname)%>
+include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
+<%endif%>
+include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
+<%if(tao)%>
+include $(TAO_ROOT)/taoconfig.mk
+<%endif%>
+
+<%if(includes)%>
+CPPFLAGS +=<%foreach(includes)%> -I<%include%><%endfor%>
+<%endif%>
+<%if(idlpreprocessor)%>
+ifeq ($(TAO_IDL_PREPROCESSOR),)
+ CPPFLAGS += -DTAO_IDL_PREPROCESSOR=\"$(strip $(CXX))\"
+else
+ CPPFLAGS += -DTAO_IDL_PREPROCESSOR=\"$(subst \,\,$(TAO_IDL_PREPROCESSOR))\"
+endif
+<%endif%>
+<%if(libpaths)%>
+LDFLAGS +=<%foreach(libpaths)%> -L<%libpath%><%endfor%>
+<%endif%>
+<%if(idl_files)%>
+<%if(idlflags)%>
+TAO_IDLFLAGS += <%idlflags%>
+<%endif%>
+<%endif%>
+<%if(libs)%>
+
+<%if(exename)%>LDLIBS<%endif%><%if(sharedname)%>ACE_SHLIBS<%endif%> =<%foreach(libs)%> -l<%lib%><%endfor%>
+<%endif%>
+<%if(ssl)%>
+<%if(exename)%>LDLIBS<%endif%><%if(sharedname)%>ACE_SHLIBS<%endif%> +=<%foreach(ssl_libs)%> -l<%ssl_lib%><%endfor%>
+<%endif%>
+
+#----------------------------------------------------------------------------
+# Local targets
+#----------------------------------------------------------------------------
+<%if(idl_files)%>
+
+all: idl_stubs
+
+.PRECIOUS: $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext)))
+<%endif%>
+<%if(exename)%>
+
+$(BIN): $(addprefix $(VDIR), $(OBJS))
+ $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK)
+<%endif%>
+<%if(idl_files)%>
+
+realclean: clean
+ -$(RM) $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext)))
+<%endif%>
+
+#----------------------------------------------------------------------------
+# Dependencies
+#----------------------------------------------------------------------------
+# DO NOT DELETE THIS LINE -- g++dep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
+
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/bin/MakeProjectCreator/templates/gnudll.mpt b/bin/MakeProjectCreator/templates/gnudll.mpt
new file mode 100644
index 00000000000..a1f16f6e6e8
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/gnudll.mpt
@@ -0,0 +1 @@
+ssl_libs = ssl crypto
diff --git a/bin/MakeProjectCreator/templates/gnuexe.mpt b/bin/MakeProjectCreator/templates/gnuexe.mpt
new file mode 100644
index 00000000000..a1f16f6e6e8
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/gnuexe.mpt
@@ -0,0 +1 @@
+ssl_libs = ssl crypto
diff --git a/bin/MakeProjectCreator/templates/nmake.mpd b/bin/MakeProjectCreator/templates/nmake.mpd
new file mode 100644
index 00000000000..0d2b6b096ae
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/nmake.mpd
@@ -0,0 +1,202 @@
+# Microsoft Developer Studio Generated NMAKE File
+!IF "$(CFG)" == ""
+CFG=<%default_platform("Win32")%> <%default_configuration("Debug")%>
+!MESSAGE No configuration specified. Defaulting to <%platform("Win32")%> <%default_configuration%>.
+!ENDIF
+
+!IF <%foreach(configurations)%>"$(CFG)" != "<%platform%> <%configuration%>"<%fornotlast(" && ")%><%endfor%>
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "<%project_file%>" CFG="<%platform%> <%default_configuration%>"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+<%foreach(configurations)%>
+!MESSAGE "<%platform%> <%configuration%>" (based on "<%platform_long("Win32 (x86)")%> <%type_description("Dynamic-Lynk Library")%>")
+<%endfor%>
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+<%foreach(configurations)%>
+!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%platform%> <%configuration%>"
+
+<%if(exename)%>
+OUTDIR=<%output_dir(".")%>
+<%if(install)%>
+INSTALLDIR=<%install%>
+<%else%>
+INSTALLDIR=$(OUTDIR)
+<%endif%>
+<%endif%>
+<%if(type_is_static)%>
+OUTDIR=<%output_dir(".")%>
+<%endif%>
+<%if(type_is_dynamic)%>
+OUTDIR=<%libout%>
+<%endif%>
+INTDIR=<%intermediate_dir(".")%>
+
+ALL : "<%if(type_is_dynamic)%><%dllout%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(type_is_static)%>$(OUTDIR)\<%staticname%><%lib_modifier%>.lib<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%>.exe<%endif%>"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\*.obj"
+ -@erase "$(INTDIR)\*.res"
+ -@erase "$(INTDIR)\*.pch"
+ -@erase "$(INTDIR)\*.idb"
+ -@erase "$(OUTDIR)\*.exp"
+ -@erase "$(OUTDIR)\*.lib"
+ -@erase "$(OUTDIR)\*.ilk"
+<%if(pdb)%>
+<%if(exename)%>
+ -@erase "$(INSTALLDIR)\<%exename%>.pdb"
+<%endif%>
+<%if(type_is_dynamic)%>
+ -@erase "$(OUTDIR)\<%sharedname%><%lib_modifier%>.pdb"
+<%endif%>
+<%if(type_is_static)%>
+ -@erase "$(OUTDIR)\<%staticname%><%lib_modifier%>.pdb"
+<%endif%>
+<%endif%>
+ -@erase "<%if(type_is_dynamic)%><%dllout%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(type_is_static)%>$(OUTDIR)\<%staticname%><%lib_modifier%>.lib<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%>.exe<%endif%>"
+
+<%if(type_is_dynamic)%>
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+<%endif%>
+"$(INTDIR)" :
+ if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo <%compile_flags("/MD /W3 /GX /O2 /Ob2")%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines common_defines)%>/D <%define%>=1 <%endfor%><%if(type_is_dynamic)%><%foreach(dllflags)%>/D <%dllflag%>=1 <%endfor%><%endif%><%if(need_libflags)%><%foreach(libflags)%>/D <%libflag%>=1 <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%>=1 <%endfor%><%if(pch_source)%>/Yu<%else%>/YX<%endif%>"<%pch_header%>" /Fp"$(INTDIR)\<%noextension(pch_header)%>.pch" <%endif%>/Fo"<%fo_flag("$(INTDIR)\\\\")%>" /Fd"<%fd_flag("$(INTDIR)\\\\")%>" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+RSC=rc.exe
+<%foreach(resource_files)%>
+RSC_PROJ=/l 0x409 /fo"$(INTDIR)\<%basenoextension(resource_file)%>.res"<%foreach(defines)%> /d <%define%>=1<%endfor%><%foreach(includes)%> /i "<%include%>"<%endfor%>
+<%endfor%>
+BSC32=bscmake.exe
+<%if(sharedname)%>
+BSC32_FLAGS=/nologo <%if(type_is_dynamic)%>/o"$(OUTDIR)\<%sharedname%>.bsc"<%endif%>
+<%endif%>
+BSC32_SBRS= \
+
+<%if(type_is_binary)%>
+LINK32=link.exe
+LINK32_FLAGS=<%systemlibs("advapi32.lib user32.lib")%> <%if(ssl)%><%foreach(ssl_libs)%><%ssl_lib%>.lib <%endfor%><%endif%>/INCREMENTAL:<%incremental("NO")%> <%foreach(libs defaultlibs)%><%lib%><%lib_modifier%>.lib <%endfor%><%foreach(libpaths)%>/libpath:"<%libpath%>" <%endfor%>/nologo /version:<%version("1.0")%> /subsystem:<%subsystem("windows")%><%if(type_is_dynamic)%> /dll<%endif%> <%debug_switch("/debug")%> <%if(pdb)%>/pdb:"<%if(type_is_dynamic)%><%dllout%>\<%sharedname%><%lib_modifier%>.pdb<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%>.pdb<%endif%><%if(type_is_static)%>$(OUTDIR)\<%staticname%><%lib_modifier%>.pdb<%endif%>" <%endif%>/machine:<%machine("I386")%> /out:"<%if(sharedname)%><%dllout%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%>.exe<%endif%>"<%if(sharedname)%> /implib:"$(OUTDIR)\<%sharedname%><%lib_modifier%>.lib"<%endif%>
+<%endif%>
+<%if(type_is_static)%>
+LINK32=link.exe -lib
+LINK32_FLAGS=/nologo /machine:<%machine("I386")%> /out:"<%libout%>\<%staticname%><%lib_modifier%>.lib"
+<%endif%>
+LINK32_OBJS= \
+<%foreach(resource_files)%>
+ "$(INTDIR)\<%basenoextension(resource_file)%>.res" \
+<%endfor%>
+<%if(pch_source)%>
+ "$(INTDIR)\<%basenoextension(pch_source)%>.obj" \
+<%endif%>
+<%foreach(source_files)%>
+ "$(INTDIR)\<%basenoextension(source_file)%>.obj"<%fornotlast(" \\")%>
+<%endfor%>
+
+"<%if(type_is_dynamic)%><%dllout%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(type_is_static)%>$(OUTDIR)\<%staticname%><%lib_modifier%>.lib<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%>.exe<%endif%>" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+<%endfor%>
+!ENDIF
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("<%dependency_file("project.dep")%>")
+!INCLUDE "<%dependency_file%>"
+!ELSE
+!MESSAGE Warning: cannot find "<%dependency_file%>"
+!ENDIF
+!ENDIF
+
+
+!IF <%foreach(configurations)%>"$(CFG)" == "<%platform%> <%configuration%>" <%fornotlast("|| ")%><%endfor%>
+<%if(pch_source)%>
+<%if(pch_header)%>
+SOURCE=.\<%pch_source%>
+
+<%foreach(configurations)%>
+!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%platform%> <%configuration%>"
+
+CPP_SWITCHES=/nologo <%compile_flags%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines common_defines)%>/D <%define%>=1 <%endfor%><%if(type_is_dynamic)%><%foreach(dllflags)%>/D <%dllflag%>=1 <%endfor%><%endif%><%if(need_libflags)%><%foreach(libflags)%>/D <%libflag%>=1 <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%>=1 <%endfor%>/Fp"$(INTDIR)\<%noextension(pch_header)%>.pch" /Yc"<%pch_header%>" <%endif%>/Fo"<%fo_flag%>" /Fd"<%fd_flag%>" /FD /c
+
+"$(INTDIR)\<%basenoextension(pch_source)%>.obj" "$(INTDIR)\<%noextension(pch_header)%>.pch" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+<%endfor%>
+!ENDIF
+
+<%endif%>
+<%endif%>
+<%foreach(source_files)%>
+SOURCE=.\<%source_file%>
+
+"$(INTDIR)\<%basenoextension(source_file)%>.obj" : $(SOURCE) "$(INTDIR)"<%if(pch_header)%> "$(INTDIR)\<%noextension(pch_header)%>.pch"<%endif%>
+<%if(basename_found)%>
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+<%endif%>
+
+<%endfor%>
+<%foreach(template_files)%>
+SOURCE=.\<%template_file%>
+<%endfor%>
+<%foreach(resource_files)%>
+SOURCE=.\<%resource_file%>
+
+"$(INTDIR)\<%basenoextension(resource_file)%>.res" : $(SOURCE) "$(INTDIR)"
+ $(RSC) $(RSC_PROJ) $(SOURCE)
+
+
+<%endfor%>
+
+!ENDIF
+
diff --git a/bin/MakeProjectCreator/templates/nmakedll.mpt b/bin/MakeProjectCreator/templates/nmakedll.mpt
new file mode 100644
index 00000000000..f40a4cf5c52
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/nmakedll.mpt
@@ -0,0 +1,62 @@
+configurations = Release Debug "Static Release" "Static Debug"
+common_defines = WIN32 _WINDOWS
+pch_defines = ACE_USING_PCH
+
+Release {
+ type_code = 0x0102
+ use_debug_libraries = 0
+ compile_flags = /W3 /GX /O2 /MD /Zi /Ob2
+ defines = NDEBUG
+ compile_flags_removed = /YX
+ output_dir = Release
+ intermediate_dir = Release
+ debug_switch =
+ type_is_dynamic = 1
+ type_is_binary = 1
+ ssl_libs = libeay32 ssleay32
+}
+
+Debug {
+ type_code = 0x0102
+ use_debug_libraries = 1
+ compile_flags = /W3 /Gm /GX /Zi /Od /MDd /Gy
+ defines = _DEBUG
+ compile_flags_removed = /Fr /YX
+ intermediate_dir = Debug
+ lib_modifier = d
+ type_is_dynamic = 1
+ type_is_binary = 1
+ pdb = 1
+ ssl_libs = libeay32 ssleay32
+}
+
+Static Release {
+ type_description = "Static Library"
+ type_code = 0x0104
+ use_debug_libraries = 0
+ compile_flags = /G5 /W3 /GX /O2 /MD /Zi
+ defines = NDEBUG
+ compile_flags_removed = /YX
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+ lib_modifier = s
+ debug_switch =
+ type_is_static = 1
+ need_libflags = 1
+}
+
+Static Debug {
+ type_description = "Static Library"
+ type_code = 0x0104
+ use_debug_libraries = 1
+ compile_flags = /G5 /W3 /Gm /GX /Zi /Od /Gy /MDd
+ defines = _DEBUG
+ compile_flags_removed = /Fr /YX
+ output_dir = Static_Debug
+ intermediate_dir = Static_Debug
+ lib_modifier = sd
+ type_is_static = 1
+ need_libflags = 1
+ pdb = 1
+}
+
diff --git a/bin/MakeProjectCreator/templates/nmakeexe.mpt b/bin/MakeProjectCreator/templates/nmakeexe.mpt
new file mode 100644
index 00000000000..931e813f0b5
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/nmakeexe.mpt
@@ -0,0 +1,53 @@
+type_description = "Console Application"
+type_code = 0x0103
+configurations = Release Debug "Static Release" "Static Debug"
+type_is_binary = 1
+common_defines = WIN32 _CONSOLE
+subsystem = console
+pch_defines = ACE_USING_PCH
+
+Release {
+ use_debug_libraries = 0
+ compile_flags = /W3 /GX /O2 /MD
+ defines = NDEBUG
+ compile_flags_removed = /YX
+ output_dir = Release
+ intermediate_dir = Release
+ debug_switch =
+ ssl_libs = libeay32 ssleay32
+}
+
+Debug {
+ use_debug_libraries = 1
+ compile_flags = /W3 /Gm /GX /Zi /Od /MDd /GR /Gy
+ defines = _DEBUG
+ compile_flags_removed = /YX
+ intermediate_dir = Debug
+ lib_modifier = d
+ pdb = 1
+ ssl_libs = libeay32 ssleay32
+}
+
+Static Release {
+ use_debug_libraries = 0
+ compile_flags = /W3 /GX /O2 /MD
+ defines = NDEBUG
+ compile_flags_removed = /YX
+ lib_modifier = s
+ need_libflags = 1
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+ debug_switch =
+}
+
+Static Debug {
+ use_debug_libraries = 1
+ compile_flags = /W3 /Gm /GX /Zi /Od /MDd /GR /Gy
+ defines = _DEBUG
+ compile_flags_removed = /YX
+ lib_modifier = sd
+ need_libflags = 1
+ output_dir = Static_Debug
+ intermediate_dir = Static_Debug
+ pdb = 1
+}
diff --git a/bin/MakeProjectCreator/templates/va4icc.mpd b/bin/MakeProjectCreator/templates/va4icc.mpd
new file mode 100644
index 00000000000..4dcc547a365
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/va4icc.mpd
@@ -0,0 +1,142 @@
+// Configuration file to build <%if(type_is_dynamic)%><%sharedname%> shared library (aka DLL)<%endif%><%if(type_is_static)%><%staticname%> static library<%endif%><%if(type_is_binary)%><%exename%> executable<%endif%> on both Win32
+// and AIX using Visual Age C++ 4 (or later)
+
+if $__TOS_WIN__ {
+ option PlatformOptions =
+<%foreach(defines common_defines)%>
+ define ("<%define%>", "1"),
+<%endfor%>
+<%if(type_is_dynamic)%>
+<%foreach(dllflags)%>
+ define ("<%dllflag%>", "1"),
+<%endfor%>
+<%endif%>
+<%if(need_libflags)%>
+<%foreach(libflags)%>
+ define ("<%libflag%>", "1"),
+<%endfor%>
+<%endif%>
+ define ("ACE_HAS_WINSOCK2","1"),
+ define ("ACE_HAS_WCHAR_TYPEDEFS_CHAR","1"),
+ define ("_stricmp", "stricmp"),
+ define ("_strnicmp", "strnicmp"),
+ define ("_O_TEMPORARY", 0x08),
+ define ("_O_CREAT", "O_CREAT"),
+ define ("_O_TRUNC", "O_TRUNC"),
+ define ("_O_EXCL", "O_EXCL"),
+ define ("_INTEGRAL_MAX_BITS", 64),
+ define ('ACE_LACKS_RTTI', '1'),
+ define ('ACE_USE_RCSID', '0'),
+ gen('check', 'bounds', 'no'),
+ gen('libansi', 'yes'),
+ link('typecheck', 'yes'),
+ opt('level', '0'),
+ report('level', 'W'),
+ lang('staticinlinelinkage', 'yes'),
+ file('once', 'yes')
+}
+
+if $__TOS_AIX__ {
+ option PlatformOptions =
+ defaults('xlC_r'),
+ define ('ACE_AIX_VERS', '<%aix_vers("501")%>'),
+ define ('ACE_LACKS_RTTI', '1'),
+ define ('ACE_USE_RCSID', '0'),
+ gen('check', 'bounds', 'no'),
+ gen('libansi', 'yes'),
+ link('typecheck', 'yes'),
+ opt('level', 0),
+ report('level', 'W'),
+ lang('staticinlinelinkage', 'yes'),
+ file('once', 'yes')
+}
+
+option
+ PlatformOptions,
+<%foreach(includes)%>
+ incl(searchPath, '<%include%>'),
+<%endfor%>
+<%if(sharedname)%>
+ link(exportAll),
+<%endif%>
+ link(linkwithsharedlib),
+<%foreach(libpaths)%>
+ link(libSearchPath, '<%libpath%>'),
+<%endfor%>
+ link(linkWithMultiThreadLib,yes),
+ link(debug)
+ {
+ if $__TOS_WIN__ {
+ target type ( <%if(type_is_dynamic)%>shr<%endif%><%if(type_is_static)%>lib<%endif%><%if(type_is_binary)%>exe<%endif%> ) '<%if(type_is_dynamic)%>shr.o<%endif%><%if(type_is_static)%>lib<%sharedname%>.a<%endif%><%if(type_is_binary)%><%exename%><%endif%>'
+ {
+ option macros(global)
+ {
+<%if(sharedname)%>
+ source type(hpp) 'wchar.h'
+ source type(hpp) 'wcstr.h'
+<%endif%>
+<%if(header_files)%>
+ source type(hpp)
+<%foreach(header_files)%>
+ '<%header_file%>'<%fornotlast(",")%>
+<%endfor%>
+<%endif%>
+ }
+<%if(source_files)%>
+ source type(cpp)
+<%foreach(source_files)%>
+ "<%source_file%>"<%fornotlast(",")%>
+<%endfor%>
+<%endif%>
+<%if(type_is_static)%>
+ // Template implementation files (#pragma implementation)
+<%foreach(template_files)%>
+ source type(cpp) "<%template_file%>"
+<%endfor%>
+<%endif%>
+
+ // Libraries needed during linking
+ source type (lib) "advapi32.lib"
+ source type (lib) "user32.lib"
+ source type (lib) "ws2_32.lib"
+ source type (lib) "wsock32.lib"
+ source type (lib) "mswsock.lib"
+<%foreach(libs default_libs)%>
+ source type (lib) "<%lib%><%lib_modifier%>.lib"
+<%endfor%>
+ }
+ }
+ if $__TOS_AIX__ {
+ target type ( <%if(type_is_dynamic)%>shr<%endif%><%if(type_is_static)%>lib<%endif%><%if(type_is_binary)%>exe<%endif%> ) '<%if(type_is_dynamic)%>shr.o<%endif%><%if(type_is_static)%>lib<%sharedname%>.a<%endif%><%if(type_is_binary)%><%exename%><%endif%>'
+ {
+ run after sources("shr.o") targets ("lib<%sharedname%>.a") "ar -r -u lib<%sharedname%>.a shr.o", "rm -rf shr.o"
+ run cleanup "rm -rf lib<%sharedname%>.a shr.o"
+
+<%if(source_files)%>
+ source type(cpp)
+<%foreach(source_files)%>
+ "<%source_file%>"<%fornotlast(",")%>
+<%endfor%>
+<%endif%>
+<%if(type_is_static)%>
+ // Template implementation files (#pragma implementation)
+<%foreach(template_files)%>
+ source type(cpp) "<%template_file%>"
+<%endfor%>
+<%endif%>
+
+ // Libraries needed during linking
+<%foreach(libs defaultlibs)%>
+ source type (lib) "lib<%lib%>.a"
+<%endfor%>
+<%if(type_is_dynamic)%>
+ source type (lib) "libtli_r.a"
+ source type (lib) "libpthreads.a"
+ source type (lib) "libc_r.a"
+ source type (lib) "libdl.a"
+ // Imports
+ source type (imp) "pse.exp"
+<%endif%>
+ }
+ }
+ }
diff --git a/bin/MakeProjectCreator/templates/va4iccdll.mpt b/bin/MakeProjectCreator/templates/va4iccdll.mpt
new file mode 100644
index 00000000000..3f6265f7b71
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/va4iccdll.mpt
@@ -0,0 +1,4 @@
+common_defines = _WINDOWS WIN32
+type_is_dynamic = 1
+lib_modifier = d
+defines = _DEBUG
diff --git a/bin/MakeProjectCreator/templates/va4iccdllexe.mpt b/bin/MakeProjectCreator/templates/va4iccdllexe.mpt
new file mode 100644
index 00000000000..1616203a141
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/va4iccdllexe.mpt
@@ -0,0 +1,4 @@
+common_defines = _WINDOWS _CONSOLE
+type_is_binary = 1
+lib_modifier = d
+defines = _DEBUG
diff --git a/bin/MakeProjectCreator/templates/va4icclib.mpt b/bin/MakeProjectCreator/templates/va4icclib.mpt
new file mode 100644
index 00000000000..8584a3b73a4
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/va4icclib.mpt
@@ -0,0 +1,4 @@
+common_defines = _WINDOWS WIN32
+type_is_static = 1
+lib_modifier = d
+defines = _DEBUG \ No newline at end of file
diff --git a/bin/MakeProjectCreator/templates/va4icclibexe.mpt b/bin/MakeProjectCreator/templates/va4icclibexe.mpt
new file mode 100644
index 00000000000..8505a668ea5
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/va4icclibexe.mpt
@@ -0,0 +1,5 @@
+common_defines = _WINDOWS _CONSOLE
+type_is_binary = 1
+lib_modifier = d
+defines = _DEBUG
+need_libflags = 1 \ No newline at end of file
diff --git a/bin/MakeProjectCreator/templates/vc6dsp.mpd b/bin/MakeProjectCreator/templates/vc6dsp.mpd
new file mode 100644
index 00000000000..3e999f9f61f
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/vc6dsp.mpd
@@ -0,0 +1,218 @@
+# Microsoft Developer Studio Project File - Name="<%project_name%>" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "<%platform_long("Win32 (x86)")%> <%type_description("Dynamic-Link Library")%>" <%type_code("0x0102")%>
+
+CFG=<%project_name%> - <%platform("Win32")%> <%default_configuration("Debug")%>
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE run the tool that generated this project file and specify the
+!MESSAGE nmake output type. You can then use the following command:
+!MESSAGE
+!MESSAGE NMAKE /f "<%make_file_name%>".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "<%make_file_name%>" CFG="<%project_name%> - <%platform%> <%default_configuration%>"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+<%foreach(configurations)%>
+!MESSAGE "<%project_name%> - <%platform%> <%configuration%>" (based on "<%platform_long%> <%type_description%>")
+<%endfor%>
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+<%foreach(configurations)%>
+!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%platform%> <%configuration%>"
+
+# PROP Use_MFC <%use_mfc("0")%>
+# PROP Use_Debug_Libraries <%use_debug_libraries("1")%>
+<%if(exename)%>
+# PROP Output_Dir "<%output_dir%>"
+<%endif%>
+<%if(type_is_static)%>
+# PROP Output_Dir "<%output_dir%>"
+<%endif%>
+<%if(type_is_dynamic)%>
+# PROP Output_Dir "<%libout%>"
+<%endif%>
+# PROP Intermediate_Dir "<%intermediate_dir%>"
+<%if(type_is_dynamic)%>
+# PROP Ignore_Export_Lib 0
+<%endif%>
+# PROP Target_Dir ""
+<%if(type_is_static)%>
+LINK32=link.exe -lib
+<%endif%>
+# ADD CPP /nologo <%compile_flags%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines common_defines)%>/D <%define%>=1 <%endfor%><%if(type_is_dynamic)%><%foreach(dllflags)%>/D <%dllflag%>=1 <%endfor%><%endif%><%if(need_libflags)%><%foreach(libflags)%>/D <%libflag%>=1 <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%> <%endfor%><%if(pch_source)%>/Yu<%else%>/YX<%endif%>"<%pch_header%>" /Fp"<%intermediate_dir%>\<%noextension(pch_header)%>.pch" <%endif%>/FD /c
+<%if(compile_flags_removed)%>
+# SUBTRACT CPP <%compile_flags_removed%>
+<%endif%>
+# ADD RSC /l 0x409<%foreach(defines)%> /d <%define%>=1<%endfor%><%foreach(includes)%> /i "<%include%>"<%endfor%>
+BSC32=bscmake.exe
+# ADD BSC32 /nologo <%if(sharedname)%>/o"<%libout%>\<%sharedname%>.bsc"<%endif%>
+<%if(type_is_binary)%>
+LINK32=link.exe
+# ADD LINK32 <%systemlibs("advapi32.lib user32.lib")%> <%if(ssl)%><%foreach(ssl_libs)%><%ssl_lib%>.lib <%endfor%><%endif%>/INCREMENTAL:<%incremental("NO")%> <%foreach(libs defaultlibs)%><%lib%><%lib_modifier%>.lib <%endfor%><%foreach(libpaths)%>/libpath:"<%libpath%>" <%endfor%>/nologo /version:<%version("1.0")%> /subsystem:<%subsystem("windows")%><%if(type_is_dynamic)%> /dll<%endif%> <%debug_switch("/debug")%> <%if(pdb)%><%if(sharedname)%>/pdb:<%sharedname%><%lib_modifier%>.pdb <%endif%><%endif%>/machine:<%machine("I386")%> /out:"<%if(sharedname)%><%dllout%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(exename)%><%if(install)%><%install%>\<%endif%><%exename%>.exe<%endif%>"
+<%if(link_flags_removed)%>
+# SUBTRACT LINK32 <%link_flags_removed%>
+<%endif%>
+<%endif%>
+<%if(type_is_static)%>
+LIB32=link.exe -lib
+# ADD LIB32 /nologo /out:"<%libout%>\<%staticname%><%lib_modifier%>.lib"
+<%endif%>
+
+<%endfor%>
+!ENDIF
+
+# Begin Target
+
+<%foreach(configurations)%>
+# Name "<%project_name%> - <%platform%> <%configuration%>"
+<%endfor%>
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;cxx;c"
+<%if(pch_source)%>
+<%if(pch_header)%>
+# Begin Source File
+
+SOURCE=.\<%pch_source%>
+# ADD CPP /Yc"<%pch_header%>"
+# End Source File
+<%endif%>
+<%endif%>
+<%foreach(source_files)%>
+# Begin Source File
+
+SOURCE=.\<%source_file%>
+# End Source File
+<%endfor%>
+# End Group
+<%if(header_files)%>
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hh"
+<%foreach(header_files)%>
+# Begin Source File
+
+SOURCE=.\<%header_file%>
+# End Source File
+<%endfor%>
+# End Group
+<%endif%>
+<%if(inline_files)%>
+# Begin Group "Inline Files"
+
+# PROP Default_Filter "i;inl"
+<%foreach(inline_files)%>
+# Begin Source File
+
+SOURCE=.\<%inline_file%>
+# End Source File
+<%endfor%>
+# End Group
+<%endif%>
+<%if(template_files)%>
+# Begin Group "Template Files"
+
+# PROP Default_Filter ""
+<%foreach(template_files)%>
+# Begin Source File
+
+SOURCE=.\<%template_file%>
+# PROP Exclude_From_Build 1
+# End Source File
+<%endfor%>
+# End Group
+<%endif%>
+<%if(documentation_files)%>
+# Begin Group "Documentation"
+
+# PROP Default_Filter ""
+<%foreach(documentation_files)%>
+# Begin Source File
+
+SOURCE=.\<%documentation_file%>
+# End Source File
+<%endfor%>
+# End Group
+<%endif%>
+<%if(resource_files)%>
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "rc;ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+<%foreach(resource_files)%>
+# Begin Source File
+
+SOURCE=.\<%resource_file%>
+# End Source File
+<%endfor%>
+# End Group
+<%endif%>
+<%if(idl_files)%>
+# Begin Group "IDL Files"
+
+# PROP Default_Filter "idl"
+<%foreach(idl_files)%>
+# Begin Source File
+
+SOURCE=.\<%idl_file%>
+
+<%foreach(configurations)%>
+!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%platform%> <%configuration%>"
+
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputPath)
+InputPath=.\<%idl_file%>
+InputName=<%noextension(idl_file)%>
+
+BuildCmds= \
+ <%tao_idl_exe("$(ACE_ROOT)\\bin\\tao_idl")%> <%idlflags("-Sc")%> $(InputPath)
+
+"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+<%endfor%>
+!ENDIF
+
+# End Source File
+<%endfor%>
+# End Group
+<%endif%>
+# End Target
+# End Project
diff --git a/bin/MakeProjectCreator/templates/vc6dspdll.mpt b/bin/MakeProjectCreator/templates/vc6dspdll.mpt
new file mode 100644
index 00000000000..965ce8a4534
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/vc6dspdll.mpt
@@ -0,0 +1,27 @@
+configurations = Release Debug
+type_is_binary = 1
+type_is_dynamic = 1
+common_defines = WIN32 _WINDOWS
+pch_defines = ACE_USING_PCH
+ssl_libs = libeay32 ssleay32
+
+Release {
+ use_debug_libraries = 0
+ compile_flags = /W3 /GX /O2 /MD /Zi /Ob2
+ defines = NDEBUG
+ compile_flags_removed = /YX
+ output_dir = Release
+ intermediate_dir = Release
+ debug_switch =
+}
+
+Debug {
+ use_debug_libraries = 1
+ compile_flags = /W3 /Gm /GX /Zi /Od /MDd /Gy
+ defines = _DEBUG
+ compile_flags_removed = /Fr /YX
+ intermediate_dir = Debug
+ lib_modifier = d
+ pdb = 1
+}
+
diff --git a/bin/MakeProjectCreator/templates/vc6dspdllexe.mpt b/bin/MakeProjectCreator/templates/vc6dspdllexe.mpt
new file mode 100644
index 00000000000..9f9926f0463
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/vc6dspdllexe.mpt
@@ -0,0 +1,28 @@
+type_description = "Console Application"
+type_code = 0x0103
+configurations = Release Debug
+type_is_binary = 1
+common_defines = WIN32 _CONSOLE
+subsystem = console
+pch_defines = ACE_USING_PCH
+ssl_libs = libeay32 ssleay32
+
+Release {
+ use_debug_libraries = 0
+ compile_flags = /W3 /GX /O2 /MD
+ defines = NDEBUG
+ compile_flags_removed = /YX
+ output_dir = Release
+ intermediate_dir = Release
+ debug_switch =
+}
+
+Debug {
+ use_debug_libraries = 1
+ compile_flags = /W3 /Gm /GX /Zi /Od /MDd /GR /Gy
+ defines = _DEBUG
+ compile_flags_removed = /YX
+ intermediate_dir = Debug
+ lib_modifier = d
+}
+
diff --git a/bin/MakeProjectCreator/templates/vc6dsplib.mpt b/bin/MakeProjectCreator/templates/vc6dsplib.mpt
new file mode 100644
index 00000000000..dd525bbe2a0
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/vc6dsplib.mpt
@@ -0,0 +1,31 @@
+type_description = "Static Library"
+type_code = 0x0104
+configurations = "Static Release" "Static Debug"
+default_configuration = "Static Debug"
+common_defines = WIN32 _WINDOWS
+type_is_static = 1
+need_libflags = 1
+pch_defines = ACE_USING_PCH
+
+Static Release {
+ use_debug_libraries = 0
+ compile_flags = /G5 /W3 /GX /O2 /MD /Zi
+ defines = NDEBUG
+ compile_flags_removed = /YX
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+ lib_modifier = s
+ debug_switch =
+}
+
+Static Debug {
+ use_debug_libraries = 1
+ compile_flags = /G5 /W3 /Gm /GX /Zi /Od /Gy /MDd
+ defines = _DEBUG
+ compile_flags_removed = /Fr /YX
+ output_dir = Static_Debug
+ intermediate_dir = Static_Debug
+ lib_modifier = sd
+ pdb = 1
+}
+
diff --git a/bin/MakeProjectCreator/templates/vc6dsplibexe.mpt b/bin/MakeProjectCreator/templates/vc6dsplibexe.mpt
new file mode 100644
index 00000000000..c3cd0597804
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/vc6dsplibexe.mpt
@@ -0,0 +1,31 @@
+type_description = "Console Application"
+type_code = 0x0103
+configurations = "Static Release" "Static Debug"
+default_configuration = "Static Debug"
+type_is_binary = 1
+common_defines = WIN32 _CONSOLE
+subsystem = console
+pch_defines = ACE_USING_PCH
+ssl_libs = libeay32 ssleay32
+need_libflags = 1
+
+Static Release {
+ use_debug_libraries = 0
+ compile_flags = /W3 /GX /O2 /MD
+ defines = NDEBUG
+ compile_flags_removed = /YX
+ lib_modifier = s
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+ debug_switch =
+}
+
+Static Debug {
+ use_debug_libraries = 1
+ compile_flags = /W3 /Gm /GX /Zi /Od /MDd /GR /Gy
+ defines = _DEBUG
+ compile_flags_removed = /YX
+ lib_modifier = sd
+ output_dir = Static_Debug
+ intermediate_dir = Static_Debug
+}
diff --git a/bin/MakeProjectCreator/templates/vc7.mpd b/bin/MakeProjectCreator/templates/vc7.mpd
new file mode 100644
index 00000000000..4302f33983e
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/vc7.mpd
@@ -0,0 +1,217 @@
+<?xml version="<%xml_version("1.0")%>" encoding = "<%encoding("Windows-1252")%>"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.00"
+ Name="<%project_name%>"
+ ProjectGUID="{<%guid%>}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="<%platform("Win32")%>"/>
+ </Platforms>
+ <Configurations>
+<%foreach(configurations)%>
+ <Configuration
+ Name="<%configuration%>|<%platform%>"
+ OutputDirectory=".\<%if(type_is_dynamic)%><%libout%><%else%><%output_dir%><%endif%>"
+ IntermediateDirectory=".\<%intermediate_dir%>"
+ ConfigurationType="<%configuration_type("2")%>"
+ UseOfMFC="<%use_mfc("0")%>"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+<%if(optimization)%>
+ Optimization="<%optimization%>"
+<%endif%>
+<%if(!debug)%>
+ InlineFunctionExpansion="<%inline("2")%>"
+<%endif%>
+ AdditionalIncludeDirectories="<%foreach(includes)%><%include%><%fornotlast(",")%><%endfor%>"
+ PreprocessorDefinitions="<%if(type_is_dynamic)%><%foreach(dllflags)%><%dllflag%>;<%endfor%><%endif%><%if(need_libflags)%><%foreach(libflags)%><%libflag%>;<%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%><%pch_define%>;<%endfor%><%endif%><%foreach(defines common_defines)%><%define%><%fornotlast(";")%><%endfor%>"
+<%if(!debug)%>
+ StringPooling="<%string_pooling("TRUE")%>"
+<%endif%>
+ RuntimeLibrary="<%runtime_library%>"
+ EnableFunctionLevelLinking="TRUE"
+ RuntimeTypeInfo="<%rtti("TRUE")%>"
+<%if(pch_header)%>
+ UsePrecompiledHeader="3"
+ PrecompiledHeaderThrough="<%pch_header%>"
+<%if(pch_source)%>
+ PrecompiledHeaderFile=".\<%intermediate_dir%>\<%noextension(pch_source)%>.pch"
+<%endif%>
+<%endif%>
+ AssemblerListingLocation=".\<%intermediate_dir%>"
+ ObjectFile=".\<%intermediate_dir%>\"
+<%if(pdb)%>
+ ProgramDataBaseFileName=".\<%intermediate_dir%>"
+<%endif%>
+ WarningLevel="<%warning_level("3")%>"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="<%debug_format("3")%>"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:<%machine("I386")%>"
+<%if(type_is_binary)%>
+ AdditionalDependencies="<%foreach(libs defaultlibs)%><%lib%><%lib_modifier%>.lib<%fornotlast(" ")%><%endfor%>"
+<%endif%>
+ OutputFile="<%if(type_is_dynamic)%><%dllout%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(exename)%><%if(install)%><%install%>\<%endif%><%exename%>.exe<%endif%><%if(type_is_static)%><%libout%>\<%staticname%><%lib_modifier%>.lib<%endif%>"
+ Version="<%version("1.0")%>"
+ LinkIncremental="<%incremental("1")%>"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="<%foreach(libpaths)%><%libpath%><%fornotlast(";")%><%endfor%>"
+<%if(debug)%>
+ GenerateDebugInformation="TRUE"
+<%endif%>
+<%if(pdb)%>
+ ProgramDatabaseFile="<%if(type_is_dynamic)%><%dllout%>\<%sharedname%><%lib_modifier%><%endif%><%if(exename)%><%if(install)%><%install%><%else%><%output_dir%><%endif%>\<%exename%><%endif%><%if(type_is_static)%><%output_dir%>\<%staticdname%><%lib_modifier%><%endif%>.pdb"
+<%endif%>
+<%if(type_is_dynamic)%>
+ SubSystem="<%subsystem("2")%>"
+ ImportLibrary="<%libout%>\<%sharedname%><%lib_modifier%>.lib"/>
+<%else%>
+ SubSystem="<%subsystem("2")%>"/>
+<%endif%>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="<%foreach(defines)%><%define%><%fornotlast(";")%><%endfor%>"
+ Culture="<%culture("1033")%>"
+ AdditionalIncludeDirectories="<%foreach(includes)%><%include%><%fornotlast(",")%><%endfor%>"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+<%endfor%>
+ </Configurations>
+ <Files>
+<%if(source_files)%>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;cxx;cc;C;c">
+<%if(pch_source)%>
+ <File
+ RelativePath=".\<%pch_source%>">
+<%foreach(configurations)%>
+ <FileConfiguration
+ Name="<%configuration%>|<%platform%>">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"/>
+ </FileConfiguration>
+<%endfor%>
+ </File>
+ </Filter>
+<%endif%>
+<%foreach(source_files)%>
+ <File
+ RelativePath=".\<%source_file%>">
+ </File>
+<%endfor%>
+ </Filter>
+<%endif%>
+<%if(header_files)%>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hh">
+<%if(pch_header)%>
+ <File
+ RelativePath=".\<%pch_header%>">
+ </File>
+<%endif%>
+<%foreach(header_files)%>
+ <File
+ RelativePath=".\<%header_file%>">
+ </File>
+<%endfor%>
+ </Filter>
+<%endif%>
+<%if(idl_files)%>
+ <Filter
+ Name="IDL Files"
+ Filter="idl">
+<%foreach(idl_files)%>
+ <File
+ RelativePath=".\<%idl_file%>">
+<%foreach(configurations)%>
+ <FileConfiguration
+ Name="<%configuration%>|<%platform%>">
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Invoking TAO_IDL Compiler on <%idl_file%>"
+ CommandLine="<%tao_idl_exe("$(ACE_ROOT)\\bin\\tao_idl")%> <%idlflags("-Sc")%> <%idl_file%>"
+ Outputs="<%noextension(idl_file)%>C.h;<%noextension(idl_file)%>C.i;<%noextension(idl_file)%>C.cpp;<%noextension(idl_file)%>S.h;<%noextension(idl_file)%>S.i;<%noextension(idl_file)%>S.cpp;<%noextension(idl_file)%>S_T.h;<%noextension(idl_file)%>S_T.i;<%noextension(idl_file)%>S_T.cpp"/>
+ </FileConfiguration>
+<%endfor%>
+ </File>
+<%endfor%>
+ </Filter>
+<%endif%>
+<%if(inline_files)%>
+ <Filter
+ Name="Inline Files"
+ Filter="i;inl">
+<%foreach(inline_files)%>
+ <File
+ RelativePath=".\<%inline_file%>">
+ </File>
+<%endfor%>
+ </Filter>
+<%endif%>
+<%if(template_files)%>
+ <Filter
+ Name="Template Files"
+ Filter="">
+<%foreach(template_files)%>
+ <File
+ RelativePath=".\<%template_file%>">
+<%foreach(configurations)%>
+ <FileConfiguration
+ Name="<%configuration%>|<%platform%>"
+ ExcludedFromBuild="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"/>
+ </FileConfiguration>
+<%endfor%>
+ </File>
+<%endfor%>
+ </Filter>
+<%endif%>
+<%if(documentation_files)%>
+ <Filter
+ Name="Documentation"
+ Filter="">
+<%foreach(documentation_files)%>
+ <File
+ RelativePath=".\<%documentation_file%>">
+ </File>
+<%endfor%>
+ </Filter>
+<%endif%>
+<%if(resource_files)%>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe">
+<%foreach(resource_files)%>
+ <File
+ RelativePath=".\<%resource_file%>">
+ </File>
+<%endfor%>
+ </Filter>
+<%endif%>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/bin/MakeProjectCreator/templates/vc7dll.mpt b/bin/MakeProjectCreator/templates/vc7dll.mpt
new file mode 100644
index 00000000000..05546bf2edb
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/vc7dll.mpt
@@ -0,0 +1,48 @@
+configurations = Release Debug "Static Release" "Static Debug"
+common_defines = WIN32 _WINDOWS
+pdb = 1
+pch_defines = ACE_USING_PCH
+ssl_libs = libeay32 ssleay32
+
+Release {
+ type_is_dynamic = 1
+ type_is_binary = 1
+ defines = NDEBUG
+ output_dir = Release
+ intermediate_dir = Release
+ runtime_library = 2
+}
+
+Debug {
+ type_is_dynamic = 1
+ type_is_binary = 1
+ optimization = 0
+ debug = 1
+ defines = _DEBUG
+ intermediate_dir = Debug
+ lib_modifier = d
+ runtime_library = 3
+}
+
+Static Release {
+ type_is_static = 1
+ defines = NDEBUG
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+ lib_modifier = s
+ need_libflags = 1
+ runtime_library = 2
+}
+
+Static Debug {
+ type_is_static = 1
+ optimization = 0
+ debug = 1
+ defines = _DEBUG
+ output_dir = Static_Debug
+ intermediate_dir = Static_Debug
+ lib_modifier = sd
+ need_libflags = 1
+ runtime_library = 3
+}
+
diff --git a/bin/MakeProjectCreator/templates/vc7exe.mpt b/bin/MakeProjectCreator/templates/vc7exe.mpt
new file mode 100644
index 00000000000..a8d4ac3d4d4
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/vc7exe.mpt
@@ -0,0 +1,45 @@
+configurations = Release Debug "Static Release" "Static Debug"
+type_is_binary = 1
+common_defines = WIN32 _CONSOLE
+pch_defines = ACE_USING_PCH
+configuration_type = 1
+subsystem = 1
+pdb = 1
+ssl_libs = libeay32 ssleay32
+
+Release {
+ defines = NDEBUG
+ output_dir = Release
+ intermediate_dir = Release
+ runtime_library = 2
+}
+
+Debug {
+ optimization = 0
+ debug = 1
+ defines = _DEBUG
+ intermediate_dir = Debug
+ lib_modifier = d
+ runtime_library = 3
+}
+
+Static Release {
+ defines = NDEBUG
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+ lib_modifier = s
+ need_libflags = 1
+ runtime_library = 2
+}
+
+Static Debug {
+ optimization = 0
+ debug = 1
+ defines = _DEBUG
+ output_dir = Static_Debug
+ intermediate_dir = Static_Debug
+ lib_modifier = sd
+ need_libflags = 1
+ runtime_library = 3
+}
+
diff --git a/bin/mpc.pl b/bin/mpc.pl
new file mode 100755
index 00000000000..94dd9be9a56
--- /dev/null
+++ b/bin/mpc.pl
@@ -0,0 +1,97 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# ******************************************************************
+# Author: Chad Elliott
+# Date: 6/17/2002
+# $Id$
+# ******************************************************************
+
+# ******************************************************************
+# Pragma Section
+# ******************************************************************
+
+use strict;
+use Cwd;
+use File::Basename;
+
+my($basePath) = getExecutePath($0) . "/MakeProjectCreator";
+unshift(@INC, $basePath . "/modules");
+
+require Driver;
+
+# ************************************************************
+# Data Section
+# ************************************************************
+
+my(@creators) = ('GNUProjectCreator',
+ 'NMakeProjectCreator',
+ 'VC6ProjectCreator',
+ 'VC7ProjectCreator',
+ 'BorlandProjectCreator',
+ 'GHSProjectCreator',
+ 'EM3ProjectCreator',
+ 'VA4ProjectCreator',
+ );
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub which {
+ my($prog) = shift;
+ my($exec) = "$prog";
+ my($part) = "";
+ my($isWin) = ($^O eq "MSWin32");
+ my($envSep) = ($isWin ? ";" : ":");
+
+ if (defined $ENV{'PATH'}) {
+ foreach $part (split(/$envSep/, $ENV{'PATH'})) {
+ $part .= "/$prog";
+ if ( -x $part ) {
+ $exec = $part;
+ last;
+ }
+ }
+ }
+
+ return $exec;
+}
+
+
+sub getExecutePath {
+ my($prog) = shift;
+ my($loc) = "";
+
+ if ($prog ne basename($prog)) {
+ if ($prog =~ /^[\/\\]/ ||
+ $prog =~ /^[A-Za-z]:[\/\\]?/) {
+ $loc = dirname($prog);
+ }
+ else {
+ $loc = getcwd() . "/" . dirname($prog);
+ }
+ }
+ else {
+ $loc = dirname(which($prog));
+ }
+
+ if ($loc eq ".") {
+ $loc = getcwd();
+ }
+
+ if ($loc ne "") {
+ $loc .= "/";
+ }
+
+ return $loc;
+}
+
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+my($driver) = new Driver($basePath, basename($0), @creators);
+exit($driver->run(@ARGV));
diff --git a/bin/mwc.pl b/bin/mwc.pl
new file mode 100755
index 00000000000..7e7ee31f7d9
--- /dev/null
+++ b/bin/mwc.pl
@@ -0,0 +1,97 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# ******************************************************************
+# Author: Chad Elliott
+# Date: 6/17/2002
+# $Id$
+# ******************************************************************
+
+# ******************************************************************
+# Pragma Section
+# ******************************************************************
+
+use strict;
+use Cwd;
+use File::Basename;
+
+my($basePath) = getExecutePath($0) . "/MakeProjectCreator";
+unshift(@INC, $basePath . "/modules");
+
+require Driver;
+
+# ************************************************************
+# Data Section
+# ************************************************************
+
+my(@creators) = ('GNUWorkspaceCreator',
+ 'NMakeWorkspaceCreator',
+ 'VC6WorkspaceCreator',
+ 'VC7WorkspaceCreator',
+ 'BorlandWorkspaceCreator',
+ 'GHSWorkspaceCreator',
+ 'EM3WorkspaceCreator',
+ 'VA4WorkspaceCreator',
+ );
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub which {
+ my($prog) = shift;
+ my($exec) = "$prog";
+ my($part) = "";
+ my($isWin) = ($^O eq "MSWin32");
+ my($envSep) = ($isWin ? ";" : ":");
+
+ if (defined $ENV{'PATH'}) {
+ foreach $part (split(/$envSep/, $ENV{'PATH'})) {
+ $part .= "/$prog";
+ if ( -x $part ) {
+ $exec = $part;
+ last;
+ }
+ }
+ }
+
+ return $exec;
+}
+
+
+sub getExecutePath {
+ my($prog) = shift;
+ my($loc) = "";
+
+ if ($prog ne basename($prog)) {
+ if ($prog =~ /^[\/\\]/ ||
+ $prog =~ /^[A-Za-z]:[\/\\]?/) {
+ $loc = dirname($prog);
+ }
+ else {
+ $loc = getcwd() . "/" . dirname($prog);
+ }
+ }
+ else {
+ $loc = dirname(which($prog));
+ }
+
+ if ($loc eq ".") {
+ $loc = getcwd();
+ }
+
+ if ($loc ne "") {
+ $loc .= "/";
+ }
+
+ return $loc;
+}
+
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+my($driver) = new Driver($basePath, basename($0), @creators);
+exit($driver->run(@ARGV));