Proper default goals when inside keyboard fodlers
This commit is contained in:
parent
459ddaceda
commit
3fa6625869
1 changed files with 19 additions and 4 deletions
23
Makefile
23
Makefile
|
@ -61,6 +61,18 @@ $(info Keymap: $(KEYMAP))
|
||||||
$(info Subproject: $(SUBPROJECT))
|
$(info Subproject: $(SUBPROJECT))
|
||||||
$(info Keyboards: $(KEYBOARDS))
|
$(info Keyboards: $(KEYBOARDS))
|
||||||
|
|
||||||
|
ifneq ($(KEYMAP),)
|
||||||
|
ifeq ($(SUBPROJECT),)
|
||||||
|
.DEFAULT_GOAL := $(KEYBOARD)-$(KEYMAP)
|
||||||
|
else
|
||||||
|
.DEFAULT_GOAL := $(KEYBOARD)-$(SUBPROJECT)-$(KEYMAP)
|
||||||
|
endif
|
||||||
|
else ifneq ($(SUBPROJECT),)
|
||||||
|
.DEFAULT_GOAL := $(KEYBOARD)-$(SUBPROJECT)-allkm
|
||||||
|
else ifneq ($(KEYBOARD),)
|
||||||
|
.DEFAULT_GOAL := $(KEYBOARD)-allsp-allkm
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
# Compare the start of the RULE_VARIABLE with the first argument($1)
|
# Compare the start of the RULE_VARIABLE with the first argument($1)
|
||||||
# If the rules equals $1 or starts with $1-, RULE_FOUND is set to true
|
# If the rules equals $1 or starts with $1-, RULE_FOUND is set to true
|
||||||
|
@ -114,9 +126,11 @@ endef
|
||||||
define PARSE_RULE
|
define PARSE_RULE
|
||||||
RULE := $1
|
RULE := $1
|
||||||
COMMANDS :=
|
COMMANDS :=
|
||||||
|
$$(info $$(RULE))
|
||||||
ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,allkb),true)
|
ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,allkb),true)
|
||||||
$$(eval $$(call PARSE_ALL_KEYBOARDS))
|
$$(eval $$(call PARSE_ALL_KEYBOARDS))
|
||||||
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYBOARDS)),true)
|
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYBOARDS)),true)
|
||||||
|
$$(info $$(MATCHED_ITEM))
|
||||||
$$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM)))
|
$$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM)))
|
||||||
else ifneq ($$(KEYBOARD),)
|
else ifneq ($$(KEYBOARD),)
|
||||||
# If there's no match in the beginning, then use the working directory instead
|
# If there's no match in the beginning, then use the working directory instead
|
||||||
|
@ -222,12 +236,13 @@ RUN_COMMAND = echo "Running": $(COMMAND_$(COMMAND));
|
||||||
$(eval $(call PARSE_RULE,$@))
|
$(eval $(call PARSE_RULE,$@))
|
||||||
$(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND))
|
$(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND))
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all:
|
||||||
|
echo "Compiling"
|
||||||
|
|
||||||
.PHONY: all-keyboards
|
.PHONY: all-keyboards
|
||||||
all-keyboards: allkb
|
all-keyboards: allkb
|
||||||
|
|
||||||
.PHONY: all-keyboards-defaults
|
.PHONY: all-keyboards-defaults
|
||||||
all-keyboards-defaults: allkb-default-default
|
all-keyboards-defaults: allkb-default-default
|
||||||
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
echo "Compiling"
|
|
Loading…
Reference in a new issue