diff options
| author | Fred Sundvik <fsundvik@gmail.com> | 2016-08-21 16:29:54 +0300 |
|---|---|---|
| committer | Fred Sundvik <fsundvik@gmail.com> | 2016-08-27 21:57:49 +0300 |
| commit | 6d7cd639a5e4503f00162c7cfa4bc7302b82c71c (patch) | |
| tree | 77c21e7a32258aaa1e2c49dd4c44983510a78045 /Makefile | |
| parent | cfddec17d5a4ea2c3ce9afe0f15de3fa604dee63 (diff) | |
| download | qmk_firmware-6d7cd639a5e4503f00162c7cfa4bc7302b82c71c.tar.gz qmk_firmware-6d7cd639a5e4503f00162c7cfa4bc7302b82c71c.zip | |
Basic framework for parsing test targets
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 16 |
1 files changed, 15 insertions, 1 deletions
| @@ -224,6 +224,8 @@ define PARSE_RULE | |||
| 224 | # PARSE_ALL_KEYBOARDS | 224 | # PARSE_ALL_KEYBOARDS |
| 225 | ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,allkb),true) | 225 | ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,allkb),true) |
| 226 | $$(eval $$(call PARSE_ALL_KEYBOARDS)) | 226 | $$(eval $$(call PARSE_ALL_KEYBOARDS)) |
| 227 | else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,test),true) | ||
| 228 | $$(eval $$(call PARSE_TEST)) | ||
| 227 | # If the rule starts with the name of a known keyboard, then continue | 229 | # If the rule starts with the name of a known keyboard, then continue |
| 228 | # the parsing from PARSE_KEYBOARD | 230 | # the parsing from PARSE_KEYBOARD |
| 229 | else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYBOARDS)),true) | 231 | else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYBOARDS)),true) |
| @@ -396,6 +398,16 @@ define PARSE_ALL_KEYMAPS | |||
| 396 | $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYMAP,$$(KEYMAPS))) | 398 | $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYMAP,$$(KEYMAPS))) |
| 397 | endef | 399 | endef |
| 398 | 400 | ||
| 401 | define PARSE_TEST | ||
| 402 | TEST_NAME := $$(firstword $$(subst -, ,$$(RULE))) | ||
| 403 | TEST_TARGET := $$(subst $$(TEST_NAME),,$$(subst $$(TEST_NAME)-,,$$(RULE))) | ||
| 404 | MATCHED_TESTS := $$(foreach TEST,$$(TEST_LIST),$$(if $$(findstring $$(TEST_NAME),$$(TEST)),$$(TEST),)) | ||
| 405 | $$(info Test name $$(TEST_NAME)) | ||
| 406 | $$(info Test target $$(TEST_TARGET)) | ||
| 407 | $$(info $$(MATCHED_TESTS)) | ||
| 408 | endef | ||
| 409 | |||
| 410 | |||
| 399 | # Set the silent mode depending on if we are trying to compile multiple keyboards or not | 411 | # Set the silent mode depending on if we are trying to compile multiple keyboards or not |
| 400 | # By default it's on in that case, but it can be overriden by specifying silent=false | 412 | # By default it's on in that case, but it can be overriden by specifying silent=false |
| 401 | # from the command line | 413 | # from the command line |
| @@ -459,4 +471,6 @@ all-keyboards-defaults: allkb-allsp-default | |||
| 459 | GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") | 471 | GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") |
| 460 | BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") | 472 | BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") |
| 461 | $(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h) | 473 | $(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h) |
| 462 | $(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h) \ No newline at end of file | 474 | $(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h) |
| 475 | |||
| 476 | include $(ROOT_DIR)/testlist.mk \ No newline at end of file | ||
