Merge pull request #604 from stv0g/fix-issue-601
Fix regression: PARSE_BOARD chops off flags which contain '=' signs
This commit is contained in:
commit
3817dbeb28
2 changed files with 1 additions and 8 deletions
|
@ -5,16 +5,14 @@ COMMON_INCLUDED = TRUE
|
||||||
# (directory and optional filename) exists
|
# (directory and optional filename) exists
|
||||||
dir_if_exists = $(if $(wildcard $(1)$(2)),$(1))
|
dir_if_exists = $(if $(wildcard $(1)$(2)),$(1))
|
||||||
|
|
||||||
ifndef PARSE_BOARD
|
|
||||||
# result = $(call READ_BOARD_TXT, 'boardname', 'parameter')
|
# result = $(call READ_BOARD_TXT, 'boardname', 'parameter')
|
||||||
PARSE_BOARD = $(shell if [ -f $(BOARDS_TXT) ]; \
|
PARSE_BOARD = $(shell if [ -f $(BOARDS_TXT) ]; \
|
||||||
then \
|
then \
|
||||||
grep -Ev '^\#' $(BOARDS_TXT) | \
|
grep -Ev '^\#' $(BOARDS_TXT) | \
|
||||||
grep -E "^[ \t]*$(1).$(2)=" | \
|
grep -E "^[ \t]*$(1).$(2)=" | \
|
||||||
cut -d = -f 2 | \
|
cut -d = -f 2- | \
|
||||||
cut -d : -f 2; \
|
cut -d : -f 2; \
|
||||||
fi)
|
fi)
|
||||||
endif
|
|
||||||
|
|
||||||
# Run a shell script if it exists. Stops make on error.
|
# Run a shell script if it exists. Stops make on error.
|
||||||
runscript_if_exists = \
|
runscript_if_exists = \
|
||||||
|
|
5
Sam.mk
5
Sam.mk
|
@ -130,11 +130,6 @@ CPPFLAGS += -I$(CMSIS_ATMEL_DIR)/Device/ATMEL
|
||||||
LIB_PATH = $(CMSIS_DIR)/Lib/GCC
|
LIB_PATH = $(CMSIS_DIR)/Lib/GCC
|
||||||
BOOTLOADER_PARENT = $(ALTERNATE_CORE_PATH)/bootloaders
|
BOOTLOADER_PARENT = $(ALTERNATE_CORE_PATH)/bootloaders
|
||||||
|
|
||||||
# Utility from ard-mk to parse boards.txt for flags
|
|
||||||
ifndef PARSE_BOARD
|
|
||||||
PARSE_BOARD = $(shell grep -Ev '^\#' $(BOARDS_TXT) | grep -E '^[ \t]*$(1).$(2)=' | cut -d = -f 2 | cut -d : -f 2)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef VARIANT
|
ifndef VARIANT
|
||||||
VARIANT := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).build.variant)
|
VARIANT := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).build.variant)
|
||||||
ifndef VARIANT
|
ifndef VARIANT
|
||||||
|
|
Loading…
Reference in a new issue