File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 23
23
# THE SOFTWARE.
24
24
25
25
# Select the board to build for.
26
- define boardlist
27
-
28
- $(foreach dir, $( filter-out % . * , $( wildcard boards/ * ) ) , $( notdir $( dir ) ) )
29
-
30
-
26
+ define show_board_error
27
+ boardlist =
28
+ $(info Valid boards: )
29
+ $( shell printf ' % s\n' $( patsubst boards/ % /mpconfigboard.mk, % , $( wildcard boards/ * /mpconfigboard.mk) ) | column -xc $$( tput cols || echo 80 ) 1>&2)
30
+ $( error Rerun with $( MAKE ) BOARD=<board>)
31
31
endef
32
32
33
33
ifeq ($(BOARD ) ,)
34
- $(error You must provide a BOARD parameter : $(boardlist ) Rerun with $(MAKE ) BOARD=<board>)
34
+ $(info No BOARD specified)
35
+ $(call show_board_error)
35
36
else
36
37
ifeq ($(wildcard boards/$(BOARD)/.),)
37
- $(error Invalid BOARD specified)
38
+ $(info Invalid BOARD specified)
39
+ $(call show_board_error)
38
40
endif
39
41
endif
40
42
You can’t perform that action at this time.
0 commit comments