From ef6329af7c7be77b537fbfc5a5cc7105acc679f7 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sun, 31 Jan 2021 12:46:00 -0800 Subject: Create a system to map between info.json and config.h/rules.mk (#11548) * generate rules.mk from a json mapping * generate rules.mk from a json mapping * support for config.h from json maps * improve the mapping system * document the mapping system * move data/maps to data/mappings * fix flake8 errors * fixup LED_MATRIX_DRIVER * remove product and description from the vision_division keymap level * reduce the complexity of generate-rules-mk * add tests for the generate commands * fix qmk doctor when submodules are not clean --- data/mappings/info_rules.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 data/mappings/info_rules.json (limited to 'data/mappings/info_rules.json') diff --git a/data/mappings/info_rules.json b/data/mappings/info_rules.json new file mode 100644 index 0000000000..97f772c4d5 --- /dev/null +++ b/data/mappings/info_rules.json @@ -0,0 +1,15 @@ +# This file maps keys between `rules.mk` and `info.json`. It is used by QMK +# to correctly and consistently map back and forth between the two systems. +{ + # Format: + # : {"info_key": , ["value_type": ], ["to_json": ], ["to_c": ]} + # value_type: one of "array", "array.int", "int", "list", "hex", "mapping" + # to_json: Default `true`. Set to `false` to exclude this mapping from info.json + # to_c: Default `true`. Set to `false` to exclude this mapping from rules.mk + # warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places + "BOARD": {"info_key": "board"}, + "BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false}, + "LAYOUTS": {"info_key": "community_layouts", "value_type": "list"}, + "LED_MATRIX_DRIVER": {"info_key": "led_matrix.driver"}, + "MCU": {"info_key": "processor", "warn_duplicate": false}, +} -- cgit v1.2.3