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.
|
# 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),)
|
ifeq ($(BOARD),)
|
||||||
$(error You must provide a BOARD parameter)
|
$(info No BOARD specified)
|
||||||
|
$(call show_board_error)
|
||||||
else
|
else
|
||||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||||
$(error Invalid BOARD "$(BOARD)" specified)
|
$(info Invalid BOARD specified)
|
||||||
|
$(call show_board_error)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -23,11 +23,20 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
# Select the board to build for.
|
# 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),)
|
ifeq ($(BOARD),)
|
||||||
$(error You must provide a BOARD parameter)
|
$(info No BOARD specified)
|
||||||
|
$(call show_board_error)
|
||||||
else
|
else
|
||||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||||
$(error Invalid BOARD specified)
|
$(info Invalid BOARD specified)
|
||||||
|
$(call show_board_error)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -23,11 +23,20 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
# Select the board to build for.
|
# 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),)
|
ifeq ($(BOARD),)
|
||||||
$(error You must provide a BOARD parameter)
|
$(info No BOARD specified)
|
||||||
|
$(call show_board_error)
|
||||||
else
|
else
|
||||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||||
$(error Invalid BOARD specified)
|
$(info Invalid BOARD specified)
|
||||||
|
$(call show_board_error)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -23,11 +23,20 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
# Select the board to build for.
|
# 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),)
|
ifeq ($(BOARD),)
|
||||||
$(error You must provide a BOARD parameter)
|
$(info No BOARD specified)
|
||||||
|
$(call show_board_error)
|
||||||
else
|
else
|
||||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||||
$(error Invalid BOARD specified)
|
$(info Invalid BOARD specified)
|
||||||
|
$(call show_board_error)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -24,11 +24,20 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
# Select the board to build for.
|
# 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),)
|
ifeq ($(BOARD),)
|
||||||
$(error You must provide a BOARD parameter)
|
$(info No BOARD specified)
|
||||||
|
$(call show_board_error)
|
||||||
else
|
else
|
||||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||||
$(error Invalid BOARD specified)
|
$(info Invalid BOARD specified)
|
||||||
|
$(call show_board_error)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -23,14 +23,20 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
# Select the board to build for.
|
# 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),)
|
ifeq ($(BOARD),)
|
||||||
$(info You must provide a BOARD parameter with 'BOARD=')
|
$(info No BOARD specified)
|
||||||
$(info Possible values are:)
|
$(call show_board_error)
|
||||||
$(info $(sort $(subst /.,,$(subst boards/,,$(wildcard boards/*/.)))))
|
|
||||||
$(error BOARD not defined)
|
|
||||||
else
|
else
|
||||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||||
$(error Invalid BOARD specified)
|
$(info Invalid BOARD specified)
|
||||||
|
$(call show_board_error)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -23,11 +23,20 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
# Select the board to build for.
|
# 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),)
|
ifeq ($(BOARD),)
|
||||||
$(error You must provide a BOARD parameter)
|
$(info No BOARD specified)
|
||||||
|
$(call show_board_error)
|
||||||
else
|
else
|
||||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||||
$(error Invalid BOARD specified)
|
$(info Invalid BOARD specified)
|
||||||
|
$(call show_board_error)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -24,12 +24,21 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
# Select the board to build for.
|
# 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),)
|
ifeq ($(BOARD),)
|
||||||
$(error You must provide a BOARD parameter)
|
$(info No BOARD specified)
|
||||||
|
$(call show_board_error)
|
||||||
else
|
else
|
||||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||||
$(error Invalid BOARD specified)
|
$(info Invalid BOARD specified)
|
||||||
endif
|
$(call show_board_error)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# If the build directory is not given, make it reflect the board name.
|
# If the build directory is not given, make it reflect the board name.
|
||||||
|
Loading…
Reference in New Issue
Block a user