]> granicus.if.org Git - esp-idf/commitdiff
build system: Fix undefined variables
authorAnton Maklakov <anton@espressif.com>
Fri, 20 Oct 2017 04:14:41 +0000 (12:14 +0800)
committerAnton Maklakov <anton@espressif.com>
Thu, 28 Dec 2017 11:21:34 +0000 (19:21 +0800)
    make/project.mk:315: warning: undefined variable `CC'
    make/project.mk:316: warning: undefined variable `LD'
    make/project.mk:317: warning: undefined variable `AR'
    make/project.mk:62: warning: undefined variable `MAKECMDGOALS'
    components/partition_table/Makefile.projbuild:24: warning: undefined variable `quote'
    components/bootloader/Makefile.projbuild:123: warning: undefined variable 'BOOTLOADER_DIGEST_BIN'
    components/bootloader/Makefile.projbuild:123: warning: undefined variable 'SECURE_BOOTLOADER_KEY'

components/bootloader/Makefile.projbuild
components/partition_table/Makefile.projbuild
make/project.mk

index db7f4f0a24850040eb359351b89ed8d0fda423ec..7876635cc96d8047d0363d8610d8dc31317a2f5c 100644 (file)
@@ -121,4 +121,6 @@ endif
 
 bootloader-clean: $(SDKCONFIG_MAKEFILE)
        $(BOOTLOADER_MAKE) app-clean
+ifdef CONFIG_SECURE_BOOTLOADER_REFLASHABLE
        rm -f $(SECURE_BOOTLOADER_KEY) $(BOOTLOADER_DIGEST_BIN)
+endif
index ddcd8471bde6d743e3ac9d89964c389190fdb94c..a7d4f2ecde2b5f72cb5dec719fb64b6ccc878168 100644 (file)
@@ -21,8 +21,7 @@ ifndef PARTITION_TABLE_CSV_PATH
 # Path to partition CSV file is relative to project path for custom
 # partition CSV files, but relative to component dir otherwise.
 PARTITION_TABLE_ROOT := $(call dequote,$(if $(CONFIG_PARTITION_TABLE_CUSTOM),$(PROJECT_PATH),$(COMPONENT_PATH)))
-quote := "
-PARTITION_TABLE_CSV_PATH := $(call dequote,$(abspath $(PARTITION_TABLE_ROOT)/$(subst $(quote),,$(CONFIG_PARTITION_TABLE_FILENAME))))
+PARTITION_TABLE_CSV_PATH := $(call dequote,$(abspath $(PARTITION_TABLE_ROOT)/$(call dequote,$(CONFIG_PARTITION_TABLE_FILENAME))))
 endif
 
 PARTITION_TABLE_CSV_NAME := $(notdir $(PARTITION_TABLE_CSV_PATH))
index d2eefad7bd854a189d6838e8f38e231652edc29a..b9a04a3b3f82792f3fb3a3714ac41d1428ca62a5 100644 (file)
@@ -11,6 +11,8 @@
 #
 
 .PHONY: build-components menuconfig defconfig all build clean all_binaries check-submodules size size-components size-files list-components
+
+MAKECMDGOALS ?= all
 all: all_binaries
 # see below for recipe of 'all' target
 #
@@ -326,20 +328,19 @@ endif
 
 export CFLAGS CPPFLAGS CXXFLAGS
 
+# Set default values that were not previously defined
+CC ?= gcc
+LD ?= ld
+AR ?= ar
+OBJCOPY ?= objcopy
+SIZE ?= size
+
 # Set host compiler and binutils
 HOSTCC := $(CC)
 HOSTLD := $(LD)
 HOSTAR := $(AR)
-ifdef OBJCOPY
 HOSTOBJCOPY := $(OBJCOPY)
-else
-HOSTOBJCOPY := objcopy
-endif
-ifdef SIZE
 HOSTSIZE := $(SIZE)
-else
-HOSTSIZE := size
-endif
 export HOSTCC HOSTLD HOSTAR HOSTOBJCOPY SIZE
 
 # Set target compiler. Defaults to whatever the user has