From ac8dc72575d55ddb076d0e93056e616c564a2e7f Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 20 Aug 2021 10:11:49 +0100 Subject: [PATCH] Fix issues with recent keymap.json changes (#14089) * Fix issues with recent keymap.json changes * Allow empty author string --- build_keyboard.mk | 18 +++++++++--------- data/schemas/keymap.jsonschema | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build_keyboard.mk b/build_keyboard.mk index daef76080a14..37fa6852f871 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -148,24 +148,24 @@ endif # Have we found a keymap.json? ifneq ("$(wildcard $(KEYMAP_JSON))", "") - KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c - KEYMAP_H := $(KEYMAP_OUTPUT)/config.h + KEYMAP_C := $(KEYMAP_OUTPUT)/src/keymap.c + KEYMAP_H := $(KEYMAP_OUTPUT)/src/config.h # Load the keymap-level rules.mk if exists -include $(KEYMAP_PATH)/rules.mk # 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) -# Add rules to enerate the keymap files - indentation here is important -$(KEYMAP_OUTPUT)/keymap.c: $(KEYMAP_JSON) - (QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON) +# Add rules to generate the keymap files - indentation here is important +$(KEYMAP_OUTPUT)/src/keymap.c: $(KEYMAP_JSON) + $(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON) -$(KEYMAP_OUTPUT)/config.h: $(KEYMAP_JSON) - (QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_OUTPUT)/config.h +$(KEYMAP_OUTPUT)/src/config.h: $(KEYMAP_JSON) + $(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 diff --git a/data/schemas/keymap.jsonschema b/data/schemas/keymap.jsonschema index 35c5b5c98e05..a4bdab966b61 100644 --- a/data/schemas/keymap.jsonschema +++ b/data/schemas/keymap.jsonschema @@ -4,7 +4,7 @@ "title": "Keymap Information", "type": "object", "properties": { - "author": {"$ref": "qmk.definitions.v1#/text_identifier"}, + "author": {"type": "string"}, "keyboard": {"$ref": "qmk.definitions.v1#/text_identifier"}, "keymap": {"$ref": "qmk.definitions.v1#/text_identifier"}, "layout": {"$ref": "qmk.definitions.v1#/layout_macro"},