summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobody <nobody@a3e5c962-4219-0410-a828-e124f845ac39>2003-09-16 16:50:31 +0000
committernobody <nobody@a3e5c962-4219-0410-a828-e124f845ac39>2003-09-16 16:50:31 +0000
commit88a409f10ef5f8c303fc29be609d455c94960655 (patch)
tree3930e2f01a472db4c0b829cfc2c5eb21520dccaf
parent25949958531eb4353d80b520ca327d1d8c971cc6 (diff)
downloadMPC-88a409f10ef5f8c303fc29be609d455c94960655.tar.gz
This commit was manufactured by cvs2svn to create branch
'unlabeled-1.2.18'.
-rw-r--r--modules/AutomakeProjectCreator.pm104
-rw-r--r--modules/AutomakeWorkspaceCreator.pm76
-rw-r--r--modules/Creator.pm810
-rw-r--r--modules/Driver.pm387
-rw-r--r--modules/EM3ProjectCreator.pm79
-rw-r--r--modules/EM3WorkspaceCreator.pm44
-rw-r--r--modules/GHSProjectCreator.pm62
-rw-r--r--modules/GHSWorkspaceCreator.pm76
-rw-r--r--modules/GUID.pm58
-rw-r--r--modules/MakeProjectCreator.pm65
-rw-r--r--modules/MakeWorkspaceCreator.pm100
-rw-r--r--modules/NMakeProjectCreator.pm72
-rw-r--r--modules/NMakeWorkspaceCreator.pm128
-rw-r--r--modules/Options.pm329
-rw-r--r--modules/Parser.pm197
-rw-r--r--modules/ProjectCreator.pm2450
-rw-r--r--modules/StringProcessor.pm110
-rw-r--r--modules/TemplateInputReader.pm143
-rw-r--r--modules/TemplateParser.pm1010
-rw-r--r--modules/VA4ProjectCreator.pm129
-rw-r--r--modules/VA4WorkspaceCreator.pm77
-rw-r--r--modules/VC6ProjectCreator.pm176
-rw-r--r--modules/VC6WorkspaceCreator.pm117
-rw-r--r--modules/VC71ProjectCreator.pm29
-rw-r--r--modules/VC71WorkspaceCreator.pm76
-rw-r--r--modules/VC7ProjectCreator.pm115
-rw-r--r--modules/VC7WorkspaceCreator.pm180
-rw-r--r--modules/WorkspaceCreator.pm1430
-rw-r--r--templates/automake.mpd120
-rw-r--r--templates/common.mpt3
-rw-r--r--templates/em3.mpd285
-rw-r--r--templates/em3vcp.mpd285
-rw-r--r--templates/em3vcpdll.mpt84
-rw-r--r--templates/em3vcpdllexe.mpt84
-rw-r--r--templates/em3vcplib.mpt88
-rw-r--r--templates/em3vcplibexe.mpt87
-rw-r--r--templates/ghs.mpd16
-rw-r--r--templates/make.mpd180
-rw-r--r--templates/makedll.mpt65
-rw-r--r--templates/makeexe.mpt2
-rw-r--r--templates/nmake.mpd294
-rw-r--r--templates/nmakedll.mpt144
-rw-r--r--templates/nmakeexe.mpt125
-rw-r--r--templates/va4icc.mpd139
-rw-r--r--templates/va4iccdll.mpt7
-rw-r--r--templates/va4iccdllexe.mpt7
-rw-r--r--templates/va4icclib.mpt7
-rw-r--r--templates/va4icclibexe.mpt8
-rw-r--r--templates/vc6.mpd269
-rw-r--r--templates/vc6dsp.mpd269
-rw-r--r--templates/vc6dspdll.mpt56
-rw-r--r--templates/vc6dspdllexe.mpt63
-rw-r--r--templates/vc6dsplib.mpt62
-rw-r--r--templates/vc6dsplibexe.mpt67
-rw-r--r--templates/vc7.mpd266
-rw-r--r--templates/vc7dll.mpt102
-rw-r--r--templates/vc7exe.mpt92
57 files changed, 0 insertions, 11905 deletions
diff --git a/modules/AutomakeProjectCreator.pm b/modules/AutomakeProjectCreator.pm
deleted file mode 100644
index 2266e858..00000000
--- a/modules/AutomakeProjectCreator.pm
+++ /dev/null
@@ -1,104 +0,0 @@
-package AutomakeProjectCreator;
-
-# ************************************************************
-# Description : A Automake Project Creator
-# Author : Chad Elliott
-# Create Date : 2/26/2003
-# ************************************************************
-
-# ************************************************************
-# 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 convert_slashes {
- #my($self) = shift;
- return 0;
-}
-
-
-sub fill_value {
- my($self) = shift;
- my($name) = shift;
- my($value) = undef;
-
- if ($name eq 'vpath') {
- my(%vpath) = ();
- my($names) = $self->{'source_files'};
- foreach my $name (keys %$names) {
- my($comps) = $$names{$name};
- foreach my $key (keys %$comps) {
- foreach my $item (@{$$comps{$key}}) {
- my($dname) = dirname($item);
- if ($dname ne '.' && $dname !~ /^\.\.\//) {
- $vpath{$dname} = 1;
- }
- }
- }
- }
- my($str) = join(':', sort keys %vpath);
- if ($str ne '') {
- $value = 'VPATH = .:' . $str . $self->crlf();
- }
- }
- elsif ($name eq 'tao') {
- my($incs) = $self->get_assignment('includes');
- my($libs) = $self->get_assignment('libpaths');
- if ((defined $incs && $incs =~ /tao/i) ||
- (defined $libs && $libs =~ /tao/i)) {
- $value = 1;
- }
- }
-
- return $value;
-}
-
-
-sub project_file_name {
- my($self) = shift;
- my($name) = shift;
-
- if (!defined $name) {
- $name = $self->project_name();
- }
-
- return 'Makefile' . ($name eq '' ? '' : ".$name") . '.am';
-}
-
-
-sub get_dll_exe_template_input_file {
- #my($self) = shift;
- return 'automakeexe';
-}
-
-
-sub get_dll_template_input_file {
- #my($self) = shift;
- return 'automakedll';
-}
-
-
-sub get_template {
- #my($self) = shift;
- return 'automake';
-}
-
-
-1;
diff --git a/modules/AutomakeWorkspaceCreator.pm b/modules/AutomakeWorkspaceCreator.pm
deleted file mode 100644
index f5571395..00000000
--- a/modules/AutomakeWorkspaceCreator.pm
+++ /dev/null
@@ -1,76 +0,0 @@
-package AutomakeWorkspaceCreator;
-
-# ************************************************************
-# Description : A Automake Workspace (Makefile) creator
-# Author : Chad Elliott
-# Create Date : 5/13/2002
-# ************************************************************
-
-# ************************************************************
-# Pragmas
-# ************************************************************
-
-use strict;
-use File::Basename;
-
-use AutomakeProjectCreator;
-use WorkspaceCreator;
-
-use vars qw(@ISA);
-@ISA = qw(WorkspaceCreator);
-
-# ************************************************************
-# Subroutine Section
-# ************************************************************
-
-sub workspace_file_name {
- my($self) = shift;
- return $self->get_modified_workspace_name('Makefile', '.am');
-}
-
-
-sub pre_workspace {
- my($self) = shift;
- my($fh) = shift;
- my($crlf) = $self->crlf();
-
- print $fh "##$crlf" .
- "## Process this file with automake$crlf" .
- "##$crlf" .
- "$crlf" .
- "## The number in AUTOMAKE_OPTIONS is the minimum required version automake$crlf" .
- "## needed to process this file.$crlf" .
- "AUTOMAKE_OPTIONS = 1.4$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();
- my(%unique) = ();
- my(@dirs) = ();
-
- ## Get a unique list of directories while
- ## preserving the order of the original @list
- foreach my $dep (@list) {
- my($dir) = dirname($dep);
- if (!defined $unique{$dir}) {
- $unique{$dir} = 1;
- unshift(@dirs, $dir);
- }
- }
-
- ## Print out the subdirectories
- print $fh 'SUBDIRS =';
- foreach my $dir (@dirs) {
- print $fh " \\$crlf $dir";
- }
- print $fh $crlf;
-}
-
-
-1;
diff --git a/modules/Creator.pm b/modules/Creator.pm
deleted file mode 100644
index 21071be4..00000000
--- a/modules/Creator.pm
+++ /dev/null
@@ -1,810 +0,0 @@
-package Creator;
-
-# ************************************************************
-# Description : Base class for workspace and project creators
-# Author : Chad Elliott
-# Create Date : 5/13/2002
-# ************************************************************
-
-# ************************************************************
-# Pragmas
-# ************************************************************
-
-use strict;
-use FileHandle;
-use File::Basename;
-
-use Parser;
-
-use vars qw(@ISA);
-@ISA = qw(Parser);
-
-# ************************************************************
-# Data Section
-# ************************************************************
-
-my(@statekeys) = ('global', 'include', 'template', 'ti',
- 'dynamic', 'static', 'relative', 'addtemp',
- 'addproj', 'progress', 'toplevel', 'baseprojs',
- 'feature_file', 'hierarchy',
- );
-
-my(%all_written) = ();
-
-# ************************************************************
-# 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($addtemp) = shift;
- my($addproj) = shift;
- my($progress) = shift;
- my($toplevel) = shift;
- my($baseprojs) = shift;
- my($feature) = shift;
- my($hierarchy) = shift;
- my($type) = shift;
- my($self) = Parser::new($class, $inc);
-
- $self->{'relative'} = $relative;
- $self->{'template'} = $template;
- $self->{'ti'} = $ti;
- $self->{'global'} = $global;
- $self->{'grammar_type'} = $type;
- $self->{'type_check'} = $type . '_defined';
- $self->{'global_read'} = 0;
- $self->{'current_input'} = '';
- $self->{'progress'} = $progress;
- $self->{'addtemp'} = $addtemp;
- $self->{'addproj'} = $addproj;
- $self->{'toplevel'} = $toplevel;
- $self->{'files_written'} = [];
- $self->{'reading_global'} = 0;
- $self->{'global_assign'} = {};
- $self->{'assign'} = {};
- $self->{'baseprojs'} = $baseprojs;
- $self->{'dynamic'} = $dynamic;
- $self->{'static'} = $static;
- $self->{'feature_file'} = $feature;
- $self->{'hierarchy'} = $hierarchy;
-
- return $self;
-}
-
-
-sub collect_line {
- my($self) = shift;
- my($fh) = shift;
- my($lref) = shift;
- my($line) = shift;
- my($status) = 1;
- my($errorString) = '';
-
- $$lref .= $self->strip_line($line);
-
- if ($$lref =~ /\\$/) {
- $$lref =~ s/\\$/ /;
- }
- else {
- ($status, $errorString) = $self->parse_line($fh, $$lref);
- $$lref = '';
- }
-
- return $status, $errorString;
-}
-
-
-sub generate_default_input {
- my($self) = shift;
- my($status) = 0;
- my($error) = '';
-
- ($status, $error) = $self->parse_line(undef, "$self->{'grammar_type'} {");
- ($status, $error) = $self->parse_line(undef, '}');
-
- if (!$status) {
- print STDERR "$error\n";
- }
-
- return $status;
-}
-
-
-sub parse_file {
- my($self) = shift;
- my($input) = shift;
- my($oline) = $self->get_line_number();
-
- ## Read the input file and get the last line number
- my($status, $errorString) = $self->read_file($input);
-
- if (!$status) {
- print STDERR $self->getcwd() .
- "/$input: line " . $self->get_line_number() .
- ":\n$errorString\n";
- }
- elsif ($status && $self->{$self->{'type_check'}}) {
- ## 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 $self->getcwd() .
- "/$input: line " . $self->get_line_number() .
- ":\nERROR: Did not " .
- "find the end of the $self->{'grammar_type'}\n";
- $status = 0;
- }
- $self->set_line_number($oline);
-
- return $status;
-}
-
-
-sub generate {
- my($self) = shift;
- my($input) = shift;
- my($status) = 1;
-
- ## Reset the files_written array between processing each file
- $self->{'files_written'} = [];
-
- ## 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) {
- $self->{'current_input'} = $input;
-
- ## 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_assignment {
- my($self) = shift;
- my($line) = shift;
- my($values) = shift;
- my($status) = 1;
-
- if ($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, 'assignment', $name, $value);
- }
- elsif ($line =~ /^(\w+)\s*\-=\s*(.*)?/) {
- my($name) = lc($1);
- my($value) = $2;
- push(@$values, 'assign_sub', $name, $value);
- }
- else {
- $status = 0;
- }
-
- return $status;
-}
-
-
-sub parse_known {
- my($self) = shift;
- my($line) = shift;
- my($status) = 1;
- my($errorString) = '';
- my($type) = $self->{'grammar_type'};
- my(@values) = ();
-
- ##
- ## 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->{$self->{'type_check'}}) {
- $errorString = "ERROR: Did not find the end of the $type";
- $status = 0;
- }
- else {
- if (defined $parents) {
- my(@parents) = ();
- $parents =~ s/^://;
- foreach my $parent (split(',', $parents)) {
- $parent =~ s/^\s+//;
- $parent =~ s/\s+$//;
- if ($parent ne '') {
- push(@parents, $parent);
- }
- }
- if (!defined $parents[0]) {
- ## The : was used, but no parents followed. This
- ## is an error.
- $errorString = 'ERROR: No parents listed';
- $status = 0;
- }
- $parents = \@parents;
- }
- push(@values, $type, $name, $parents);
- }
- }
- elsif ($line =~ /^}$/) {
- if ($self->{$self->{'type_check'}}) {
- push(@values, $type, $line);
- }
- else {
- $errorString = "ERROR: Did not find the beginning of the $type";
- $status = 0;
- }
- }
- elsif ($line =~ /^(feature)\s*\(([^\)]+)\)\s*{$/) {
- my($type) = $1;
- my($name) = $2;
- my(@names) = split(/\s*,\s*/, $name);
- push(@values, $type, \@names);
- }
- elsif (!$self->{$self->{'type_check'}}) {
- $errorString = "ERROR: No $type was defined";
- $status = 0;
- }
- elsif ($self->parse_assignment($line, \@values)) {
- ## If this returns true, then we've found an assignment
- }
- elsif ($line =~ /^(\w+)\s*(\([^\)]+\))?\s*{$/) {
- my($comp) = lc($1);
- my($name) = $2;
-
- if (defined $name) {
- $name =~ s/^\(\s*//;
- $name =~ s/\s*\)$//;
- }
- else {
- $name = $self->get_default_component_name();
- }
- push(@values, 'component', $comp, $name);
- }
- else {
- $errorString = "ERROR: Unrecognized line: $line";
- $status = -1;
- }
-
- return $status, $errorString, @values;
-}
-
-
-sub parse_scope {
- my($self) = shift;
- my($fh) = shift;
- my($name) = shift;
- my($type) = shift;
- my($validNames) = shift;
- my($flags) = shift;
- my($status) = 0;
- my($errorString) = "ERROR: Unable to process $name";
-
- if (!defined $flags) {
- $flags = {};
- }
-
- while($_ = $fh->getline()) {
- my($line) = $self->strip_line($_);
-
- if ($line eq '') {
- }
- elsif ($line =~ /^}/) {
- $status = 1;
- $errorString = '';
- $self->handle_scoped_end($type, $flags);
- last;
- }
- else {
- my(@values) = ();
- if ($self->parse_assignment($line, \@values)) {
- if (defined $$validNames{$values[1]}) {
- if ($values[0] eq 'assignment') {
- $self->process_assignment($values[1], $values[2], $flags);
- }
- elsif ($values[0] eq 'assign_add') {
- $self->process_assignment_add($values[1], $values[2], $flags);
- }
- elsif ($values[0] eq 'assign_sub') {
- $self->process_assignment_sub($values[1], $values[2], $flags);
- }
- }
- else {
- $status = 0;
- $errorString = "ERROR: Invalid assignment name: $values[1]";
- last;
- }
- }
- else {
- ($status, $errorString) = $self->handle_scoped_unknown($fh,
- $type,
- $flags,
- $line);
- if (!$status) {
- last;
- }
- }
- }
- }
- return $status, $errorString;
-}
-
-
-sub base_directory {
- my($self) = shift;
- return basename($self->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 windows_crlf {
- #my($self) = shift;
- if ($^O eq 'MSWin32' || $^O eq 'cygwin') {
- return "\n";
- }
- else {
- return "\r\n";
- }
-}
-
-
-sub transform_file_name {
- my($self) = shift;
- my($name) = shift;
-
- $name =~ s/[\s\-]/_/g;
- return $name;
-}
-
-
-sub file_written {
- my($self) = shift;
- my($file) = shift;
- return (defined $all_written{$self->getcwd() . '/' . $file});
-}
-
-
-sub add_file_written {
- my($self) = shift;
- my($file) = shift;
-
- foreach my $written (@{$self->{'files_written'}}) {
- if ($written eq $file) {
- print "WARNING: $file has been overwritten by a " .
- "$self->{'grammar_type'} with a duplicate name.\n";
- last;
- }
- }
- push(@{$self->{'files_written'}}, $file);
-
- $all_written{$self->getcwd() . '/' . $file} = 1;
-}
-
-
-sub extension_recursive_input_list {
- my($self) = shift;
- my($dir) = shift;
- my($ext) = shift;
- my($fh) = new FileHandle();
- my(@files) = ();
-
- if (opendir($fh, $dir)) {
- foreach my $file (grep(!/^\.\.?$/, readdir($fh))) {
- my($full) = ($dir ne '.' ? "$dir/" : '') . $file;
- if (-d $full) {
- push(@files, $self->extension_recursive_input_list($full, $ext));
- }
- elsif ($full =~ /$ext$/) {
- push(@files, $full);
- }
- }
- closedir($fh);
- }
-
- return @files;
-}
-
-
-sub modify_assignment_value {
- my($self) = shift;
- my($value) = shift;
-
- if ($self->convert_slashes()) {
- $value = $self->slash_to_backslash($value);
- }
- return $value;
-}
-
-
-sub process_assignment {
- my($self) = shift;
- my($name) = shift;
- my($value) = shift;
- my($assign) = shift;
-
-
- ## If no hash table was passed in
- if (!defined $assign) {
- my($tag) = ($self->{'reading_global'} ? 'global_assign' : 'assign');
- $assign = $self->{$tag};
-
- ## If we haven't yet defined the hash table in this project
- if (!defined $assign) {
- $assign = {};
- $self->{$tag} = $assign;
- }
- }
-
- if (defined $value) {
- $value =~ s/^\s+//;
- $value =~ s/\s+$//;
-
- ## Modify the assignment value before saving it
- $$assign{$name} = $self->modify_assignment_value($value);
- }
- else {
- $$assign{$name} = undef;
- }
-}
-
-
-sub process_assignment_add {
- my($self) = shift;
- my($name) = shift;
- my($value) = shift;
- my($assign) = shift;
- my($order) = shift;
- my($nval) = $self->get_assignment($name, $assign);
-
- if (defined $nval) {
- if ($order) {
- $nval .= " $value";
- }
- else {
- $nval = "$value $nval";
- }
- }
- else {
- $nval = $value;
- }
- $self->process_assignment($name, $nval, $assign);
- $self->process_duplicate_modification($name, $assign);
-}
-
-
-sub process_assignment_sub {
- my($self) = shift;
- my($name) = shift;
- my($value) = shift;
- my($assign) = shift;
- my($nval) = $self->get_assignment($name, $assign);
-
- 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, $assign);
- }
-}
-
-
-sub fill_type_name {
- my($self) = shift;
- my($name) = shift;
- my($def) = shift;
-
- if ($name =~ /\*/) {
- my($pre) = $def . '_';
- my($mid) = '_' . $def . '_';
- my($post) = '_' . $def;
-
- ## Replace the beginning and end first then the middle
- $name =~ s/^\*/$pre/;
- $name =~ s/\*$/$post/;
- $name =~ s/\*/$mid/g;
-
- ## If any one word is capitalized then capitalize each word
- if ($name =~ /[A-Z][0-9a-z_]+/) {
- ## Do the first word
- if ($name =~ /^([a-z])([^_]+)/) {
- my($first) = uc($1);
- my($rest) = $2;
- $name =~ s/^[a-z][^_]+/$first$rest/;
- }
- ## Do subsequent words
- while($name =~ /(_[a-z])([^_]+)/) {
- my($first) = uc($1);
- my($rest) = $2;
- $name =~ s/_[a-z][^_]+/$first$rest/;
- }
- }
- }
-
- return $name;
-}
-
-
-sub save_state {
- my($self) = shift;
- my(%state) = ();
-
- ## Make a deep copy of each state value. That way our array
- ## references and hash references do not get accidentally modified.
- foreach my $skey (@statekeys) {
- if (UNIVERSAL::isa($self->{$skey}, 'ARRAY')) {
- $state{$skey} = [];
- foreach my $element (@{$self->{$skey}}) {
- push(@{$state{$skey}}, $element);
- }
- }
- elsif (UNIVERSAL::isa($self->{$skey}, 'HASH')) {
- $state{$skey} = {};
- foreach my $key (keys %{$self->{$skey}}) {
- $state{$skey}->{$key} = $self->{$skey}->{$key};
- }
- }
- else {
- $state{$skey} = $self->{$skey};
- }
- }
-
- return %state;
-}
-
-
-sub restore_state {
- my($self) = shift;
- my($state) = shift;
-
- ## Make a deep copy of each state value. That way our array
- ## references and hash references do not get accidentally modified.
- foreach my $skey (@statekeys) {
- if (UNIVERSAL::isa($state->{$skey}, 'ARRAY')) {
- my(@arr) = @{$state->{$skey}};
- $self->{$skey} = \@arr;
- }
- elsif (UNIVERSAL::isa($state->{$skey}, 'HASH')) {
- my(%hash) = %{$state->{$skey}};
- $self->{$skey} = \%hash;
- }
- else {
- $self->{$skey} = $state->{$skey};
- }
- }
-}
-
-
-sub get_global_cfg {
- my($self) = shift;
- return $self->{'global'};
-}
-
-
-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 get_current_input {
- my($self) = shift;
- return $self->{'current_input'};
-}
-
-
-sub get_progress_callback {
- my($self) = shift;
- return $self->{'progress'};
-}
-
-
-sub get_addtemp {
- my($self) = shift;
- return $self->{'addtemp'};
-}
-
-
-sub get_addproj {
- my($self) = shift;
- return $self->{'addproj'};
-}
-
-
-sub get_toplevel {
- my($self) = shift;
- return $self->{'toplevel'};
-}
-
-
-sub get_files_written {
- my($self) = shift;
- return $self->{'files_written'};
-}
-
-
-sub get_assignment {
- my($self) = shift;
- my($name) = shift;
- my($assign) = shift;
-
- ## If no hash table was passed in
- if (!defined $assign) {
- my($tag) = ($self->{'reading_global'} ? 'global_assign' : 'assign');
- $assign = $self->{$tag};
- }
-
- return $$assign{$name};
-}
-
-
-sub get_baseprojs {
- my($self) = shift;
- return $self->{'baseprojs'};
-}
-
-
-sub get_dynamic {
- my($self) = shift;
- return $self->{'dynamic'};
-}
-
-
-sub get_static {
- my($self) = shift;
- return $self->{'static'};
-}
-
-
-sub get_default_component_name {
- #my($self) = shift;
- return 'default';
-}
-
-
-sub get_hierarchy {
- my($self) = shift;
- return $self->{'hierarchy'};
-}
-
-# ************************************************************
-# Virtual Methods To Be Overridden
-# ************************************************************
-
-sub handle_scoped_end {
- #my($self) = shift;
- #my($type) = shift;
- #my($flags) = shift;
-}
-
-
-sub handle_scoped_unknown {
- my($self) = shift;
- my($fh) = shift;
- my($type) = shift;
- my($flags) = shift;
- my($line) = shift;
- return 0, "ERROR: Unrecognized line: $line";
-}
-
-
-sub process_duplicate_modification {
- #my($self) = shift;
- #my($name) = shift;
- #my($assign) = shift;
-}
-
-sub generate_recursive_input_list {
- #my($self) = shift;
- #my($dir) = shift;
- return ();
-}
-
-
-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/modules/Driver.pm b/modules/Driver.pm
deleted file mode 100644
index d91e8ba9..00000000
--- a/modules/Driver.pm
+++ /dev/null
@@ -1,387 +0,0 @@
-package Driver;
-
-# ************************************************************
-# Description : Functionality to call a workspace or project creator
-# Author : Chad Elliott
-# Create Date : 5/28/2002
-# ************************************************************
-
-# ************************************************************
-# Pragmas
-# ************************************************************
-
-use strict;
-use File::Basename;
-
-use Options;
-use Parser;
-
-use vars qw(@ISA);
-@ISA = qw(Parser Options);
-
-# ************************************************************
-# Data Section
-# ************************************************************
-
-my($index) = 0;
-my(@progress) = ('|', '/', '-', '\\');
-my($cmdenv) = 'MPC_COMMANDLINE';
-
-# ************************************************************
-# Subroutine Section
-# ************************************************************
-
-sub new {
- my($class) = shift;
- my($path) = shift;
- my($name) = shift;
- my(@creators) = @_;
- my($self) = $class->SUPER::new();
-
- $self->{'path'} = $path;
- $self->{'name'} = $name;
- $self->{'version'} = "2.1";
- $self->{'types'} = {};
- $self->{'creators'} = \@creators;
- $self->{'default'} = $creators[0];
- $self->{'reldefs'} = {};
- $self->{'relorder'} = [];
-
- return $self;
-}
-
-
-sub convert_slashes {
- #my($self) = shift;
- return 0;
-}
-
-
-sub parse_line {
- my($self) = shift;
- my($ih) = shift;
- my($line) = shift;
- my($status) = 1;
- my($errorString) = '';
-
- if ($line eq '') {
- }
- elsif ($line =~ /^(\w+)(\s*,\s*(.*))?$/) {
- my($name) = $1;
- my($value) = $3;
- if (defined $value) {
- $value =~ s/^\s+//;
- $value =~ s/\s+$//;
- }
- $self->{'reldefs'}->{$name} = $value;
- push(@{$self->{'relorder'}}, $name);
- }
- else {
- $status = 0;
- $errorString = "ERROR: Unrecognized line: $line";
- }
-
- return $status, $errorString;
-}
-
-
-sub optionError {
- my($self) = shift;
- my($line) = shift;
- my($base) = $self->{'name'};
-
- if (defined $line) {
- print STDERR "ERROR: $line\n";
- }
- my($spaces) = (' ' x (length($base) + 8));
- print STDERR "$base v$self->{'version'}\n" .
- "Usage: $base [-global <file>] [-include <directory>] [-recurse]]\n" .
- $spaces . "[-ti <dll | lib | dll_exe | lib_exe>:<file>] [-hierarchy]\n" .
- $spaces . "[-template <file>] [-relative NAME=VAR] [-base <project>]\n" .
- $spaces . "[-noreldefs] [-notoplevel] [-static] [-static_only]\n" .
- $spaces . "[-value_template <NAME+=VAL | NAME=VAL | NAME-=VAL>]\n" .
- $spaces . "[-value_project <NAME+=VAL | NAME=VAL | NAME-=VAL>]\n" .
- $spaces . "[-feature_file <file name>] [-make_coexistence]\n" .
- $spaces . "[-exclude <directories>]\n" .
- $spaces . "[-type <";
-
- my(@keys) = sort keys %{$self->{'types'}};
- for(my $i = 0; $i <= $#keys; $i++) {
- print STDERR $keys[$i];
- if ($i != $#keys) {
- print STDERR ' | ';
- }
- if ((($i + 1) % 6) == 0) {
- print STDERR "\n$spaces ";
- }
- }
- print STDERR ">]\n" .
- $spaces . "[files]\n\n";
-
- my($default) = $self->extractType($self->{'default'});
- print STDERR
-" -base Add <project> as a base project to each generated\n" .
-" project file.\n" .
-" -exclude Use this option to exclude directories when searching\n" .
-" for input files.\n" .
-" -feature_file Specifies the feature file to read before processing.\n" .
-" The default feature file is default.features under the\n" .
-" config directory.\n" .
-" -global Specifies the global input file. Values stored\n" .
-" within this file are applied to all projects.\n" .
-" -hierarchy Generate a workspace in a hierarchical fashion.\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" .
-" -static Specifies that static projects will be generated in\n" .
-" addition to dynamic projects.\n" .
-" -static_only Specifies that only static projects will be generated.\n" .
-" -recurse Recurse from the current directory and generate from\n" .
-" all found input files.\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" .
-" -make_coexistence If multiple 'make' based project types are\n" .
-" generated, they will be named such that they can coexist.\n" .
-" -noreldefs Do not try to generate default relative definitions.\n" .
-" -notoplevel Do not generate the top level target file. Files\n" .
-" are still process, but no top level file is created.\n" .
-" -value_template This option allows modification of a template input\n" .
-" name value pair. Use += to add VAL to the NAME's\n" .
-" value. Use -= to subtract and = to override the value.\n" .
-" It is important to note that this will only modify\n" .
-" existing template input name value pairs and can not\n" .
-" be used to introduce new name value pairs.\n" .
-" -value_project This option allows modification of a project variable\n" .
-" assignment . Use += to add VAL to the NAME's value.\n" .
-" Use -= to subtract and = to override the value.\n" .
-" This can be used to introduce new name value pairs to\n" .
-" a project. However, it must be a valid project\n" .
-" assignment.\n" .
-" -type Specifies the type of project file to generate. This\n" .
-" option can be used multiple times to generate multiple\n" .
-" types. If -type is not used, it defaults to '$default'.\n";
-
- exit(0);
-}
-
-
-sub run {
- my($self) = shift;
- my(@args) = @_;
- my($status) = 0;
-
- ## 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) = $self->extractType($creator);
- $self->{'types'}->{$tag} = $creator;
- }
-
- ## Before we process the arguments, we will prepend the $cmdenv
- ## environment variable.
- if (defined $ENV{$cmdenv}) {
- my($envargs) = $self->create_array($ENV{$cmdenv});
- unshift(@args, @$envargs);
- }
-
- my($options) = $self->options($self->{'name'},
- $self->{'types'},
- 1,
- @args);
- if (!defined $options) {
- return $status;
- }
-
- ## Set up a hash that we can use to keep track of what
- ## has been 'required'
- my(%loaded) = ();
-
- ## Set up the default generator, if no type is selected
- if (!defined $options->{'generators'}->[0]) {
- push(@{$options->{'generators'}}, $self->{'default'});
- }
-
- if ($options->{'recurse'}) {
- if (defined $options->{'input'}->[0]) {
- ## This is an error.
- ## -recurse was used and input files were specified.
- $self->optionError('No files should be ' .
- 'specified when using -recurse');
- }
- else {
- ## We have to load at least one generator here in order
- ## to call the generate_recursive_input_list virtual function.
- my($name) = $options->{'generators'}->[0];
- if (!$loaded{$name}) {
- require "$name.pm";
- $loaded{$name} = 1;
- }
-
- ## Generate the recursive input list
- my($generator) = $name->new();
- my(@input) = $generator->generate_recursive_input_list('.');
- $options->{'input'} = \@input;
-
- ## If no files were found above, then we issue a warning
- ## that we are going to use the default input
- if (!defined $options->{'input'}->[0]) {
- print "WARNING: No files were found using the -recurse option.\n" .
- " Using the default input.\n";
- }
- }
- }
-
- ## Set the global feature file
- my($global_feature_file) = $self->{'path'} . '/config/global.features';
-
- ## Set up default values
- if (!defined $options->{'input'}->[0]) {
- push(@{$options->{'input'}}, '');
- }
- if (!defined $options->{'feature_file'}) {
- my($feature_file) = $self->{'path'} . '/config/default.features';
- if (-r $feature_file) {
- $options->{'feature_file'} = $feature_file;
- }
- }
- if (!defined $options->{'global'}) {
- my($global) = $self->{'path'} . '/config/global.mpb';
- if (-r $global) {
- $options->{'global'} = $global;
- }
- }
- ## Save the original directory outside of the loop
- ## to avoid calling it multiple times.
- my($orig_dir) = $self->getcwd();
-
- ## Always add the default include paths
- unshift(@{$options->{'include'}}, $orig_dir);
- unshift(@{$options->{'include'}}, $self->{'path'} . '/templates');
- unshift(@{$options->{'include'}}, $self->{'path'} . '/config');
-
- if ($options->{'reldefs'}) {
- ## Only try to read the file if it exists
- my($rel) = $self->{'path'} . '/config/default.rel';
- if (-r $rel) {
- my($srel, $errorString) = $self->read_file($rel);
- if (!$srel) {
- print STDERR "$errorString\nin $rel\n";
- return $status;
- }
- }
-
- foreach my $key (@{$self->{'relorder'}}) {
- if (defined $ENV{$key} &&
- !defined $options->{'relative'}->{$key}) {
- $options->{'relative'}->{$key} = $ENV{$key};
- }
- if (defined $self->{'reldefs'}->{$key} &&
- !defined $options->{'relative'}->{$key}) {
- my($value) = $self->{'reldefs'}->{$key};
- if ($value =~ /\$(\w+)(.*)?/) {
- my($var) = $1;
- my($extra) = $2;
- $options->{'relative'}->{$key} =
- (defined $options->{'relative'}->{$var} ?
- $options->{'relative'}->{$var} : '') .
- (defined $extra ? $extra : '');
- }
- else {
- $options->{'relative'}->{$key} = $value;
- }
- }
- }
- }
-
- ## Set up un-buffered output for the progress callback
- $| = 1;
-
- ## Generate the files
- foreach my $cfile (@{$options->{'input'}}) {
- ## To correctly reference any pathnames in the input file, chdir to
- ## its directory if there's any directory component to the specified path.
- my($base) = basename($cfile);
-
- if (-d $cfile) {
- $base = '';
- }
-
- foreach my $name (@{$options->{'generators'}}) {
- if (!$loaded{$name}) {
- require "$name.pm";
- $loaded{$name} = 1;
- }
- my($file) = $cfile;
- my($generator) = $name->new($options->{'global'},
- $options->{'include'},
- $options->{'template'},
- $options->{'ti'},
- $options->{'dynamic'},
- $options->{'static'},
- $options->{'relative'},
- $options->{'addtemp'},
- $options->{'addproj'},
- (-t 1 ? \&progress : undef),
- $options->{'toplevel'},
- $options->{'baseprojs'},
- $global_feature_file,
- $options->{'feature_file'},
- $options->{'hierarchy'},
- $options->{'exclude'},
- $options->{'coexistence'});
- if ($base ne $file) {
- my($dir) = ($base eq '' ? $file : dirname($file));
- if (!$generator->cd($dir)) {
- print STDERR "ERROR: Unable to change to directory: $dir\n";
- $status++;
- last;
- }
- $file = $base;
- }
- print 'Generating output using ';
- if ($file eq '') {
- print 'default input';
- }
- else {
- my($partial) = $self->getcwd();
- my($oescaped) = $self->escape_regex_special($orig_dir) . '(/)?';
- $partial =~ s/^$oescaped//;
- print '' . ($partial ne '' ? "$partial/" : '') . $file;
- }
- print "\n" . 'Start Time: ' . scalar(localtime(time())) . "\n";
- if (!$generator->generate($file)) {
- print STDERR "ERROR: Unable to process: " .
- ($file eq '' ? 'default input' : $file) . "\n";
- $status++;
- last;
- }
- print ' End Time: ' . scalar(localtime(time())) . "\n";
- $generator->cd($orig_dir);
- }
- if ($status) {
- last;
- }
- }
-
- return $status;
-}
-
-
-sub progress {
- ## This method will be called before each output
- ## file (or set of output files in vc6's case) is written.
- print "$progress[$index]\r";
- $index++;
- if ($index > $#progress) {
- $index = 0;
- }
-}
-
-
-1;
diff --git a/modules/EM3ProjectCreator.pm b/modules/EM3ProjectCreator.pm
deleted file mode 100644
index b15f24d9..00000000
--- a/modules/EM3ProjectCreator.pm
+++ /dev/null
@@ -1,79 +0,0 @@
-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/modules/EM3WorkspaceCreator.pm b/modules/EM3WorkspaceCreator.pm
deleted file mode 100644
index e374de01..00000000
--- a/modules/EM3WorkspaceCreator.pm
+++ /dev/null
@@ -1,44 +0,0 @@
-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_modified_workspace_name($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/modules/GHSProjectCreator.pm b/modules/GHSProjectCreator.pm
deleted file mode 100644
index 95302457..00000000
--- a/modules/GHSProjectCreator.pm
+++ /dev/null
@@ -1,62 +0,0 @@
-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 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/modules/GHSWorkspaceCreator.pm b/modules/GHSWorkspaceCreator.pm
deleted file mode 100644
index e26f2e51..00000000
--- a/modules/GHSWorkspaceCreator.pm
+++ /dev/null
@@ -1,76 +0,0 @@
-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 $self->get_modified_workspace_name('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 = $self->slash_to_backslash($project);
-
- print $fh "..\\$project$crlf";
- if ($gen->exe_target()) {
- print $fh "\tprogram$crlf";
- }
- else {
- print $fh "\tlibrary$crlf";
- }
- }
-}
-
-
-
-1;
diff --git a/modules/GUID.pm b/modules/GUID.pm
deleted file mode 100644
index 015db9c2..00000000
--- a/modules/GUID.pm
+++ /dev/null
@@ -1,58 +0,0 @@
-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($out) = shift;
- my($in) = shift;
- my($cwd) = shift;
- my($chash) = $self->hash($cwd);
- my($nhash) = $self->hash($out);
- my($ihash) = $self->hash($in);
- my($val) = 0xfeca1bad;
-
- return sprintf("%08X-%04X-%04X-%04X-%04X%08X",
- $nhash, ($val >> 16) & 0xffff, ($val & 0xffff),
- ($ihash >> 16) & 0xffff, $ihash & 0xffff, $chash);
-}
-
-
-sub hash {
- my($self) = shift;
- my($str) = shift;
- my($value) = 0;
-
- if (defined $str) {
- my($length) = length($str);
- for(my $i = 0; $i < $length; $i++) {
- $value = ($value << 4) ^ ($value >> 28) ^ ord(substr($str, $i, 1));
- }
- }
-
- return $value;
-}
-
-1;
diff --git a/modules/MakeProjectCreator.pm b/modules/MakeProjectCreator.pm
deleted file mode 100644
index c852fca6..00000000
--- a/modules/MakeProjectCreator.pm
+++ /dev/null
@@ -1,65 +0,0 @@
-package MakeProjectCreator;
-
-# ************************************************************
-# Description : A Generic Make Project Creator
-# Author : Chad Elliott
-# Create Date : 2/18/2003
-# ************************************************************
-
-# ************************************************************
-# Pragmas
-# ************************************************************
-
-use strict;
-
-use ProjectCreator;
-
-use vars qw(@ISA);
-@ISA = qw(ProjectCreator);
-
-# ************************************************************
-# Subroutine Section
-# ************************************************************
-
-sub sort_files {
- #my($self) = shift;
- return 0;
-}
-
-
-sub convert_slashes {
- #my($self) = shift;
- return 0;
-}
-
-
-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 'makeexe';
-}
-
-
-sub get_dll_template_input_file {
- #my($self) = shift;
- return 'makedll';
-}
-
-
-sub get_template {
- #my($self) = shift;
- return 'make';
-}
-
-1;
diff --git a/modules/MakeWorkspaceCreator.pm b/modules/MakeWorkspaceCreator.pm
deleted file mode 100644
index e1d506f0..00000000
--- a/modules/MakeWorkspaceCreator.pm
+++ /dev/null
@@ -1,100 +0,0 @@
-package MakeWorkspaceCreator;
-
-# ************************************************************
-# Description : A Generic Workspace (Makefile) creator
-# Author : Chad Elliott
-# Create Date : 2/18/2003
-# ************************************************************
-
-# ************************************************************
-# Pragmas
-# ************************************************************
-
-use strict;
-use File::Basename;
-
-use MakeProjectCreator;
-use WorkspaceCreator;
-
-use vars qw(@ISA);
-@ISA = qw(WorkspaceCreator);
-
-# ************************************************************
-# Subroutine Section
-# ************************************************************
-
-sub workspace_file_name {
- my($self) = shift;
- return $self->get_modified_workspace_name('Makefile', '');
-}
-
-
-sub workspace_per_project {
- #my($self) = shift;
- return 1;
-}
-
-
-sub pre_workspace {
- my($self) = shift;
- my($fh) = shift;
- my($crlf) = $self->crlf();
-
- print $fh "#----------------------------------------------------------------------------$crlf" .
- "# Make 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();
-
- ## Only use the list if there is more than one project
- if ($#list > 0) {
- print $fh "MFILES = \\$crlf";
- for(my $i = 0; $i <= $#list; $i++) {
- print $fh " $list[$i]";
- if ($i != $#list) {
- print $fh " \\";
- }
- print $fh $crlf;
- }
- }
-
- ## Print out the projet Makefile
- print $fh $crlf .
- "all clean depend realclean:$crlf";
-
- ## If there is more than one project, use a for loop
- if ($#list > 0) {
- print $fh "\t\@for file in \$(MFILES); do \\$crlf" .
- "\told=`pwd`; \\$crlf" .
- "\tcd `dirname \$\$file`; \\$crlf" .
- "\t\$(MAKE) PWD=`pwd` -f `basename \$\$file` \$(\@); \\$crlf" .
- "\tcd \$\$old; \\$crlf" .
- "\tdone$crlf";
- }
- else {
- ## Otherwise, just list the call to make without a for loop
- print $fh "\t\@";
- my($dname) = dirname($list[0]);
- my($pwd) = '';
- if ($dname ne '.') {
- print $fh "cd $dname && ";
- $pwd = "PWD=$dname";
- }
- print $fh "\$(MAKE) $pwd -f " .
- ($dname eq '.' ? $list[0] : basename($list[0])) .
- " \$(\@);$crlf";
- }
-}
-
-
-
-1;
diff --git a/modules/NMakeProjectCreator.pm b/modules/NMakeProjectCreator.pm
deleted file mode 100644
index dfab3435..00000000
--- a/modules/NMakeProjectCreator.pm
+++ /dev/null
@@ -1,72 +0,0 @@
-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 sort_files {
- #my($self) = shift;
- return 0;
-}
-
-
-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_env_accessor {
- #my($self) = shift;
- return ('%', '%');
-}
-
-
-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/modules/NMakeWorkspaceCreator.pm b/modules/NMakeWorkspaceCreator.pm
deleted file mode 100644
index e8935edf..00000000
--- a/modules/NMakeWorkspaceCreator.pm
+++ /dev/null
@@ -1,128 +0,0 @@
-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;
- if ($self->make_coexistence()) {
- return $self->get_modified_workspace_name($self->get_workspace_name(),
- '.nmake');
- }
- else {
- return $self->get_modified_workspace_name('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_project_targets {
- my($self) = shift;
- my($fh) = shift;
- my($target) = shift;
- my($list) = shift;
- my($crlf) = $self->crlf();
-
- foreach my $project (@$list) {
- my($dir) = dirname($project);
- my($chdir) = 0;
- my($back) = '';
-
- ## 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($count) = 0;
- my($length) = length($dir);
- for(my $i = 0; $i < $length; $i++) {
- if (substr($dir, $i, 1) eq '/') {
- $count++;
- }
- }
- if ($dir =~ /^\.\.\//) {
- $back = ('../' x $count) . basename($self->getcwd());
- }
- else {
- $back = ('../' x ($count + 1));
- }
- }
-
- print $fh ($chdir ? "\tcd $dir$crlf" : '') .
- "\t\$(MAKE) /f " . basename($project) . " $target$crlf" .
- ($chdir ? "\tcd $back$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();
- my($default) = 'Win32 Debug';
-
- ## Determine the default configuration
- foreach my $project (keys %$pjs) {
- my($name, $deps, $pguid, @cfgs) = @{$pjs->{$project}};
- @cfgs = sort @cfgs;
- if (defined $cfgs[0]) {
- $default = $cfgs[0];
- $default =~ s/(.*)\|(.*)/$2 $1/;
- last;
- }
- }
-
- ## Print out the content
- print $fh '!IF "$(CFG)" == ""' . $crlf .
- 'CFG=' . $default . $crlf .
- '!MESSAGE No configuration specified. ' .
- 'Defaulting to ' . $default . '.' . $crlf .
- '!ENDIF' . $crlf;
-
- foreach my $target ('ALL', 'DEPEND', 'IDL_STUBS', 'CLEAN', 'REALCLEAN') {
- print $fh $crlf .
- $target . ':' . $crlf;
- $self->write_project_targets($fh, 'CFG="$(CFG)" ' . $target, \@list);
- }
-}
-
-
-
-1;
diff --git a/modules/Options.pm b/modules/Options.pm
deleted file mode 100644
index a9e31b31..00000000
--- a/modules/Options.pm
+++ /dev/null
@@ -1,329 +0,0 @@
-package Options;
-
-# ************************************************************
-# Description : Process mpc command line options
-# Author : Chad Elliott
-# Create Date : 3/20/2003
-# ************************************************************
-
-# ************************************************************
-# Pragmas
-# ************************************************************
-
-use strict;
-
-# ************************************************************
-# Subroutine Section
-# ************************************************************
-
-sub optionError {
- #my($self) = shift;
- #my($str) = shift;
-}
-
-
-sub completion_command {
- my($self) = shift;
- my($name) = shift;
- my($types) = shift;
- my($str) = "complete $name " .
- "'c/-/(global include type template relative " .
- "ti static noreldefs notoplevel feature_file " .
- "value_template value_project make_coexistence " .
- "hierarchy exclude)/' " .
- "'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 %$types;
- for(my $i = 0; $i <= $#keys; $i++) {
- $str .= $keys[$i];
- if ($i != $#keys) {
- $str .= " ";
- }
- }
- $str .= ")/'";
- return $str;
-}
-
-
-sub options {
- my($self) = shift;
- my($name) = shift;
- my($types) = shift;
- my($defaults) = shift;
- my(@args) = @_;
- my(@include) = ();
- my(@input) = ();
- my(@generators) = ();
- my(@baseprojs) = ();
- my(%ti) = ();
- my(%relative) = ();
- my(%addtemp) = ();
- my(%addproj) = ();
- my(@exclude) = ();
- my($global) = undef;
- my($template) = undef;
- my($feature_f) = undef;
- my($hierarchy) = 0;
- my($dynamic) = ($defaults ? 1 : undef);
- my($reldefs) = ($defaults ? 1 : undef);
- my($toplevel) = ($defaults ? 1 : undef);
- my($static) = ($defaults ? 0 : undef);
- my($recurse) = ($defaults ? 0 : undef);
- my($makeco) = ($defaults ? 0 : undef);
-
- ## Process the command line arguments
- for(my $i = 0; $i <= $#args; $i++) {
- my($arg) = $args[$i];
- if ($arg eq '-complete') {
- print $self->completion_command($name, $types) . "\n";
- return undef;
- }
- elsif ($arg eq '-base') {
- $i++;
- if (!defined $args[$i]) {
- $self->optionError('-base requires an argument');
- }
- else {
- push(@baseprojs, $args[$i]);
- }
- }
- elsif ($arg eq '-type') {
- $i++;
- if (!defined $args[$i]) {
- $self->optionError('-type requires an argument');
- }
- else {
- my($type) = lc($args[$i]);
- if (defined $types->{$type}) {
- my($call) = $types->{$type};
- my($found) = 0;
- foreach my $generator (@generators) {
- if ($generator eq $call) {
- $found = 1;
- last;
- }
- }
- if (!$found) {
- push(@generators, $call);
- }
- }
- else {
- $self->optionError("Invalid type: $args[$i]");
- }
- }
- }
- elsif ($arg eq '-exclude') {
- $i++;
- if (defined $args[$i]) {
- @exclude = split(',', $args[$i]);
- }
- else {
- $self->optionError('-exclude requires a ' .
- 'comma separated list argument');
- }
- }
- elsif ($arg eq '-feature_file') {
- $i++;
- $feature_f = $args[$i];
- if (!defined $feature_f) {
- $self->optionError('-feature_file requires a file name argument');
- }
- }
- elsif ($arg eq '-global') {
- $i++;
- $global = $args[$i];
- if (!defined $global) {
- $self->optionError('-global requires a file name argument');
- }
- }
- elsif ($arg eq '-hierarchy') {
- $hierarchy = 1;
- }
- elsif ($arg eq '-include') {
- $i++;
- my($include) = $args[$i];
- if (!defined $include) {
- $self->optionError('-include requires a directory argument');
- }
- else {
- push(@include, $include);
- }
- }
- elsif ($arg eq '-make_coexistence') {
- $makeco = 1;
- }
- elsif ($arg eq '-noreldefs') {
- $reldefs = 0;
- }
- elsif ($arg eq '-notoplevel') {
- $toplevel = 0;
- }
- elsif ($arg eq '-recurse') {
- $recurse = 1;
- }
- elsif ($arg eq '-template') {
- $i++;
- $template = $args[$i];
- if (!defined $template) {
- $self->optionError('-template requires a file name argument');
- }
- }
- elsif ($arg eq '-relative') {
- $i++;
- my($rel) = $args[$i];
- if (!defined $rel) {
- $self->optionError('-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->optionError('Invalid option to -relative');
- }
- }
- }
- elsif ($arg eq '-ti') {
- $i++;
- my($tmpi) = $args[$i];
- if (!defined $tmpi) {
- $self->optionError('-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->optionError("Invalid -ti argument: $tmpi");
- }
- }
- }
- elsif ($arg eq '-value_template') {
- $i++;
- my($value) = $args[$i];
- if (!defined $value) {
- $self->optionError('-value_template requires a variable assignment argument');
- }
- else {
- if ($value =~ /(\w+)\s*([\-+]?=)\s*(.*)/) {
- my($name) = $1;
- my($op) = $2;
- my($val) = $3;
- $val =~ s/^\s+//;
- $val =~ s/\s+$//;
- if ($op eq '+=') {
- $op = 1;
- }
- elsif ($op eq '-=') {
- $op = -1;
- }
- else {
- $op = 0;
- }
- $addtemp{$name} = [$op, $val];
- }
- else {
- $self->optionError('Invalid option to -value_template');
- }
- }
- }
- elsif ($arg eq '-value_project') {
- $i++;
- my($value) = $args[$i];
- if (!defined $value) {
- $self->optionError('-value_project requires a variable assignment argument');
- }
- else {
- if ($value =~ /(\w+)\s*([\-+]?=)\s*(.*)/) {
- my($name) = $1;
- my($op) = $2;
- my($val) = $3;
- $val =~ s/^\s+//;
- $val =~ s/\s+$//;
- if ($op eq '+=') {
- $op = 1;
- }
- elsif ($op eq '-=') {
- $op = -1;
- }
- else {
- $op = 0;
- }
- $addproj{$name} = [$op, $val];
- }
- else {
- $self->optionError('Invalid option to -value_project');
- }
- }
- }
- elsif ($arg eq '-static') {
- $static = 1;
- }
- elsif ($arg eq '-static_only') {
- $static = 1;
- $dynamic = 0;
- }
- elsif ($arg =~ /^-/) {
- $self->optionError("Unknown option: $arg");
- }
- else {
- push(@input, $arg);
- }
- }
-
- my(%options) = ('global' => $global,
- 'feature_file' => $feature_f,
- 'include' => \@include,
- 'input' => \@input,
- 'generators' => \@generators,
- 'baseprojs' => \@baseprojs,
- 'template' => $template,
- 'ti' => \%ti,
- 'dynamic' => $dynamic,
- 'static' => $static,
- 'relative' => \%relative,
- 'reldefs' => $reldefs,
- 'toplevel' => $toplevel,
- 'recurse' => $recurse,
- 'addtemp' => \%addtemp,
- 'addproj' => \%addproj,
- 'coexistence' => $makeco,
- 'hierarchy' => $hierarchy,
- 'exclude' => \@exclude,
- );
-
- return \%options;
-}
-
-
-sub is_set {
- my($self) = shift;
- my($key) = shift;
- my($options) = shift;
-
- if (UNIVERSAL::isa($options->{$key}, 'ARRAY')) {
- if (defined $options->{$key}->[0]) {
- return 'ARRAY';
- }
- }
- elsif (UNIVERSAL::isa($options->{$key}, 'HASH')) {
- my(@keys) = keys %{$options->{$key}};
- if (defined $keys[0]) {
- return 'HASH';
- }
- }
- elsif (defined $options->{$key}) {
- return 'SCALAR';
- }
-
- return undef;
-}
-
-1;
diff --git a/modules/Parser.pm b/modules/Parser.pm
deleted file mode 100644
index 7977ae1a..00000000
--- a/modules/Parser.pm
+++ /dev/null
@@ -1,197 +0,0 @@
-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;
-
-use StringProcessor;
-
-use vars qw(@ISA);
-@ISA = qw(StringProcessor);
-
-# ************************************************************
-# Data Section
-# ************************************************************
-
-my($cwd) = Cwd::getcwd();
-
-# ************************************************************
-# Subroutine Section
-# ************************************************************
-
-sub new {
- my($class) = shift;
- my($inc) = shift;
- my($self) = $class->SUPER::new();
-
- $self->{'line_number'} = 0;
- $self->{'include'} = $inc;
-
- return $self;
-}
-
-
-sub cd {
- my($self) = shift;
- my($dir) = shift;
- my($status) = chdir($dir);
-
- if ($status && $dir ne '.') {
- ## First strip out any /./ or ./ or /.
- $dir =~ s/\/\.\//\//g;
- $dir =~ s/^\.\///;
- $dir =~ s/\/\.$//;
-
- ## If the new directory contains a relative directory
- ## then we just get the real working directory
- if ($dir =~ /\.\./) {
- $cwd = Cwd::getcwd();
- }
- else {
- if ($dir =~ /^\// || $dir =~ /^[A-Za-z]:/) {
- $cwd = $dir;
- }
- else {
- $cwd .= "/$dir";
- }
- }
- }
- return $status;
-}
-
-
-sub getcwd {
- #my($self) = shift;
- return $cwd;
-}
-
-
-sub strip_line {
- my($self) = shift;
- my($line) = shift;
-
- ++$self->{'line_number'};
- $line =~ s/\/\/.*//;
- $line =~ s/^\s+//;
- $line =~ s/\s+$//;
-
- return $line;
-}
-
-
-sub collect_line {
- my($self) = shift;
- my($fh) = shift;
- my($lref) = shift;
- my($line) = shift;
-
- $$lref = $self->strip_line($line);
- return $self->parse_line($fh, $$lref);
-}
-
-
-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)) {
- my($line) = '';
- while($_ = $ih->getline()) {
- ($status, $errorString) = $self->collect_line($ih, \$line, $_);
-
- if (!$status) {
- last;
- }
- }
- close($ih);
- }
- else {
- $errorString = 'ERROR: Unable to open for reading';
- $status = 0;
- }
-
- return $status, $errorString;
-}
-
-
-sub get_line_number {
- my($self) = shift;
- return $self->{'line_number'};
-}
-
-
-sub set_line_number {
- my($self) = shift;
- my($number) = shift;
- $self->{'line_number'} = $number;
-}
-
-
-sub slash_to_backslash {
- my($self) = shift;
- my($file) = shift;
- $file =~ s/\//\\/g;
- return $file;
-}
-
-
-sub get_include_path {
- my($self) = shift;
- return $self->{'include'};
-}
-
-
-sub search_include_path {
- my($self) = shift;
- my($file) = shift;
-
- foreach my $include ('.', @{$self->{'include'}}) {
- if (-r "$include/$file") {
- return "$include/$file";
- }
- }
-
- return undef;
-}
-
-
-sub escape_regex_special {
- my($self) = shift;
- my($name) = shift;
-
- $name =~ s/([\+\-\\\$\[\]\(\)\.])/\\$1/g;
- return $name;
-}
-
-
-# ************************************************************
-# Virtual Methods To Be Overridden
-# ************************************************************
-
-sub convert_slashes {
- #my($self) = shift;
- return 1;
-}
-
-
-sub parse_line {
- #my($self) = shift;
- #my($ih) = shift;
- #my($line) = shift;
-}
-
-
-1;
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm
deleted file mode 100644
index d0d6c399..00000000
--- a/modules/ProjectCreator.pm
+++ /dev/null
@@ -1,2450 +0,0 @@
-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::Compare;
-use File::Basename;
-
-use Creator;
-use TemplateInputReader;
-use TemplateParser;
-use FeatureParser;
-
-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,
- 'after' => 1,
- 'libs' => 1,
- 'lit_libs' => 1,
- 'pch_header' => 1,
- 'pch_source' => 1,
- 'ssl' => 1,
- 'dllout' => 1,
- 'libout' => 1,
- 'dynamicflags' => 1,
- 'staticflags' => 1,
- 'version' => 1,
- 'requires' => 1,
- 'avoids' => 1,
- 'compname' => 1,
- 'comps' => 1,
- 'tagname' => 1,
- 'tagchecks' => 1,
- 'include_dir' => 1,
- 'core' => 1,
- 'idlgendir' => 1,
- 'macros' => 1,
- );
-
-## Custom definitions only
-## -1 means that it is always an array
-## 0 means that it is an array that gets outputext converted to files
-## 1 means that it is always scalar
-my(%customDefined) = ('automatic' => 1,
- 'command' => 1,
- 'commandflags' => 1,
- 'inputext' => -1,
- 'libpath' => 1,
- 'output_option' => 1,
- 'pch_option' => 1,
- 'pre_extension' => 0,
- 'pre_filename' => 0,
- 'source_outputext' => 0,
- 'template_outputext' => 0,
- 'header_outputext' => 0,
- 'inline_outputext' => 0,
- 'documentation_outputext' => 0,
- 'resource_outputext' => 0,
- 'generic_outputext' => 0,
- );
-
-## Custom sections as well as definitions
-my(%custom) = ('commandflags' => 1,
- 'gendir' => 1,
- );
-
-## Deal with these components in a special way
-my(@specialComponents) = ('header_files', 'inline_files');
-
-## 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' => [ "README", "readme", "\\.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", ],
- );
-
-## Match up assignments with the valid components
-my(%ma) = ('idl_files' => [ 'idlgendir', 'idlflags' ],
- );
-
-my(%genext) = ('idl_files' => {'automatic' => 1,
- 'pre_filename' => [ '' ],
- 'pre_extension' => [ 'C', 'S' ],
- 'source_files' => [ '\\.cpp', '\\.cxx', '\\.cc', '\\.C', ],
- 'inline_files' => [ '\\.i', '\\.inl', ],
- 'header_files' => [ '\\.h', '\\.hxx', '\\.hh', ],
- },
- );
-
-my($grouped_key) = 'grouped_';
-
-# ************************************************************
-# 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($addtemp) = shift;
- my($addproj) = shift;
- my($progress) = shift;
- my($toplevel) = shift;
- my($baseprojs) = shift;
- my($gfeature) = shift;
- my($feature) = shift;
- my($hierarchy) = shift;
- my($exclude) = shift;
- my($makeco) = shift;
- my($self) = Creator::new($class, $global, $inc,
- $template, $ti, $dynamic, $static,
- $relative, $addtemp, $addproj,
- $progress, $toplevel, $baseprojs,
- $feature, $hierarchy, 'project');
-
- $self->{$self->{'type_check'}} = 0;
- $self->{'feature_defined'} = 0;
- $self->{'project_info'} = [];
- $self->{'reading_parent'} = [];
- $self->{'feature_definitions'} = [];
- $self->{'dexe_template_input'} = undef;
- $self->{'lexe_template_input'} = undef;
- $self->{'lib_template_input'} = undef;
- $self->{'dll_template_input'} = undef;
- $self->{'writing_type'} = 0;
- $self->{'flag_overrides'} = {};
- $self->{'special_supplied'} = {};
- $self->{'verbatim'} = {};
- $self->{'type_specific_assign'} = {};
- $self->{'pctype'} = $self->extractType("$self");
- $self->{'defaulted'} = {};
- $self->{'custom_types'} = {};
- $self->{'parents_read'} = {};
- $self->{'feature_parser'} = new FeatureParser($gfeature, $feature);
- $self->{'convert_slashes'} = $self->convert_slashes();
- $self->{'sort_files'} = $self->sort_files();
- $self->{'source_callback'} = undef;
- $self->reset_generating_types();
-
- 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 process_assignment {
- my($self) = shift;
- my($name) = shift;
- my($value) = shift;
- my($assign) = shift;
-
- ## Support the '*' mechanism as in the project name, to allow
- ## the user to correctly depend on another project within the same
- ## directory.
- if ($name eq 'after' && $value =~ /\*/) {
- my($def) = $self->get_default_project_name();
- $value = $self->fill_type_name($value, $def);
- }
- $self->SUPER::process_assignment($name, $value, $assign);
-}
-
-
-sub parse_line {
- my($self) = shift;
- my($ih) = shift;
- my($line) = shift;
- 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 $self->{'grammar_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();
-
- ## Fill in type specific assignments
- $self->process_type_specific_assignments();
-
- ## Perform any additions, subtractions
- ## or overrides for the project values.
- my($addproj) = $self->get_addproj();
- foreach my $ap (keys %$addproj) {
- if (defined $validNames{$ap}) {
- my($val) = $$addproj{$ap};
- if ($$val[0] > 0) {
- $self->process_assignment_add($ap, $$val[1]);
- }
- elsif ($$val[0] < 0) {
- $self->process_assignment_sub($ap, $$val[1]);
- }
- else {
- $self->process_assignment($ap, $$val[1]);
- }
- }
- else {
- $errorString = 'ERROR: Invalid ' .
- "assignment modification name: $ap";
- $status = 0;
- }
- }
-
- if ($status) {
- ## End of project; Write out the file.
- ($status, $errorString) = $self->write_project();
-
- foreach my $key (keys %{$self->{'valid_components'}}) {
- delete $self->{$key};
- $self->{'defaulted'}->{$key} = 0;
- }
- $self->{'assign'} = {};
- $self->{'verbatim'} = {};
- $self->{'special_supplied'} = {};
- $self->{'type_specific_assign'} = {};
- $self->{'flag_overrides'} = {};
- $self->{'parents_read'} = {};
- $self->{'feature_definitions'} = [];
- $self->reset_generating_types();
- }
- }
- $self->{$typecheck} = 0;
- }
- else {
- ## Project Beginning
- ## Deal with the inheritance hiearchy first
- my($parents) = $values[2];
-
- ## Add in the base projects from the command line
- if (!$self->{'reading_global'} &&
- !defined $self->{'reading_parent'}->[0]) {
- my($baseprojs) = $self->get_baseprojs();
-
- if (defined $parents) {
- foreach my $base (@$baseprojs) {
- my($found) = 0;
- foreach my $parent (@$parents) {
- if ($base eq $parent) {
- $found = 1;
- last;
- }
- }
- if (!$found) {
- push(@$parents, $base);
- }
- }
- }
- else {
- $parents = $baseprojs;
- }
- }
-
- 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) {
- foreach my $currently (@{$self->{'reading_parent'}}) {
- if ($currently eq $file) {
- $status = 0;
- $errorString = 'ERROR: Cyclic inheritance detected: ' .
- $parent;
- }
- }
-
- if ($status) {
- if (!defined $self->{'parents_read'}->{$file}) {
- $self->{'parents_read'}->{$file} = 1;
- ## Begin reading the parent
- push(@{$self->{'reading_parent'}}, $file);
- $status = $self->parse_file($file);
- pop(@{$self->{'reading_parent'}});
-
- 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) {
- if ($name =~ /[\/\\]/) {
- $status = 0;
- $errorString = 'ERROR: Projects can not have a slash ' .
- 'or a back slash in the name';
- }
- else {
- $name =~ s/^\(\s*//;
- $name =~ s/\s*\)$//;
- $name = $self->transform_file_name($name);
-
- ## Replace any *'s with the default name
- my($def) = $self->get_default_project_name();
- $name = $self->fill_type_name($name, $def);
-
- $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'}}) {
- if (!defined $self->{'assign'}->{$key}) {
- $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 = $self->get_default_component_name();
- }
-
- my($vc) = $self->{'valid_components'};
- if (defined $$vc{$comp}) {
- if (!$self->parse_components($ih, $comp, $name)) {
- $errorString = "ERROR: Unable to process $comp";
- $status = 0;
- }
- }
- else {
- if ($comp eq 'verbatim') {
- my($type, $loc) = split(/\s*,\s*/, $name);
- if (!$self->parse_verbatim($ih, $comp, $type, $loc)) {
- $errorString = "ERROR: Unable to process $comp";
- $status = 0;
- }
- }
- elsif ($comp eq 'specific') {
- my(@types) = split(/\s*,\s*/, $name);
- ($status, $errorString) = $self->parse_scope(
- $ih, $values[1], \@types, \%validNames);
- }
- elsif ($comp eq 'define_custom') {
- ($status, $errorString) = $self->parse_define_custom($ih, $name);
- }
- else {
- $errorString = "ERROR: Invalid component name: $comp";
- $status = 0;
- }
- }
- }
- elsif ($values[0] eq 'feature') {
- $self->{'feature_defined'} = 1;
- $self->process_feature($ih, $values[1]);
- if ($self->{'feature_defined'}) {
- $errorString = "ERROR: Did not find the end of the feature";
- $status = 0;
- }
- }
- else {
- $errorString = "ERROR: Unrecognized line: $line";
- $status = 0;
- }
- }
- elsif ($status == -1) {
- $status = 0;
- }
-
- return $status, $errorString;
-}
-
-
-sub parse_scoped_assignment {
- my($self) = shift;
- my($tag) = shift;
- my($type) = shift;
- my($name) = shift;
- my($value) = shift;
- my($flags) = shift;
- my($order) = shift;
- my($over) = {};
- my($status) = 0;
-
- if (defined $self->{'matching_assignments'}->{$tag}) {
- foreach my $possible (@{$self->{'matching_assignments'}->{$tag}}) {
- if ($possible eq $name) {
- $status = 1;
- last;
- }
- }
- }
-
- if ($status) {
- if (defined $self->{'flag_overrides'}->{$tag}) {
- $over = $self->{'flag_overrides'}->{$tag};
- }
- else {
- $self->{'flag_overrides'}->{$tag} = $over;
- }
-
- if ($type eq 'assignment') {
- $self->process_assignment($name, $value, $flags);
- }
- elsif ($type eq 'assign_add') {
- ## If there is no value in $$flags, then we need to get
- ## the outer scope value and put it in there.
- if (!defined $self->get_assignment($name, $flags)) {
- my($outer) = $self->get_assignment($name);
- $self->process_assignment($name, $outer, $flags);
- }
- $self->process_assignment_add($name, $value, $flags, $order);
- }
- elsif ($type eq 'assign_sub') {
- ## If there is no value in $$flags, then we need to get
- ## the outer scope value and put it in there.
- if (!defined $self->get_assignment($name, $flags)) {
- my($outer) = $self->get_assignment($name);
- $self->process_assignment($name, $outer, $flags);
- }
- $self->process_assignment_sub($name, $value, $flags);
- }
- }
- return $status;
-}
-
-
-sub parse_components {
- my($self) = shift;
- my($fh) = shift;
- my($tag) = shift;
- my($name) = shift;
- my($current) = $self->get_default_element_name();
- my($status) = 1;
- my($names) = {};
- my($comps) = {};
- my($set) = 0;
- my(%flags) = ();
- my($custom) = defined $self->{'generated_exts'}->{$tag};
- my($grtag) = $grouped_key . $tag;
-
- if ($custom) {
- ## For the custom scoped assignments, we want to put a copy of
- ## the original custom defined values in our flags associative array.
- foreach my $key (keys %custom) {
- if (defined $self->{'generated_exts'}->{$tag}->{$key}) {
- $flags{$key} = $self->{'generated_exts'}->{$tag}->{$key};
- }
- }
- }
-
- 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} = [];
- }
-
- foreach my $special (@specialComponents) {
- if ($special eq $tag) {
- $self->{'special_supplied'}->{$tag} = 1;
- last;
- }
- }
-
- while($_ = $fh->getline()) {
- 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 = $1;
- $set = 1;
- if (!defined $$comps{$current}) {
- $$comps{$current} = [];
- $self->process_assignment_add($grtag, $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(@values) = ();
- ## If this returns true, then we've found an assignment
- if ($self->parse_assignment($line, \@values)) {
- $status = $self->parse_scoped_assignment($tag, @values,
- \%flags, $custom);
- if (!$status) {
- last;
- }
- }
- else {
- my($over) = $self->{'flag_overrides'}->{$tag};
- if (defined $over) {
- $$over{$line} = \%flags;
- }
- push(@{$$comps{$current}}, $line);
- }
- }
- else {
- $status = 0;
- last;
- }
- }
-
- return $status;
-}
-
-
-sub parse_verbatim {
- my($self) = shift;
- my($fh) = shift;
- my($tag) = shift;
- my($type) = shift;
- my($loc) = shift;
-
- ## All types are lowercase
- $type = lc($type);
-
- if (!defined $self->{'verbatim'}->{$type}) {
- $self->{'verbatim'}->{$type} = {};
- }
- $self->{'verbatim'}->{$type}->{$loc} = [];
- my($array) = $self->{'verbatim'}->{$type}->{$loc};
-
- while($_ = $fh->getline()) {
- my($line) = $self->strip_line($_);
-
- if ($line =~ /^}/) {
- ## This is not an error,
- ## this is the end of the verbatim
- last;
- }
- else {
- push(@$array, $line);
- }
- }
-
- return 1;
-}
-
-
-sub process_feature {
- my($self) = shift;
- my($fh) = shift;
- my($names) = shift;
- my($status) = 1;
- my($error) = '';
-
- my($requires) = '';
- my($avoids) = '';
- foreach my $name (@$names) {
- if ($name =~ /^!\s*(.*)$/) {
- if ($avoids ne '') {
- $avoids .= ' ';
- }
- $avoids .= $1;
- }
- else {
- if ($requires ne '') {
- $requires .= ' ';
- }
- $requires .= $name;
- }
- }
-
- if ($self->check_features($requires, $avoids)) {
- $self->{'feature_defined'} = 0;
- $self->{$self->{'type_check'}} = 1;
- }
- else {
- my($curly) = 1;
- while($_ = $fh->getline()) {
- my($line) = $self->strip_line($_);
-
- ## This is a very simplistic way of finding the end of
- ## the feature definition. It will work as long as no spurious
- ## open curly braces are counted.
- if ($line =~ /{$/) {
- ++$curly;
- }
- elsif ($line =~ /^}$/) {
- --$curly;
- }
- if ($curly == 0) {
- $self->{'feature_defined'} = 0;
- last;
- }
- }
- }
-
- return $status, $error;
-}
-
-
-sub process_type_specific_assignments {
- my($self) = shift;
- my($tsa) = $self->{'type_specific_assign'}->{$self->{'pctype'}};
-
- if (defined $tsa) {
- foreach my $key (keys %$tsa) {
- $self->process_assignment_add($key, $$tsa{$key});
- }
- }
-}
-
-
-sub process_array_assignment {
- my($self) = shift;
- my($aref) = shift;
- my($type) = shift;
- my($array) = shift;
-
- if (!defined $$aref || $type eq 'assignment') {
- if ($type ne 'assign_sub') {
- $$aref = $array;
- }
- }
- else {
- if ($type eq 'assign_add') {
- push(@{$$aref}, @$array);
- }
- elsif ($type eq 'assign_sub') {
- my($count) = scalar(@{$$aref});
- for(my $i = 0; $i < $count; ++$i) {
- foreach my $val (@$array) {
- if ($$aref->[$i] eq $val) {
- splice(@{$$aref}, $i, 1);
- --$i;
- --$count;
- last;
- }
- }
- }
- }
- }
-}
-
-
-sub parse_define_custom {
- my($self) = shift;
- my($fh) = shift;
- my($tag) = shift;
- my($status) = 0;
- my($errorString) = "ERROR: Unable to process $tag";
- my(%flags) = ();
-
- ## Make the tag something _files
- $tag = lc($tag) . '_files';
-
- if (defined $self->{'valid_components'}->{$tag}) {
- $errorString = "ERROR: $tag has already been defined";
- }
- else {
- ## Update the custom_types assignment
- $self->process_assignment_add('custom_types', $tag);
-
- if (!defined $self->{'matching_assignments'}->{$tag}) {
- my(@keys) = keys %custom;
- $self->{'matching_assignments'}->{$tag} = \@keys;
- }
-
- while($_ = $fh->getline()) {
- my($line) = $self->strip_line($_);
-
- if ($line eq '') {
- }
- elsif ($line =~ /^}/) {
- $status = 1;
- $errorString = '';
- if (!defined $self->{'generated_exts'}->{$tag}->{'pre_filename'}) {
- $self->{'generated_exts'}->{$tag}->{'pre_filename'} = [ '' ];
- }
- if (!defined $self->{'generated_exts'}->{$tag}->{'pre_extension'}) {
- $self->{'generated_exts'}->{$tag}->{'pre_extension'} = [ '' ];
- }
- if (!defined $self->{'generated_exts'}->{$tag}->{'automatic'}) {
- $self->{'generated_exts'}->{$tag}->{'automatic'} = 1;
- }
- last;
- }
- else {
- my(@values) = ();
- ## If this returns true, then we've found an assignment
- if ($self->parse_assignment($line, \@values)) {
- my($type) = $values[0];
- my($name) = $values[1];
- my($value) = $values[2];
- if (defined $customDefined{$name}) {
- if ($customDefined{$name} == -1) {
- $value = $self->escape_regex_special($value);
- my(@array) = split(/\s*,\s*/, $value);
- $self->process_array_assignment(
- \$self->{'valid_components'}->{$tag}, $type, \@array);
- }
- else {
- if (!defined $self->{'generated_exts'}->{$tag}) {
- $self->{'generated_exts'}->{$tag} = {};
- }
- ## First try to convert the value into a relative path
- $value = $self->relative($value);
-
- ## If that didn't work, try to convert it to the
- ## right environment variable form.
- if ($value =~ /\$\(.*\)/) {
- my($envstart, $envend) = $self->get_env_accessor();
- if (defined $envstart) {
- if (!defined $envend) {
- $envend = '';
- }
- $value =~ s/\$\(([^\)]+)\)/$envstart$1$envend/g;
- }
- }
- if ($customDefined{$name} == 1) {
- if ($type eq 'assignment') {
- $self->process_assignment(
- $name, $value,
- $self->{'generated_exts'}->{$tag});
- }
- elsif ($type eq 'assign_add') {
- $self->process_assignment_add(
- $name, $value,
- $self->{'generated_exts'}->{$tag});
- }
- elsif ($type eq 'assign_sub') {
- $self->process_assignment_sub(
- $name, $value,
- $self->{'generated_exts'}->{$tag});
- }
- }
- else {
- ## Transform the name from something outputext to
- ## something files. We expect this to match the
- ## names of valid_assignments.
- $name =~ s/outputext/files/g;
-
- ## Get it ready for regular expressions
- $value = $self->escape_regex_special($value);
-
- ## Process the array assignment
- my(@array) = split(/\s*,\s*/, $value);
- $self->process_array_assignment(
- \$self->{'generated_exts'}->{$tag}->{$name},
- $type, \@array);
- }
- }
- }
- else {
- $status = 0;
- $errorString = "ERROR: Invalid assignment name: $name";
- last;
- }
- }
- }
- }
- }
-
- return $status, $errorString;
-}
-
-
-sub handle_scoped_end {
- my($self) = shift;
- my($types) = shift;
- my($flags) = shift;
-
- foreach my $type (@$types) {
- if (!defined $self->{'type_specific_assign'}->{$type}) {
- $self->{'type_specific_assign'}->{$type} = {};
- }
- foreach my $key (keys %$flags) {
- $self->{'type_specific_assign'}->{$type}->{$key} = $$flags{$key};
- }
- }
-}
-
-
-sub process_duplicate_modification {
- my($self) = shift;
- my($name) = shift;
- my($assign) = shift;
-
- ## If we are modifying the libs, libpaths or includes assignment with
- ## either addition or subtraction, we are going to
- ## perform a little fix on the value to avoid multiple
- ## libraries and to try to insure the correct linking order
- if ($name eq 'libs' || $name eq 'libpaths' || $name eq 'includes') {
- my($nval) = $self->get_assignment($name, $assign);
- if (defined $nval) {
- my($parts) = $self->create_array($nval);
- my(%seen) = ();
- my($value) = '';
- foreach my $part (reverse @$parts) {
- if (!defined $seen{$part}) {
- $value = "$part $value";
- $seen{$part} = 1;
- }
- }
- $self->process_assignment($name, $value, $assign);
- }
- }
-}
-
-
-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($self->get_include_path());
- ($status, $errorString) = $self->{$tag}->read_file($file);
- }
- else {
- if ($override) {
- $status = 0;
- $errorString = 'Unable to locate template input file.';
- }
- }
- }
-
- return $status, $errorString;
-}
-
-
-sub already_added {
- my($self) = shift;
- my($array) = shift;
- my($name) = shift;
-
- foreach my $file (@$array) {
- if ($file eq $name) {
- return 1;
- }
- }
- return 0;
-}
-
-
-sub add_generated_files {
- my($self) = shift;
- my($gentype) = shift;
- my($tag) = shift;
- my($arr) = shift;
- my($names) = $self->{$tag};
- my($wanted) = $self->{'valid_components'}->{$gentype}->[0];
-
- foreach my $name (keys %$names) {
- my($comps) = $$names{$name};
- foreach my $key (keys %$comps) {
- my(@added) = ();
- my($array) = $$comps{$key};
- foreach my $i (@$arr) {
- my($file) = $i;
- $file =~ s/$wanted$//;
- foreach my $pf (@{$self->{'generated_exts'}->{$gentype}->{'pre_filename'}}) {
- foreach my $pe (@{$self->{'generated_exts'}->{$gentype}->{'pre_extension'}}) {
- $self->list_generated_file($gentype, $tag, \@added, "$pf$file$pe");
- }
- }
- }
- unshift(@$array, @added);
- }
- }
-}
-
-
-sub generate_default_target_names {
- my($self) = 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 it's neither an exe or library target, we will search
- ## through the source files for a main()
- my(@sources) = $self->get_component_list('source_files');
- if (!$self->lib_target()) {
- my($fh) = new FileHandle();
- my($exename) = undef;
- foreach my $file (@sources) {
- if (open($fh, $file)) {
- while($_ = $fh->getline()) {
- ## Remove c++ comments (ignore c style comments for now)
- $_ =~ s/\/\/.*//;
-
- ## Check for main
- if (/(main|ACE_MAIN|ACE_WMAIN|ACE_TMAIN)\s*\(/) {
- ## If we found a main, set the exename to the basename
- ## of the cpp file with the extension removed
- $exename = basename($file);
- $exename =~ s/\.[^\.]+$//;
- last;
- }
- }
- close($fh);
- }
-
- ## Set the exename assignment
- if (defined $exename) {
- $self->process_assignment('exename', $exename);
- last;
- }
- }
-
- ## If we still don't have a project type, then we will
- ## default to a library if there are source files
- if (!$self->exe_target() && $#sources >= 0) {
- my($base) = $self->get_assignment('project_name');
- $self->process_assignment('sharedname', $base);
- $self->process_assignment('staticname', $base);
- }
- }
- }
-}
-
-
-sub generate_default_pch_filenames {
- my($self) = shift;
- my($files) = shift;
- my($pname) = $self->escape_regex_special(
- $self->get_assignment('project_name'));
-
- if (!defined $self->get_assignment('pch_header')) {
- my($count) = 0;
- my($matching) = undef;
- foreach my $file (@$files) {
- foreach my $ext (@{$self->{'valid_components'}->{'header_files'}}) {
- if ($file =~ /(.*_pch$ext)$/) {
- $self->process_assignment('pch_header', $1);
- ++$count;
- if ($file =~ /$pname/) {
- $matching = $file;
- }
- last;
- }
- }
- }
- if ($count > 1 && defined $matching) {
- $self->process_assignment('pch_header', $matching);
- }
- }
-
- if (!defined $self->get_assignment('pch_source')) {
- my($count) = 0;
- my($matching) = undef;
- foreach my $file (@$files) {
- foreach my $ext (@{$self->{'valid_components'}->{'source_files'}}) {
- if ($file =~ /(.*_pch$ext)$/) {
- $self->process_assignment('pch_source', $1);
- ++$count;
- if ($file =~ /$pname/) {
- $matching = $file;
- }
- last;
- }
- }
- }
- if ($count > 1 && defined $matching) {
- $self->process_assignment('pch_source', $matching);
- }
- }
-}
-
-
-sub fix_pch_filenames {
- my($self) = shift;
- foreach my $type ('pch_header', 'pch_source') {
- my($pch) = $self->get_assignment($type);
- if (defined $pch && $pch eq '') {
- $self->process_assignment($type, undef);
- }
- }
-}
-
-
-sub remove_extra_pch_listings {
- my($self) = shift;
- my(@pchs) = ('pch_header', 'pch_source');
- my(@tags) = ('header_files', 'source_files');
-
- for(my $j = 0; $j <= $#pchs; ++$j) {
- my($pch) = $self->get_assignment($pchs[$j]);
-
- if (defined $pch) {
- ## If we are converting slashes, then we need to
- ## convert the pch file back to forward slashes
- if ($self->{'convert_slashes'}) {
- $pch =~ s/\\/\//g;
- }
-
- ## Find out which files are duplicated
- my($names) = $self->{$tags[$j]};
- foreach my $name (keys %$names) {
- my($comps) = $$names{$name};
- foreach my $key (keys %$comps) {
- my($array) = $$comps{$key};
- my($count) = scalar(@$array);
- for(my $i = 0; $i < $count; ++$i) {
- if ($pch eq $$array[$i]) {
- splice(@$array, $i, 1);
- --$count;
- }
- }
- }
- }
- }
- }
-}
-
-
-sub is_special_tag {
- my($self) = shift;
- my($tag) = shift;
-
- foreach my $t (@specialComponents) {
- if ($tag eq $t) {
- return 1;
- }
- }
-
- return 0;
-}
-
-
-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) {
- if (!$self->already_added($array, $file)) {
- push(@$array, $file);
- }
- }
- last;
- }
- }
- }
-
- ## Now deal with the saved files
- if (defined $saved[0]) {
- if ($#saved == 0) {
- ## Theres only one rc file, take it
- push(@$array, $saved[0]);
- }
- else {
- my($unescaped) = $self->transform_file_name(
- $self->get_assignment('project_name'));
- my($pjname) = $self->escape_regex_special($unescaped);
- foreach my $save (@saved) {
- my($file) = $self->escape_regex_special($save);
- if ($unescaped =~ /$file/ || $save =~ /$pjname/) {
- if (!$self->already_added($array, $save)) {
- push(@$array, $save);
- }
- }
- }
- }
- }
-}
-
-
-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 {
- if (!$self->already_added(\@built, $file)) {
- push(@built, $file);
- }
- }
- }
- $$comps{$comp} = \@built;
- }
- }
- }
- }
- else {
- ## Generate default values for undefined tags
- my($defcomp) = $self->get_default_element_name();
- my($names) = {};
- $self->{$tag} = $names;
- my($comps) = {};
- $$names{$self->get_default_component_name()} = $comps;
- $$comps{$defcomp} = [];
- my($array) = $$comps{$defcomp};
-
- if (!$self->is_special_tag($tag)) {
- $self->sift_files($files, $exts, $pchh, $pchc, $tag, $array);
- if (defined $self->{'generated_exts'}->{$tag}) {
- if (defined $$array[0]) {
- $self->{'defaulted'}->{$tag} = 1;
- }
- }
- elsif ($tag eq 'source_files') {
- foreach my $gentype (keys %{$self->{'generated_exts'}}) {
- ## If we are auto-generating the source_files, then
- ## we need to make sure that any generated source
- ## files that are added are put at the front of the list.
- my(@front) = ();
- my(@copy) = @$array;
- my(@exts) = $self->generated_extensions($gentype, $tag);
-
- $self->{'defaulted'}->{$tag} = 1;
- @$array = ();
- foreach my $file (@copy) {
- my($found) = 0;
- foreach my $ext (@exts) {
- if ($file =~ /$ext$/) {
- ## No need to check for previously added files
- ## here since there are none.
- push(@front, $file);
- $found = 1;
- last;
- }
- }
- if (!$found) {
- ## No need to check for previously added files
- ## here since there are none.
- push(@$array, $file);
- }
- }
-
- if (defined $front[0]) {
- unshift(@$array, @front);
- }
- }
- }
- }
- }
- }
- }
-}
-
-
-sub remove_duplicated_files {
- my($self) = shift;
- my($dest) = shift;
- my($source) = shift;
- my($names) = $self->{$dest};
- my(@slist) = $self->get_component_list($source);
- my(%shash) = ();
-
- ## Convert the array into keys for a hash table
- @shash{@slist} = ();
-
- ## Find out which source files are listed
- foreach my $name (keys %$names) {
- my($comps) = $$names{$name};
- foreach my $key (keys %$comps) {
- my($array) = $$comps{$key};
- my($count) = scalar(@$array);
- for(my $i = 0; $i < $count; ++$i) {
- ## Is the source file in the component array?
- if (exists $shash{$$array[$i]}) {
- ## Remove the element and fix the index and count
- splice(@$array, $i, 1);
- --$count;
- --$i;
- }
- }
- }
- }
-}
-
-
-sub generated_extensions {
- my($self) = shift;
- my($name) = shift;
- my($tag) = shift;
- my(@exts) = ();
- my($gen) = $self->{'generated_exts'}->{$name};
-
- if (defined $gen->{$tag}) {
- foreach my $pe (@{$gen->{'pre_extension'}}) {
- foreach my $ext (@{$gen->{$tag}}) {
- push(@exts, "$pe$ext");
- }
- }
- }
- return @exts;
-}
-
-
-sub generated_source_listed {
- my($self) = shift;
- my($gent) = shift;
- my($tag) = shift;
- my($arr) = shift;
- my($names) = $self->{$tag};
- my(@gen) = $self->generated_extensions($gent, $tag);
-
- ## 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 (@$arr) {
- my($ifile) = $self->escape_regex_special($i);
- if ($val =~ /$ifile$ext$/) {
- return 1;
- }
- }
- }
- }
- }
- }
-
- return 0;
-}
-
-
-sub list_default_generated {
- my($self) = shift;
- my($gentype) = shift;
- my($tags) = shift;
-
- if ($self->{'defaulted'}->{$gentype} &&
- $self->{'generated_exts'}->{$gentype}->{'automatic'}) {
- ## After all source and headers have been defaulted, see if we
- ## need to add the generated .h, .i and .cpp files
- if (defined $self->{$gentype}) {
- ## Build up the list of files
- my(@arr) = ();
- my($wanted) = $self->{'valid_components'}->{$gentype}->[0];
- my($names) = $self->{$gentype};
- 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/$wanted$//;
- push(@arr, $f);
- }
- }
- }
-
- foreach my $type (@$tags) {
- if (!$self->generated_source_listed($gentype, $type, \@arr)) {
- $self->add_generated_files($gentype, $type, \@arr);
- }
- }
- }
- }
-}
-
-
-sub list_generated_file {
- my($self) = shift;
- my($gentype) = shift;
- my($tag) = shift;
- my($array) = shift;
- my($file) = shift;
-
- if (defined $self->{'generated_exts'}->{$gentype}->{$tag}) {
- my(@gen) = $self->get_component_list($gentype);
- my(@genexts) = $self->generated_extensions($gentype, $tag);
-
- $file = $self->escape_regex_special($file);
-
- foreach my $gen (@gen) {
- ## If we are converting slashes, then we need to
- ## convert the component back to forward slashes
- if ($self->{'convert_slashes'}) {
- $gen =~ s/\\/\//g;
- }
-
- ## Remove the extension
- my($start) = $gen;
- foreach my $ext (@{$self->{'valid_components'}->{$gentype}}) {
- $gen =~ s/$ext$//;
- if ($gen ne $start) {
- last;
- }
- }
-
- ## See if we need to add the file
- foreach my $pf (@{$self->{'generated_exts'}->{$gentype}->{'pre_filename'}}) {
- foreach my $genext (@genexts) {
- if ("$pf$gen$genext" =~ /$file(.*)?$/) {
- my($created) = "$file$1";
- $created =~ s/\\//g;
- if (!$self->already_added($array, $created)) {
- push(@$array, $created);
- }
- last;
- }
- }
- }
- }
- }
-}
-
-
-sub add_corresponding_component_files {
- my($self) = shift;
- my($ftags) = shift;
- my($tag) = shift;
- my(@all) = ();
-
- foreach my $filetag (@$ftags) {
- my($names) = $self->{$filetag};
- foreach my $name (keys %$names) {
- my($comps) = $$names{$name};
- foreach my $comp (keys %$comps) {
- foreach my $sfile (@{$$comps{$comp}}) {
- my($scopy) = $sfile;
- $scopy =~ s/\.[^\.]+$//;
- push(@all, $scopy);
- }
- }
- }
- }
-
- my(@exts) = ();
- my($names) = $self->{$tag};
-
- foreach my $ext (@{$self->{'valid_components'}->{$tag}}) {
- my($ecpy) = $ext;
- $ecpy =~ s/\\//g;
- push(@exts, $ecpy);
- }
-
- foreach my $name (keys %$names) {
- my($comps) = $$names{$name};
- foreach my $comp (keys %$comps) {
- my($array) = $$comps{$comp};
- foreach my $sfile (@all) {
- my($found) = 0;
- my(%scfiles) = ();
- foreach my $ext (@exts) {
- $scfiles{"$sfile$ext"} = 1;
- }
- foreach my $file (@$array) {
- if (defined $scfiles{$file}) {
- $found = 1;
- last;
- }
- }
-
- if (!$found) {
- foreach my $ext (@exts) {
- my($built) = "$sfile$ext";
- if (-r $built) {
- push(@$array, $built);
- $found = 1;
- last;
- }
- }
-
- if (!$found) {
- foreach my $gentype (keys %{$self->{'generated_exts'}}) {
- $self->list_generated_file($gentype, $tag, $array, $sfile);
- }
- }
- }
- }
- }
- }
-}
-
-
-sub get_default_project_name {
- my($self) = shift;
- my($name) = $self->get_current_input();
-
- if ($name eq '') {
- $name = $self->transform_file_name($self->base_directory());
- }
- else {
- ## Since files on UNIX can have back slashes, we transform them
- ## into underscores.
- $name =~ s/\\/_/g;
-
- ## Convert then name to a usable name
- $name = $self->transform_file_name($name);
-
- ## Take off the extension
- $name =~ s/\.[^\.]+$//;
- }
-
- return $name;
-}
-
-
-sub generate_defaults {
- my($self) = shift;
-
- ## Generate default project name
- if (!defined $self->get_assignment('project_name')) {
- $self->process_assignment('project_name',
- $self->get_default_project_name());
- }
-
- ## Generate the default pch file names (if needed)
- my(@files) = $self->generate_default_file_list();
- $self->generate_default_pch_filenames(\@files);
-
- ## If the pch file names are empty strings then we need to fix that
- $self->fix_pch_filenames();
-
- ## Generate default components, but @specialComponents
- ## are skipped in the initial default components generation
- $self->generate_default_components(\@files);
-
- ## Remove source files that are also listed in the template files
- ## If we do not do this, then generated projects can be invalid.
- $self->remove_duplicated_files('source_files', 'template_files');
-
- ## If pch files are listed in header_files or source_files more than
- ## once, we need to remove the extras
- $self->remove_extra_pch_listings();
-
- ## Generate the default generated list of source files
- ## only if we defaulted the generated file list
- foreach my $gentype (keys %{$self->{'generated_exts'}}) {
- $self->list_default_generated($gentype, ['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_corresponding_component_files(['source_files',
- 'template_files'], $tag);
- }
-
- ## Now, if the @specialComponents are still empty
- ## then take any file that matches the components extension
- foreach my $tag (@specialComponents) {
- if (!$self->{'special_supplied'}->{$tag}) {
- 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->{'defaulted'}->{'source_files'}) {
- $self->generate_default_components(\@files, $tag);
- }
- }
- }
- }
- }
- }
-
- ## Generate default target names after all source files are added
- $self->generate_default_target_names();
-}
-
-
-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_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] = $self->slash_to_backslash($list[$i]);
- }
- }
-
- if ($self->{'sort_files'}) {
- @list = sort { $self->file_sorter($a, $b) } @list;
- }
-
- return @list;
-}
-
-
-sub check_custom_output {
- my($self) = shift;
- my($based) = shift;
- my($pf) = shift;
- my($cinput) = shift;
- my($type) = shift;
- my($comps) = shift;
- my(@outputs) = ();
- my($gen) = $self->{'generated_exts'}->{$based};
-
- if (defined $gen->{$type}) {
- foreach my $pe (@{$gen->{'pre_extension'}}) {
- foreach my $ext (@{$gen->{$type}}) {
- my($ge) = "$pe$ext";
- $ge =~ s/\\//g;
- my($built) = "$pf$cinput$ge";
- if (@$comps == 0) {
- push(@outputs, $built);
- last;
- }
- else {
- my($base) = $built;
- if ($self->{'convert_slashes'}) {
- $base =~ s/\\/\//g;
- }
- my($re) = $self->escape_regex_special(basename($base));
- foreach my $c (@$comps) {
- ## We only match if the built file name matches from
- ## beginning to end or from a slash to the end.
- if ($c =~ /^$re$/ || $c =~ /[\/\\]$re$/) {
- push(@outputs, $built);
- last;
- }
- }
- }
- }
- }
- }
-
- return @outputs;
-}
-
-
-sub get_special_value {
- my($self) = shift;
- my($type) = shift;
- my($cmd) = shift;
- my($based) = shift;
-
- if ($type =~ /^custom_type/) {
- return $self->get_custom_value($cmd, $based);
- }
- elsif ($type =~ /^grouped_/) {
- return $self->get_grouped_value($type, $cmd, $based);
- }
-
- return undef;
-}
-
-
-sub get_grouped_value {
- my($self) = shift;
- my($type) = shift;
- my($cmd) = shift;
- my($based) = shift;
- my($value) = undef;
-
- ## Make it all lowercase
- $type = lc($type);
-
- ## Remove the grouped_ part
- $type =~ s/^$grouped_key//;
-
- ## Add the s if it isn't there
- if ($type !~ /s$/) {
- $type .= 's';
- }
-
- my($names) = $self->{$type};
- if ($cmd eq 'files') {
- foreach my $name (keys %$names) {
- my($comps) = $$names{$name};
- foreach my $comp (keys %$comps) {
- if ($comp eq $based) {
- $value = $$comps{$comp};
- last;
- }
- }
- }
- }
- elsif ($cmd eq 'component_name') {
- ## If there is more than one name, then we will need
- ## to deal with that at a later time.
- foreach my $name (keys %$names) {
- $value = $name;
- }
- }
-
- return $value;
-}
-
-
-sub get_custom_value {
- my($self) = shift;
- my($cmd) = shift;
- my($based) = shift;
- my($value) = undef;
-
- if ($cmd eq 'input_files') {
- my($generic) = 'generic_files'; ## Matches with generic_outputext
- my(@array) = $self->get_component_list($based);
- $value = \@array;
-
- $self->{'custom_output_files'} = {};
- my(%vcomps) = ();
- foreach my $vc (keys %{$self->{'valid_components'}}, $generic) {
- my(@comps) = $self->get_component_list($vc);
- $vcomps{$vc} = \@comps;
- }
- foreach my $input (@array) {
- my(@outputs) = ();
- my($cinput) = $input;
- $cinput =~ s/\.[^\.]+$//;
- foreach my $pf (@{$self->{'generated_exts'}->{$based}->{'pre_filename'}}) {
- foreach my $vc (keys %{$self->{'valid_components'}}, $generic) {
- push(@outputs,
- $self->check_custom_output($based, $pf,
- $cinput, $vc, $vcomps{$vc}));
- }
- }
- $self->{'custom_output_files'}->{$input} = \@outputs;
- }
- }
- elsif ($cmd eq 'output_files') {
- # Generate output files based on $based
- if (defined $self->{'custom_output_files'}) {
- $value = $self->{'custom_output_files'}->{$based};
- }
- }
- elsif ($cmd eq 'inputexts') {
- my(@array) = @{$self->{'valid_components'}->{$based}};
- foreach my $val (@array) {
- $val =~ s/\\\.//g;
- }
- $value = \@array;
- }
- elsif (defined $custom{$cmd} ||
- (defined $customDefined{$cmd} && $customDefined{$cmd} == 1)) {
- $value = $self->get_assignment($cmd,
- $self->{'generated_exts'}->{$based});
- }
-
- return $value;
-}
-
-
-sub check_features {
- my($self) = shift;
- my($requires) = shift;
- my($avoids) = shift;
- my($status) = 1;
-
- if (defined $requires) {
- foreach my $require (split(/\s+/, $requires)) {
- my($fval) = $self->{'feature_parser'}->get_value($require);
-
- ## By default, if the feature is not listed, then it is enabled.
- if (defined $fval && !$fval) {
- $status = 0;
- last;
- }
- }
- }
-
- ## If it passes the requires, then check the avoids
- if ($status) {
- if (defined $avoids) {
- foreach my $avoid (split(/\s+/, $avoids)) {
- my($fval) = $self->{'feature_parser'}->get_value($avoid);
-
- ## By default, if the feature is not listed, then it is enabled.
- if (!defined $fval || $fval) {
- $status = 0;
- last;
- }
- }
- }
- }
-
- return $status;
-}
-
-
-sub need_to_write_project {
- my($self) = shift;
-
- foreach my $key ('source_files', keys %{$self->{'generated_exts'}}) {
- my($names) = $self->{$key};
- foreach my $name (keys %$names) {
- foreach my $key (keys %{$names->{$name}}) {
- if (defined $names->{$name}->{$key}->[0]) {
- return 1;
- }
- }
- }
- }
-
- return 0;
-}
-
-
-sub write_output_file {
- my($self) = shift;
- my($name) = shift;
- my($status) = 0;
- my($error) = '';
- 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) {
- ## 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 (defined $self->{'source_callback'}) {
- my($cb) = $self->{'source_callback'};
- my($pjname) = $self->get_assignment('project_name');
- my(@list) = $self->get_component_list('source_files');
- if (UNIVERSAL::isa($cb, 'ARRAY')) {
- my(@copy) = @$cb;
- my($s) = shift(@copy);
- &$s(@copy, $name, $pjname, @list);
- }
- elsif (UNIVERSAL::isa($cb, 'CODE')) {
- &$cb($name, $pjname, @list);
- }
- else {
- print "WARNING: Ignoring callback: $cb\n";
- }
- }
-
- if ($self->get_toplevel()) {
- my($fh) = new FileHandle();
- my($dir) = dirname($name);
-
- if ($dir ne '.') {
- mkpath($dir, 0, 0777);
- }
-
- ## First write the output to a temporary file
- my($tmp) = "MPC$>.$$";
- my($different) = 1;
- if (open($fh, ">$tmp")) {
- my($lines) = $tp->get_lines();
- foreach my $line (@$lines) {
- print $fh $line;
- }
- close($fh);
-
- if (-r $name &&
- -s $tmp == -s $name && compare($tmp, $name) == 0) {
- $different = 0;
- }
- }
- else {
- $error = "ERROR: Unable to open $tmp for output.";
- $status = 0;
- }
-
- if ($status) {
- ## If they are different, then rename the temporary file
- if ($different) {
- unlink($name);
- if (rename($tmp, $name)) {
- $self->add_file_written($name);
- }
- else {
- $error = "ERROR: Unable to open $name for output.";
- $status = 0;
- }
- }
- else {
- ## We will pretend that we wrote the file
- unlink($tmp);
- $self->add_file_written($name);
- }
- }
- }
- }
- }
- }
- 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($file_name) = $self->transform_file_name($self->project_file_name());
- my($progress) = $self->get_progress_callback();
-
- if (defined $progress) {
- &$progress();
- }
-
- if ($self->check_features($self->get_assignment('requires'),
- $self->get_assignment('avoids'))) {
- if ($self->need_to_write_project()) {
- ## Writing the non-static file so set it to 0
- if ($self->get_dynamic()) {
- $self->{'writing_type'} = 0;
- ($status, $error) = $self->write_output_file($file_name);
- }
-
- if ($status &&
- $self->get_static() && $self->separate_static_project()) {
- $file_name = $self->transform_file_name(
- $self->static_project_file_name());
-
- ## Writing the static file so set it to 1
- $self->{'writing_type'} = 1;
- ($status, $error) = $self->write_output_file($file_name);
- }
- }
- }
- else {
- if (defined $ENV{MPC_VERBOSE_FEATURES}) {
- print "WARNING: Skipping the " . $self->get_assignment('project_name') .
- " project due to the current features\n";
- }
- }
-
- return $status, $error;
-}
-
-
-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 set_source_listing_callback {
- my($self) = shift;
- my($cb) = shift;
- $self->{'source_callback'} = $cb;
-}
-
-
-sub reset_values {
- my($self) = shift;
- $self->{'project_info'} = [];
-}
-
-
-sub reset_generating_types {
- my($self) = shift;
- my(%reset) = ('matching_assignments' => \%ma,
- 'valid_components' => \%vc,
- 'generated_exts' => \%genext,
- 'exclude_components' => \%ec,
- );
-
- foreach my $r (keys %reset) {
- $self->{$r} = {};
- foreach my $key (keys %{$reset{$r}}) {
- $self->{$r}->{$key} = $reset{$r}->{$key};
- }
- }
-
- $self->{'custom_types'} = {};
-
- ## Allow subclasses to override the default extensions
- $self->set_component_extensions();
-}
-
-
-sub get_template_input {
- my($self) = shift;
-
- ## This follows along the same logic as read_template_input() by
- ## checking for exe target and then defaulting to a lib target
- if ($self->exe_target()) {
- if ($self->{'writing_type'} == 1) {
- return $self->{'lexe_template_input'};
- }
- else {
- return $self->{'dexe_template_input'};
- }
- }
-
- if ($self->{'writing_type'} == 1) {
- return $self->{'lib_template_input'};
- }
- else {
- return $self->{'dll_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;
-}
-
-
-sub relative {
- my($self) = shift;
- my($value) = shift;
- my($rel) = $self->get_relative();
- my(@keys) = keys %$rel;
-
- if (defined $value && defined $keys[0]) {
- if (UNIVERSAL::isa($value, 'ARRAY')) {
- my(@built) = ();
- foreach my $val (@$value) {
- push(@built, $self->relative($val));
- }
- $value = \@built;
- }
- elsif ($value =~ /\$/) {
- my($cwd) = $self->getcwd();
- my($start) = 0;
- my($fixed) = 0;
-
- if ($cwd =~ /[a-z]:[\/\\]/) {
- substr($cwd, 0, 1) = uc(substr($cwd, 0, 1));
- }
-
- while(substr($value, $start) =~ /(\$\(([^)]+)\))/) {
- my($whole) = $1;
- my($name) = $2;
- my($val) = $$rel{$name};
-
- if (defined $val) {
- if ($^O eq 'cygwin' && !$fixed &&
- $cwd !~ /[A-Za-z]:/ && $val =~ /[A-Za-z]:/) {
- my($cyg) = `cygpath -w $cwd`;
- if (defined $cyg) {
- $cyg =~ s/\\/\//g;
- chop($cwd = $cyg);
- $fixed = 1;
- }
- }
-
- ## Fix up the value for Windows switch the \\'s to /
- $val =~ s/\\/\//g;
-
- ## Lowercase everything if we are running on Windows
- my($icwd) = ($^O eq 'MSWin32' || $^O eq 'cygwin' ? lc($cwd) : $cwd);
- my($ival) = ($^O eq 'MSWin32' || $^O eq 'cygwin' ? lc($val) : $val);
- if (index($icwd, $ival) == 0) {
- my($count) = 0;
- my($current) = $icwd;
- substr($current, 0, length($ival)) = '';
- while($current =~ /^\\/) {
- $current =~ s/^\///;
- }
- my($length) = length($current);
- for(my $i = 0; $i < $length; ++$i) {
- if (substr($current, $i, 1) eq '/') {
- ++$count;
- }
- }
- $ival = '../' x $count;
- $ival =~ s/\/$//;
- if ($self->convert_slashes()) {
- $ival = $self->slash_to_backslash($ival);
- }
- substr($value, $start) =~ s/\$\([^)]+\)/$ival/;
- $whole = $ival;
- }
- }
- $start += length($whole);
- }
- }
- }
-
- return $value;
-}
-
-
-sub get_verbatim {
- my($self) = shift;
- my($marker) = shift;
- my($str) = undef;
- my($thash) = $self->{'verbatim'}->{$self->{'pctype'}};
-
- if (defined $thash) {
- if (defined $thash->{$marker}) {
- my($crlf) = $self->crlf();
- foreach my $line (@{$thash->{$marker}}) {
- if (!defined $str) {
- $str = '';
- }
- $str .= $self->process_special($line) . $crlf;
- }
- if (defined $str) {
- $str .= $crlf;
- }
- }
- }
- return $str;
-}
-
-
-sub generate_recursive_input_list {
- my($self) = shift;
- my($dir) = shift;
- return $self->extension_recursive_input_list($dir,
- $ProjectCreatorExtension);
-}
-
-
-sub get_default_element_name {
- #my($self) = shift;
- return 'FILES';
-}
-
-# ************************************************************
-# Virtual Methods To Be Overridden
-# ************************************************************
-
-sub translate_value {
- my($self) = shift;
- my($key) = shift;
- my($val) = shift;
-
- if ($key eq 'after' && $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 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_env_accessor {
- #my($self) = shift;
- return ();
-}
-
-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/modules/StringProcessor.pm b/modules/StringProcessor.pm
deleted file mode 100644
index 97a5ab96..00000000
--- a/modules/StringProcessor.pm
+++ /dev/null
@@ -1,110 +0,0 @@
-package StringProcessor;
-
-# ************************************************************
-# Description : Perform various algorithms on strings
-# Author : Chad Elliott
-# Create Date : 3/07/2003
-# ************************************************************
-
-# ************************************************************
-# Pragmas
-# ************************************************************
-
-use strict;
-
-# ************************************************************
-# Subroutine Section
-# ************************************************************
-
-sub new {
- my($class) = shift;
- my($self) = bless {
- }, $class;
- return $self;
-}
-
-
-sub extractType {
- my($self) = shift;
- my($name) = shift;
- my($type) = $name;
-
- if ($name =~ /(.*)(Project|Workspace)Creator/) {
- $type = $1;
- }
-
- return lc($type);
-}
-
-
-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 create_array {
- my($self) = shift;
- my($line) = shift;
- my(@array) = ();
- my($length) = length($line);
- my($prev) = 0;
- my($double) = 0;
- my($single) = 0;
-
- for(my $i = 0; $i <= $length; $i++) {
- my($ch) = substr($line, $i, 1);
- if (!$double && !$single && ($ch eq '' || $ch =~ /\s/)) {
- my($val) = substr($line, $prev, $i - $prev);
- $val =~ s/^\s+//;
- $val =~ s/\s+$//;
- if ($val =~ /^\"(.*)\"$/) {
- $val = $1;
- }
- elsif ($val =~ /^\'(.*)\'$/) {
- $val = $1;
- }
-
- ## Only add the value to the array if the string isn't empty
- if ($val ne '') {
- 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;
- }
- elsif ($ch eq "'") {
- $single ^= 1;
- }
- }
- return \@array;
-}
-
-
-1;
diff --git a/modules/TemplateInputReader.pm b/modules/TemplateInputReader.pm
deleted file mode 100644
index 3dbd7d4f..00000000
--- a/modules/TemplateInputReader.pm
+++ /dev/null
@@ -1,143 +0,0 @@
-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);
-
-# ************************************************************
-# Data Section
-# ************************************************************
-
-my($mpt) = 'mpt';
-
-# ************************************************************
-# Subroutine Section
-# ************************************************************
-
-sub new {
- my($class) = shift;
- my($inc) = shift;
- my($self) = Parser::new($class, $inc);
-
- $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($op) = $2;
- my($value) = $3;
-
- if (defined $value) {
- $value = $self->create_array($value);
- }
- else {
- $value = '';
- }
-
- if ($op eq '+=') {
- my($ref) = $$current[$self->{'cindex'}]->{$name};
- if (defined $ref) {
- if (UNIVERSAL::isa($ref, 'ARRAY')) {
- if (UNIVERSAL::isa($value, 'ARRAY')) {
- push(@$ref, @$value);
- }
- else {
- push(@$ref, $value);
- }
- }
- else {
- if (UNIVERSAL::isa($value, 'ARRAY')) {
- $$current[$self->{'cindex'}]->{$name} .= " @$value";
- }
- else {
- $$current[$self->{'cindex'}]->{$name} .= $value;
- }
- }
- }
- else {
- $$current[$self->{'cindex'}]->{$name} = $value;
- }
- }
- else {
- if (!$$current[$self->{'cindex'}]->{$name}) {
- $$current[$self->{'cindex'}]->{$name} = $value;
- }
- else {
- $status = 0;
- $errorString = "ERROR: Redifinition of '$name'";
- }
- }
- }
- elsif ($line =~ /^conditional_include\s+"([\w\s\-\+\/\\\.]+)"$/) {
- my($file) = $self->search_include_path("$1.$mpt");
- if (defined $file) {
- my($ol) = $self->get_line_number();
- ($status, $errorString) = $self->read_file($file);
- $self->set_line_number($ol);
- }
- }
- 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/modules/TemplateParser.pm b/modules/TemplateParser.pm
deleted file mode 100644
index 621d39fb..00000000
--- a/modules/TemplateParser.pm
+++ /dev/null
@@ -1,1010 +0,0 @@
-package TemplateParser;
-
-# ************************************************************
-# Description : Parses the template and fills in missing values
-# Author : Chad Elliott
-# Create Date : 5/17/2002
-# ************************************************************
-
-# ************************************************************
-# Pragmas
-# ************************************************************
-
-use strict;
-
-use Parser;
-
-use vars qw(@ISA);
-@ISA = qw(Parser);
-
-# ************************************************************
-# Data Section
-# ************************************************************
-
-my(%keywords) = ('if' => 1,
- 'else' => 1,
- 'endif' => 1,
- 'noextension' => 1,
- 'dirname' => 1,
- 'basename' => 1,
- 'basenoextension' => 1,
- 'foreach' => 1,
- 'forfirst' => 1,
- 'fornotfirst' => 1,
- 'fornotlast' => 1,
- 'forlast' => 1,
- 'endfor' => 1,
- 'comment' => 1,
- 'flag_overrides' => 1,
- 'marker' => 1,
- 'uc' => 1,
- 'lc' => 1,
- );
-
-# ************************************************************
-# Subroutine Section
-# ************************************************************
-
-sub new {
- my($class) = shift;
- my($prjc) = shift;
- my($self) = Parser::new($class);
-
- $self->{'prjc'} = $prjc;
- $self->{'ti'} = $prjc->get_template_input();
- $self->{'cslashes'} = $prjc->convert_slashes();
- $self->{'addtemp'} = $prjc->get_addtemp();
- $self->{'crlf'} = $prjc->crlf();
- $self->{'clen'} = length($self->{'crlf'});
- $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'}->{'name'} = [];
- $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;
-}
-
-
-## 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 adjust_value {
- my($self) = shift;
- my($name) = shift;
- my($value) = shift;
-
- ## Perform any additions, subtractions
- ## or overrides for the template values.
- my($addtemp) = $self->{'addtemp'};
- foreach my $at (keys %$addtemp) {
- if ($at eq $name) {
- my($val) = $$addtemp{$at};
- if ($$val[0] > 0) {
- if (UNIVERSAL::isa($value, 'ARRAY')) {
- $value = [ $$val[1], @$value ];
- }
- else {
- $value = "$$val[1] $value";
- }
- }
- elsif ($$val[0] < 0) {
- my($parts) = undef;
- if (UNIVERSAL::isa($value, 'ARRAY')) {
- my(@copy) = @$value;
- $parts = \@copy;
- }
- else {
- $parts = $self->create_array($value);
- }
-
- $value = '';
- foreach my $part (@$parts) {
- if ($part ne $$val[1] && $part ne '') {
- $value .= "$part ";
- }
- }
- $value =~ s/^\s+//;
- $value =~ s/\s+$//;
- }
- else {
- $value = $$val[1];
- }
- }
- }
-
- return $value;
-}
-
-
-sub set_current_values {
- my($self) = shift;
- my($name) = shift;
- my($set) = 0;
-
- ## 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 table in the current scope
- if (defined $self->{'ti'}) {
- my($counter) = $self->{'foreach'}->{'count'};
- if ($counter >= 0) {
- my($value) = $self->{'ti'}->get_value($name);
- if (defined $value && UNIVERSAL::isa($value, 'HASH')) {
- my(%copy) = ();
- foreach my $key (keys %$value) {
- $copy{$key} = $self->adjust_value($key, $$value{$key});
- }
- $self->{'foreach'}->{'temp_scope'}->[$counter] = \%copy;
- $set = 1;
- }
- }
- }
- return $set;
-}
-
-
-sub get_nested_value {
- my($self) = shift;
- my($name) = shift;
- my($value) = undef;
-
- if ($name =~ /^(.*)\->(\w+)/) {
- my($pre) = $1;
- my($post) = $2;
- my($base) = $self->get_value($pre);
- if (defined $base) {
- $value = $self->{'prjc'}->get_special_value($pre, $post, $base);
- }
- }
-
- 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) {
- $value = $self->{'foreach'}->{'temp_scope'}->[$counter]->{$name};
- --$counter;
- }
- $counter = $self->{'foreach'}->{'count'};
- }
-
- if (!defined $value) {
- ## Next, check for a template value
- if (defined $self->{'ti'}) {
- $value = $self->{'ti'}->get_value($name);
- if (defined $value) {
- $value = $self->adjust_value($name, $value);
- }
- }
-
- if (!defined $value) {
- ## Next, check the inner to outer foreach
- ## scopes for overriding values
- while(!defined $value && $counter >= 0) {
- $value = $self->{'foreach'}->{'scope'}->[$counter]->{$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};
- if (!defined $value) {
- ## Call back onto the project creator to allow
- ## it to fill in the value before defaulting to undef.
- $value = $self->{'prjc'}->fill_value($name);
- if (!defined $value && $name =~ /\->/) {
- $value = $self->get_nested_value($name);
- }
- }
- }
- }
- }
- }
-
- return $self->{'prjc'}->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) {
-# print "DEBUG: WARNING: $name defaulting to empty string\n";
- $value = '';
- }
- else {
-# print "DEBUG: WARNING: $name using default value of $value\n";
- $value = $self->adjust_value($name, $value);
- }
- $value = $self->{'prjc'}->relative($value);
- }
-
- return $value;
-}
-
-
-sub process_foreach {
- my($self) = shift;
- my($index) = $self->{'foreach'}->{'count'};
- my($text) = $self->{'foreach'}->{'text'}->[$index];
- my($status) = 1;
- my($errorString) = '';
- my(@values) = ();
- my($names) = $self->create_array($self->{'foreach'}->{'names'}->[$index]);
- my($name) = $self->{'foreach'}->{'name'}->[$index];
-
- 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;
- $name =~ s/s$//;
- }
- }
-
- ## Reset the text (it will be regenerated by calling parse_line
- $self->{'foreach'}->{'text'}->[$index] = '';
-
- if (defined $values[0]) {
- my($scope) = $self->{'foreach'}->{'scope'}->[$index];
-
- $$scope{'forlast'} = 0;
- $$scope{'fornotlast'} = 1;
- $$scope{'forfirst'} = 1;
- $$scope{'fornotfirst'} = 0;
-
- ## If the foreach values are mixed (HASH and SCALAR), then
- ## remove the SCALAR values.
- my($pset) = undef;
- for(my $i = 0; $i <= $#values; ++$i) {
- my($set) = $self->set_current_values($values[$i]);
- if (!defined $pset) {
- $pset |= $set;
- }
- else {
- if ($pset && !$set) {
- splice(@values, $i, 1);
- $i = 0;
- $pset = undef;
- }
- }
- }
-
- 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{'forcount'} = $i + 1;
-
- ## We don't use adjust_value here because these names
- ## are generated from a foreach and should not be adjusted.
- $$scope{$name} = $value;
-
- ## A tiny hack for VC7
- if ($name 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($end) = pop(@{$self->{'sstack'}});
- pop(@{$self->{'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 get_flag_overrides {
- my($self) = shift;
- my($name) = shift;
- my($type) = shift;
- my($value) = undef;
- my($file) = $self->get_value($name);
- my($prjc) = $self->{'prjc'};
- my($fo) = $prjc->{'flag_overrides'};
-
- if (defined $file) {
- ## Replace the custom_type key with the actual custom type
- if ($name =~ /^custom_type\->/) {
- my($ct) = $self->get_value('custom_type');
- if (defined $ct) {
- $name = $ct;
- }
- }
-
- foreach my $key (keys %$fo) {
- if ($key =~ /^$name/) {
- foreach my $of (keys %{$$fo{$key}}) {
- my($cv) = $of;
- if ($self->{'cslashes'}) {
- $cv = $prjc->slash_to_backslash($of);
- }
- if ($cv eq $file) {
- foreach my $ma (keys %{$prjc->{'matching_assignments'}}) {
- if ($ma eq $key) {
- foreach my $aname (@{$prjc->{'matching_assignments'}->{$ma}}) {
- if ($aname eq $type &&
- defined $$fo{$key}->{$of}->{$aname}) {
- $value = $$fo{$key}->{$of}->{$aname};
- last;
- }
- }
- last;
- }
- }
- last;
- }
- }
- last;
- }
- }
- }
-
- return $prjc->relative($value);
-}
-
-
-sub handle_if {
- my($self) = shift;
- my($val) = shift;
- my($name) = 'endif';
-
- push(@{$self->{'lstack'}}, $self->get_line_number() . " $val");
- if (!$self->{'if_skip'}) {
- my($true) = 1;
- push(@{$self->{'sstack'}}, $name);
- if ($val =~ /^!(.*)/) {
- $val = $1;
- $val =~ s/^\s+//;
- $true = 0;
- }
-
- if ($val =~ /flag_overrides\(([^\)]+),\s*([^\)]+)\)/) {
- $val = $self->get_flag_overrides($1, $2);
- }
- else {
- $val = $self->get_value($val)
- }
-
- if (defined $val) {
- if (UNIVERSAL::isa($val, 'ARRAY')) {
- my($empty) = 1;
- foreach my $v (@$val) {
- if ($v ne '') {
- $empty = 0;
- last;
- }
- }
- if ($empty) {
- $val = undef;
- }
- }
- elsif ($val eq '') {
- $val = undef;
- }
- }
-
- if (!defined $val) {
- $self->{'if_skip'} = $true;
- }
- else {
- $self->{'if_skip'} = !$true;
- }
- }
- else {
- push(@{$self->{'sstack'}}, "*$name");
- }
-}
-
-
-sub handle_else {
- my($self) = shift;
- my(@scopy) = @{$self->{'sstack'}};
-
- ## 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 'endif') {
- $self->{'if_skip'} ^= 1;
- }
-}
-
-
-sub handle_foreach {
- my($self) = shift;
- my($val) = shift;
- my($name) = 'endfor';
- my($status) = 1;
- my($errorString) = '';
-
- push(@{$self->{'lstack'}}, $self->get_line_number());
- if (!$self->{'if_skip'}) {
- my($vname) = undef;
- if ($val =~ /([^,]+),(.*)/) {
- $vname = $1;
- $val = $2;
- $vname =~ s/^\s+//;
- $vname =~ s/\s+$//;
- $val =~ s/^\s+//;
- $val =~ s/\s+$//;
-
- ## Due to the way flag_overrides works, we can't allow
- ## the user to name the foreach variable when dealing
- ## with custom types.
- if ($val =~ /^custom_type\->/ || $val eq 'custom_types') {
- $status = 0;
- $errorString = 'ERROR: The foreach variable can not be ' .
- 'named when dealing with custom types';
- }
- elsif ($val =~ /^grouped_.*_file\->/ || $val =~ /^grouped_.*files$/) {
- $status = 0;
- $errorString = 'ERROR: The foreach variable can not be ' .
- 'named when dealing with grouped files';
- }
- }
-
- push(@{$self->{'sstack'}}, $name);
- ++$self->{'foreach'}->{'count'};
-
- my($index) = $self->{'foreach'}->{'count'};
- $self->{'foreach'}->{'name'}->[$index] = $vname;
- $self->{'foreach'}->{'names'}->[$index] = $val;
- $self->{'foreach'}->{'text'}->[$index] = '';
- $self->{'foreach'}->{'scope'}->[$index] = {};
- }
- else {
- push(@{$self->{'sstack'}}, "*$name");
- }
-
- return $status, $errorString;
-}
-
-
-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->{'if_skip'}) {
- if ($self->get_value($name)) {
- $self->append_current($val);
- }
- }
-}
-
-
-sub handle_uc {
- my($self) = shift;
- my($name) = shift;
-
- if (!$self->{'if_skip'}) {
- my($val) = uc($self->get_value_with_default($name));
- $self->append_current($val);
- }
-}
-
-
-sub handle_lc {
- my($self) = shift;
- my($name) = shift;
-
- if (!$self->{'if_skip'}) {
- my($val) = lc($self->get_value_with_default($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);
- }
-}
-
-
-sub handle_flag_overrides {
- my($self) = shift;
- my($name) = shift;
- my($type) = '';
-
- ($name, $type) = split(/,\s*/, $name);
-
- if (!$self->{'if_skip'}) {
- my($value) = $self->get_flag_overrides($name, $type);
- if (defined $value) {
- $self->append_current($value);
- }
- }
-}
-
-
-sub handle_marker {
- my($self) = shift;
- my($name) = shift;
-
- if (!$self->{'if_skip'}) {
- my($value) = $self->{'prjc'}->get_verbatim($name);
- if (defined $value) {
- $self->append_current($value);
- }
- }
-}
-
-
-## 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($name) = undef;
- my($val) = undef;
-
- if ($line =~ /([^%\(]+)(\(([^%]+)\))?%>/) {
- $name = $1;
- $val = $3;
- }
-
- return lc($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+)(\(([^\)]+|\".*\"|flag_overrides\([^\)]+,\s*[^\)]+\))\)|\->\w+([\w\-\>]+)?)?%>/) {
- my($name, $val) = $self->split_name_value($line);
-
- $length += length($name);
- if (defined $val) {
- $length += length($val) + 2;
- }
-
- if (defined $keywords{$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') {
- ($status, $errorString) = $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 'flag_overrides') {
- $self->handle_flag_overrides($val);
- }
- elsif ($name eq 'marker') {
- $self->handle_marker($val);
- }
- elsif ($name eq 'uc') {
- $self->handle_uc($val);
- }
- elsif ($name eq 'lc') {
- $self->handle_lc($val);
- }
- 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, ['after']);
-
- ## VC7 Projects need to know the GUID.
- ## We need to save this value in our known 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;
-
- ## Does the line contain only a keyword?
- ## Checking for spaces allows nesting in the template.
- if ($line =~ /^\s*<%(.*)%>$/) {
- my($part) = $1;
- if ($part !~ /%>/) {
- $part =~ s/\(.*//;
- return (defined $keywords{$part} ? 1 : 0);
- }
- }
- return 0;
-}
-
-
-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($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 .= $self->{'crlf'};
- $length += $self->{'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 $self->{'crlf'} && $self->{'built'} ne '')) {
- push(@{$self->{'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->get_line_number();
- $errorString = "$input: line $linenumber:\n$errorString\n";
- }
-
- return $status, $errorString;
-}
-
-
-sub get_lines {
- my($self) = shift;
- return $self->{'lines'};
-}
-
-
-1;
diff --git a/modules/VA4ProjectCreator.pm b/modules/VA4ProjectCreator.pm
deleted file mode 100644
index 17b893f6..00000000
--- a/modules/VA4ProjectCreator.pm
+++ /dev/null
@@ -1,129 +0,0 @@
-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 'after' && $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/modules/VA4WorkspaceCreator.pm b/modules/VA4WorkspaceCreator.pm
deleted file mode 100644
index bc444485..00000000
--- a/modules/VA4WorkspaceCreator.pm
+++ /dev/null
@@ -1,77 +0,0 @@
-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_modified_workspace_name($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/modules/VC6ProjectCreator.pm b/modules/VC6ProjectCreator.pm
deleted file mode 100644
index fa0edd31..00000000
--- a/modules/VC6ProjectCreator.pm
+++ /dev/null
@@ -1,176 +0,0 @@
-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($sname) = '_Static';
-
-# ************************************************************
-# Subroutine Section
-# ************************************************************
-
-sub base_project_name {
- my($self) = shift;
- return $self->transform_file_name(
- $self->project_name() .
- ($self->get_writing_type() == 1 ? $sname : ''));
-}
-
-
-sub get_static_append {
- #my($self) = shift;
- return $sname;
-}
-
-
-sub translate_value {
- my($self) = shift;
- my($key) = shift;
- my($val) = shift;
-
- if ($key eq 'after' && $val ne '') {
- my($arr) = $self->create_array($val);
- $val = '';
-
- ## Only write dependencies for non-static projects
- ## and static exe projects
- my($wt) = $self->get_writing_type();
- if ($wt == 0 || $self->exe_target()) {
- foreach my $entry (@$arr) {
- $val .= "\"$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 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_env_accessor {
- #my($self) = shift;
- return ('%', '%');
-}
-
-
-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/modules/VC6WorkspaceCreator.pm b/modules/VC6WorkspaceCreator.pm
deleted file mode 100644
index 92ac7e88..00000000
--- a/modules/VC6WorkspaceCreator.pm
+++ /dev/null
@@ -1,117 +0,0 @@
-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_modified_workspace_name($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 allow_duplicates {
- my($self) = shift;
- return 0;
-}
-
-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($name) = $$pjs{$project}->[0];
- my($deps) = $self->get_validated_ordering($project);
-
- print $fh "###############################################################################$crlf" .
- $crlf .
- "Project: \"$name\"=" . $self->slash_to_backslash($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/modules/VC71ProjectCreator.pm b/modules/VC71ProjectCreator.pm
deleted file mode 100644
index 14d92cba..00000000
--- a/modules/VC71ProjectCreator.pm
+++ /dev/null
@@ -1,29 +0,0 @@
-package VC71ProjectCreator;
-
-# ************************************************************
-# Description : A VC7.1 Project Creator
-# Author : Chad Elliott
-# Create Date : 4/17/2003
-# ************************************************************
-
-# ************************************************************
-# Pragmas
-# ************************************************************
-
-use strict;
-
-use VC7ProjectCreator;
-
-use vars qw(@ISA);
-@ISA = qw(VC7ProjectCreator);
-
-# ************************************************************
-# Subroutine Section
-# ************************************************************
-
-sub get_vcversion {
- #my($self) = shift;
- return '7.10';
-}
-
-1;
diff --git a/modules/VC71WorkspaceCreator.pm b/modules/VC71WorkspaceCreator.pm
deleted file mode 100644
index 1362e756..00000000
--- a/modules/VC71WorkspaceCreator.pm
+++ /dev/null
@@ -1,76 +0,0 @@
-package VC71WorkspaceCreator;
-
-# ************************************************************
-# Description : A VC7.1 Workspace Creator
-# Author : Chad Elliott
-# Create Date : 4/17/2003
-# ************************************************************
-
-# ************************************************************
-# Pragmas
-# ************************************************************
-
-use strict;
-
-use VC71ProjectCreator;
-use VC7WorkspaceCreator;
-
-use vars qw(@ISA);
-@ISA = qw(VC7WorkspaceCreator);
-
-# ************************************************************
-# Subroutine Section
-# ************************************************************
-
-
-sub pre_workspace {
- my($self) = shift;
- my($fh) = shift;
-
- print $fh "Microsoft Visual Studio Solution File, Format Version 8.00" .
- $self->crlf();
-}
-
-
-sub print_inner_project {
- my($self) = shift;
- my($fh) = shift;
- my($gen) = shift;
- my($pguid) = shift;
- my($deps) = shift;
- my($project_name) = shift;
- my($name_to_guid_map) = shift;
-
- my($crlf) = $self->crlf();
- print $fh "\tProjectSection(ProjectDependencies) = postProject$crlf";
- my($darr) = $self->create_array($deps);
- foreach my $dep (@$darr) {
- ## Avoid cirular dependencies
- if ($project_name ne $dep) {
- my($guid) = $name_to_guid_map->{$dep};
- if (defined $guid) {
- print $fh "\t\t{$guid} = {$guid}$crlf";
- }
- }
- }
- print $fh "\tEndProjectSection$crlf";
-}
-
-
-sub print_configs {
- my($self) = shift;
- my($fh) = shift;
- my($configs) = shift;
- my($crlf) = $self->crlf();
- foreach my $key (sort keys %$configs) {
- print $fh "\t\t$key = $key$crlf";
- }
-}
-
-
-sub print_dependencies {
- ## These are done in the print_inner_project method
-}
-
-
-1;
diff --git a/modules/VC7ProjectCreator.pm b/modules/VC7ProjectCreator.pm
deleted file mode 100644
index 6be9b130..00000000
--- a/modules/VC7ProjectCreator.pm
+++ /dev/null
@@ -1,115 +0,0 @@
-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 file_sorter {
- my($self) = shift;
- my($left) = shift;
- my($right) = shift;
- return lc($left) cmp lc($right);
-}
-
-sub translate_value {
- my($self) = shift;
- my($key) = shift;
- my($val) = shift;
-
- if ($key eq 'after' && $val ne '') {
- my($arr) = $self->create_array($val);
- $val = '';
- foreach my $entry (@$arr) {
- $val .= '"' . $entry . '" ';
- }
- $val =~ s/\s+$//;
- }
- return $val;
-}
-
-
-sub crlf {
- my($self) = shift;
- return $self->windows_crlf();
-}
-
-
-sub get_vcversion {
- #my($self) = shift;
- return '7.00';
-}
-
-
-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(),
- $self->get_current_input(),
- $self->getcwd());
- }
- elsif ($name eq 'vcversion') {
- $value = $self->get_vcversion();
- }
- return $value;
-}
-
-
-sub project_file_name {
- my($self) = shift;
- my($name) = shift;
-
- if (!defined $name) {
- $name = $self->project_name();
- }
-
- return "$name.vcproj";
-}
-
-
-sub get_env_accessor {
- #my($self) = shift;
- return ('%', '%');
-}
-
-
-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/modules/VC7WorkspaceCreator.pm b/modules/VC7WorkspaceCreator.pm
deleted file mode 100644
index 62d4e104..00000000
--- a/modules/VC7WorkspaceCreator.pm
+++ /dev/null
@@ -1,180 +0,0 @@
-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 allow_duplicates {
- my($self) = shift;
- return 0;
-}
-
-sub crlf {
- my($self) = shift;
- return $self->windows_crlf();
-}
-
-
-sub workspace_file_name {
- my($self) = shift;
- return $self->get_modified_workspace_name($self->get_workspace_name(),
- '.sln');
-}
-
-
-sub pre_workspace {
- my($self) = shift;
- my($fh) = shift;
-
- print $fh "Microsoft Visual Studio Solution File, Format Version 7.00" .
- $self->crlf();
-}
-
-
-sub print_inner_project {
- #my($self) = shift;
- #my($fh) = shift;
- #my($gen) = shift;
- #my($pguid) = shift;
- #my($deps) = shift;
- #my($name) = shift;
-}
-
-
-sub print_configs {
- my($self) = shift;
- my($fh) = shift;
- my($configs) = shift;
- my($crlf) = $self->crlf();
- my($count) = 0;
-
- foreach my $key (sort keys %$configs) {
- print $fh "\t\tConfigName.$count = $key$crlf";
- $count++;
- }
-}
-
-
-sub print_dependencies {
- my($self) = shift;
- my($fh) = shift;
- my($gen) = shift;
- my($list) = shift;
- my($pjs) = shift;
- my($crlf) = $self->crlf();
-
- ## I hate to add yet another loop through all the projects, but
- ## we must have some way to map plain project names to guids.
- my(%name_to_guid_map) = ();
- foreach my $project(@$list) {
- my($name, $deps, $guid) = @{$$pjs{$project}};
- $name_to_guid_map{$name} = $guid;
- }
-
- ## Project Dependencies
- print $fh "\tGlobalSection(ProjectDependencies) = postSolution$crlf";
- foreach my $project (@$list) {
- my($name, $rawdeps, $project_guid) = @{$$pjs{$project}};
- my($deps) = $self->get_validated_ordering($project);
- if (defined $deps && $deps ne '') {
- my($darr) = $self->create_array($deps);
- my($i) = 0;
- foreach my $dep (@$darr) {
- my($guid) = $name_to_guid_map{$dep};
- if (defined $guid && $guid ne $project_guid) {
- print $fh "\t\t{$project_guid}.$i = {$guid}$crlf";
- $i++;
- }
- }
- }
- }
- print $fh "\tEndGlobalSection$crlf";
-}
-
-
-sub write_comps {
- my($self) = shift;
- my($fh) = shift;
- my($gen) = shift;
- my($projects) = $self->get_projects();
- my($vc7guid) = '8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942';
- my($pjs) = $self->get_project_info();
- my(@list) = $self->sort_dependencies($projects, $pjs);
- my($crlf) = $self->crlf();
-
- ## I hate to add yet another loop through all the projects, but
- ## we must have some way to map plain project names to guids.
- my(%name_to_guid_map) = ();
- foreach my $project(@list) {
- my($name, $deps, $guid) = @{$$pjs{$project}};
- $name_to_guid_map{$name} = $guid;
- }
-
- ## Project Information
- foreach my $project (sort @list) {
- my($name, $rawdeps, $guid) = @{$$pjs{$project}};
- my($deps) = $self->get_validated_ordering($project);
- ## Convert all /'s to \
- my($cpy) = $self->slash_to_backslash($project);
- print $fh "Project(\"{$vc7guid}\") = \"$name\", \"$cpy\", \"{$guid}\"$crlf";
- $self->print_inner_project($fh, $gen, $guid, $deps, $name, \%name_to_guid_map);
- print $fh "EndProject$crlf";
- }
-
- ## Project Configurations
- print $fh "Global$crlf" .
- "\tGlobalSection(SolutionConfiguration) = preSolution$crlf";
-
- my(%configs) = ();
- foreach my $project (@list) {
- my($name, $deps, $pguid, @cfgs) = @{$$pjs{$project}};
- foreach my $cfg (@cfgs) {
- $cfg =~ s/\|.*//;
- $configs{$cfg} = 1;
- }
- }
- $self->print_configs($fh, \%configs);
- print $fh "\tEndGlobalSection$crlf";
-
- ## Print dependencies if there are any
- $self->print_dependencies($fh, $gen, \@list, $pjs);
-
- ## Project Configuration Names
- print $fh "\tGlobalSection(ProjectConfiguration) = postSolution$crlf";
- foreach my $project (sort @list) {
- my($name, $deps, $pguid, @cfgs) = @{$$pjs{$project}};
- 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/modules/WorkspaceCreator.pm b/modules/WorkspaceCreator.pm
deleted file mode 100644
index 974943ba..00000000
--- a/modules/WorkspaceCreator.pm
+++ /dev/null
@@ -1,1430 +0,0 @@
-package WorkspaceCreator;
-
-# ************************************************************
-# Description : Base class for all workspace creators
-# Author : Chad Elliott
-# Create Date : 5/13/2002
-# ************************************************************
-
-# ************************************************************
-# Pragmas
-# ************************************************************
-
-use strict;
-use FileHandle;
-use File::Path;
-use File::Compare;
-use File::Basename;
-
-use Creator;
-use Options;
-
-use vars qw(@ISA);
-@ISA = qw(Creator Options);
-
-# ************************************************************
-# Data Section
-# ************************************************************
-
-my($wsext) = 'mwc';
-my($wsbase) = 'mwb';
-
-## Valid names for assignments within a workspace
-my(%validNames) = ('cmdline' => 1,
- 'implicit' => 1,
- );
-
-## Singleton hash maps of project information
-my(%allprinfo) = ();
-my(%allprojects) = ();
-
-## Global previous workspace names
-my(%previous_workspace_name) = ();
-
-# ************************************************************
-# 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($addtemp) = shift;
- my($addproj) = shift;
- my($progress) = shift;
- my($toplevel) = shift;
- my($baseprojs) = shift;
- my($gfeature) = shift;
- my($feature) = shift;
- my($hierarchy) = shift;
- my($exclude) = shift;
- my($makeco) = shift;
- my($self) = Creator::new($class, $global, $inc,
- $template, $ti, $dynamic, $static,
- $relative, $addtemp, $addproj,
- $progress, $toplevel, $baseprojs,
- $feature, $hierarchy, '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->{'scoped_assign'} = {};
- $self->{'cacheok'} = 1;
- $self->{'exclude'} = {};
- $self->{'wctype'} = $self->extractType("$self");
- $self->{'modified_count'} = 0;
- $self->{'global_feature_file'} = $gfeature;
- $self->{'coexistence'} = $makeco;
- $self->{'project_file_list'} = {};
-
- if (defined $$exclude[0]) {
- my($type) = $self->{'wctype'};
- if (!defined $self->{'exclude'}->{$type}) {
- $self->{'exclude'}->{$type} = [];
- }
- push(@{$self->{'exclude'}->{$type}}, @$exclude);
- }
-
- ## Add a hash reference for our workspace type
- if (!defined $previous_workspace_name{$self->{'wctype'}}) {
- $previous_workspace_name{$self->{'wctype'}} = {};
- }
-
- return $self;
-}
-
-
-sub modify_assignment_value {
- my($self) = shift;
- my($value) = shift;
-
- ## Workspace assignments do not need modification.
- return $value;
-}
-
-
-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 workspace; Have subclass write out the file
- ## Generate the project files
- my($gstat, $generator) = $self->generate_project_files();
- if ($gstat) {
- ($status, $errorString) = $self->write_workspace($generator, 1);
- $self->{'assign'} = {};
- }
- else {
- $errorString = 'ERROR: Unable to ' .
- 'generate all of the project files';
- $status = 0;
- }
-
- $self->{'modified_count'} = 0;
- $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.$wsbase");
- if (!defined $file) {
- $file = $self->search_include_path("$parent.$wsext");
- }
-
- 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) {
- if ($name =~ /[\/\\]/) {
- $status = 0;
- $errorString = 'ERROR: Workspaces can not have a slash ' .
- 'or a back slash in the name';
- }
- else {
- $name =~ s/^\(\s*//;
- $name =~ s/\s*\)$//;
-
- ## Replace any *'s with the default name
- my($def) = $self->get_default_workspace_name();
- $name = $self->fill_type_name($name, $def);
-
- $self->{'workspace_name'} = $name;
- }
- }
- $self->{$typecheck} = 1;
- }
- }
- elsif ($values[0] eq 'assignment') {
- if (defined $validNames{$values[1]}) {
- $self->process_assignment($values[1], $values[2]);
- }
- else {
- $errorString = "ERROR: Invalid assignment name: $values[1]";
- $status = 0;
- }
- }
- elsif ($values[0] eq 'assign_add') {
- if (defined $validNames{$values[1]}) {
- $self->process_assignment_add($values[1], $values[2]);
- }
- else {
- $errorString = "ERROR: Invalid addition name: $values[1]";
- $status = 0;
- }
- }
- elsif ($values[0] eq 'assign_sub') {
- if (defined $validNames{$values[1]}) {
- $self->process_assignment_sub($values[1], $values[2]);
- }
- else {
- $errorString = "ERROR: Invalid subtraction name: $values[1]";
- $status = 0;
- }
- }
- elsif ($values[0] eq 'component') {
- if ($values[1] eq 'exclude') {
- ($status, $errorString) = $self->parse_exclude($ih,
- $values[2]);
- }
- else {
- ($status, $errorString) = $self->parse_scope($ih,
- $values[1],
- $values[2],
- \%validNames);
- }
- }
- else {
- $errorString = "ERROR: Unrecognized line: $line";
- $status = 0;
- }
- }
- elsif ($status == -1) {
- push(@{$self->{'project_files'}}, $line);
- $status = 1;
- }
-
- return $status, $errorString;
-}
-
-
-sub parse_exclude {
- my($self) = shift;
- my($fh) = shift;
- my($typestr) = shift;
- my($status) = 0;
- my($errorString) = 'ERROR: Unable to process exclude';
-
- if ($typestr eq $self->get_default_component_name()) {
- $typestr = $self->{'wctype'};
- }
-
- my(@types) = split(/\s*,\s*/, $typestr);
- my(@exclude) = ();
-
- while($_ = $fh->getline()) {
- my($line) = $self->strip_line($_);
-
- if ($line eq '') {
- }
- elsif ($line =~ /^}/) {
- $status = 1;
- $errorString = '';
- last;
- }
- else {
- push(@exclude, $line);
- }
- }
-
- foreach my $type (@types) {
- if (!defined $self->{'exclude'}->{$type}) {
- $self->{'exclude'}->{$type} = [];
- }
- push(@{$self->{'exclude'}->{$type}}, @exclude);
- }
-
- return $status, $errorString;
-}
-
-
-sub excluded {
- my($self) = shift;
- my($file) = shift;
-
- foreach my $excluded (@{$self->{'exclude'}->{$self->{'wctype'}}}) {
- if ($excluded eq $file || $file =~ /$excluded\//) {
- return 1;
- }
- }
-
- return 0;
-}
-
-
-sub handle_scoped_unknown {
- my($self) = shift;
- my($fh) = shift;
- my($type) = shift;
- my($flags) = shift;
- my($line) = shift;
-
- if (-d $line) {
- my(@files) = ();
- $self->search_for_files([ $line ], \@files, $$flags{'implicit'});
- foreach my $file (@files) {
- $self->{'scoped_assign'}->{$file} = $flags;
- push(@{$self->{'project_files'}}, $file);
- }
- }
- else {
- $self->{'scoped_assign'}->{$line} = $flags;
- push(@{$self->{'project_files'}}, $line);
- }
-
- return 1, '';
-}
-
-
-sub search_for_files {
- my($self) = shift;
- my($files) = shift;
- my($array) = shift;
- my($impl) = shift;
-
- foreach my $file (@$files) {
- if (-d $file) {
- my(@f) = $self->generate_default_file_list($file);
- $self->search_for_files(\@f, $array, $impl);
- if ($impl) {
- unshift(@$array, $file);
- }
- }
- else {
- if ($file =~ /\.mpc$/) {
- unshift(@$array, $file);
- }
- }
- }
-}
-
-
-sub remove_duplicate_projects {
- my($self) = shift;
- my($list) = shift;
- my($count) = scalar(@$list);
-
- for(my $i = 0; $i < $count; ++$i) {
- my($file) = $$list[$i];
- foreach my $inner (@$list) {
- if ($file ne $inner && $file eq dirname($inner) && ! -d $inner) {
- splice(@$list, $i, 1);
- --$count;
- --$i;
- last;
- }
- }
- }
-}
-
-
-sub generate_default_components {
- my($self) = shift;
- my($files) = shift;
- my($impl) = shift;
- my($pjf) = $self->{'project_files'};
-
- if (defined $$pjf[0]) {
- ## If we have files, then process directories
- my(@built) = ();
- foreach my $file (@$pjf) {
- if (!$self->excluded($file)) {
- if (-d $file) {
- my(@found) = ();
- my(@gen) = $self->generate_default_file_list($file);
- $self->search_for_files(\@gen, \@found, $impl);
- push(@built, @found);
- if ($impl || $self->{'scoped_assign'}->{$file}->{'implicit'}) {
- push(@built, $file);
- }
- }
- else {
- push(@built, $file);
- }
- }
- }
-
- ## If the workspace is set to implicit
- if ($impl) {
- ## Remove duplicates from this list
- $self->remove_duplicate_projects(\@built);
- }
-
- ## Set the project files
- $self->{'project_files'} = \@built;
- }
- else {
- ## Add all of the wanted files in this directory
- ## and in the subdirectories.
- $self->search_for_files($files, $pjf, $impl);
-
- ## If the workspace is set to implicit
- if ($impl) {
- ## Remove duplicates from this list
- $self->remove_duplicate_projects($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 get_default_workspace_name {
- my($self) = shift;
- my($name) = $self->get_current_input();
-
- if ($name eq '') {
- $name = $self->base_directory();
- }
- else {
- ## Since files on UNIX can have back slashes, we transform them
- ## into underscores.
- $name =~ s/\\/_/g;
-
- ## Take off the extension
- $name =~ s/\.[^\.]+$//;
- }
-
- return $name;
-}
-
-
-sub generate_defaults {
- my($self) = shift;
-
- ## Generate default workspace name
- if (!defined $self->{'workspace_name'}) {
- $self->{'workspace_name'} = $self->get_default_workspace_name();
- }
-
- my(@files) = $self->generate_default_file_list();
-
- ## Generate default components
- $self->generate_default_components(\@files,
- $self->get_assignment('implicit'));
-}
-
-
-sub get_workspace_name {
- my($self) = shift;
- return $self->{'workspace_name'};
-}
-
-
-sub write_workspace {
- my($self) = shift;
- my($generator) = shift;
- my($addfile) = shift;
- my($status) = 1;
- my($error) = '';
- my($duplicates) = 0;
-
- if ($self->get_toplevel()) {
- if ($addfile) {
- ## VC6 is the only tool that currently cannot work with duplicate names, but
- ## duplicates really don't make sense for anything but Makefile-style projects.
- my(%names) = ();
- foreach my $project (@{$self->{'projects'}}) {
- my($name) = $self->{'project_info'}->{$project}->[0];
- if (defined $names{$name}) {
- ++$duplicates;
- print "WARNING: Duplicate project '$name'.\n";
- }
- else {
- $names{$name} = 1;
- }
- }
- }
- else {
- $self->{'per_project_workspace_name'} = 1;
- }
-
- my($name) = $self->transform_file_name($self->workspace_file_name());
-
- my($abort_creation) = 0;
- if ($duplicates > 0 && !$self->allow_duplicates()) {
- print "WARNING: Duplicates not allowed.\n";
- $abort_creation = 1;
- }
- else {
- if (!defined $self->{'projects'}->[0]) {
- print "WARNING: No projects were created.\n";
- $abort_creation = 1;
- }
- }
-
- if (!$abort_creation) {
- my($fh) = new FileHandle();
- my($dir) = dirname($name);
-
- ## Verify and possibly modify the dependencies
- if ($addfile) {
- $self->verify_build_ordering();
- }
-
- if ($dir ne '.') {
- mkpath($dir, 0, 0777);
- }
-
- ## First write the output to a temporary file
- my($tmp) = "MWC$>.$$";
- my($different) = 1;
- if (open($fh, ">$tmp")) {
- $self->pre_workspace($fh);
- $self->write_comps($fh, $generator);
- $self->post_workspace($fh);
- close($fh);
-
- if (-r $name &&
- -s $tmp == -s $name && compare($tmp, $name) == 0) {
- $different = 0;
- }
- }
- else {
- $error = "ERROR: Unable to open $tmp for output.";
- $status = 0;
- }
-
- if ($status) {
- if ($different) {
- unlink($name);
- if (rename($tmp, $name)) {
- if ($addfile) {
- $self->add_file_written($name);
- }
- }
- else {
- $error = 'ERROR: Unable to open ' . $self->getcwd() .
- "/$name for output";
- $status = 0;
- }
- }
- else {
- ## We will pretend that we wrote the file
- unlink($tmp);
- if ($addfile) {
- $self->add_file_written($name);
- }
- }
- }
- }
- else {
- print " Workspace $name has not been created.\n";
- }
- if (!$addfile) {
- $self->{'per_project_workspace_name'} = undef;
- }
- }
-
- return $status, $error;
-}
-
-
-sub save_project_info {
- my($self) = shift;
- my($gen) = shift;
- my($gpi) = shift;
- my($dir) = shift;
- my($projects) = shift;
- my($pi) = shift;
- my($c) = 0;
-
- ## For each file written
- foreach my $pj (@$gen) {
- ## Save the full path to the project file in the array
- my($full) = ($dir ne '.' ? "$dir/" : '') . $pj;
- push(@$projects, $full);
-
- ## Get the corresponding generated project info and save it
- ## in the hash map keyed on the full project file name
- $$pi{$full} = $$gpi[$c];
- $c++;
- }
-}
-
-
-sub topname {
- my($self) = shift;
- my($file) = shift;
- my($dir) = '.';
- my($rest) = $file;
- if ($file =~ /^([^\/\\]+)[\/\\](.*)/) {
- $dir = $1;
- $rest = $2;
- }
- return $dir, $rest;
-}
-
-
-sub generate_hierarchy {
- my($self) = shift;
- my($generator) = shift;
- my($origproj) = shift;
- my($originfo) = shift;
- my($current) = undef;
- my(@saved) = ();
- my(%sinfo) = ();
- my($cwd) = $self->getcwd();
-
- ## Make a copy of these. We will be modifying them.
- my(@projects) = sort @{$origproj};
- my(%projinfo) = %{$originfo};
-
- foreach my $prj (@projects) {
- my($top, $rest) = $self->topname($prj);
-
- if (!defined $current) {
- $current = $top;
- push(@saved, $rest);
- $sinfo{$rest} = $projinfo{$prj};
- }
- elsif ($top ne $current) {
- ## Write out the hierachical workspace
- $self->cd($current);
- $self->generate_hierarchy($generator, \@saved, \%sinfo);
-
- $self->{'projects'} = \@saved;
- $self->{'project_info'} = \%sinfo;
- $self->{'workspace_name'} = $self->base_directory();
-
- ## Add implict project dependencies based on source files
- ## that have been used by multiple projects
- if ($self->generate_implicit_project_dependencies()) {
- $self->add_implicit_project_dependencies($generator, $self->getcwd());
- }
-
- my($status, $error) = $self->write_workspace($generator);
- if (!$status) {
- print STDERR "$error\n";
- }
- $self->cd($cwd);
-
- ## Start the next one
- $current = $top;
- @saved = ($rest);
- %sinfo = ();
- $sinfo{$rest} = $projinfo{$prj};
- }
- else {
- push(@saved, $rest);
- $sinfo{$rest} = $projinfo{$prj};
- }
- }
- if (defined $current && $current ne '.') {
- $self->cd($current);
- $self->generate_hierarchy($generator, \@saved, \%sinfo);
-
- $self->{'projects'} = \@saved;
- $self->{'project_info'} = \%sinfo;
- $self->{'workspace_name'} = $self->base_directory();
-
- ## Add implict project dependencies based on source files
- ## that have been used by multiple projects
- if ($self->generate_implicit_project_dependencies()) {
- $self->add_implicit_project_dependencies($generator, $self->getcwd());
- }
-
- my($status, $error) = $self->write_workspace($generator);
- if (!$status) {
- print STDERR "$error\n";
- }
- $self->cd($cwd);
- }
-}
-
-
-sub generate_project_files {
- my($self) = shift;
- my($status) = (scalar @{$self->{'project_files'}} == 0 ? 1 : 0);
- my(@projects) = ();
- my(%pi) = ();
- my($generator) = $self->project_creator();
- my($cwd) = $self->getcwd();
- my($impl) = $self->get_assignment('implicit');
- my($postkey) = $generator->get_dynamic() .
- $generator->get_static() . "-$self";
- my($previmpl) = $impl;
- my($prevcache) = $self->{'cacheok'};
- my(%gstate) = $generator->save_state();
-
- ## Remove the address portion of the $self string
- $postkey =~ s/=.*//;
-
- ## Set the source file callback on our project creator
- $generator->set_source_listing_callback([\&source_listing_callback, $self]);
-
- foreach my $ofile (@{$self->{'project_files'}}) {
- if (!$self->excluded($ofile)) {
- my($file) = $ofile;
- my($dir) = dirname($file);
- my($restore) = 0;
-
- if (defined $self->{'scoped_assign'}->{$ofile}) {
- ## Handle the implicit assignment
- my($oi) = $self->{'scoped_assign'}->{$ofile}->{'implicit'};
- if (defined $oi) {
- $previmpl = $impl;
- $impl = $oi;
- }
-
- ## Handle the cmdline assignment
- my($cmdline) = $self->{'scoped_assign'}->{$ofile}->{'cmdline'};
- if (defined $cmdline && $cmdline ne '') {
- ## Save the cacheok value
- $prevcache = $self->{'cacheok'};
-
- ## Get the current parameters and process the command line
- my(%parameters) = $self->current_parameters();
- $self->process_cmdline($cmdline, \%parameters);
-
- ## Set the parameters on the generator
- $generator->restore_state(\%parameters);
- $restore = 1;
- }
- }
-
- ## If we are generating implicit projects and the file is a
- ## directory, then we set the dir to the file and empty the file
- if ($impl && -d $file) {
- $dir = $file;
- $file = '';
-
- ## If the implicit assignment value was not a number, then
- ## we will add this value to our base projects.
- if ($impl !~ /^\d+$/) {
- my($bps) = $generator->get_baseprojs();
- push(@$bps, split(/\s+/, $impl));
- $restore = 1;
- $self->{'cacheok'} = 0;
- }
- }
-
- ## Generate the key for this project file
- my($prkey) = $self->getcwd() . '/' .
- ($file eq '' ? $dir : $file) . "-$postkey";
-
- ## We must change to the subdirectory for
- ## which this project file is intended
- if ($self->cd($dir)) {
- my($gen) = [];
- my($gpi) = [];
- if ($self->{'cacheok'} && defined $allprojects{$prkey}) {
- $gen = $allprojects{$prkey};
- $gpi = $allprinfo{$prkey};
- $status = 1;
- }
- else {
- $status = $generator->generate(basename($file));
-
- ## If any one project file fails, then stop
- ## processing altogether.
- if (!$status) {
- ## We don't restore the state before we leave,
- ## but that's ok since we will be exiting soon.
- return $status, $generator;
- }
-
- ## Get the individual project information and
- ## generated file name(s)
- $gen = $generator->get_files_written();
- $gpi = $generator->get_project_info();
-
- ## If we need to generate a workspace file per project
- ## then we generate a temporary project info and projects
- ## array and call write_project().
- if ($dir ne '.' && defined $$gen[0] &&
- $self->workspace_per_project() && !$self->get_hierarchy()) {
- my(%perpi) = ();
- my(@perprojects) = ();
- $self->save_project_info($gen, $gpi, '.', \@perprojects, \%perpi);
-
- ## Set our per project information
- $self->{'projects'} = \@perprojects;
- $self->{'project_info'} = \%perpi;
-
- ## Write our per project workspace
- my($error) = '';
- ($status, $error) = $self->write_workspace($generator);
- if (!$status) {
- print STDERR "$error\n";
- }
-
- ## Reset our project information to empty
- $self->{'projects'} = [];
- $self->{'project_info'} = {};
- }
-
- if ($self->{'cacheok'}) {
- $allprojects{$prkey} = $gen;
- $allprinfo{$prkey} = $gpi;
- }
- }
- $self->cd($cwd);
- $self->save_project_info($gen, $gpi, $dir, \@projects, \%pi);
- }
- else {
- ## Unable to change to the directory.
- ## We don't restore the state before we leave,
- ## but that's ok since we will be exiting soon.
- return 0, $generator;
- }
-
- ## Return things to the way they were
- if (defined $self->{'scoped_assign'}->{$ofile}) {
- $impl = $previmpl;
- }
- if ($restore) {
- $self->{'cacheok'} = $prevcache;
- $generator->restore_state(\%gstate);
- }
- }
- else {
- ## This one was excluded, so status is ok
- $status = 1;
- }
- }
-
- if ($self->get_hierarchy()) {
- my($orig) = $self->{'workspace_name'};
- $self->generate_hierarchy($generator, \@projects, \%pi);
- $self->{'workspace_name'} = $orig;
- }
-
- $self->{'projects'} = \@projects;
- $self->{'project_info'} = \%pi;
-
- ## Add implict project dependencies based on source files
- ## that have been used by multiple projects
- if ($status && $self->generate_implicit_project_dependencies()) {
- $self->add_implicit_project_dependencies($generator, $cwd);
- }
-
- return $status, $generator;
-}
-
-
-sub array_contains {
- my($self) = shift;
- my($left) = shift;
- my($right) = shift;
- my($over) = shift;
- my($status) = 0;
- my(%check) = ();
-
- ## Initialize the hash keys with the left side array
- @check{@$left} = ();
-
- ## Check each element on the right against the left.
- ## Store anything that isn't in the left side in the over array.
- foreach my $r (@$right) {
- if (exists $check{$r}) {
- $status = 1;
- }
- elsif (defined $over) {
- push(@$over, $r);
- }
- }
- return $status;
-}
-
-
-sub add_implicit_project_dependencies {
- my($self) = shift;
- my($generator) = shift;
- my($cwd) = shift;
- my(%bidir) = ();
- my(%save) = ();
-
- ## Take the current working directory and regular expression'ize it.
- $cwd = $self->escape_regex_special($cwd);
-
- ## Look at each projects file list and check it against all of the
- ## others. If any of the other projects file lists contains anothers
- ## file, then they are dependent (due to build parallelism). So, we
- ## append the dependency and remove the file in question from the
- ## project so that the next time around the foreach, we don't find it
- ## as a dependent on the one that we just modified.
- my(@pflkeys) = keys %{$self->{'project_file_list'}};
- foreach my $key (@pflkeys) {
- foreach my $ikey (@pflkeys) {
- if ($key ne $ikey &&
- ($self->{'project_file_list'}->{$key}->[1] eq
- $self->{'project_file_list'}->{$ikey}->[1]) &&
- (!defined $bidir{$ikey} ||
- !$self->array_contains($bidir{$ikey}, [$key]))) {
- my(@over) = ();
- if ($self->array_contains(
- $self->{'project_file_list'}->{$key}->[2],
- $self->{'project_file_list'}->{$ikey}->[2],
- \@over)) {
- $save{$ikey} = $self->{'project_file_list'}->{$ikey}->[2];
- $self->{'project_file_list'}->{$ikey}->[2] = \@over;
- if (defined $bidir{$key}) {
- push(@{$bidir{$key}}, $ikey);
- }
- else {
- $bidir{$key} = [$ikey];
- }
- my($append) = $generator->translate_value('after', $key);
- my($file) = $self->{'project_file_list'}->{$ikey}->[0];
- my($dir) = $self->{'project_file_list'}->{$ikey}->[1];
-
- ## Remove our starting directory from the projects directory
- ## to get the right part of the directory to prepend.
- $dir =~ s/^$cwd[\/\\]*//;
- if ($dir ne '') {
- $file = "$dir/$file";
- }
-
- ## Append the dependency
- $self->{'project_info'}->{$file}->[1] .= " $append";
- }
- }
- }
- }
-
- ## Restore the modified values in case this method is called again
- ## which is the case when using the -hierarchy option.
- foreach my $skey (keys %save) {
- $self->{'project_file_list'}->{$skey}->[2] = $save{$skey};
- }
-}
-
-
-sub get_projects {
- my($self) = shift;
- return $self->{'projects'};
-}
-
-
-sub get_project_info {
- my($self) = shift;
- return $self->{'project_info'};
-}
-
-
-sub generate_circular_tree {
- my($self) = shift;
- my($circular) = shift;
- my($prepend) = shift;
- my($into) = shift;
- my($current) = shift;
- my($aref) = $self->{'project_info'}->{$current};
-
- if (defined $aref) {
- my($name, $deps) = @$aref;
-
- if (defined $deps && $deps ne '') {
- my($darr) = $self->create_array($deps);
-
- if (!defined $$circular{$into}) {
- $$circular{$into} = {};
- }
-
- foreach my $dep (@$darr) {
- my($base) = basename($dep);
- my($full) = (defined $$prepend{$base} ?
- "$$prepend{$base}/" : '') . $base;
- if (!defined $$circular{$into}->{$full}) {
- $$circular{$into}->{$full} = 1;
- $self->generate_circular_tree($circular, $prepend, $into, $full);
- }
- }
- }
- }
-}
-
-
-sub sort_dependencies {
- my($self) = shift;
- my($projects) = shift;
- my($pjs) = shift;
- my($prepref) = shift;
- my(@list) = @$projects;
- my(%prepend) = ();
-
- foreach my $project (@list) {
- my($dname) = dirname($project);
- if ($dname ne '.') {
- $prepend{basename($project)} = $dname;
- }
- }
-
- if (defined $prepref) {
- %$prepref = %prepend;
- }
-
- ## This will help us catch circular dependencies
- my(%circular) = ();
-
- ## Put the projects in the order specified
- ## by the project dpendencies.
- for(my $i = 0; $i <= $#list; ++$i) {
- my($project) = $list[$i];
- my($name) = $$pjs{$project}->[0];
- my($deps) = $self->get_validated_ordering($project);
-
- if ($deps ne '') {
- my($darr) = $self->create_array($deps);
-
- ## Set up the circular entry
- $self->generate_circular_tree(\%circular, \%prepend, $project, $project);
-
- 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 + 1; $j <= $#list; ++$j) {
- if ($list[$j] eq $full) {
- if (defined $circular{$full} &&
- defined $circular{$full}->{$list[$j]}) {
- ## Don't warn about circular dependencies if we are
- ## generating implicit project dependencies. The
- ## dependencies in question may have been generated and
- ## that's not the users fault.
- if (!$self->generate_implicit_project_dependencies() ||
- defined $ENV{MPC_VERBOSE_CIRCULAR}) {
- print 'WARNING: Circular dependency between ' .
- "$list[$j] and $full\n";
- }
- }
- else {
- ## If so, move it in front of the current project.
- ## The original code, which had splices, didn't always
- ## work correctly (especially on AIX for some reason).
- for(my $k = $j; $k > $i; --$k) {
- $list[$k] = $list[$k - 1];
- }
- $list[$i] = $full;
-
- ## Mark that an entry has been moved
- $moved = 1;
- $j--;
- }
- }
- }
- }
- }
- if ($moved) {
- $i--;
- }
- }
- }
- return @list;
-}
-
-
-sub number_target_deps {
- my($self) = shift;
- my($projects) = shift;
- my($pjs) = shift;
- my($targets) = shift;
- my(%prepend) = ();
- my(@list) = $self->sort_dependencies($projects, $pjs, \%prepend);
-
- ## This block of code must be done after the list of dependencies
- ## has been sorted in order to get the correct project numbers.
- for(my $i = 0; $i <= $#list; ++$i) {
- my($project) = $list[$i];
- if (defined $$pjs{$project}) {
- my($name, $deps) = @{$$pjs{$project}};
- if (defined $deps && $deps ne '') {
- my(%targetnumbers) = ();
- my($darr) = $self->create_array($deps);
-
- ## For each dependency, search in the sorted list
- ## up to the point of this project for the projects
- ## that this one depends on. When the project is
- ## found, we put the target number in a hash map (to avoid
- ## duplicates).
- foreach my $dep (@$darr) {
- my($base) = basename($dep);
- my($full) = (defined $prepend{$base} ?
- "$prepend{$base}/" : '') . $base;
- for(my $j = 0; $j < $i; ++$j) {
- if ($list[$j] eq $full) {
- $targetnumbers{$j} = 1;
- }
- }
- }
-
- ## Get the keys of the hash map and store the
- ## array in the hash keyed on the project file.
- my(@numbers) = sort { $a <=> $b } keys %targetnumbers;
- if (defined $numbers[0]) {
- $$targets{$project} = \@numbers;
- }
- }
- }
- }
-
- return @list;
-}
-
-
-sub optionError {
- my($self) = shift;
- my($str) = shift;
- print 'WARNING: ' . $self->get_current_input() . ": $str\n";
-}
-
-
-sub process_cmdline {
- my($self) = shift;
- my($cmdline) = shift;
- my($parameters) = shift;
-
- ## It's ok to use the cache
- $self->{'cacheok'} = 1;
-
- if (defined $cmdline && $cmdline ne '') {
- my($args) = $self->create_array($cmdline);
-
- ## Look for environment variables
- foreach my $arg (@$args) {
- while($arg =~ /\$(\w+)/) {
- my($name) = $1;
- my($val) = '';
- if ($name eq 'PWD') {
- $val = $self->getcwd();
- }
- elsif (defined $ENV{$name}) {
- $val = $ENV{$name};
- }
- $arg =~ s/\$\w+/$val/;
- }
- }
-
- my($options) = $self->options('MWC', {}, 0, @$args);
- if (defined $options) {
- foreach my $key (keys %$options) {
- my($type) = $self->is_set($key, $options);
-
- if (!defined $type) {
- ## This option was not used, so we ignore it
- }
- elsif ($type eq 'ARRAY') {
- push(@{$parameters->{$key}}, @{$options->{$key}});
- }
- elsif ($type eq 'HASH') {
- foreach my $hk (keys %{$options->{$key}}) {
- $parameters->{$key}->{$hk} = $options->{$key}->{$hk};
- }
- }
- elsif ($type eq 'SCALAR') {
- $parameters->{$key} = $options->{$key};
- }
- }
-
- ## Issue warnings for these options
- if (defined $options->{'recurse'}) {
- $self->optionError('-recurse is ignored');
- }
- if (defined $options->{'reldefs'}) {
- $self->optionError('-noreldefs is ignored');
- }
- if (defined $options->{'coexistence'}) {
- $self->optionError('-make_coexistence is ignored');
- }
- if (defined $options->{'input'}->[0]) {
- $self->optionError('Command line files ' .
- 'specified in a workspace are ignored');
- }
-
- ## Determine if it's ok to use the cache
- my(@cacheInvalidating) = ('global', 'include', 'baseprojs',
- 'template', 'ti', 'relative',
- 'addtemp', 'addproj', 'feature_file');
- foreach my $key (@cacheInvalidating) {
- if ($self->is_set($key, $options)) {
- $self->{'cacheok'} = 0;
- last;
- }
- }
- }
- }
-}
-
-
-sub current_parameters {
- my($self) = shift;
- my(%parameters) = $self->save_state();
-
- ## We always want the project creator to generate a toplevel
- $parameters{'toplevel'} = 1;
- return %parameters;
-}
-
-
-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.*//;
-
- ## Set up values for each project creator
- ## If we have command line arguments in the workspace, then
- ## we process them before creating the project creator
- my($cmdline) = $self->get_assignment('cmdline');
- my(%parameters) = $self->current_parameters();
- $self->process_cmdline($cmdline, \%parameters);
-
- ## Create the new project creator with the updated parameters
- return $str->new($parameters{'global'},
- $parameters{'include'},
- $parameters{'template'},
- $parameters{'ti'},
- $parameters{'dynamic'},
- $parameters{'static'},
- $parameters{'relative'},
- $parameters{'addtemp'},
- $parameters{'addproj'},
- $parameters{'progress'},
- $parameters{'toplevel'},
- $parameters{'baseprojs'},
- $self->{'global_feature_file'},
- $parameters{'feature_file'},
- $parameters{'hierarchy'},
- $self->{'exclude'}->{$self->{'wctype'}},
- $self->make_coexistence());
-}
-
-
-sub sort_files {
- #my($self) = shift;
- return 0;
-}
-
-
-sub make_coexistence {
- my($self) = shift;
- return $self->{'coexistence'};
-}
-
-
-sub get_modified_workspace_name {
- my($self) = shift;
- my($name) = shift;
- my($ext) = shift;
-
- ## If this is a per project workspace, then we should not
- ## modify the workspace name. It may overwrite another workspace
- ## but that's ok, it will also be a per project workspace.
- if ($self->{'per_project_workspace_name'}) {
- return "$name$ext";
- }
-
- my($pwd) = $self->getcwd();
- my($type) = $self->{'wctype'};
- my($wsname) = $self->get_workspace_name();
-
- if (!defined $previous_workspace_name{$type}->{$pwd}) {
- $previous_workspace_name{$type}->{$pwd} = $wsname;
- $self->{'current_workspace_name'} = undef;
- }
- else {
- my($prefix) = ($name eq $wsname ? $name : "$name.$wsname");
- $previous_workspace_name{$type}->{$pwd} = $wsname;
- while($self->file_written("$prefix" .
- ($self->{'modified_count'} > 0 ?
- ".$self->{'modified_count'}" : '') .
- "$ext")) {
- ++$self->{'modified_count'};
- }
- $self->{'current_workspace_name'} =
- "$prefix" . ($self->{'modified_count'} > 0 ?
- ".$self->{'modified_count'}" : '') . "$ext";
- }
-
- return (defined $self->{'current_workspace_name'} ?
- $self->{'current_workspace_name'} : "$name$ext");
-}
-
-
-sub generate_recursive_input_list {
- my($self) = shift;
- my($dir) = shift;
- return $self->extension_recursive_input_list($dir, $wsext);
-}
-
-
-sub verify_build_ordering {
- my($self) = shift;
-
- foreach my $project (@{$self->{'projects'}}) {
- $self->get_validated_ordering($project, 1);
- }
-}
-
-
-sub get_validated_ordering {
- my($self) = shift;
- my($project) = shift;
- my($warn) = shift;
- my($pjs) = $self->{'project_info'};
- my($name) = undef;
- my($deps) = '';
-
- if (defined $$pjs{$project}) {
- ($name, $deps) = @{$$pjs{$project}};
- if (defined $deps && $deps ne '') {
- my($darr) = $self->create_array($deps);
- my($projects) = $self->{'projects'};
- foreach my $dep (@$darr) {
- my($found) = 0;
- ## Avoid circular dependencies
- if ($dep ne $name && $dep ne basename($project)) {
- foreach my $p (@$projects) {
- if ($dep eq $$pjs{$p}->[0] || $dep eq basename($p)) {
- $found = 1;
- last;
- }
- }
- if (!$found) {
- if ($warn && defined $ENV{MPC_VERBOSE_ORDERING}) {
- print "WARNING: '$name' references '$dep' which has " .
- "not been processed\n";
- }
- $deps =~ s/\s*"$dep"\s*/ /g;
- }
- }
- }
- }
-
- $deps =~ s/^\s+//;
- $deps =~ s/\s+$//;
- }
-
- return $deps;
-}
-
-
-sub source_listing_callback {
- my($self) = shift;
- my($project_file) = shift;
- my($project_name) = shift;
- my(@files) = @_;
- my($cwd) = $self->getcwd();
- $self->{'project_file_list'}->{$project_name} = [ $project_file,
- $cwd, \@files ];
-}
-
-# ************************************************************
-# Virtual Methods To Be Overridden
-# ************************************************************
-
-sub generate_implicit_project_dependencies {
- #my($self) = shift;
- return 0;
-}
-
-
-sub allow_duplicates {
- #my($self) = shift;
- return 1;
-}
-
-
-sub workspace_file_name {
- #my($self) = shift;
- return '';
-}
-
-
-sub workspace_per_project {
- #my($self) = shift;
- return 0;
-}
-
-
-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/templates/automake.mpd b/templates/automake.mpd
deleted file mode 100644
index c020bed7..00000000
--- a/templates/automake.mpd
+++ /dev/null
@@ -1,120 +0,0 @@
-##
-## Automake Template
-##
-
-## The number in AUTOMAKE_OPTIONS is the minimum required version automake
-## needed to process this file.
-AUTOMAKE_OPTIONS = 1.4
-
-<%if(idl_files)%>
-<%if(idlflags)%>
-TAO_IDLFLAGS = <%idlflags%>
-<%endif%>
-<%endif%>
-<%if(includes)%>
-INCLUDES =<%foreach(includes)%> -I<%include%><%endfor%>
-<%endif%>
-
-<%if(exename)%>
-bin_PROGRAMS = <%exename%>
-
-<%exename%>_SOURCES = \
-<%foreach(source_files)%>
- <%source_file%><%fornotlast(" \\")%>
-<%endfor%>
-<%if(header_files)%>
-
-noinst_HEADERS = \
-<%foreach(header_files)%>
- <%header_file%><%fornotlast(" \\")%>
-<%endfor%>
-<%endif%>
-<%else%>
-<%if(grouped_source_files)%>
-<%foreach(grouped_source_files)%>
-lib<%sharedname%>_<%uc(grouped_source_file)%>_la_SOURCES = \
-<%foreach(grouped_source_file->files)%>
- <%grouped_source_file->file%><%fornotlast(" \\")%>
-<%endfor%>
-
-<%endfor%>
-<%foreach(grouped_source_files)%>
-if BUILD_<%uc(grouped_source_file)%>_FILES
-LIB<%sharedname%>_<%uc(grouped_source_file)%> = lib<%sharedname%>_<%grouped_source_file%>.la
-else
-LIB<%sharedname%>_<%uc(grouped_source_file)%> =
-endif
-
-<%endfor%>
-
-lib_LTLIBRARIES = \
- $(LIB<%sharedname%>) \
-<%foreach(grouped_source_files)%>
- $(LIB<%sharedname%>_<%uc(grouped_source_file)%>)<%fornotlast(" \\")%>
-<%endfor%>
-
-lib<%sharedname%>_la_SOURCES = \
-<%foreach(grouped_source_files)%>
- $(lib<%sharedname%>_<%uc(grouped_source_file)%>_la_SOURCES)<%fornotlast(" \\")%>
-<%endfor%>
-
-<%foreach(grouped_source_files)%>
-lib<%sharedname%>_<%uc(grouped_source_file)%>_la_SOURCES = \
-<%foreach(grouped_source_file->files)%>
- <%grouped_source_file->file%><%fornotlast(" \\")%>
-<%endfor%>
-
-<%endfor%>
-lib<%sharedname%>_la_LDFLAGS = $(X_LIBS) \
- -version-info <%if(tao)%>@TAO_CURRENT@:@TAO_REVISION@:@TAO_AGE@<%else%>@ACE_CURRENT@:@ACE_REVISION@:@ACE_AGE@<%endif%>
-
-lib<%sharedname%>_la_LIBADD = $(X_PRE_LIBS) $(<%sharedname%>_XLIBS) $(X_EXTRA_LIBS)
-<%else%>
-lib_LTLIBRARIES = lib<%sharedname%>.la
-
-lib<%sharedname%>_la_SOURCES = \
-<%foreach(source_files)%>
- <%source_file%><%fornotlast(" \\")%>
-<%endfor%>
-<%endif%>
-
-<%if(template_files)%>
-TEMPLATE_FILES = \
-<%foreach(template_files)%>
- <%template_file%><%fornotlast(" \\")%>
-<%endfor%>
-
-<%endif%>
-<%if(header_files)%>
-HEADER_FILES = \
-<%foreach(header_files)%>
- <%header_file%><%fornotlast(" \\")%>
-<%endfor%>
-
-<%endif%>
-<%if(inline_files)%>
-INLINE_FILES = \
-<%foreach(inline_files)%>
- <%inline_file%><%fornotlast(" \\")%>
-<%endfor%>
-
-<%endif%>
-
-pkginclude_HEADERS = \
-<%if(template_files)%>
- $(INLINE_FILES) \
-<%endif%>
-<%if(inline_files)%>
- $(INLINE_FILES) \
-<%endif%>
-<%if(header_files)%>
- $(HEADER_FILES)
-<%endif%>
-<%endif%>
-<%vpath%>
-
-## Clean up template repositories, etc.
-clean-local:
- -rm -f *.bak *.rpo *.sym lib*.*_pure_* Makefile.old core
- -rm -f gcctemp.c gcctemp so_locations
- -rm -rf ptrepository SunWS_cache Templates.DB
diff --git a/templates/common.mpt b/templates/common.mpt
deleted file mode 100644
index 1568435d..00000000
--- a/templates/common.mpt
+++ /dev/null
@@ -1,3 +0,0 @@
-// This file contains assignments that are common to all templates
-
-pch_defines += USING_PCH
diff --git a/templates/em3.mpd b/templates/em3.mpd
deleted file mode 100644
index 3692486f..00000000
--- a/templates/em3.mpd
+++ /dev/null
@@ -1,285 +0,0 @@
-# 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%>\<%noextension(project_file)%>\<%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 macros)%> /d <%define%><%endfor%><%foreach(includes)%> /i "<%include%>"<%endfor%> /r
-CPP=<%cpp("cl.exe")%>
-# ADD CPP /nologo <%if(optimize)%>/O2<%else%>/Ob0<%endif%> <%compile_flags%> <%foreach(includes)%>/I "<%include%>" <%endfor%>/D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) <%foreach(defines common_defines cpu_defines macros)%>/D <%define%> <%endfor%><%if(type_is_dynamic)%><%foreach(dynamicflags)%>/D <%dynamicflag%> <%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%>/D <%libflag%> <%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(project_file)%>\<%noextension(pch_header)%>.pch" <%endif%>/FR /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")%> /INCREMENTAL:<%incremental("NO")%> <%foreach(lit_libs)%><%lit_lib%>.lib <%endfor%><%foreach(libs defaultlibs)%><%lib%><%lib_modifier%>.lib <%endfor%><%foreach(libpaths)%>/libpath:"<%libpath%>\<%machine%>" <%endfor%>/nologo /base:"<%base("0x00100000")%>" <%stack%><%if(type_is_dynamic)%> /entry:"_DllMainCRTStartup"<%endif%> /nodefaultlib:"$(CENoDefaultLib)" /version:<%version("1.0")%> /subsystem:$(CESubsystem) /align:"<%align("4096")%>"<%if(pdb)%><%if(sharedname)%> /pdb:"<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%machine%>\<%sharedname%><%lib_modifier%>.pdb"<%else%><%if(exename)%> /pdb:"<%if(install)%><%install%><%else%><%output_dir%><%endif%>\<%machine%>\<%exename%>.pdb"<%endif%><%endif%><%endif%> <%if(type_is_dynamic)%> /dll<%endif%> <%if(use_debug_libraries)%>/debug<%endif%> /machine:<%machine%> /out:"<%if(sharedname)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%machine%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(exename)%><%if(install)%><%install%><%else%><%output_dir%><%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"
-<%if(pch_header)%>
-# Begin Source File
-
-SOURCE=".\<%pch_header%>"
-# End Source File
-<%endif%>
-<%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 IDL Compiler on $(InputPath)
-InputPath=.\<%idl_file%>
-InputName=<%basenoextension(idl_file)%>
-InputDir=<%dirname(idl_file)%>
-
-BuildCmds= \
- PATH=%PATH%;<%idl_compiler_libs%> \
- <%idl_compiler%> -o <%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%> <%if(flag_overrides(idl_file, idlflags))%><%flag_overrides(idl_file, idlflags)%><%else%><%idlflags%><%endif%> $(InputPath)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-# End Custom Build
-
-<%endfor%>
-!ENDIF
-<%endfor%>
-
-# End Source File
-<%endfor%>
-# End Group
-<%endif%>
-<%foreach(custom_types)%>
-# Begin Group "<%custom_type%>"
-
-# PROP Default_Filter "<%foreach(custom_type->inputexts)%><%custom_type->inputext%><%fornotlast(";")%><%endfor%>"
-<%foreach(custom_type->input_files)%>
-<%if(custom_type->input_file->output_files)%>
-# Begin Source File
-
-SOURCE=".\<%custom_type->input_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 <%custom_type->command%> on $(InputPath)
-InputPath=.\<%custom_type->input_file%>
-InputName=<%basenoextension(custom_type->input_file)%>
-InputDir=<%dirname(custom_type->input_file)%>
-
-<%if(custom_type->output_option)%>
-<%foreach(custom_type->input_file->output_files)%>
-"<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%>.\<%custom_type->input_file->output_file%><%endif%>" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-<%if(custom_type->libpath)%>
- PATH=%PATH%;<%custom_type->libpath%>
-<%endif%>
- <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath) <%custom_type->output_option%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>
-
-<%endfor%>
-<%else%>
-BuildCmds= \
-<%if(custom_type->libpath)%>
- PATH=%PATH%;<%custom_type->libpath%> \
-<%endif%>
- <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath)
-
-<%foreach(custom_type->input_file->output_files)%>
-"<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%>.\<%custom_type->input_file->output_file%><%endif%>" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-<%endfor%>
-<%endif%>
-# End Custom Build
-
-<%endfor%>
-<%endfor%>
-!ENDIF
-
-# End Source File
-<%endif%>
-<%endfor%>
-# End Group
-<%endfor%>
-# End Target
-# End Project
diff --git a/templates/em3vcp.mpd b/templates/em3vcp.mpd
deleted file mode 100644
index 3692486f..00000000
--- a/templates/em3vcp.mpd
+++ /dev/null
@@ -1,285 +0,0 @@
-# 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%>\<%noextension(project_file)%>\<%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 macros)%> /d <%define%><%endfor%><%foreach(includes)%> /i "<%include%>"<%endfor%> /r
-CPP=<%cpp("cl.exe")%>
-# ADD CPP /nologo <%if(optimize)%>/O2<%else%>/Ob0<%endif%> <%compile_flags%> <%foreach(includes)%>/I "<%include%>" <%endfor%>/D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) <%foreach(defines common_defines cpu_defines macros)%>/D <%define%> <%endfor%><%if(type_is_dynamic)%><%foreach(dynamicflags)%>/D <%dynamicflag%> <%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%>/D <%libflag%> <%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(project_file)%>\<%noextension(pch_header)%>.pch" <%endif%>/FR /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")%> /INCREMENTAL:<%incremental("NO")%> <%foreach(lit_libs)%><%lit_lib%>.lib <%endfor%><%foreach(libs defaultlibs)%><%lib%><%lib_modifier%>.lib <%endfor%><%foreach(libpaths)%>/libpath:"<%libpath%>\<%machine%>" <%endfor%>/nologo /base:"<%base("0x00100000")%>" <%stack%><%if(type_is_dynamic)%> /entry:"_DllMainCRTStartup"<%endif%> /nodefaultlib:"$(CENoDefaultLib)" /version:<%version("1.0")%> /subsystem:$(CESubsystem) /align:"<%align("4096")%>"<%if(pdb)%><%if(sharedname)%> /pdb:"<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%machine%>\<%sharedname%><%lib_modifier%>.pdb"<%else%><%if(exename)%> /pdb:"<%if(install)%><%install%><%else%><%output_dir%><%endif%>\<%machine%>\<%exename%>.pdb"<%endif%><%endif%><%endif%> <%if(type_is_dynamic)%> /dll<%endif%> <%if(use_debug_libraries)%>/debug<%endif%> /machine:<%machine%> /out:"<%if(sharedname)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%machine%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(exename)%><%if(install)%><%install%><%else%><%output_dir%><%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"
-<%if(pch_header)%>
-# Begin Source File
-
-SOURCE=".\<%pch_header%>"
-# End Source File
-<%endif%>
-<%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 IDL Compiler on $(InputPath)
-InputPath=.\<%idl_file%>
-InputName=<%basenoextension(idl_file)%>
-InputDir=<%dirname(idl_file)%>
-
-BuildCmds= \
- PATH=%PATH%;<%idl_compiler_libs%> \
- <%idl_compiler%> -o <%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%> <%if(flag_overrides(idl_file, idlflags))%><%flag_overrides(idl_file, idlflags)%><%else%><%idlflags%><%endif%> $(InputPath)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-# End Custom Build
-
-<%endfor%>
-!ENDIF
-<%endfor%>
-
-# End Source File
-<%endfor%>
-# End Group
-<%endif%>
-<%foreach(custom_types)%>
-# Begin Group "<%custom_type%>"
-
-# PROP Default_Filter "<%foreach(custom_type->inputexts)%><%custom_type->inputext%><%fornotlast(";")%><%endfor%>"
-<%foreach(custom_type->input_files)%>
-<%if(custom_type->input_file->output_files)%>
-# Begin Source File
-
-SOURCE=".\<%custom_type->input_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 <%custom_type->command%> on $(InputPath)
-InputPath=.\<%custom_type->input_file%>
-InputName=<%basenoextension(custom_type->input_file)%>
-InputDir=<%dirname(custom_type->input_file)%>
-
-<%if(custom_type->output_option)%>
-<%foreach(custom_type->input_file->output_files)%>
-"<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%>.\<%custom_type->input_file->output_file%><%endif%>" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-<%if(custom_type->libpath)%>
- PATH=%PATH%;<%custom_type->libpath%>
-<%endif%>
- <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath) <%custom_type->output_option%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>
-
-<%endfor%>
-<%else%>
-BuildCmds= \
-<%if(custom_type->libpath)%>
- PATH=%PATH%;<%custom_type->libpath%> \
-<%endif%>
- <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath)
-
-<%foreach(custom_type->input_file->output_files)%>
-"<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%>.\<%custom_type->input_file->output_file%><%endif%>" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-<%endfor%>
-<%endif%>
-# End Custom Build
-
-<%endfor%>
-<%endfor%>
-!ENDIF
-
-# End Source File
-<%endif%>
-<%endfor%>
-# End Group
-<%endfor%>
-# End Target
-# End Project
diff --git a/templates/em3vcpdll.mpt b/templates/em3vcpdll.mpt
deleted file mode 100644
index 1387710e..00000000
--- a/templates/em3vcpdll.mpt
+++ /dev/null
@@ -1,84 +0,0 @@
-conditional_include "idl_compiler_win32"
-conditional_include "common"
-
-configurations = Release Debug
-platform_longs = "WCE ARM" "WCE x86" "WCE emulator"
-default_configuration = Debug
-default_platform_long = "WCE ARM"
-type_is_binary = 1
-type_is_dynamic = 1
-common_defines = UNICODE _UNICODE
-pdb = 1
-stack =
-
-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 emulator {
- type_code = 0xa602
- 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
- optimize = 1
- compile_flags = /W3 /Zi
- defines = NDEBUG
- compile_flags_removed = /YX
- output_dir = Release
- intermediate_dir = Release
-}
-
-Debug {
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Zi
- defines = _DEBUG
- compile_flags_removed = /Fr /YX
- output_dir = .
- intermediate_dir = Debug
- lib_modifier = d
-}
-
-MFC Release {
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /Zi
- defines = NDEBUG
- compile_flags_removed = /YX
- output_dir = MFC_Release
- intermediate_dir = MFC_Release
- lib_modifier = mfc
- use_mfc = 2
-}
-
-MFC Debug {
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Zi
- defines = _DEBUG
- compile_flags_removed = /Fr /YX
- output_dir = MFC_Debug
- intermediate_dir = MFC_Debug
- lib_modifier = mfcd
- use_mfc = 2
-}
-
-conditional_include "vcpartialmacros"
diff --git a/templates/em3vcpdllexe.mpt b/templates/em3vcpdllexe.mpt
deleted file mode 100644
index 08f7a5a0..00000000
--- a/templates/em3vcpdllexe.mpt
+++ /dev/null
@@ -1,84 +0,0 @@
-conditional_include "idl_compiler_win32"
-conditional_include "common"
-
-type_description = "Application"
-platform_longs = "WCE ARM" "WCE x86" "WCE emulator"
-default_configuration = Debug
-default_platform_long = "WCE ARM"
-configurations = Release Debug
-type_is_binary = 1
-common_defines = UNICODE _UNICODE
-pdb = 1
-stack =
-
-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 emulator {
- type_code = 0xa601
- 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
- optimize = 1
- compile_flags = /W3 /Zi
- defines = NDEBUG
- compile_flags_removed = /YX
- output_dir = Release
- intermediate_dir = Release
-}
-
-Debug {
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Zi
- defines = _DEBUG
- compile_flags_removed = /YX
- output_dir = .
- intermediate_dir = Debug
- lib_modifier = d
-}
-
-MFC Release {
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /Zi
- defines = NDEBUG _AFXDLL
- compile_flags_removed = /YX
- output_dir = MFC_Release
- intermediate_dir = MFC_Release
- lib_modifier = mfc
- use_mfc = 2
-}
-
-MFC Debug {
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Zi
- defines = _DEBUG _AFXDLL
- compile_flags_removed = /YX
- output_dir = MFC_Debug
- intermediate_dir = MFC_Debug
- lib_modifier = mfcd
- use_mfc = 2
-}
-
-conditional_include "vcpartialmacros"
diff --git a/templates/em3vcplib.mpt b/templates/em3vcplib.mpt
deleted file mode 100644
index 3776ae06..00000000
--- a/templates/em3vcplib.mpt
+++ /dev/null
@@ -1,88 +0,0 @@
-conditional_include "idl_compiler_win32"
-conditional_include "common"
-
-type_description = "Static Library"
-platform_longs = "WCE ARM" "WCE x86" "WCE emulator"
-default_configuration = "Static Debug"
-default_platform_long = "WCE ARM"
-configurations = "Static Release" "Static Debug"
-common_defines = UNICODE _UNICODE
-type_is_static = 1
-need_staticflags = 1
-stack =
-
-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 emulator {
- type_code = 0xa604
- 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
- optimize = 1
- compile_flags = /W3 /Zi
- defines = NDEBUG
- compile_flags_removed = /YX
- output_dir = Static_Release
- intermediate_dir = Static_Release
- lib_modifier = s
-}
-
-Static Debug {
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Zi
- defines = _DEBUG
- compile_flags_removed = /Fr /YX
- output_dir = Static_Debug
- intermediate_dir = Static_Debug
- lib_modifier = sd
- pdb = 1
-}
-
-MFC Release {
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /Zi
- defines = NDEBUG
- compile_flags_removed = /YX
- output_dir = MFC_Release
- intermediate_dir = MFC_Release
- lib_modifier = mfcs
- use_mfc = 2
-}
-
-MFC Debug {
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Zi
- defines = _DEBUG
- compile_flags_removed = /Fr /YX
- output_dir = MFC_Debug
- intermediate_dir = MFC_Debug
- lib_modifier = mfcsd
- pdb = 1
- use_mfc = 2
-}
-
-conditional_include "vcpartialmacros"
-
diff --git a/templates/em3vcplibexe.mpt b/templates/em3vcplibexe.mpt
deleted file mode 100644
index bfeb2267..00000000
--- a/templates/em3vcplibexe.mpt
+++ /dev/null
@@ -1,87 +0,0 @@
-conditional_include "idl_compiler_win32"
-conditional_include "common"
-
-type_description = "Application"
-platform_longs = "WCE ARM" "WCE x86" "WCE emulator"
-default_configuration = "Static Debug"
-default_platform_long = "WCE ARM"
-configurations = "Static Release" "Static Debug"
-type_is_binary = 1
-common_defines = UNICODE _UNICODE
-need_staticflags = 1
-pdb = 1
-stack =
-
-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 emulator {
- type_code = 0xa601
- 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
- optimize = 1
- compile_flags = /W3 /Zi
- defines = NDEBUG
- compile_flags_removed = /YX
- lib_modifier = s
- output_dir = Static_Release
- intermediate_dir = Static_Release
-}
-
-Static Debug {
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Zi
- defines = _DEBUG
- compile_flags_removed = /YX
- lib_modifier = sd
- output_dir = Static_Debug
- intermediate_dir = Static_Debug
-}
-
-MFC Release {
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /Zi
- defines = NDEBUG _AFXDLL
- compile_flags_removed = /YX
- lib_modifier = mfcs
- output_dir = MFC_Release
- intermediate_dir = MFC_Release
- use_mfc = 1
-}
-
-MFC Debug {
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Zi
- defines = _DEBUG _AFXDLL
- compile_flags_removed = /YX
- lib_modifier = mfcsd
- output_dir = MFC_Debug
- intermediate_dir = MFC_Debug
- use_mfc = 1
-}
-
-conditional_include "vcpartialmacros"
-
diff --git a/templates/ghs.mpd b/templates/ghs.mpd
deleted file mode 100644
index fbfb6a0a..00000000
--- a/templates/ghs.mpd
+++ /dev/null
@@ -1,16 +0,0 @@
-#!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/templates/make.mpd b/templates/make.mpd
deleted file mode 100644
index f55d1477..00000000
--- a/templates/make.mpd
+++ /dev/null
@@ -1,180 +0,0 @@
-#----------------------------------------------------------------------------
-# Macros
-#----------------------------------------------------------------------------
-<%marker(top)%>
-<%foreach(configurations)%>
-CXX = <%cxx%>
-<%endfor%>
-CCC = $(CXX)
-MAKEFILE = <%project_file%>
-DEPENDENCIES = .depend.<%project_file%>
-<%if(exename)%>
-BIN = <%exename%>
-<%endif%>
-<%if(staticname)%>
-LIB = lib<%staticname%>.a
-<%endif%>
-<%if(sharedname)%>
-SHLIB = lib<%sharedname%>.$(SOEXT)
-<%foreach(platforms)%>
-SOEXT = <%soext%>
-<%endfor%>
-<%foreach(configurations)%>
-<%if(pic)%>
-CPPFLAGS += <%pic%>
-<%endif%>
-<%endfor%>
-<%foreach(platforms)%>
-<%if(shflags)%>
-SHFLAGS = <%shflags%>
-<%endif%>
-<%endfor%>
-<%endif%>
-<%foreach(configurations)%>
-<%if(cppflags)%>
-CPPFLAGS += <%cppflags%>
-<%endif%>
-<%endfor%>
-<%if(pch_header)%>
-CPPFLAGS +=<%foreach(pch_defines)%> -D<%pch_define%><%endfor%>
-<%endif%>
-<%if(idl_files)%>
-IDL_FILES =<%foreach(idl_files)%> <%noextension(idl_file)%><%endfor%>
-IDL_SRC =<%foreach(idl_files)%> <%noextension(idl_file)%>C.cpp <%noextension(idl_file)%>S.cpp<%endfor%>
-<%endif%>
-SRC =<%foreach(source_files)%> <%source_file%><%endfor%>
-OBJS =<%foreach(source_files)%> <%noextension(source_file)%>.o<%endfor%>
-<%if(includes)%>
-CPPFLAGS +=<%foreach(includes)%> -I<%include%><%endfor%>
-<%endif%>
-<%if(macros)%>
-CPPFLAGS +=<%foreach(macros)%> -D<%macro%><%endfor%>
-<%endif%>
-<%if(libpaths)%>
-LDFLAGS +=<%foreach(libpaths)%> -L<%libpath%><%endfor%>
-<%endif%>
-<%foreach(configurations)%>
-<%if(linkflags)%>
-LDFLAGS += <%linkflags%>
-<%endif%>
-<%endfor%>
-<%foreach(platforms)%>
-LDLIBS += <%ldlibs%>
-<%endfor%>
-<%if(libs)%>
-LDLIBS +=<%foreach(libs)%> -l<%lib%><%endfor%>
-<%endif%>
-<%if(defaultlibs)%>
-LDLIBS +=<%foreach(defaultlibs)%> -l<%defaultlib%><%endfor%>
-<%endif%>
-<%if(lit_libs)%>
-LDLIBS +=<%foreach(lit_libs)%> -l<%lit_lib%><%endfor%>
-<%endif%>
-OUTPUT_OPTION = -o $@
-<%marker(macros)%>
-
-#----------------------------------------------------------------------------
-# Local targets
-#----------------------------------------------------------------------------
-<%marker(local)%>
-
-<%if(custom_types)%>
-<%foreach(custom_types)%>
-<%if(custom_types->libpath)%>
-LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):<%custom_type->libpath%>
-SHLIB_PATH := $(SHLIB_PATH):<%custom_type->libpath%>
-LIBPATH := $(LIBPATH):<%custom_type->libpath%>
-PATH := $(PATH):<%custom_type->libpath%>
-
-<%endif%>
-<%foreach(custom_type->input_files)%>
-<%if(custom_type->input_file->output_files)%>
-GENERATED_DIRTY +=<%foreach(custom_type->input_file->output_files)%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%endfor%>
-<%foreach(custom_type->input_file->output_files)%>
-<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>: <%custom_type->input_file%>
- <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%custom_type->input_file%> <%if(custom_type->output_option)%><%custom_type->output_option%> $@<%endif%>
-
-<%endfor%>
-<%endif%>
-<%endfor%>
-<%endfor%>
-.PRECIOUS: $(GENERATED_DIRTY)
-all: $(GENERATED_DIRTY)
-<%source_files%>: $(GENERATED_DIRTY)
-
-<%endif%>
-<%if(exename)%>
-all: $(BIN) <%if(install)%>install<%endif%>
-
-$(BIN): $(OBJS)
- $(LINK.cc) $(OUTPUT_OPTION) $(OBJS) $(LDLIBS)
-
-<%endif%>
-<%if(sharedname)%>
-INSTARGET = $(SHLIB)
-
-all: $(INSTARGET) <%if(install)%>install<%else%><%if(!exename)%>install<%endif%><%endif%>
-<%else%>
-<%if(staticname)%>
-INSTARGET = $(LIB)
-
-all: $(INSTARGET) <%if(install)%>install<%else%><%if(!exename)%>install<%endif%><%endif%>
-<%endif%>
-<%endif%>
-
-<%if(sharedname)%>
-$(SHLIB): $(OBJS)
- $(LINK.cc) $(SHFLAGS) $(OUTPUT_OPTION) $(OBJS) $(LDLIBS)
-
-<%endif%>
-<%if(staticname)%>
-$(LIB): $(OBJS)
- $(AR) $(ARFLAGS) $(LIB) $(OBJS)
-
-<%endif%>
-%.o: %.cpp
- $(COMPILE.cc) $< $(OUTPUT_OPTION)
-
-<%if(install)%>
-<%if(exename)%>
-INSTARGET = $(BIN)
-install:
- @echo "Installing $(INSTARGET) -> <%install%>/$(INSTARGET)"
- @mkdir -p "<%install%>"
- @$(RM) "<%install%>/$(INSTARGET)"
- @ln -s "$(PWD)/$(INSTARGET)" "<%install%>"
-
-<%endif%>
-<%else%>
-<%if(!exename)%>
-install:
- @mkdir -p "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>"
- @[ -f "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>/$(INSTARGET)" ] || ln -s "$(PWD)/$(INSTARGET)" "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>"
-<%endif%>
-<%endif%>
-clean:
- -$(RM) $(OBJS)
-<%foreach(configurations)%>
-<%if(clean)%>
- -$(RM) -r <%clean%>
-<%endif%>
-<%endfor%>
-
-realclean: clean
- -$(RM) <%if(exename)%>$(BIN)<%else%>$(SHLIB) $(LIB)<%endif%><%if(install)%> <%install%>/$(INSTARGET)<%endif%>
-<%if(custom_types)%>
- -$(RM) -r $(GENERATED_DIRTY)
-<%endif%>
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-
-$(DEPENDENCIES):
- touch $(DEPENDENCIES)
-
-depend:
- <%depgen("depgen.pl")%> -t gnu $(CFLAGS) $(CCFLAGS) $(CPPFLAGS) -f $(DEPENDENCIES)<%foreach(source_files)%> <%source_file%><%endfor%>
-
-include $(DEPENDENCIES)
-<%marker(bottom)%>
diff --git a/templates/makedll.mpt b/templates/makedll.mpt
deleted file mode 100644
index b3e1519c..00000000
--- a/templates/makedll.mpt
+++ /dev/null
@@ -1,65 +0,0 @@
-conditional_include "idl_compiler"
-conditional_include "common"
-
-configurations = gcc
-soext = so
-cppflags = -O
-
-gcc {
- cxx = g++
- pic = -fPIC
- platforms = linux
-}
-
-SunCC {
- cxx = CC
- pic = -KPIC
- linkflags = -library=Cstd -library=Crun
- clean = SunWS_cache
- platforms = solaris
-}
-
-aCC {
- cxx = aCC
- pic = +Z
- platforms = hpux
-}
-
-xlC_r {
- cxx = xlC_r
- platforms = aix
-}
-
-SGICC {
- cxx = CC
- pic = -KPIC
- linkflags = -Wl,-woff,84
- clean = ii_files
- platforms = irix
-}
-
-linux {
- shflags = -shared
- ldlibs = -ldl -lpthread
-}
-
-solaris {
- shflags = -G
- ldlibs = -lsocket -ldl -lnsl -lgen -lposix4
-}
-
-hpux {
- soext = sl
- shflags = -b
- ldlibs = -lxti -lpthread -lrt -ldld
-}
-
-aix {
- soext = a
- ldlibs = -ldl
-}
-
-irix {
- shflags = -shared
- ldlibs = -lsocket -ldl -lnsl -lgen -lpthread
-}
diff --git a/templates/makeexe.mpt b/templates/makeexe.mpt
deleted file mode 100644
index ca465a3e..00000000
--- a/templates/makeexe.mpt
+++ /dev/null
@@ -1,2 +0,0 @@
-conditional_include "makedll"
-
diff --git a/templates/nmake.mpd b/templates/nmake.mpd
deleted file mode 100644
index 0b1463a3..00000000
--- a/templates/nmake.mpd
+++ /dev/null
@@ -1,294 +0,0 @@
-# Microsoft Developer Studio Generated NMAKE File
-<%foreach(platforms)%>
-!<%fornotfirst("ELSE")%>IF "$(CFG)" == ""
-CFG=<%platform%> <%default_configuration%>
-!MESSAGE No configuration specified. Defaulting to <%platform%> <%default_configuration%>.
-<%endfor%>
-!ENDIF
-
-!IF <%foreach(platforms)%><%foreach(configurations)%>"$(CFG)" != "<%platform%> <%configuration%>"<%fornotlast(" && ")%><%endfor%><%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
-<%foreach(platforms)%>
-!MESSAGE NMAKE /f "<%project_file%>" CFG="<%platform%> <%default_configuration%>"
-<%endfor%>
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-<%foreach(platforms)%>
-<%foreach(configurations)%>
-!MESSAGE "<%platform%> <%configuration%>" (based on "<%platform%> (<%machine_description%>) <%type_description("Dynamic-Lynk Library")%>")
-<%endfor%>
-<%endfor%>
-!MESSAGE
-!ERROR An invalid configuration is specified.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-
-<%foreach(platforms)%>
-<%foreach(configurations)%>
-!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%platform%> <%configuration%>"
-
-<%if(exename)%>
-OUTDIR=<%output_dir(".")%>
-INSTALLDIR=<%if(install)%><%install%><%else%><%output_dir%><%endif%>
-<%endif%>
-<%if(type_is_static)%>
-OUTDIR=<%output_dir(".")%>
-<%endif%>
-<%if(type_is_dynamic)%>
-OUTDIR=<%libout%>
-<%endif%>
-INTDIR=<%intermediate_dir%>\<%noextension(project_file)%>
-
-ALL : <%if(idl_files)%>IDL_STUBS <%endif%><%if(exename)%><%if(install)%>"$(INSTALLDIR)" <%endif%><%endif%>"<%if(type_is_dynamic)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(type_is_static)%>$(OUTDIR)\<%staticname%><%lib_modifier%>.lib<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%>.exe<%endif%>"<%foreach(custom_types)%><%foreach(custom_type->input_files)%><%foreach(custom_type->input_file->output_files)%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%>.\<%custom_type->input_file->output_file%><%endif%>"<%endfor%><%endfor%><%endfor%>
-
-DEPEND :
- perl <%depgen("$(ACE_ROOT)\\bin\\depgen.pl")%><%foreach(includes)%> -I"<%include%>"<%endfor%><%foreach(defines cpu_defines common_defines macros)%> -D<%define%><%endfor%><%if(type_is_dynamic)%><%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%> -D<%staticflag%><%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%> -D<%pch_define%><%endfor%><%endif%> -f "<%noextension(project_file)%>.dep"<%foreach(source_files)%> <%source_file%><%endfor%>
-
-<%if(idl_files)%>
-IDL_STUBS :<%foreach(idl_files)%> "<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%dirname(idl_file)%><%endif%><%endif%>\<%basenoextension(idl_file)%>C.cpp"<%endfor%>
-
-<%endif%>
-CLEAN :
- -@erase "$(INTDIR)\*.obj"
- -@erase "$(INTDIR)\*.res"
- -@erase "$(INTDIR)\*.pch"
- -@erase "$(INTDIR)\*.idb"
-
-REALCLEAN : CLEAN
-<%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%>
-<%if(type_is_dynamic)%>
- -@erase "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%sharedname%><%lib_modifier%>.dll"
-<%endif%>
-<%if(exename)%>
- -@erase "$(INSTALLDIR)\<%exename%>.exe"
- -@erase "$(INSTALLDIR)\<%exename%>.ilk"
-<%else%>
- -@erase "$(OUTDIR)\<%staticname%><%lib_modifier%>.lib"
- -@erase "$(OUTDIR)\<%staticname%><%lib_modifier%>.exp"
- -@erase "$(OUTDIR)\<%staticname%><%lib_modifier%>.ilk"
-<%endif%>
-<%if(idl_files)%>
- -@erase<%foreach(idl_files)%> "<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%dirname(idl_file)%><%endif%><%endif%>\<%basenoextension(idl_file)%>C.*" "<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%dirname(idl_file)%><%endif%><%endif%>\<%basenoextension(idl_file)%>S.*"<%endfor%>
-<%endif%>
-<%foreach(custom_types)%>
-<%foreach(custom_type->input_files)%>
-<%foreach(custom_type->input_file->output_files)%>
- -@erase "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>"
-<%endfor%>
-<%endfor%>
-<%endfor%>
-
-<%if(install)%>
-"$(INSTALLDIR)" :
- if not exist "<%install%>/$(NULL)" mkdir "<%install%>"
-
-<%endif%>
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-"$(INTDIR)" :
- if not exist "<%intermediate_dir%>/$(NULL)" mkdir "<%intermediate_dir%>"
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-CPP=cl.exe
-CPP_PROJ=/nologo <%if(add_compile)%><%add_compile%> <%endif%><%if(optimize)%>/O2<%else%>/Ob0<%endif%> <%compile_flags%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines cpu_defines common_defines macros)%>/D <%define%> <%endfor%><%if(type_is_dynamic)%><%foreach(dynamicflags)%>/D <%dynamicflag%> <%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%>/D <%libflag%> <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%> <%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 cpu_defines macros)%> /d <%define%><%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")%> /INCREMENTAL:<%incremental("NO")%> <%foreach(lit_libs)%><%lit_lib%>.lib <%endfor%><%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)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%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)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%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)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%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
-<%endfor%>
-
-
-!IF "$(NO_EXTERNAL_DEPS)" != "1"
-!IF EXISTS("<%noextension(project_file)%>.dep")
-!INCLUDE "<%noextension(project_file)%>.dep"
-!ELSE
-!MESSAGE Warning: cannot find "<%noextension(project_file)%>.dep"
-!ENDIF
-!ENDIF
-
-
-!IF <%foreach(platforms)%><%foreach(configurations)%>"$(CFG)" == "<%platform%> <%configuration%>" <%fornotlast("|| ")%><%endfor%><%endfor%>
-<%if(pch_source)%>
-<%if(pch_header)%>
-SOURCE=.\<%pch_source%>
-
-<%foreach(platforms)%>
-<%foreach(configurations)%>
-!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%platform%> <%configuration%>"
-
-CPP_SWITCHES=/nologo <%if(add_compile)%><%add_compile%> <%endif%><%if(optimize)%>/O2<%else%>/Ob0<%endif%> <%compile_flags%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines cpu_defines common_defines macros)%>/D <%define%> <%endfor%><%if(type_is_dynamic)%><%foreach(dynamicflags)%>/D <%dynamicflag%> <%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%>/D <%libflag%> <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%> <%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%>
-<%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(idl_files)%>
-SOURCE=<%idl_file%>
-
-<%foreach(platforms)%>
-<%foreach(configurations)%>
-!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%platform%> <%configuration%>"
-
-InputPath=.\<%idl_file%>
-InputName=<%basenoextension(idl_file)%>
-InputDir=<%dirname(idl_file)%>
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.h" "<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.i" "<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.cpp" "<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.h" "<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.i" "<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- <<tempfile.bat
- @echo off
- <%idl_compiler%> -o <%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%> <%if(flag_overrides(idl_file, idlflags))%><%flag_overrides(idl_file, idlflags)%><%else%><%idlflags%><%endif%> <%idl_file%>
-<<
-
-<%endfor%>
-!ENDIF
-<%endfor%>
-
-<%endfor%>
-<%foreach(custom_types)%>
-<%foreach(custom_type->input_files)%>
-<%if(custom_type->input_file->output_files)%>
-SOURCE=<%custom_type->input_file%>
-
-<%foreach(platforms)%>
-<%foreach(configurations)%>
-!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%platform%> <%configuration%>"
-
-InputPath=.\<%custom_type->input_file%>
-InputName=<%basenoextension(custom_type->input_file)%>
-InputDir=<%dirname(custom_type->input_file)%>
-
-<%foreach(custom_type->input_file->output_files)%>"<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%>.\<%custom_type->input_file->output_file%><%endif%>" <%endfor%>: $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- <<tempfile.bat
- @echo off
-<%if(custom_type->libpath)%>
- PATH=%PATH%;<%custom_type->libpath%>
-<%endif%>
-<%if(custom_type->output_option)%>
-<%foreach(custom_type->input_file->output_files)%>
- <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath) <%custom_type->output_option%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>
-<%endfor%>
-<%else%>
- <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath)
-<%endif%>
-<<
-
-<%endfor%>
-!ENDIF
-<%endfor%>
-
-<%endif%>
-<%endfor%>
-<%endfor%>
-<%foreach(resource_files)%>
-SOURCE=.\<%resource_file%>
-
-"$(INTDIR)\<%basenoextension(resource_file)%>.res" : $(SOURCE) "$(INTDIR)"
- $(RSC) $(RSC_PROJ) $(SOURCE)
-
-
-<%endfor%>
-
-!ENDIF
-
diff --git a/templates/nmakedll.mpt b/templates/nmakedll.mpt
deleted file mode 100644
index 74ec8734..00000000
--- a/templates/nmakedll.mpt
+++ /dev/null
@@ -1,144 +0,0 @@
-conditional_include "idl_compiler_win32"
-conditional_include "common"
-
-configurations = Release Debug "Static Release" "Static Debug"
-platforms = Win32
-default_configuration = Debug
-common_defines = WIN32 _WINDOWS
-
-Win32 {
- machine_description = x86
- machine = I386
-}
-
-Win64 {
- machine_description = IA64
- machine = IA64
- cpu_defines = WIN64
- add_compile = /Wp64
-}
-
-Release {
- type_code = 0x0102
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /GX /MD /Zi /GR
- defines = NDEBUG
- compile_flags_removed = /YX
- output_dir = Release
- intermediate_dir = Release
- debug_switch =
- type_is_dynamic = 1
- type_is_binary = 1
- pdb = 1
-}
-
-Debug {
- type_code = 0x0102
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy
- defines = _DEBUG
- compile_flags_removed = /Fr /YX
- output_dir = .
- intermediate_dir = Debug
- lib_modifier = d
- type_is_dynamic = 1
- type_is_binary = 1
- pdb = 1
-}
-
-Static Release {
- type_description = "Static Library"
- type_code = 0x0104
- use_debug_libraries = 0
- optimize = 1
- compile_flags = W3 /GX /MD /Zi /GR
- defines = NDEBUG
- compile_flags_removed = /YX
- output_dir = Static_Release
- intermediate_dir = Static_Release
- lib_modifier = s
- debug_switch =
- type_is_static = 1
- need_staticflags = 1
-}
-
-Static Debug {
- type_description = "Static Library"
- type_code = 0x0104
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Gm /GX /Zi /GR /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_staticflags = 1
-}
-
-MFC Release {
- type_code = 0x0102
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /GX /MD /Zi /GR
- defines = NDEBUG
- compile_flags_removed = /YX
- output_dir = MFC_Release
- intermediate_dir = MFC_Release
- lib_modifier = mfc
- debug_switch =
- type_is_dynamic = 1
- type_is_binary = 1
- pdb = 1
-}
-
-MFC Debug {
- type_code = 0x0102
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy
- defines = _DEBUG
- compile_flags_removed = /Fr /YX
- output_dir = MFC_Debug
- intermediate_dir = MFC_Debug
- lib_modifier = mfcd
- type_is_dynamic = 1
- type_is_binary = 1
- pdb = 1
-}
-
-Static MFC Release {
- type_description = "Static Library"
- type_code = 0x0104
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /GX /MD /Zi /GR
- defines = NDEBUG
- compile_flags_removed = /YX
- output_dir = Static_MFC_Release
- intermediate_dir = Static_MFC_Release
- lib_modifier = mfcs
- debug_switch =
- type_is_static = 1
- need_staticflags = 1
-}
-
-Static MFC Debug {
- type_description = "Static Library"
- type_code = 0x0104
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Gm /GX /Zi /GR /Gy /MDd
- defines = _DEBUG
- compile_flags_removed = /Fr /YX
- output_dir = Static_MFC_Debug
- intermediate_dir = Static_MFC_Debug
- lib_modifier = mfcsd
- type_is_static = 1
- need_staticflags = 1
-}
-
-conditional_include "vcfullmacros"
diff --git a/templates/nmakeexe.mpt b/templates/nmakeexe.mpt
deleted file mode 100644
index 060431e4..00000000
--- a/templates/nmakeexe.mpt
+++ /dev/null
@@ -1,125 +0,0 @@
-conditional_include "idl_compiler_win32"
-conditional_include "common"
-
-type_description = "Console Application"
-type_code = 0x0103
-configurations = Release Debug "Static Release" "Static Debug"
-platforms = Win32
-default_configuration = Debug
-type_is_binary = 1
-common_defines = WIN32 _CONSOLE
-subsystem = console
-pdb = 1
-
-Win32 {
- machine_description = x86
- machine = I386
-}
-
-Win64 {
- machine_description = IA64
- machine = IA64
- cpu_defines = WIN64
- add_compile = /Wp64
-}
-
-Release {
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /GX /MD /GR
- defines = NDEBUG
- compile_flags_removed = /YX
- output_dir = Release
- intermediate_dir = Release
- debug_switch =
-}
-
-Debug {
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy
- defines = _DEBUG
- compile_flags_removed = /YX
- output_dir = .
- intermediate_dir = Debug
- lib_modifier = d
-}
-
-Static Release {
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /GX /MD /GR
- defines = NDEBUG
- compile_flags_removed = /YX
- lib_modifier = s
- need_staticflags = 1
- output_dir = Static_Release
- intermediate_dir = Static_Release
- debug_switch =
-}
-
-Static Debug {
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy
- defines = _DEBUG
- compile_flags_removed = /YX
- lib_modifier = sd
- need_staticflags = 1
- output_dir = Static_Debug
- intermediate_dir = Static_Debug
-}
-
-MFC Release {
- subsystem = windows
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /GX /MD /GR
- defines = NDEBUG _AFXDLL
- compile_flags_removed = /YX
- output_dir = MFC_Release
- intermediate_dir = MFC_Release
- lib_modifier = mfc
- debug_switch =
-}
-
-MFC Debug {
- subsystem = windows
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy
- defines = _DEBUG _AFXDLL
- compile_flags_removed = /YX
- output_dir = MFC_Debug
- intermediate_dir = MFC_Debug
- lib_modifier = mfcd
-}
-
-Static MFC Release {
- subsystem = windows
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /GX /MD /GR
- defines = NDEBUG _AFXDLL
- compile_flags_removed = /YX
- lib_modifier = mfcs
- need_staticflags = 1
- output_dir = Static_MFC_Release
- intermediate_dir = Static_MFC_Release
- debug_switch =
-}
-
-Static MFC Debug {
- subsystem = windows
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy
- defines = _DEBUG _AFXDLL
- compile_flags_removed = /YX
- lib_modifier = mfcsd
- need_staticflags = 1
- output_dir = Static_MFC_Debug
- intermediate_dir = Static_MFC_Debug
-}
-
-conditional_include "vcfullmacros"
diff --git a/templates/va4icc.mpd b/templates/va4icc.mpd
deleted file mode 100644
index 591c91d4..00000000
--- a/templates/va4icc.mpd
+++ /dev/null
@@ -1,139 +0,0 @@
-// 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 macros)%>
- define ("<%define%>", "1"),
-<%endfor%>
-<%if(type_is_dynamic)%>
-<%foreach(dynamicflags)%>
- define ("<%dynamicflag%>", "1"),
-<%endfor%>
-<%endif%>
-<%if(need_staticflags)%>
-<%foreach(staticflags)%>
- define ("<%staticflag%>", "1"),
-<%endfor%>
-<%endif%>
- 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),
- 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'),
- 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(lit_libs)%>
- source type (lib) "<%lit_lib%>.lib"
-<%endfor%>
-<%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 lit_libs)%>
- 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/templates/va4iccdll.mpt b/templates/va4iccdll.mpt
deleted file mode 100644
index 29c76ef0..00000000
--- a/templates/va4iccdll.mpt
+++ /dev/null
@@ -1,7 +0,0 @@
-conditional_include "idl_compiler_win32"
-conditional_include "common"
-
-common_defines = _WINDOWS WIN32
-type_is_dynamic = 1
-lib_modifier = d
-defines = _DEBUG
diff --git a/templates/va4iccdllexe.mpt b/templates/va4iccdllexe.mpt
deleted file mode 100644
index 41147727..00000000
--- a/templates/va4iccdllexe.mpt
+++ /dev/null
@@ -1,7 +0,0 @@
-conditional_include "idl_compiler_win32"
-conditional_include "common"
-
-common_defines = _WINDOWS _CONSOLE
-type_is_binary = 1
-lib_modifier = d
-defines = _DEBUG
diff --git a/templates/va4icclib.mpt b/templates/va4icclib.mpt
deleted file mode 100644
index e79e55d6..00000000
--- a/templates/va4icclib.mpt
+++ /dev/null
@@ -1,7 +0,0 @@
-conditional_include "idl_compiler_win32"
-conditional_include "common"
-
-common_defines = _WINDOWS WIN32
-type_is_static = 1
-lib_modifier = d
-defines = _DEBUG
diff --git a/templates/va4icclibexe.mpt b/templates/va4icclibexe.mpt
deleted file mode 100644
index e32938b7..00000000
--- a/templates/va4icclibexe.mpt
+++ /dev/null
@@ -1,8 +0,0 @@
-conditional_include "idl_compiler_win32"
-conditional_include "common"
-
-common_defines = _WINDOWS _CONSOLE
-type_is_binary = 1
-lib_modifier = d
-defines = _DEBUG
-need_staticflags = 1
diff --git a/templates/vc6.mpd b/templates/vc6.mpd
deleted file mode 100644
index 8cd762d4..00000000
--- a/templates/vc6.mpd
+++ /dev/null
@@ -1,269 +0,0 @@
-# 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("Win32")%> (<%platform_hardware("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%> (<%platform_hardware%>) <%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%>\<%noextension(project_file)%>"
-<%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 <%if(optimize)%>/O2<%else%>/Ob0<%endif%> <%compile_flags%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines common_defines macros)%>/D <%define%> <%endfor%><%if(type_is_dynamic)%><%foreach(dynamicflags)%>/D <%dynamicflag%> <%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%>/D <%libflag%> <%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(project_file)%>\<%noextension(pch_header)%>.pch" <%endif%>/FD /c
-<%if(compile_flags_removed)%>
-# SUBTRACT CPP <%compile_flags_removed%>
-<%endif%>
-# ADD RSC /l 0x409<%foreach(defines macros)%> /d <%define%><%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")%> /INCREMENTAL:<%incremental("NO")%> <%foreach(lit_libs)%><%lit_lib%>.lib <%endfor%><%foreach(libs defaultlibs)%><%lib%><%lib_modifier%>.lib <%endfor%><%foreach(libpaths)%>/libpath:"<%libpath%>" <%endfor%>/nologo /version:<%version("1.0")%> /subsystem:<%subsystem("windows")%><%if(pdb)%><%if(sharedname)%> /pdb:"<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%sharedname%><%lib_modifier%>.pdb"<%else%><%if(exename)%> /pdb:"<%if(install)%><%install%><%else%><%output_dir%><%endif%>\<%exename%>.pdb"<%endif%><%endif%><%endif%><%if(type_is_dynamic)%> /dll<%endif%> <%debug_switch("/debug")%> /machine:<%machine("I386")%> /out:"<%if(sharedname)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(exename)%><%if(install)%><%install%><%else%><%output_dir%><%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"
-<%if(pch_header)%>
-# Begin Source File
-
-SOURCE=".\<%pch_header%>"
-# End Source File
-<%endif%>
-<%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 IDL Compiler on $(InputPath)
-InputPath=.\<%idl_file%>
-InputName=<%basenoextension(idl_file)%>
-InputDir=<%dirname(idl_file)%>
-
-BuildCmds= \
- PATH=%PATH%;<%idl_compiler_libs%> \
- <%idl_compiler%> -o <%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%> <%if(flag_overrides(idl_file, idlflags))%><%flag_overrides(idl_file, idlflags)%><%else%><%idlflags%><%endif%> $(InputPath)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-# End Custom Build
-
-<%endfor%>
-!ENDIF
-
-# End Source File
-<%endfor%>
-# End Group
-<%endif%>
-<%foreach(custom_types)%>
-# Begin Group "<%custom_type%>"
-
-# PROP Default_Filter "<%foreach(custom_type->inputexts)%><%custom_type->inputext%><%fornotlast(";")%><%endfor%>"
-<%foreach(custom_type->input_files)%>
-<%if(custom_type->input_file->output_files)%>
-# Begin Source File
-
-SOURCE=".\<%custom_type->input_file%>"
-
-<%foreach(configurations)%>
-!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%platform%> <%configuration%>"
-
-# PROP Ignore_Default_Tool 1
-# Begin Custom Build - Invoking <%custom_type->command%> on $(InputPath)
-InputPath=.\<%custom_type->input_file%>
-InputName=<%basenoextension(custom_type->input_file)%>
-InputDir=<%dirname(custom_type->input_file)%>
-
-<%if(custom_type->output_option)%>
-<%foreach(custom_type->input_file->output_files)%>
-"<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%>.\<%custom_type->input_file->output_file%><%endif%>" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-<%if(custom_type->libpath)%>
- PATH=%PATH%;<%custom_type->libpath%>
-<%endif%>
- <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath) <%custom_type->output_option%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>
-
-<%endfor%>
-<%else%>
-BuildCmds= \
-<%if(custom_type->libpath)%>
- PATH=%PATH%;<%custom_type->libpath%> \
-<%endif%>
- <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath)
-
-<%foreach(custom_type->input_file->output_files)%>
-"<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%>.\<%custom_type->input_file->output_file%><%endif%>" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-<%endfor%>
-<%endif%>
-# End Custom Build
-
-<%endfor%>
-!ENDIF
-
-# End Source File
-<%endif%>
-<%endfor%>
-# End Group
-<%endfor%>
-# End Target
-# End Project
diff --git a/templates/vc6dsp.mpd b/templates/vc6dsp.mpd
deleted file mode 100644
index 8cd762d4..00000000
--- a/templates/vc6dsp.mpd
+++ /dev/null
@@ -1,269 +0,0 @@
-# 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("Win32")%> (<%platform_hardware("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%> (<%platform_hardware%>) <%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%>\<%noextension(project_file)%>"
-<%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 <%if(optimize)%>/O2<%else%>/Ob0<%endif%> <%compile_flags%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines common_defines macros)%>/D <%define%> <%endfor%><%if(type_is_dynamic)%><%foreach(dynamicflags)%>/D <%dynamicflag%> <%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%>/D <%libflag%> <%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(project_file)%>\<%noextension(pch_header)%>.pch" <%endif%>/FD /c
-<%if(compile_flags_removed)%>
-# SUBTRACT CPP <%compile_flags_removed%>
-<%endif%>
-# ADD RSC /l 0x409<%foreach(defines macros)%> /d <%define%><%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")%> /INCREMENTAL:<%incremental("NO")%> <%foreach(lit_libs)%><%lit_lib%>.lib <%endfor%><%foreach(libs defaultlibs)%><%lib%><%lib_modifier%>.lib <%endfor%><%foreach(libpaths)%>/libpath:"<%libpath%>" <%endfor%>/nologo /version:<%version("1.0")%> /subsystem:<%subsystem("windows")%><%if(pdb)%><%if(sharedname)%> /pdb:"<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%sharedname%><%lib_modifier%>.pdb"<%else%><%if(exename)%> /pdb:"<%if(install)%><%install%><%else%><%output_dir%><%endif%>\<%exename%>.pdb"<%endif%><%endif%><%endif%><%if(type_is_dynamic)%> /dll<%endif%> <%debug_switch("/debug")%> /machine:<%machine("I386")%> /out:"<%if(sharedname)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(exename)%><%if(install)%><%install%><%else%><%output_dir%><%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"
-<%if(pch_header)%>
-# Begin Source File
-
-SOURCE=".\<%pch_header%>"
-# End Source File
-<%endif%>
-<%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 IDL Compiler on $(InputPath)
-InputPath=.\<%idl_file%>
-InputName=<%basenoextension(idl_file)%>
-InputDir=<%dirname(idl_file)%>
-
-BuildCmds= \
- PATH=%PATH%;<%idl_compiler_libs%> \
- <%idl_compiler%> -o <%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%> <%if(flag_overrides(idl_file, idlflags))%><%flag_overrides(idl_file, idlflags)%><%else%><%idlflags%><%endif%> $(InputPath)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-# End Custom Build
-
-<%endfor%>
-!ENDIF
-
-# End Source File
-<%endfor%>
-# End Group
-<%endif%>
-<%foreach(custom_types)%>
-# Begin Group "<%custom_type%>"
-
-# PROP Default_Filter "<%foreach(custom_type->inputexts)%><%custom_type->inputext%><%fornotlast(";")%><%endfor%>"
-<%foreach(custom_type->input_files)%>
-<%if(custom_type->input_file->output_files)%>
-# Begin Source File
-
-SOURCE=".\<%custom_type->input_file%>"
-
-<%foreach(configurations)%>
-!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%platform%> <%configuration%>"
-
-# PROP Ignore_Default_Tool 1
-# Begin Custom Build - Invoking <%custom_type->command%> on $(InputPath)
-InputPath=.\<%custom_type->input_file%>
-InputName=<%basenoextension(custom_type->input_file)%>
-InputDir=<%dirname(custom_type->input_file)%>
-
-<%if(custom_type->output_option)%>
-<%foreach(custom_type->input_file->output_files)%>
-"<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%>.\<%custom_type->input_file->output_file%><%endif%>" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-<%if(custom_type->libpath)%>
- PATH=%PATH%;<%custom_type->libpath%>
-<%endif%>
- <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath) <%custom_type->output_option%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>
-
-<%endfor%>
-<%else%>
-BuildCmds= \
-<%if(custom_type->libpath)%>
- PATH=%PATH%;<%custom_type->libpath%> \
-<%endif%>
- <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath)
-
-<%foreach(custom_type->input_file->output_files)%>
-"<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%>.\<%custom_type->input_file->output_file%><%endif%>" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-<%endfor%>
-<%endif%>
-# End Custom Build
-
-<%endfor%>
-!ENDIF
-
-# End Source File
-<%endif%>
-<%endfor%>
-# End Group
-<%endfor%>
-# End Target
-# End Project
diff --git a/templates/vc6dspdll.mpt b/templates/vc6dspdll.mpt
deleted file mode 100644
index 7ad8406b..00000000
--- a/templates/vc6dspdll.mpt
+++ /dev/null
@@ -1,56 +0,0 @@
-conditional_include "idl_compiler_win32"
-conditional_include "common"
-
-configurations = Release Debug
-type_is_binary = 1
-type_is_dynamic = 1
-common_defines = WIN32 _WINDOWS
-pdb = 1
-
-Release {
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /GX /MD /Zi /GR
- defines = NDEBUG
- compile_flags_removed = /YX
- output_dir = Release
- intermediate_dir = Release
- debug_switch =
-}
-
-Debug {
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy
- defines = _DEBUG
- compile_flags_removed = /Fr /YX
- intermediate_dir = Debug
- lib_modifier = d
-}
-
-MFC Release {
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /GX /MD /Zi /GR
- defines = NDEBUG
- compile_flags_removed = /YX
- output_dir = MFC_Release
- intermediate_dir = MFC_Release
- debug_switch =
- lib_modifier = mfc
- use_mfc = 2
-}
-
-MFC Debug {
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy
- defines = _DEBUG
- compile_flags_removed = /Fr /YX
- output_dir = MFC_Debug
- intermediate_dir = MFC_Debug
- lib_modifier = mfcd
- use_mfc = 2
-}
-
-conditional_include "vcpartialmacros"
diff --git a/templates/vc6dspdllexe.mpt b/templates/vc6dspdllexe.mpt
deleted file mode 100644
index 1496559c..00000000
--- a/templates/vc6dspdllexe.mpt
+++ /dev/null
@@ -1,63 +0,0 @@
-conditional_include "idl_compiler_win32"
-conditional_include "common"
-
-type_description = "Console Application"
-type_code = 0x0103
-configurations = Release Debug
-type_is_binary = 1
-common_defines = WIN32 _CONSOLE
-subsystem = console
-pdb = 1
-
-Release {
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /GX /MD /GR
- defines = NDEBUG
- compile_flags_removed = /YX
- output_dir = Release
- intermediate_dir = Release
- debug_switch =
-}
-
-Debug {
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy
- defines = _DEBUG
- compile_flags_removed = /YX
- intermediate_dir = Debug
- output_dir = .
- lib_modifier = d
-}
-
-MFC Release {
- subsystem = windows
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /GX /MD /GR
- common_defines = WIN32 _WINDOWS
- defines = NDEBUG _AFXDLL
- compile_flags_removed = /YX
- output_dir = MFC_Release
- intermediate_dir = MFC_Release
- debug_switch =
- lib_modifier = mfc
- use_mfc = 2
-}
-
-MFC Debug {
- subsystem = windows
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy
- common_defines = WIN32 _WINDOWS
- defines = _DEBUG _AFXDLL
- compile_flags_removed = /YX
- intermediate_dir = MFC_Debug
- output_dir = MFC_Debug
- lib_modifier = mfcd
- use_mfc = 2
-}
-
-conditional_include "vcpartialmacros"
diff --git a/templates/vc6dsplib.mpt b/templates/vc6dsplib.mpt
deleted file mode 100644
index 0dc477c6..00000000
--- a/templates/vc6dsplib.mpt
+++ /dev/null
@@ -1,62 +0,0 @@
-conditional_include "idl_compiler_win32"
-conditional_include "common"
-
-type_description = "Static Library"
-type_code = 0x0104
-configurations = Release Debug
-type_is_static = 1
-need_staticflags = 1
-common_defines = WIN32 _WINDOWS
-
-
-Release {
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /GX /MD /Zi /GR
- defines = NDEBUG
- compile_flags_removed = /YX
- output_dir = Release
- intermediate_dir = Release
- lib_modifier = s
- debug_switch =
-}
-
-Debug {
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy
- defines = _DEBUG
- compile_flags_removed = /Fr /YX
- output_dir = Debug
- intermediate_dir = Debug
- lib_modifier = sd
- pdb = 1
-}
-
-MFC Release {
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /GX /MD /Zi /GR
- defines = NDEBUG
- compile_flags_removed = /YX
- output_dir = MFC_Release
- intermediate_dir = MFC_Release
- lib_modifier = mfcs
- debug_switch =
- use_mfc = 1
-}
-
-MFC Debug {
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy
- defines = _DEBUG
- compile_flags_removed = /Fr /YX
- output_dir = MFC_Debug
- intermediate_dir = MFC_Debug
- lib_modifier = mfcsd
- pdb = 1
- use_mfc = 1
-}
-
-conditional_include "vcpartialmacros"
diff --git a/templates/vc6dsplibexe.mpt b/templates/vc6dsplibexe.mpt
deleted file mode 100644
index a2a3b70a..00000000
--- a/templates/vc6dsplibexe.mpt
+++ /dev/null
@@ -1,67 +0,0 @@
-conditional_include "idl_compiler_win32"
-conditional_include "common"
-
-type_description = "Console Application"
-type_code = 0x0103
-configurations = Release Debug
-default_configuration = Debug
-type_is_binary = 1
-common_defines = WIN32 _CONSOLE
-subsystem = console
-need_staticflags = 1
-pdb = 1
-
-
-Release {
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /GX /MD /GR
- defines = NDEBUG
- compile_flags_removed = /YX
- lib_modifier = s
- output_dir = Release
- intermediate_dir = Release
- debug_switch =
-}
-
-Debug {
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy
- defines = _DEBUG
- compile_flags_removed = /YX
- intermediate_dir = Debug
- output_dir = Debug
- lib_modifier = sd
-}
-
-MFC Release {
- subsystem = windows
- use_debug_libraries = 0
- optimize = 1
- compile_flags = /W3 /GX /MD /GR
- common_defines = WIN32 _WINDOWS
- defines = NDEBUG _AFXDLL
- compile_flags_removed = /YX
- output_dir = MFC_Release
- intermediate_dir = MFC_Release
- debug_switch =
- lib_modifier = mfcs
- use_mfc = 1
-}
-
-MFC Debug {
- subsystem = windows
- use_debug_libraries = 1
- optimize =
- compile_flags = /W3 /Gm /GX /Zi /MDd /GR /Gy
- common_defines = WIN32 _WINDOWS
- defines = _DEBUG _AFXDLL
- compile_flags_removed = /YX
- intermediate_dir = MFC_Debug
- output_dir = MFC_Debug
- lib_modifier = mfcsd
- use_mfc = 1
-}
-
-conditional_include "vcpartialmacros"
diff --git a/templates/vc7.mpd b/templates/vc7.mpd
deleted file mode 100644
index 845241e0..00000000
--- a/templates/vc7.mpd
+++ /dev/null
@@ -1,266 +0,0 @@
-<?xml version="<%xml_version("1.0")%>" encoding="<%encoding("Windows-1252")%>"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="<%vcversion%>"
- 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)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%><%else%><%if(type_is_static)%><%libout%><%else%><%if(install)%><%install%><%else%><%output_dir%><%endif%><%endif%><%endif%>"
- IntermediateDirectory="<%intermediate_dir%>/<%noextension(project_file)%>"
- ConfigurationType="<%configuration_type("2")%>"
- UseOfMFC="<%use_mfc("0")%>"
- ATLMinimizesCRunTimeLibraryUsage="FALSE">
- <Tool
- Name="VCCLCompilerTool"
-<%if(optimize)%>
- Optimization="<%optimize%>"
-<%else%>
- Optimization="0"
-<%endif%>
- AdditionalIncludeDirectories="<%foreach(includes)%><%include%><%fornotlast(",")%><%endfor%>"
- PreprocessorDefinitions="<%if(type_is_dynamic)%><%foreach(dynamicflags)%><%dynamicflag%>;<%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%><%staticflag%>;<%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%><%pch_define%>;<%endfor%><%endif%><%foreach(defines common_defines macros)%><%define%><%fornotlast(";")%><%endfor%>"
- MinimalRebuild="<%MinimalRebuild("FALSE")%>"
- ExceptionHandling="TRUE"
-<%if(debug)%>
- BasicRuntimeChecks="<%BasicRuntimeChecks("3")%>"
-<%endif%>
-<%if(StringPooling)%>
- StringPooling="<%StringPooling%>"
-<%endif%>
- RuntimeLibrary="<%if(debug)%><%runtime_library("3")%><%else%><%runtime_library("2")%><%endif%>"
- BufferSecurityCheck="<%BufferSecurityCheck("TRUE")%>"
- EnableFunctionLevelLinking="<%EnableFunctionLevelLinking("TRUE")%>"
- TreatWChar_tAsBuiltInType="TRUE"
- ForceConformanceInForLoopScope="TRUE"
- RuntimeTypeInfo="<%rtti("TRUE")%>"
-<%if(pch_header)%>
-<%if(pch_source)%>
- UsePrecompiledHeader="3"
-<%else%>
- UsePrecompiledHeader="2"
-<%endif%>
- PrecompiledHeaderThrough="<%pch_header%>"
-<%endif%>
- WarningLevel="<%warning_level("3")%>"
- SuppressStartupBanner="TRUE"
- Detect64BitPortabilityProblems="<%Detect64BitPortabilityProblems("FALSE")%>"
- DebugInformationFormat="<%debug_format("3")%>"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
-<%if(type_is_binary)%>
- AdditionalDependencies="<%foreach(lit_libs)%><%lit_lib%>.lib <%endfor%><%foreach(libs defaultlibs)%><%lib%><%lib_modifier%>.lib<%fornotlast(" ")%><%endfor%>"
-<%endif%>
- OutputFile="$(OutDir)/<%if(type_is_dynamic)%><%sharedname%><%lib_modifier%>.dll<%else%><%if(type_is_static)%><%staticname%><%lib_modifier%>.lib<%else%><%exename%>.exe<%endif%><%endif%>"
- Version="<%version("1.0")%>"
- LinkIncremental="<%LinkIncremental("1")%>"
- SuppressStartupBanner="TRUE"
- AdditionalLibraryDirectories="<%foreach(libpaths)%><%libpath%><%fornotlast(";")%><%endfor%>"
- GenerateDebugInformation="TRUE"
-<%if(type_is_dynamic)%>
- ProgramDatabaseFile="$(OutDir)/<%sharedname%><%lib_modifier%>.pdb"
-<%else%>
- <%if(type_is_binary)%>
- ProgramDatabaseFile="$(OutDir)/<%exename%>.pdb"
- <%endif%>
-<%endif%>
- SubSystem="<%subsystem("1")%>"
-<%if(!debug)%>
- OptimizeReferences="<%optref("2")%>"
- EnableCOMDATFolding="<%opticf("2")%>"
-<%endif%>
-<%if(type_is_dynamic)%>
- ImportLibrary="$(OutDir)/<%sharedname%><%lib_modifier%>.lib"
-<%endif%>
- />
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="<%foreach(defines macros)%><%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>
-<%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 IDL Compiler on <%basename(idl_file)%> located in <%dirname(idl_file)%>"
-<%if(flag_overrides(idl_file, idlgendir))%>
- CommandLine="PATH=%PATH%;<%idl_compiler_libs%>
-<%idl_compiler%> -o <%flag_overrides(idl_file, idlgendir)%> <%if(flag_overrides(idl_file, idlflags))%><%flag_overrides(idl_file, idlflags)%><%else%><%idlflags("-Sc")%><%endif%> <%idl_file%>"
- Outputs="<%flag_overrides(idl_file, idlgendir)%>\<%basenoextension(idl_file)%>C.h;<%flag_overrides(idl_file, idlgendir)%>\<%basenoextension(idl_file)%>C.i;<%flag_overrides(idl_file, idlgendir)%>\<%basenoextension(idl_file)%>C.cpp;<%flag_overrides(idl_file, idlgendir)%>\<%basenoextension(idl_file)%>S.h;<%flag_overrides(idl_file, idlgendir)%>\<%basenoextension(idl_file)%>S.i;<%flag_overrides(idl_file, idlgendir)%>\<%basenoextension(idl_file)%>S.cpp"/>
-<%else%>
-<%if(idlgendir)%>
- CommandLine="PATH=%PATH%;<%idl_compiler_libs%>
-<%idl_compiler%> -o <%idlgendir%> <%if(flag_overrides(idl_file, idlflags))%><%flag_overrides(idl_file, idlflags)%><%else%><%idlflags("-Sc")%><%endif%> <%idl_file%>"
- Outputs="<%idlgendir%>\<%basenoextension(idl_file)%>C.h;<%idlgendir%>\<%basenoextension(idl_file)%>C.i;<%idlgendir%>\<%basenoextension(idl_file)%>C.cpp;<%idlgendir%>\<%basenoextension(idl_file)%>S.h;<%idlgendir%>\<%basenoextension(idl_file)%>S.i;<%idlgendir%>\<%basenoextension(idl_file)%>S.cpp"/>
-<%else%>
-<%if(dirname_found)%>
- CommandLine="PATH=%PATH%;<%idl_compiler_libs%>
-<%idl_compiler%> -o <%dirname(idl_file)%> <%if(flag_overrides(idl_file, idlflags))%><%flag_overrides(idl_file, idlflags)%><%else%><%idlflags("-Sc")%><%endif%> <%idl_file%>"
- Outputs="<%basenoextension(idl_file)%>C.h;<%basenoextension(idl_file)%>C.i;<%basenoextension(idl_file)%>C.cpp;<%basenoextension(idl_file)%>S.h;<%basenoextension(idl_file)%>S.i;<%basenoextension(idl_file)%>S.cpp"/>
-<%else%>
- CommandLine="PATH=%PATH%;<%idl_compiler_libs%>
-<%idl_compiler%> <%if(flag_overrides(idl_file, idlflags))%><%flag_overrides(idl_file, idlflags)%><%else%><%idlflags("-Sc")%><%endif%> <%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"/>
-<%endif%>
-<%endif%>
-<%endif%>
- </FileConfiguration>
-<%endfor%>
- </File>
-<%endfor%>
- </Filter>
-<%endif%>
-<%foreach(custom_types)%>
- <Filter
- Name="<%custom_type%>"
- Filter="<%foreach(custom_type->inputexts)%><%custom_type->inputext%><%fornotlast(";")%><%endfor%>">
-<%foreach(custom_type->input_files)%>
-<%if(custom_type->input_file->output_files)%>
- <File
- RelativePath=".\<%custom_type->input_file%>">
-<%foreach(configurations)%>
- <FileConfiguration
- Name="<%configuration%>|<%platform%>">
- <Tool
- Name="VCCustomBuildTool"
- Description="Invoking <%custom_type->command%> on <%custom_type->input_file%>"
- CommandLine="<%if(custom_type->libpath)%>PATH=%PATH%;<%custom_type->libpath%>
-<%endif%><%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%custom_type->input_file%> <%if(custom_type->output_option)%><%custom_type->output_option%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_files)%><%else%><%custom_type->input_file->output_files%><%endif%><%endif%>"
- Outputs="<%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(";")%><%endfor%>"/>
- </FileConfiguration>
-<%endfor%>
- </File>
-<%endif%>
-<%endfor%>
- </Filter>
-<%endfor%>
-<%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/templates/vc7dll.mpt b/templates/vc7dll.mpt
deleted file mode 100644
index b01ac6ba..00000000
--- a/templates/vc7dll.mpt
+++ /dev/null
@@ -1,102 +0,0 @@
-conditional_include "idl_compiler_win32"
-conditional_include "common"
-
-configurations = Release Debug "Static Release" "Static Debug"
-common_defines = WIN32 _WINDOWS
-
-Release {
- type_is_dynamic = 1
- type_is_binary = 1
- defines = NDEBUG
- output_dir = Release
- intermediate_dir = Release
- runtime_library = 2
- pdb = 1
-}
-
-Debug {
- type_is_dynamic = 1
- type_is_binary = 1
- optimize = 0
- debug = 1
- defines = _DEBUG
- output_dir = .
- intermediate_dir = Debug
- lib_modifier = d
- runtime_library = 3
- pdb = 1
-}
-
-Static Release {
- type_is_static = 1
- defines = NDEBUG
- output_dir = Static_Release
- intermediate_dir = Static_Release
- lib_modifier = s
- need_staticflags = 1
- runtime_library = 2
-}
-
-Static Debug {
- type_is_static = 1
- optimize = 0
- debug = 1
- defines = _DEBUG
- output_dir = Static_Debug
- intermediate_dir = Static_Debug
- lib_modifier = sd
- need_staticflags = 1
- runtime_library = 3
-}
-
-MFC Release {
- type_is_dynamic = 1
- type_is_binary = 1
- defines = NDEBUG
- output_dir = MFC_Release
- intermediate_dir = MFC_Release
- lib_modifier = mfc
- runtime_library = 2
- pdb = 1
- use_mfc = 2
-}
-
-MFC Debug {
- type_is_dynamic = 1
- type_is_binary = 1
- optimize = 0
- debug = 1
- defines = _DEBUG
- output_dir = MFC_Debug
- intermediate_dir = MFC_Debug
- lib_modifier = mfcd
- runtime_library = 3
- pdb = 1
- use_mfc = 2
-}
-
-Static MFC Release {
- type_is_static = 1
- defines = NDEBUG
- output_dir = Static_MFC_Release
- intermediate_dir = Static_MFC_Release
- lib_modifier = mfcs
- need_staticflags = 1
- runtime_library = 2
- use_mfc = 2
-}
-
-Static MFC Debug {
- type_is_static = 1
- optimize = 0
- debug = 1
- defines = _DEBUG
- output_dir = Static_MFC_Debug
- intermediate_dir = Static_MFC_Debug
- lib_modifier = mfcsd
- need_staticflags = 1
- runtime_library = 3
- use_mfc = 2
-}
-
-conditional_include "vcfullmacros"
diff --git a/templates/vc7exe.mpt b/templates/vc7exe.mpt
deleted file mode 100644
index 8c3ac5fc..00000000
--- a/templates/vc7exe.mpt
+++ /dev/null
@@ -1,92 +0,0 @@
-conditional_include "idl_compiler_win32"
-conditional_include "common"
-
-configurations = Release Debug "Static Release" "Static Debug"
-type_is_binary = 1
-common_defines = WIN32 _CONSOLE
-configuration_type = 1
-subsystem = 1
-pdb = 1
-
-Release {
- defines = NDEBUG
- output_dir = Release
- intermediate_dir = Release
- runtime_library = 2
-}
-
-Debug {
- optimize = 0
- debug = 1
- defines = _DEBUG
- output_dir = .
- 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_staticflags = 1
- runtime_library = 2
-}
-
-Static Debug {
- optimize = 0
- debug = 1
- defines = _DEBUG
- output_dir = Static_Debug
- intermediate_dir = Static_Debug
- lib_modifier = sd
- need_staticflags = 1
- runtime_library = 3
-}
-
-MFC Release {
- common_defines = WIN32 _WINDOWS
- defines = NDEBUG _AFXDLL
- output_dir = MFC_Release
- intermediate_dir = MFC_Release
- lib_modifier = mfc
- runtime_library = 2
- use_mfc = 2
-}
-
-MFC Debug {
- optimize = 0
- debug = 1
- common_defines = WIN32 _WINDOWS
- defines = _DEBUG _AFXDLL
- output_dir = MFC_Debug
- intermediate_dir = MFC_Debug
- lib_modifier = mfcd
- runtime_library = 3
- use_mfc = 2
-}
-
-Static MFC Release {
- defines = NDEBUG _AFXDLL
- output_dir = Static_MFC_Release
- intermediate_dir = Static_MFC_Release
- lib_modifier = mfcs
- need_staticflags = 1
- runtime_library = 2
- use_mfc = 2
-}
-
-Static MFC Debug {
- optimize = 0
- debug = 1
- defines = _DEBUG _AFXDLL
- output_dir = Static_MFC_Debug
- intermediate_dir = Static_MFC_Debug
- lib_modifier = mfcsd
- need_staticflags = 1
- runtime_library = 3
- use_mfc = 2
-}
-
-conditional_include "vcfullmacros"