Skip to content

Commit

Permalink
Fix building layouts from JSON (#13310)
Browse files Browse the repository at this point in the history
Broken by #12632.
  • Loading branch information
firetech authored Jun 27, 2021
1 parent 023b85d commit ed56fc7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build_layout.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ define SEARCH_LAYOUTS_REPO
LAYOUT_KEYMAP_C := $$(LAYOUT_KEYMAP_PATH)/keymap.c
ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_JSON))","")
-include $$(LAYOUT_KEYMAP_PATH)/rules.mk
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_JSON := $$(LAYOUT_KEYMAP_JSON)
KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH)
else ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","")
Expand All @@ -33,4 +33,5 @@ endif
$(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS)))

# Use rule from build_json.mk, but update prerequisite in case KEYMAP_JSON was updated
$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
$(KEYMAP_C): $(KEYMAP_JSON)
$(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)

0 comments on commit ed56fc7

Please sign in to comment.