aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--make/configure.pm25
1 files changed, 13 insertions, 12 deletions
diff --git a/make/configure.pm b/make/configure.pm
index 6e5f2ffbe..0904752fd 100644
--- a/make/configure.pm
+++ b/make/configure.pm
@@ -289,22 +289,23 @@ sub parse_templates($$$) {
}
}
- # Does this line match a directive?
+ # Does this line match a command?
if ($line =~ /^(\s*)%(\w+)\s+(.+)$/) {
- if ($2 eq 'define') {
- if ($settings{$3}) {
- push @lines, "#$1define $3";
+ my ($indent, $name, $value) = ($1, $2, $3);
+ if ($name eq 'define') {
+ if ($settings{$value}) {
+ push @lines, "#${indent}define $value";
} else {
- push @lines, "#$1undef $3";
+ push @lines, "#${indent}undef $value";
}
- } elsif ($2 eq 'mode') {
- $mode = oct $3;
- } elsif ($2 eq 'platform') {
- push @platforms, $3;
- } elsif ($2 eq 'target') {
- push @targets, catfile CONFIGURE_ROOT, $3;
+ } elsif ($name eq 'mode') {
+ $mode = oct $value;
+ } elsif ($name eq 'platform') {
+ push @platforms, $value;
+ } elsif ($name eq 'target') {
+ push @targets, catfile CONFIGURE_ROOT, $value;
} else {
- print_warning "unknown template command '$2' in $template!";
+ print_warning "unknown template command '$name' in $template!";
push @lines, $line;
}
next;