diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2005-06-28 12:21:34 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2005-06-28 12:21:34 +0000 |
commit | 57cb4c028f4674966229c4794f35d927326c0dac (patch) | |
tree | 701db6b2ba83345521fa5471b05aa0fdf3589614 | |
parent | db0a0909d08e3b91628f8b5c7bdfcea2622f2bd5 (diff) | |
download | MPC-57cb4c028f4674966229c4794f35d927326c0dac.tar.gz |
ChangeLogTag: Tue Jun 28 07:20:08 2005 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | README | 10 | ||||
-rw-r--r-- | modules/ProjectCreator.pm | 18 |
3 files changed, 34 insertions, 2 deletions
@@ -1,3 +1,11 @@ +Tue Jun 28 07:20:08 2005 Chad Elliott <elliott_c@ociweb.com> + + * README: + * modules/ProjectCreator.pm: + + Added the functionality to negate the project type in 'specific' + and 'conditional' clauses. + Tue Jun 28 06:31:26 2005 Chad Elliott <elliott_c@ociweb.com> * config/zlib.mpb: @@ -224,7 +224,10 @@ specific This scope allows assignments that are specific to a } Due to limited parsing capabilities, the else is required to - be on the same line as the closing curly brace. + be on the same line as the closing curly brace. You may + also negate the project type (using '!') which will cause + the specific to be evaluated for all types except the type + specified. If a keyword is not recognized as a valid MPC keyword, it is interpreted as a template value modifier. In this @@ -252,7 +255,10 @@ conditional This scope allows addition of source files conditionally } Due to limited parsing capabilities, the else is required to - be on the same line as the closing curly brace. + be on the same line as the closing curly brace. You may + also negate the project type (using '!') which will cause + the conditional to be evaluated for all types except the + type specified. requires Specifies which features should be enabled in order to generate the project file. diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm index b0e10fc6..f43463f7 100644 --- a/modules/ProjectCreator.pm +++ b/modules/ProjectCreator.pm @@ -697,6 +697,15 @@ sub parse_line { my($scope_parsed) = 0; my($defcomp) = $self->get_default_component_name(); foreach my $type (split(/\s*,\s*/, $name)) { + my($not) = ($type =~ s/^!\s*//); + if ($not) { + if ($type eq $self->{'pctype'}) { + $type = ''; + } + else { + $type = $self->{'pctype'}; + } + } if ($type eq $self->{'pctype'} || $type eq $defcomp) { ($status, $errorString) = $self->parse_scope( $ih, $values[1], $type, @@ -995,6 +1004,15 @@ sub parse_conditional { my($add) = 0; foreach my $type (split(/\s*,\s*/, $types)) { + my($not) = ($type =~ s/^!\s*//); + if ($not) { + if ($type eq $self->{'pctype'}) { + $type = ''; + } + else { + $type = $self->{'pctype'}; + } + } if ($type eq $self->{'pctype'}) { $add = 1; last; |