summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2005-11-16 14:35:20 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2005-11-16 14:35:20 +0000
commit529daa9fb8eb5f28d00831ca90b37f79458175c0 (patch)
treee7543ea82fd30d8edda5749e0edd07ae7f64cff9
parent47f6c2e663d98e2b046cb03d75f89779bc915c9e (diff)
downloadMPC-529daa9fb8eb5f28d00831ca90b37f79458175c0.tar.gz
ChangeLogTag: Wed Nov 16 08:30:51 2005 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog12
-rw-r--r--modules/Creator.pm9
-rw-r--r--modules/ProjectCreator.pm3
3 files changed, 23 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a343d025..51e90c68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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+$//;