diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2005-11-16 14:35:20 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2005-11-16 14:35:20 +0000 |
commit | 529daa9fb8eb5f28d00831ca90b37f79458175c0 (patch) | |
tree | e7543ea82fd30d8edda5749e0edd07ae7f64cff9 | |
parent | 47f6c2e663d98e2b046cb03d75f89779bc915c9e (diff) | |
download | MPC-529daa9fb8eb5f28d00831ca90b37f79458175c0.tar.gz |
ChangeLogTag: Wed Nov 16 08:30:51 2005 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | modules/Creator.pm | 9 | ||||
-rw-r--r-- | modules/ProjectCreator.pm | 3 |
3 files changed, 23 insertions, 1 deletions
@@ -1,3 +1,15 @@ +Wed Nov 16 08:30:51 2005 Chad Elliott <elliott_c@ociweb.com> + + * modules/Creator.pm: + * modules/ProjectCreator.pm: + + Fixed a bug where adding or subtracting a value with spaces would + not work as expected. When adding, the value would be split at + each whitespace. When subtracting, the value would never be + removed. + + Setting a variable with spaces worked correctly. + Thu Nov 15 18:59:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl> * config/boost_filesystem.mpb: diff --git a/modules/Creator.pm b/modules/Creator.pm index 874f6b39..b93116ac 100644 --- a/modules/Creator.pm +++ b/modules/Creator.pm @@ -659,6 +659,15 @@ sub process_assignment_sub { if ($nval =~ s/$value\s+// || $nval =~ s/$value$//) { $self->process_assignment($name, $nval, $assign); } + else { + ## Try the same thing only with double quotes around the value. + ## Double quotes will be preserved in the value when the value + ## contains spaces. + $value = '"' . $value . '"'; + if ($nval =~ s/$value\s+// || $nval =~ s/$value$//) { + $self->process_assignment($name, $nval, $assign); + } + } } } diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm index 82b23549..9d4ceeb2 100644 --- a/modules/ProjectCreator.pm +++ b/modules/ProjectCreator.pm @@ -1616,7 +1616,8 @@ sub remove_duplicate_addition { $value = $self->modify_assignment_value($name, $value); foreach my $val (@{$self->create_array($value)}) { if (!exists $parts{$val}) { - $allowed .= $val . ' '; + my($qt) = ($val =~ /\s/ ? '"' : ''); + $allowed .= $qt . $val . $qt . ' '; } } $allowed =~ s/\s+$//; |