add awesome new make error message
Copied from initial implementation on atmel-samd Co-authored-by: Rose Hooper <rhooper@toybox.ca> Co-authored-by: Jeff Epler <jepler@gmail.com>
This commit is contained in:
parent
8933f93439
commit
e2a3597263
@ -1,11 +1,18 @@
|
||||
# Select the board to build for.
|
||||
BOARD?=raspberrypi_pi4b
|
||||
define show_board_error
|
||||
boardlist =
|
||||
$(info Valid boards:)
|
||||
$(shell printf '%s\n' $(patsubst boards/%/mpconfigboard.mk,%,$(wildcard boards/*/mpconfigboard.mk)) | column -xc $$(tput cols || echo 80) 1>&2)
|
||||
$(error Rerun with $(MAKE) BOARD=<board>)
|
||||
endef
|
||||
|
||||
ifeq ($(BOARD),)
|
||||
$(error You must provide a BOARD parameter)
|
||||
$(info No BOARD specified)
|
||||
$(call show_board_error)
|
||||
else
|
||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||
$(error Invalid BOARD "$(BOARD)" specified)
|
||||
$(info Invalid BOARD specified)
|
||||
$(call show_board_error)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -23,11 +23,20 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
# Select the board to build for.
|
||||
define show_board_error
|
||||
boardlist =
|
||||
$(info Valid boards:)
|
||||
$(shell printf '%s\n' $(patsubst boards/%/mpconfigboard.mk,%,$(wildcard boards/*/mpconfigboard.mk)) | column -xc $$(tput cols || echo 80) 1>&2)
|
||||
$(error Rerun with $(MAKE) BOARD=<board>)
|
||||
endef
|
||||
|
||||
ifeq ($(BOARD),)
|
||||
$(error You must provide a BOARD parameter)
|
||||
$(info No BOARD specified)
|
||||
$(call show_board_error)
|
||||
else
|
||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||
$(error Invalid BOARD specified)
|
||||
$(info Invalid BOARD specified)
|
||||
$(call show_board_error)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -23,11 +23,20 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
# Select the board to build for.
|
||||
define show_board_error
|
||||
boardlist =
|
||||
$(info Valid boards:)
|
||||
$(shell printf '%s\n' $(patsubst boards/%/mpconfigboard.mk,%,$(wildcard boards/*/mpconfigboard.mk)) | column -xc $$(tput cols || echo 80) 1>&2)
|
||||
$(error Rerun with $(MAKE) BOARD=<board>)
|
||||
endef
|
||||
|
||||
ifeq ($(BOARD),)
|
||||
$(error You must provide a BOARD parameter)
|
||||
$(info No BOARD specified)
|
||||
$(call show_board_error)
|
||||
else
|
||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||
$(error Invalid BOARD specified)
|
||||
$(info Invalid BOARD specified)
|
||||
$(call show_board_error)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -23,11 +23,20 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
# Select the board to build for.
|
||||
define show_board_error
|
||||
boardlist =
|
||||
$(info Valid boards:)
|
||||
$(shell printf '%s\n' $(patsubst boards/%/mpconfigboard.mk,%,$(wildcard boards/*/mpconfigboard.mk)) | column -xc $$(tput cols || echo 80) 1>&2)
|
||||
$(error Rerun with $(MAKE) BOARD=<board>)
|
||||
endef
|
||||
|
||||
ifeq ($(BOARD),)
|
||||
$(error You must provide a BOARD parameter)
|
||||
$(info No BOARD specified)
|
||||
$(call show_board_error)
|
||||
else
|
||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||
$(error Invalid BOARD specified)
|
||||
$(info Invalid BOARD specified)
|
||||
$(call show_board_error)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -24,11 +24,20 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
# Select the board to build for.
|
||||
define show_board_error
|
||||
boardlist =
|
||||
$(info Valid boards:)
|
||||
$(shell printf '%s\n' $(patsubst boards/%/mpconfigboard.mk,%,$(wildcard boards/*/mpconfigboard.mk)) | column -xc $$(tput cols || echo 80) 1>&2)
|
||||
$(error Rerun with $(MAKE) BOARD=<board>)
|
||||
endef
|
||||
|
||||
ifeq ($(BOARD),)
|
||||
$(error You must provide a BOARD parameter)
|
||||
$(info No BOARD specified)
|
||||
$(call show_board_error)
|
||||
else
|
||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||
$(error Invalid BOARD specified)
|
||||
$(info Invalid BOARD specified)
|
||||
$(call show_board_error)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -23,14 +23,20 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
# Select the board to build for.
|
||||
define show_board_error
|
||||
boardlist =
|
||||
$(info Valid boards:)
|
||||
$(shell printf '%s\n' $(patsubst boards/%/mpconfigboard.mk,%,$(wildcard boards/*/mpconfigboard.mk)) | column -xc $$(tput cols || echo 80) 1>&2)
|
||||
$(error Rerun with $(MAKE) BOARD=<board>)
|
||||
endef
|
||||
|
||||
ifeq ($(BOARD),)
|
||||
$(info You must provide a BOARD parameter with 'BOARD=')
|
||||
$(info Possible values are:)
|
||||
$(info $(sort $(subst /.,,$(subst boards/,,$(wildcard boards/*/.)))))
|
||||
$(error BOARD not defined)
|
||||
$(info No BOARD specified)
|
||||
$(call show_board_error)
|
||||
else
|
||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||
$(error Invalid BOARD specified)
|
||||
$(info Invalid BOARD specified)
|
||||
$(call show_board_error)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -23,11 +23,20 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
# Select the board to build for.
|
||||
define show_board_error
|
||||
boardlist =
|
||||
$(info Valid boards:)
|
||||
$(shell printf '%s\n' $(patsubst boards/%/mpconfigboard.mk,%,$(wildcard boards/*/mpconfigboard.mk)) | column -xc $$(tput cols || echo 80) 1>&2)
|
||||
$(error Rerun with $(MAKE) BOARD=<board>)
|
||||
endef
|
||||
|
||||
ifeq ($(BOARD),)
|
||||
$(error You must provide a BOARD parameter)
|
||||
$(info No BOARD specified)
|
||||
$(call show_board_error)
|
||||
else
|
||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||
$(error Invalid BOARD specified)
|
||||
$(info Invalid BOARD specified)
|
||||
$(call show_board_error)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -24,11 +24,20 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
# Select the board to build for.
|
||||
define show_board_error
|
||||
boardlist =
|
||||
$(info Valid boards:)
|
||||
$(shell printf '%s\n' $(patsubst boards/%/mpconfigboard.mk,%,$(wildcard boards/*/mpconfigboard.mk)) | column -xc $$(tput cols || echo 80) 1>&2)
|
||||
$(error Rerun with $(MAKE) BOARD=<board>)
|
||||
endef
|
||||
|
||||
ifeq ($(BOARD),)
|
||||
$(error You must provide a BOARD parameter)
|
||||
$(info No BOARD specified)
|
||||
$(call show_board_error)
|
||||
else
|
||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||
$(error Invalid BOARD specified)
|
||||
$(info Invalid BOARD specified)
|
||||
$(call show_board_error)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user