aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-10-05 21:44:43 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-10-05 21:44:43 +0000
commite2e8d55dcceef88f4c6e366ee690e7ab4beed14b (patch)
tree94d2fa4c69bb90d09d2db81a8533d185d72fe9ab
parent3b23e91fff87323e932902319f69383bc51f012c (diff)
downloadupstream-e2e8d55dcceef88f4c6e366ee690e7ab4beed14b.tar.gz
upstream-e2e8d55dcceef88f4c6e366ee690e7ab4beed14b.tar.bz2
upstream-e2e8d55dcceef88f4c6e366ee690e7ab4beed14b.zip
allow targets to select/deselect config symbols
SVN-Revision: 9150
-rw-r--r--include/target.mk1
-rwxr-xr-xscripts/metadata.pl19
2 files changed, 19 insertions, 1 deletions
diff --git a/include/target.mk b/include/target.mk
index 0217fcff6f..9ee369d9b1 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -150,6 +150,7 @@ define BuildTargets/DumpCurrent
echo 'Target-Path: $(subst $(TOPDIR)/,,$(PWD))'; \
echo 'Target-Arch: $(ARCH)'; \
echo 'Target-Features: $(FEATURES)'; \
+ echo 'Target-Depends: $(DEPENDS)'; \
echo 'Linux-Version: $(LINUX_VERSION)'; \
echo 'Linux-Release: $(LINUX_RELEASE)'; \
echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'; \
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index aa5df6fb9d..580e29ea0b 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -25,7 +25,9 @@ sub parse_target_metadata() {
$target = {
id => $1,
conf => confstr($1),
- profiles => []
+ profiles => [],
+ features => [],
+ depends => []
};
push @target, $target;
};
@@ -38,6 +40,7 @@ sub parse_target_metadata() {
/^Target-Path:\s*(.+)\s*$/ and $target->{path} = $1;
/^Target-Arch:\s*(.+)\s*$/ and $target->{arch} = $1;
/^Target-Features:\s*(.+)\s*$/ and $target->{features} = [ split(/\s+/, $1) ];
+ /^Target-Depends:\s*(.+)\s*$/ and $target->{depends} = [ split(/\s+/, $1) ];
/^Target-Description:/ and $target->{desc} = get_multiline(*FILE);
/^Linux-Version:\s*(.+)\s*$/ and $target->{version} = $1;
/^Linux-Release:\s*(.+)\s*$/ and $target->{release} = $1;
@@ -189,6 +192,20 @@ EOF
if ($target->{id} ne $target->{board}) {
print "\tselect TARGET_".$target->{boardconf}."\n";
}
+ foreach my $dep (@{$target->{depends}}) {
+ my $mode = "depends";
+ my $flags;
+ my $name;
+
+ $dep =~ /^([@\+\-]+)(.+)$/;
+ $flags = $1;
+ $name = $2;
+
+ $flags =~ /-/ and $mode = "deselect";
+ $flags =~ /\+/ and $mode = "select";
+ $flags =~ /@/ and print "\t$mode $name\n";
+ }
+
print "$features$help\n\n"
}