diff options
| author | Sudar Muthu <sudar@sudarmuthu.com> | 2016-07-25 19:45:11 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-25 19:45:11 +0530 |
| commit | 5a83288e6ac01182fbf2a0cf219cc13370e67c66 (patch) | |
| tree | 3b550171251074d801cc2151c862bec5d3d16c80 | |
| parent | b971b059297e6c762d365f2f5c9e85c4dda612e6 (diff) | |
| parent | 8addd6c469d7fc048154e5f36d94f4d26087b2b0 (diff) | |
Merge pull request #437 from straccio/master
Search in submenu chip or cpu for vars
| -rw-r--r-- | Arduino.mk | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -572,7 +572,7 @@ endif ifndef PARSE_BOARD # result = $(call READ_BOARD_TXT, 'boardname', 'parameter') - PARSE_BOARD = $(shell grep -v '^\#' $(BOARDS_TXT) | grep "^[ \t]*$(1).$(2)=" | cut -d = -f 2) + PARSE_BOARD = $(shell grep -Ev '^\#' $(BOARDS_TXT) | grep -E "^[ \t]*$(1).$(2)=" | cut -d = -f 2) endif # If NO_CORE is set, then we don't have to parse boards.txt file @@ -591,7 +591,7 @@ ifeq ($(strip $(NO_CORE)),) # Which variant ? This affects the include path ifndef VARIANT - VARIANT := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).build.variant) + VARIANT := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).build.variant) ifndef VARIANT VARIANT := $(call PARSE_BOARD,$(BOARD_TAG),build.variant) endif @@ -601,7 +601,7 @@ ifeq ($(strip $(NO_CORE)),) endif # see if we are a caterina device like leonardo or micro - CATERINA := $(findstring caterina,$(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).bootloader.file)) + CATERINA := $(findstring caterina,$(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).bootloader.file)) ifndef CATERINA # 1.5+ method if not a submenu CATERINA := $(findstring caterina,$(call PARSE_BOARD,$(BOARD_TAG),bootloader.file)) @@ -613,14 +613,14 @@ ifeq ($(strip $(NO_CORE)),) # processor stuff ifndef MCU - MCU := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).build.mcu) + MCU := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).build.mcu) ifndef MCU MCU := $(call PARSE_BOARD,$(BOARD_TAG),build.mcu) endif endif ifndef F_CPU - F_CPU := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).build.f_cpu) + F_CPU := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).build.f_cpu) ifndef F_CPU F_CPU := $(call PARSE_BOARD,$(BOARD_TAG),build.f_cpu) endif @@ -639,14 +639,14 @@ ifeq ($(strip $(NO_CORE)),) # normal programming info ifndef AVRDUDE_ARD_PROGRAMMER - AVRDUDE_ARD_PROGRAMMER := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).upload.protocol) + AVRDUDE_ARD_PROGRAMMER := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).upload.protocol) ifndef AVRDUDE_ARD_PROGRAMMER AVRDUDE_ARD_PROGRAMMER := $(call PARSE_BOARD,$(BOARD_TAG),upload.protocol) endif endif ifndef AVRDUDE_ARD_BAUDRATE - AVRDUDE_ARD_BAUDRATE := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).upload.speed) + AVRDUDE_ARD_BAUDRATE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).upload.speed) ifndef AVRDUDE_ARD_BAUDRATE AVRDUDE_ARD_BAUDRATE := $(call PARSE_BOARD,$(BOARD_TAG),upload.speed) endif @@ -658,21 +658,21 @@ ifeq ($(strip $(NO_CORE)),) endif ifndef ISP_HIGH_FUSE - ISP_HIGH_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).bootloader.high_fuses) + ISP_HIGH_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).bootloader.high_fuses) ifndef ISP_HIGH_FUSE ISP_HIGH_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),bootloader.high_fuses) endif endif ifndef ISP_LOW_FUSE - ISP_LOW_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).bootloader.low_fuses) + ISP_LOW_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).bootloader.low_fuses) ifndef ISP_LOW_FUSE ISP_LOW_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),bootloader.low_fuses) endif endif ifndef ISP_EXT_FUSE - ISP_EXT_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).bootloader.extended_fuses) + ISP_EXT_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).bootloader.extended_fuses) ifndef ISP_EXT_FUSE ISP_EXT_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),bootloader.extended_fuses) endif @@ -683,7 +683,7 @@ ifeq ($(strip $(NO_CORE)),) endif ifndef BOOTLOADER_FILE - BOOTLOADER_FILE := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).bootloader.file) + BOOTLOADER_FILE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).bootloader.file) ifndef BOOTLOADER_FILE BOOTLOADER_FILE := $(call PARSE_BOARD,$(BOARD_TAG),bootloader.file) endif @@ -694,7 +694,7 @@ ifeq ($(strip $(NO_CORE)),) endif ifndef HEX_MAXIMUM_SIZE - HEX_MAXIMUM_SIZE := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).upload.maximum_size) + HEX_MAXIMUM_SIZE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).upload.maximum_size) ifndef HEX_MAXIMUM_SIZE HEX_MAXIMUM_SIZE := $(call PARSE_BOARD,$(BOARD_TAG),upload.maximum_size) endif @@ -1504,7 +1504,7 @@ show_boards: @$(CAT) $(BOARDS_TXT) | grep -E '^[a-zA-Z0-9_\-]+.name' | sort -uf | sed 's/.name=/:/' | column -s: -t show_submenu: - @$(CAT) $(BOARDS_TXT) | grep -E '[a-zA-Z0-9_\-]+.menu.cpu.[a-zA-Z0-9_\-]+=' | sort -uf | sed 's/.menu.cpu./:/' | sed 's/=/:/' | column -s: -t + @$(CAT) $(BOARDS_TXT) | grep -E '[a-zA-Z0-9_\-]+.menu.(cpu|chip).[a-zA-Z0-9_\-]+=' | sort -uf | sed 's/.menu.(cpu|chip)./:/' | sed 's/=/:/' | column -s: -t monitor: ifeq ($(MONITOR_CMD), 'putty') |
