-ifndef TARGET_CONFIGS_UC
-ifdef TARGET_CONFIGS
- export TARGET_CONFIGS_UC := $(strip $(shell printf "%s" "$(TARGET_CONFIGS)" | $(TR) a-z A-Z))
- export MACHINE_CONFIG = $(word 3, $(TARGET_CONFIGS_UC))
- export DEFAULT_KERNEL_CONFIG = $(word 1, $(TARGET_CONFIGS_UC))
-else
-
- ifneq ($(filter %_embedded,$(MAKECMDGOALS)),)
-# generate set of standard embedded configs
- export TARGET_CONFIGS = $(TARGET_CONFIGS_EMBEDDED)
- else ifneq ($(filter %_devicemap,$(MAKECMDGOALS)),)
- DEVICEMAP_PLATFORMS = $(shell $(EMBEDDED_DEVICE_MAP) -query SELECT DISTINCT Platform FROM Targets | $(TR) [:lower:] [:upper:])
- export TARGET_CONFIGS = $(foreach my_kernel_config,$(KERNEL_CONFIGS_EMBEDDED),$(foreach my_arch,$(ARCH_CONFIGS),$(foreach my_machine_config,$(filter $(DEVICEMAP_PLATFORMS),$(SUPPORTED_$(my_arch)_MACHINE_CONFIGS)),$(my_kernel_config) $(my_arch) $(my_machine_config) )))
- else
-# generate TARGET_CONFIGS using KERNEL_CONFIGS and ARCH_CONFIGS and MACHINE_CONFIG (which defaults to "DEFAULT")
- export TARGET_CONFIGS = $(strip $(foreach my_arch_config, $(ARCH_CONFIGS), $(foreach my_kern_config, $(KERNEL_CONFIGS), $(my_kern_config) $(my_arch_config) $(MACHINE_CONFIG))))
- endif
- export TARGET_CONFIGS_UC := $(shell printf "%s" "$(TARGET_CONFIGS)" | $(TR) a-z A-Z)
- export MACHINE_CONFIG = $(word 3, $(TARGET_CONFIGS_UC))
- export DEFAULT_KERNEL_CONFIG = $(word 1, $(TARGET_CONFIGS_UC))
-endif
-endif
-
-export MACHINE_CONFIG_LC := $(shell printf "%s" "$(MACHINE_CONFIG)" | $(TR) A-Z a-z)
-export KERNEL_CONFIG_LC := $(shell printf "%s" "$(KERNEL_CONFIG)" | $(TR) A-Z a-z)