prefer an explicitly-set TARGET_BOARD_INFO_FILE

Change-Id: Ie667a4d0070d1f0bbdfe9fa6d96871bcceb959b8
This commit is contained in:
Doug Zongker
2012-01-19 10:43:49 -08:00
parent e5ff5907be
commit 545b7996cc

View File

@@ -26,19 +26,19 @@ endif
# device we're building for. This file is typically packaged up # device we're building for. This file is typically packaged up
# with everything else. # with everything else.
# #
# If the file "board-info.txt" appears in $(TARGET_DEVICE_DIR), # If TARGET_BOARD_INFO_FILE (which can be set in BoardConfig.mk) is
# it will be used; otherwise TARGET_BOARD_INFO_FILE is used, which # defined, it is used, otherwise board-info.txt is looked for in
# can be set in BoardConfig.mk. # $(TARGET_DEVICE_DIR).
# #
INSTALLED_ANDROID_INFO_TXT_TARGET := $(PRODUCT_OUT)/android-info.txt INSTALLED_ANDROID_INFO_TXT_TARGET := $(PRODUCT_OUT)/android-info.txt
board_info_txt := $(wildcard $(TARGET_DEVICE_DIR)/board-info.txt)
ifndef board_info_txt
board_info_txt := $(TARGET_BOARD_INFO_FILE) board_info_txt := $(TARGET_BOARD_INFO_FILE)
ifndef board_info_txt
board_info_txt := $(wildcard $(TARGET_DEVICE_DIR)/board-info.txt)
endif endif
$(INSTALLED_ANDROID_INFO_TXT_TARGET): $(board_info_txt) $(INSTALLED_ANDROID_INFO_TXT_TARGET): $(board_info_txt)
$(call pretty,"Generated: ($@)") $(call pretty,"Generated: ($@)")
ifdef board_info_txt ifdef board_info_txt
$(hide) cat $< > $@ $(hide) grep -v '#' $< > $@
else else
$(hide) echo "board=$(TARGET_BOOTLOADER_BOARD_NAME)" > $@ $(hide) echo "board=$(TARGET_BOOTLOADER_BOARD_NAME)" > $@
endif endif