Permalink
Browse files

ChangeLogTag: Wed Aug 19 02:11:03 UTC 2009 Chad Elliott <elliott_c@oc…

…iweb.com>

git-svn-id: svn://svn.dre.vanderbilt.edu/DOC/MPC/trunk@1623 a3e5c962-4219-0410-a828-e124f845ac39
  • Loading branch information...
1 parent 55388c5 commit 9a4981415ef824e0209bcf464cd1a703570422e5 @ocielliottc ocielliottc committed Aug 19, 2009
View
@@ -1,3 +1,50 @@
+Wed Aug 19 02:11:03 UTC 2009 Chad Elliott <elliott_c@ociweb.com>
+
+ * create_base.pl:
+
+ Added a description of what the script does to the usage.
+
+ * modules/Driver.pm:
+
+ Use DirectoryManager::onVMS() instead of comparing $^O to 'VMS'.
+
+ * modules/Options.pm:
+
+ Removed a redundant exit() call.
+
+ * modules/ProjectCreator.pm:
+
+ Added comments to the get_special_value method.
+
+ * modules/NMakeWorkspaceCreator.pm:
+ * modules/TemplateParser.pm:
+ * modules/VC7WorkspaceCreator.pm:
+
+ Added the 'managed' setting to the saved project info structure.
+
+ * modules/VC8WorkspaceCreator.pm:
+
+ Used the new 'managed' setting in the saved project info structure
+ to avoid adding a reference to a non-managed c++ library.
+
+ * templates/vc8.mpd:
+
+ Removed the use of <%language%> in the MPC ADD DEPENDENCIES
+ comment. It was not necessary since we have that information
+ available from the saved project info structure.
+
+ * modules/WorkspaceCreator.pm:
+
+ Removed the redundant setting of the 'info' data member.
+
+ * registry.pl:
+
+ Added vc10 and wix types.
+
+ * vs_postclean.pl:
+
+ Changed spaces in a regular expression to \s*.
+
Fri Aug 14 18:46:11 UTC 2009 Chad Elliott <elliott_c@ociweb.com>
* config/pcre.mpb:
View
@@ -148,8 +148,10 @@ sub usageAndExit {
print STDERR "$str\n" if (defined $str);
print STDERR "Create Base Project v$version\n",
"Usage: ", basename($0), " <mpc files> <output file or ",
- "directory>\n\nThis is only useful if the project ",
- "explictly sets sharedname or staticname.\n";
+ "directory>\n\nThis script will create a base project ",
+ "based on the contents of the\nsupplied MPC file. ",
+ "This is only useful if the project ",
+ "explictly sets\nsharedname or staticname.\n";
exit(0);
}
@@ -181,8 +183,8 @@ sub usageAndExit {
## Print the usage and exit if there is no input, output or the input
## file looks like an option.
- usageAndExit() if (!defined output ||
- !defined $input || index($input, '-') == 0);
+ usageAndExit() if (!defined $output ||
+ !defined $input || index($input, '-') == 0);
## If the output file is a directory, we will create the output file
## name based on the input file.
View
@@ -252,7 +252,7 @@ Wed Apr 23 14:31:32 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
Renamed wb26wrproject to wb26
* modules/ProjectCreator.pm:
- Changed from Chad Elliot to make the make_coexistence
+ Changed from Chad Elliott to make the make_coexistence
commandline flag available in the template
* modules/WB26ProjectCreator.pm:
@@ -629,7 +629,7 @@ Fri Mar 7 14:51:25 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
because on OpenVMS all filenames are returned lower case by perl
and the after specified by the user is mixed case which
resulted in the fact that the after just didn't work
- on OpenVMS. Thanks to Chad Elliot for reviewing the patches
+ on OpenVMS. Thanks to Chad Elliott for reviewing the patches
and point out the possible performance problems of my
original changes
@@ -670,7 +670,7 @@ Wed Feb 27 14:09:25 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
On OpenVMS all filenames are returned lower case. The dynamic loading
of creators then fails. Addressed this by opening the creator file
and read the first line, it normally starts with package and after
- that the package name. Thanks to Chad Elliot for this idea and
+ that the package name. Thanks to Chad Elliott for this idea and
reviewing the proposed change.
Fri Feb 22 14:49:25 UTC 2008 Adam Mitz <mitza@ociweb.com>
@@ -800,7 +800,7 @@ Thu Jan 24 16:01:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
* modules/WB26ProjectCreator.pm:
* modules/WorkspaceCreator.pm:
- Committed fix of Chad Elliot so that the generation of the build
+ Committed fix of Chad Elliott so that the generation of the build
order for the wb26 project type does work.
* modules/WB26WorkspaceCreator.pm:
@@ -867,7 +867,7 @@ Tue Jan 22 08:48:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
The WindRiver workbench requires all paths to have forward slashes,
also on Windows. Added a requires_forward_slashes method so that
the project creator can indicate that forward slashes has to be
- used. Thanks to Chad Elliot for helping with this, this fixes
+ used. Thanks to Chad Elliott for helping with this, this fixes
bugzilla 3201
Tue Jan 22 08:27:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
View
@@ -130,7 +130,7 @@ sub add_dynamic_creators {
foreach my $file (readdir($fh)) {
if ($file =~ /(.+$type)\.pm$/i) {
my $name = $1;
- if ($^O eq 'VMS') {
+ if (DirectoryManager::onVMS()) {
my $fh = new FileHandle();
if (open($fh, $dir . "/modules/" . $file)) {
my $line = <$fh>;
@@ -74,7 +74,7 @@ sub write_comps {
## configuration (if available). It just so happens that Debug comes
## before Release so sorting the configurations works in our favor.
foreach my $project (keys %$pjs) {
- my($name, $deps, $pguid, $lang, $custom_only, $nocross, @cfgs) = @{$pjs->{$project}};
+ my($name, $deps, $pguid, $lang, $custom_only, $nocross, $managed, @cfgs) = @{$pjs->{$project}};
@cfgs = sort @cfgs;
if (defined $cfgs[0]) {
$default = $cfgs[0];
View
@@ -168,8 +168,6 @@ sub printUsage {
" name value pair. Use += to add VAL to the NAME's\n" .
" value. Use -= to subtract and = to override the value.\n" .
" -version Print the MPC version and exit.\n";
-
- exit(0);
}
@@ -3779,6 +3779,9 @@ sub get_special_value {
my $based = shift;
my @params = @_;
+ ## These names (held in $type) are variables that contain various
+ ## commands that will be used in templates within the context of a
+ ## foreach (e.g., <%custom_type->input_files%> or <%feature->value%>).
if ($type eq 'feature') {
return $self->get_feature_value($cmd, $based);
}
@@ -1844,6 +1844,11 @@ sub collect_data {
$prjc->update_project_info($self, 1, ['custom_only']);
$prjc->update_project_info($self, 1, ['nocross']);
+ ## For VC8 to be able to add references to managed DLL's to the current
+ ## managed DLL project (if it is one), we need to keep track of whether
+ ## the project is 'managed' or not.
+ $prjc->update_project_info($self, 1, ['managed']);
+
## Some Windows based projects can't deal with certain version
## values. So, for those we provide a translated version.
my $version = $prjc->get_assignment('version');
@@ -142,7 +142,7 @@ sub write_comps {
## Project Information
foreach my $project (@list) {
- my($pname, $rawdeps, $guid, $language, $custom_only, $nocross, @cfgs) = @{$$pjs{$project}};
+ my($pname, $rawdeps, $guid, $language, $custom_only, $nocross, $managed, @cfgs) = @{$$pjs{$project}};
my $pguid = $guids{$language};
my $deps = $self->get_validated_ordering($project);
my($name, $proj) = $self->adjust_names($pname, $project, $language);
@@ -161,7 +161,7 @@ sub write_comps {
") = preSolution$crlf";
my %configs;
foreach my $project (@list) {
- my($name, $deps, $pguid, $lang, $custom_only, $nocross, @cfgs) = @{$$pjs{$project}};
+ my($name, $deps, $pguid, $lang, $custom_only, $nocross, $managed, @cfgs) = @{$$pjs{$project}};
foreach my $cfg (@cfgs) {
$configs{$self->get_short_config_name($cfg)} = $cfg;
}
@@ -188,7 +188,7 @@ sub write_comps {
## Go through each project and print out the settings per GUID
foreach my $project (@list) {
- my($name, $deps, $pguid, $lang, $custom_only, $nocross, @cfgs) = @{$$pjs{$project}};
+ my($name, $deps, $pguid, $lang, $custom_only, $nocross, $managed, @cfgs) = @{$$pjs{$project}};
my %all_configs = %configs;
foreach my $cfg (sort @cfgs) {
my $c = $self->get_short_config_name($cfg);
@@ -59,8 +59,8 @@ sub post_workspace {
## Store a map of the project name to project guid
foreach my $project (@projects) {
- my($name, $deps, $guid) = @{$$pjs{$project}};
- $gmap{$name} = $guid;
+ my($name, $deps, $guid, $lang, $custom_only, $nocross, $managed) = @{$$pjs{$project}};
+ $gmap{$name} = [$guid, $managed || $lang ne Creator::cplusplus];
}
## Now go through the projects and check for the need to add external
@@ -74,31 +74,41 @@ sub post_workspace {
my @read;
my $crlf = $self->crlf();
my $cwd = $self->getcwd();
+ my $lang = $$pjs{$project}->[3];
+ my $managed = $$pjs{$project}->[6];
while(<$ph>) {
## This is a comment found in vc8.mpd if the project contains the
## 'after' keyword setting and the 'add_references' template
## variable setting.
- if (/^(\s*)<!\-\-\s+MPC\s+ADD\s+DEPENDENCIES\s+([^\s]+)?/) {
+ if (/^(\s*)<!\-\-\s+MPC\s+ADD\s+DEPENDENCIES/) {
my $spc = $1;
- my $lang = $2;
my $deps = $self->get_validated_ordering($project);
foreach my $dep (@$deps) {
my $relative = $self->get_relative_dep_file($creator,
"$cwd/$project",
$dep);
if (defined $relative) {
- if (defined $lang && $lang eq Creator::cplusplus) {
- push(@read, $spc . '<ProjectReference' . $crlf .
- $spc . "\tReferencedProjectIdentifier=" .
- "\"\{$gmap{$dep}\}\"$crlf" .
- $spc . "\tRelativePathToProject=\"$relative\"$crlf" .
- $spc . '/>' . $crlf);
+ if ($lang eq Creator::cplusplus) {
+ ## If the current project is not managed, then we will
+ ## add references (although I doubt that will be useful).
+ ## If the current project is managed, then the reference
+ ## project must be managed or a non-c++ project.
+ if (!$managed || ($managed && $gmap{$dep}->[1])) {
+ push(@read, $spc . '<ProjectReference' . $crlf .
+ $spc . "\tReferencedProjectIdentifier=" .
+ "\"\{$gmap{$dep}->[0]\}\"$crlf" .
+ $spc . "\tRelativePathToProject=\"$relative\"$crlf" .
+ $spc . '/>' . $crlf);
+ }
}
- else {
+ ## This is a non-c++ language. So, it should not reference
+ ## unmanaged c++ libraries. If it's a managed project or
+ ## it's not a c++ project, it's ok to add a reference.
+ elsif ($gmap{$dep}->[1]) {
push(@read, $spc . '<ProjectReference Include="' .
$relative . '">' . $crlf,
- $spc . ' <Project>{' . $gmap{$dep} .
+ $spc . ' <Project>{' . $gmap{$dep}->[0] .
'}</Project>' . $crlf,
$spc . ' <Name>' . $dep . '</Name>' . $crlf,
$spc . '</ProjectReference>' . $crlf);
@@ -89,7 +89,6 @@ sub new {
$self->{'for_eclipse'} = $foreclipse;
$self->{'generate_dot'} = $gendot;
$self->{'generate_ins'} = $genins;
- $self->{'into'} = $into;
$self->{'verbose_ordering'} = undef;
$self->{'wctype'} = $self->extractType("$self");
$self->{'workspace_comments'} = $comments;
@@ -1997,7 +1996,7 @@ sub project_creator {
$parameters{'name_modifier'},
$parameters{'apply_project'},
$self->{'generate_ins'} || $parameters{'genins'},
- $self->{'into'},
+ $self->get_into(),
$parameters{'language'},
$parameters{'use_env'},
$parameters{'expand_vars'},
View
@@ -26,13 +26,15 @@
my $MPC_ROOT = $FindBin::Bin;
$MPC_ROOT =~ s!/!\\!g;
-my $version = '1.3';
+my $version = '1.4';
my %types = ('nmake' => ['NMAKE', 'NMAKE'],
'bmake' => ['Borland Make', 'Borland Make'],
'vc6' => ['DSW', 'DSP'],
'vc71' => ['SLN 7.1', 'VCPROJ 7.1'],
'vc8' => ['SLN 8.0', 'VCPROJ 8.0'],
'vc9' => ['SLN 9.0', 'VCPROJ 9.0'],
+ 'vc10' => ['SLN 10.0', 'VCPROJ 10.0'],
+ 'wix' => ['WiX', 'WiX Project'],
);
# ******************************************************************
View
@@ -535,7 +535,7 @@
</Configurations>
<References>
<%if(after && add_references)%>
- <!-- MPC ADD DEPENDENCIES <%language%> -->
+ <!-- MPC ADD DEPENDENCIES -->
<%endif%>
<%foreach(AssemblyReferences)%>
<AssemblyReference
View
@@ -99,7 +99,7 @@ sub clean_sln {
## For a solution, just read in and clean each project file we find.
if (open($fh, $file)) {
while (<$fh>) {
- if (/^Project\([^)]+\) = "[^\"]+", "([^\"]+)"/) {
+ if (/^Project\([^)]+\)\s*=\s*"[^\"]+",\s*"([^\"]+)"/) {
clean_proj($cfg, $1);
}
}

0 comments on commit 9a49814

Please sign in to comment.