X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/df68e5dff33ca8c321b38e39e8bf82851f4c4d83..7e450a1c869a5b227e3c91c4e71049059f1193e6:/scripts/metadata.pl?ds=sidebyside diff --git a/scripts/metadata.pl b/scripts/metadata.pl index 7514a1713..063524a67 100755 --- a/scripts/metadata.pl +++ b/scripts/metadata.pl @@ -53,6 +53,7 @@ sub parse_target_metadata() { } $profile->{desc} = $desc; }; + /^Target-Profile-Kconfig:/ and $profile->{kconfig} = 1; } foreach my $target (@target) { @{$target->{profiles}} > 0 or $target->{profiles} = [ @@ -148,10 +149,11 @@ sub gen_target_mk() { define Profile/$conf\_$profile->{id} ID:=$profile->{id} NAME:=$profile->{name} - PACKAGES:=".join(" ", @{$profile->{packages}})." - endef"; - $profiles_eval .= " -\$(eval \$(call Profile,$conf\_$profile->{id}))" + PACKAGES:=".join(" ", @{$profile->{packages}})."\n"; + $profile->{kconfig} and $profiles_def .= " KCONFIG:=1\n"; + $profiles_def .= " endef"; + $profiles_eval .= " +\$(eval \$(call AddProfile,$conf\_$profile->{id}))" } print " ifeq (\$(CONFIG_LINUX_$conf),y) @@ -298,6 +300,7 @@ config LINUX_$target->{conf}_$profile->{id} bool "$profile->{name}" depends LINUX_$target->{conf} EOF + $profile->{kconfig} and print "\tselect PROFILE_KCONFIG\n"; my %pkgs; foreach my $pkg (@{$target->{packages}}, @{$profile->{packages}}) { $pkgs{$pkg} = 1;