Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to exclude keyboards from travis builds #11178

Merged
merged 8 commits into from
Dec 18, 2020
Prev Previous commit
Next Next commit
optimize the startup by only listing keyboards once
  • Loading branch information
skullydazed committed Dec 12, 2020
commit 3b65f5df745fa964ec7070785eed59934f3e3ff4
48 changes: 21 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,13 @@ $(eval $(call NEXT_PATH_ELEMENT))
# endif
# endif

# Build our list of keyboards
KEYBOARDS := $(shell util/list_keyboards.sh | sort -u)

.PHONY: list-keyboards
list-keyboards:
echo $(KEYBOARDS)

define PRINT_KEYBOARD
$(info $(PRINTING_KEYBOARD))
endef
util/list_keyboards.sh | tr '\n' ' '

.PHONY: generate-keyboards-file
generate-keyboards-file:
$(foreach PRINTING_KEYBOARD,$(KEYBOARDS),$(eval $(call PRINT_KEYBOARD)))
util/list_keyboards.sh | sort -u

.PHONY: clean
clean:
Expand All @@ -139,7 +132,6 @@ endif
# $(info Keyboard: $(KEYBOARD))
# $(info Keymap: $(KEYMAP))
# $(info Subproject: $(SUBPROJECT))
# $(info Keyboards: $(KEYBOARDS))


# Set the default goal depending on where we are running make from
Expand Down Expand Up @@ -272,24 +264,26 @@ define PARSE_RULE
$$(eval $$(call PARSE_ALL_KEYBOARDS))
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,test),true)
$$(eval $$(call PARSE_TEST))
# If the rule starts with the name of a known keyboard, then continue
# the parsing from PARSE_KEYBOARD
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYBOARDS)),true)
KEYBOARD_RULE=$$(MATCHED_ITEM)
$$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM)))
# Otherwise use the KEYBOARD variable, which is determined either by
# the current directory you run make from, or passed in as an argument
else ifneq ($$(KEYBOARD),)
$$(eval $$(call PARSE_KEYBOARD,$$(KEYBOARD)))
else
$$(info make: *** No rule to make target '$1'. Stop.)
$$(info |)
$$(info | QMK's make format recently changed to use folder locations and colons:)
$$(info | make project_folder:keymap[:target])
$$(info | Examples:)
$$(info | make dz60:default)
$$(info | make planck/rev6:default:flash)
$$(info |)
# If the rule starts with the name of a known keyboard, then continue
# the parsing from PARSE_KEYBOARD
ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(shell util/list_keyboards.sh | sort -u)),true)
KEYBOARD_RULE=$$(MATCHED_ITEM)
$$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM)))
# Otherwise use the KEYBOARD variable, which is determined either by
# the current directory you run make from, or passed in as an argument
else ifneq ($$(KEYBOARD),)
$$(eval $$(call PARSE_KEYBOARD,$$(KEYBOARD)))
else
$$(info make: *** No rule to make target '$1'. Stop.)
$$(info |)
$$(info | QMK's make format recently changed to use folder locations and colons:)
$$(info | make project_folder:keymap[:target])
$$(info | Examples:)
$$(info | make dz60:default)
$$(info | make planck/rev6:default:flash)
$$(info |)
endif
endif
endef

Expand Down