Fix issues with recent keymap.json changes (#14089)

* Fix issues with recent keymap.json changes

* Allow empty author string
This commit is contained in:
Joel Challis 2021-08-20 10:11:49 +01:00 committed by GitHub
parent 0741aae1d9
commit b229b0fba7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View file

@ -148,24 +148,24 @@ endif
# Have we found a keymap.json? # Have we found a keymap.json?
ifneq ("$(wildcard $(KEYMAP_JSON))", "") ifneq ("$(wildcard $(KEYMAP_JSON))", "")
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c KEYMAP_C := $(KEYMAP_OUTPUT)/src/keymap.c
KEYMAP_H := $(KEYMAP_OUTPUT)/config.h KEYMAP_H := $(KEYMAP_OUTPUT)/src/config.h
# Load the keymap-level rules.mk if exists # Load the keymap-level rules.mk if exists
-include $(KEYMAP_PATH)/rules.mk -include $(KEYMAP_PATH)/rules.mk
# Load any rules.mk content from keymap.json # Load any rules.mk content from keymap.json
INFO_RULES_MK = $(shell (QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_OUTPUT)/rules.mk) INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_OUTPUT)/src/rules.mk)
include $(INFO_RULES_MK) include $(INFO_RULES_MK)
# Add rules to enerate the keymap files - indentation here is important # Add rules to generate the keymap files - indentation here is important
$(KEYMAP_OUTPUT)/keymap.c: $(KEYMAP_JSON) $(KEYMAP_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON) $(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
$(KEYMAP_OUTPUT)/config.h: $(KEYMAP_JSON) $(KEYMAP_OUTPUT)/src/config.h: $(KEYMAP_JSON)
(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_OUTPUT)/config.h $(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_H)
generated-files: $(KEYMAP_OUTPUT)/config.h $(KEYMAP_OUTPUT)/keymap.c generated-files: $(KEYMAP_OUTPUT)/src/config.h $(KEYMAP_OUTPUT)/src/keymap.c
endif endif

View file

@ -4,7 +4,7 @@
"title": "Keymap Information", "title": "Keymap Information",
"type": "object", "type": "object",
"properties": { "properties": {
"author": {"$ref": "qmk.definitions.v1#/text_identifier"}, "author": {"type": "string"},
"keyboard": {"$ref": "qmk.definitions.v1#/text_identifier"}, "keyboard": {"$ref": "qmk.definitions.v1#/text_identifier"},
"keymap": {"$ref": "qmk.definitions.v1#/text_identifier"}, "keymap": {"$ref": "qmk.definitions.v1#/text_identifier"},
"layout": {"$ref": "qmk.definitions.v1#/layout_macro"}, "layout": {"$ref": "qmk.definitions.v1#/layout_macro"},