Generate the active profile name in menuconfig context
Signed-off-by: Felix Fietkau <nbd@nbd.name>
echo "$$$$$$$$$(call shvar,Profile/$(1)/Description)"; \
echo "@@"; \
echo;
echo "$$$$$$$$$(call shvar,Profile/$(1)/Description)"; \
echo "@@"; \
echo;
- ifeq ($(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(if $(SUBTARGET),$(SUBTARGET)_))$(1)),y)
- PROFILE=$(1)
- endif
+PROFILE:=$(call qstrip,$(CONFIG_TARGET_PROFILE))
+
- $(eval $(call IncludeProfiles))
-else
- ifeq ($(DUMP),)
$(eval $(call IncludeProfiles))
endif
endif
$(eval $(call IncludeProfiles))
endif
endif
+config TARGET_PROFILE
+ string
+EOF
+ foreach my $target (@target) {
+ my $profiles = $target->{profiles};
+ foreach my $profile (@$profiles) {
+ print "\tdefault \"$profile->{id}\" if TARGET_$target->{conf}_$profile->{id}\n";
+ }
+ }
+
+ print <<EOF;
+
config TARGET_ARCH_PACKAGES
string
config TARGET_ARCH_PACKAGES
string