u-boot: fix broken insert_define in Makefile

Patch by Markus Heidelberg <markus.heidelberg@web.de>
This commit is contained in:
Peter Korsgaard 2008-08-20 20:04:14 +00:00
parent b7a45746a4
commit b4aeef0f1c

View File

@ -34,7 +34,7 @@ define insert_define
@echo "#ifdef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE) @echo "#ifdef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE)
@echo "#undef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE) @echo "#undef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE)
@echo "#endif" >> $(U_BOOT_INC_CONF_FILE) @echo "#endif" >> $(U_BOOT_INC_CONF_FILE)
@echo "#define $(strip $(1)) $(2)" >> $(U_BOOT_INC_CONF_FILE) @echo '#define $(strip $(1)) $(2)' >> $(U_BOOT_INC_CONF_FILE)
endef endef
$(DL_DIR)/$(U_BOOT_SOURCE): $(DL_DIR)/$(U_BOOT_SOURCE):
@ -78,36 +78,36 @@ $(U_BOOT_DIR)/.header_modified: $(U_BOOT_DIR)/.configured
@echo "#ifndef __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE) @echo "#ifndef __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE)
@echo "#define __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE) @echo "#define __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE)
ifneq ($(strip $(BR2_PROJECT)),"") ifneq ($(strip $(BR2_PROJECT)),"")
$(call insert_define, "CONFIG_HOSTNAME", $(BR2_PROJECT)) $(call insert_define, CONFIG_HOSTNAME, $(BR2_PROJECT))
endif endif
ifneq ($(strip $(BR2_TARGET_UBOOT_SERVERIP)),"") ifneq ($(strip $(BR2_TARGET_UBOOT_SERVERIP)),"")
$(call insert_define, "CONFIG_SERVERIP", $(BR2_TARGET_UBOOT_SERVERIP)) $(call insert_define, CONFIG_SERVERIP, $(BR2_TARGET_UBOOT_SERVERIP))
endif endif
ifneq ($(strip $(BR2_TARGET_UBOOT_IPADDR)),"") ifneq ($(strip $(BR2_TARGET_UBOOT_IPADDR)),"")
$(call insert_define, "CONFIG_IPADDR", $(BR2_TARGET_UBOOT_IPADDR)) $(call insert_define, CONFIG_IPADDR, $(BR2_TARGET_UBOOT_IPADDR))
ifneq ($(strip $(BR2_TARGET_UBOOT_GATEWAY)),"") ifneq ($(strip $(BR2_TARGET_UBOOT_GATEWAY)),"")
$(call insert_define, "CONFIG_GATEWAYIP", $(BR2_TARGET_UBOOT_GATEWAY)) $(call insert_define, CONFIG_GATEWAYIP, $(BR2_TARGET_UBOOT_GATEWAY))
endif endif
ifneq ($(strip $(BR2_TARGET_UBOOT_NETMASK)),"") ifneq ($(strip $(BR2_TARGET_UBOOT_NETMASK)),"")
$(call insert_define, "CONFIG_NETMASK", $(BR2_TARGET_UBOOT_NETMASK)) $(call insert_define, CONFIG_NETMASK, $(BR2_TARGET_UBOOT_NETMASK))
endif endif
endif # end BR2_TARGET_U_BOOT_IPADDR endif # end BR2_TARGET_U_BOOT_IPADDR
ifneq ($(strip $(BR2_TARGET_UBOOT_ETHADDR)),"") ifneq ($(strip $(BR2_TARGET_UBOOT_ETHADDR)),"")
$(call insert_define, "CONFIG_ETHADDR", $(BR2_TARGET_UBOOT_ETHADDR)) $(call insert_define, CONFIG_ETHADDR, $(BR2_TARGET_UBOOT_ETHADDR))
endif endif
ifneq ($(strip $(BR2_TARGET_UBOOT_ETH1ADDR)),"") ifneq ($(strip $(BR2_TARGET_UBOOT_ETH1ADDR)),"")
$(call insert_define, "CONFIG_ETH2ADDR", $(BR2_TARGET_UBOOT_ETH1ADDR)) $(call insert_define, CONFIG_ETH2ADDR, $(BR2_TARGET_UBOOT_ETH1ADDR))
endif endif
ifneq ($(strip $(BR2_TARGET_UBOOT_BOOTARGS)),"") ifneq ($(strip $(BR2_TARGET_UBOOT_BOOTARGS)),"")
$(call insert_define, "CONFIG_BOOTARGS", $(BR2_TARGET_UBOOT_BOOTARGS)) $(call insert_define, CONFIG_BOOTARGS, $(BR2_TARGET_UBOOT_BOOTARGS))
endif endif
ifneq ($(strip $(BR2_TARGET_UBOOT_BOOTCMD)),"") ifneq ($(strip $(BR2_TARGET_UBOOT_BOOTCMD)),"")
$(call insert_define, "CONFIG_BOOTCOMMAND", $(BR2_TARGET_UBOOT_BOOTCMD)) $(call insert_define, CONFIG_BOOTCOMMAND, $(BR2_TARGET_UBOOT_BOOTCMD))
endif endif
ifneq ($(strip $(BR2_TARGET_UBOOT_SILENT)),"") ifeq ($(strip $(BR2_TARGET_UBOOT_SILENT)),y)
$(call insert_define, "CONFIG_SILENT_CONSOLE", "") $(call insert_define, CONFIG_SILENT_CONSOLE,)
endif endif
@echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(U_BOOT_INC_CONF_FILE) @echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(U_BOOT_INC_CONF_FILE)
touch $@ touch $@