diff options
author | Fred Sundvik <fsundvik@gmail.com> | 2016-08-07 18:44:57 +0300 |
---|---|---|
committer | Fred Sundvik <fsundvik@gmail.com> | 2016-08-20 03:56:24 +0300 |
commit | 4f20061f6619f632c28518979d17a51674a3f2c9 (patch) | |
tree | 65f90f286cc9a058dc4355eb4df685245b6db962 /Makefile | |
parent | 051017c3129a17a1f4c610f19067c60bf0a49da9 (diff) | |
download | qmk_firmware-4f20061f6619f632c28518979d17a51674a3f2c9.tar.gz qmk_firmware-4f20061f6619f632c28518979d17a51674a3f2c9.zip |
Proper handling for running make from a subproject or keymap dir
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -105,6 +105,15 @@ define PARSE_RULE | |||
105 | else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYBOARDS)),true) | 105 | else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYBOARDS)),true) |
106 | $$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM))) | 106 | $$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM))) |
107 | else ifneq ($$(KEYBOARD),) | 107 | else ifneq ($$(KEYBOARD),) |
108 | # If there's no match in the beginning, then use the working directory instead | ||
109 | # First add the keymap to the commandline if we are in a keymap subdirectory | ||
110 | ifneq ($$(KEYMAP),) | ||
111 | RULE := $$(KEYMAP)-$$(RULE) | ||
112 | endif | ||
113 | # If we are in a subproject subdirectory add the subproject | ||
114 | ifneq ($$(SUBPROJECT),) | ||
115 | RULE := $$(SUBPROJECT)-$$(RULE) | ||
116 | endif | ||
108 | $$(eval $$(call PARSE_KEYBOARD,$$(KEYBOARD))) | 117 | $$(eval $$(call PARSE_KEYBOARD,$$(KEYBOARD))) |
109 | else | 118 | else |
110 | $$(info make: *** No rule to make target '$1'. Stop.) | 119 | $$(info make: *** No rule to make target '$1'. Stop.) |