aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-08-07 18:12:45 +0300
committerFred Sundvik <fsundvik@gmail.com>2016-08-20 03:56:20 +0300
commita6d35000241e20df32b34498a3a9622bde6f0062 (patch)
treeb1b7d47b7cd1da79874bcac4e5739f1ec42829d8 /Makefile
parent2dd9c1edcdcc3fc579e6109daf9012f9a82b7435 (diff)
downloadfirmware-a6d35000241e20df32b34498a3a9622bde6f0062.tar.gz
firmware-a6d35000241e20df32b34498a3a9622bde6f0062.tar.bz2
firmware-a6d35000241e20df32b34498a3a9622bde6f0062.zip
Print error message when trying to build non-existing keymap
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 028d14393..a9a2d98fc 100644
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,8 @@ ifeq ($(CURRENT_PATH_ELEMENT),keyboards)
endif
$(info $(ROOT_DIR)/keyboards)
-KEYBOARDS := $(notdir $(patsubst %/.,%,$(wildcard $(ROOT_DIR)/keyboards/*/.)))
+# Only consider folders with makefiles, to prevent errors in case there are extra folders
+KEYBOARDS := $(notdir $(patsubst %/Makefile,%,$(wildcard $(ROOT_DIR)/keyboards/*/Makefile)))
$(info Keyboard: $(KEYBOARD))
$(info Keymap: $(KEYMAP))
@@ -154,6 +155,13 @@ define PARSE_SUBPROJECT
$$(eval $$(call PARSE_ALL_KEYMAPS))
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYMAPS)),true)
$$(eval $$(call PARSE_KEYMAP,$$(MATCHED_ITEM)))
+ else
+ ifeq ($$(CURRENT_SP),)
+ $$(info make: *** No rule to make target '$$(CURRENT_KB)-$$(RULE)'. Stop.)
+ else
+ $$(info make: *** No rule to make target '$$(CURRENT_KB)-$$(CURRENT_SP)-$$(RULE)'. Stop.)
+ endif
+ exit 1
endif
else
$$(eval $$(call PARSE_ALL_IN_LIST,PARSE_SUBPROJECT,$(SUBPROJECTS)))