diff options
author | Fredric Silberberg <fred@silberberg.xyz> | 2018-07-16 19:10:23 -0700 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2018-07-17 00:10:42 -0400 |
commit | e9755521ab73f5ae87e578ed1826fe128de426a7 (patch) | |
tree | 1f57ffd4289a13074409e0f903ebd208897de8ff /docs/feature_userspace.md | |
parent | bbecd276d2883e488f7ec41ec78a0f71c6d604c1 (diff) | |
download | qmk_firmware-e9755521ab73f5ae87e578ed1826fe128de426a7.tar.gz qmk_firmware-e9755521ab73f5ae87e578ed1826fe128de426a7.zip |
Update README with rules.mk ordering information.
Diffstat (limited to 'docs/feature_userspace.md')
-rw-r--r-- | docs/feature_userspace.md | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index c8fa406cb..5f7c05b83 100644 --- a/docs/feature_userspace.md +++ b/docs/feature_userspace.md | |||
@@ -31,6 +31,20 @@ The reason for this, is that `<name>.h` won't be added in time to add settings ( | |||
31 | 31 | ||
32 | So you should use the `config.h` for QMK settings, and the `<name>.h` file for user or keymap specific settings. | 32 | So you should use the `config.h` for QMK settings, and the `<name>.h` file for user or keymap specific settings. |
33 | 33 | ||
34 | `/users/<name>/rules.mk` will be included in the build _after_ the `rules.mk` from your keymap. This allows you to have features in your userspace `rules.mk` that depend on individual QMK features that may or may not be available on a specific keyboard. For example, if you have RGB control features shared between all your keyboards that support RGB lighting, you can `define RGB_ENABLE` in your keymap `rules.mk` and then check for the variable in your userspace `rules.mk` like this: | ||
35 | ```make | ||
36 | ifdef RGB_ENABLE | ||
37 | # Include my fancy rgb functions source here | ||
38 | endif | ||
39 | ``` | ||
40 | Because of this, any time you turn on QMK features in your `users/<name>/rules.mk`, you should conditionally enable them only if the flag isn't already defined, like this: | ||
41 | ```make | ||
42 | ifndef TAP_DANCE_ENABLE | ||
43 | TAP_DANCE_ENABLE = yes | ||
44 | endif | ||
45 | ``` | ||
46 | This will ensure that you can explicitly turn off features for an individual keymap. | ||
47 | |||
34 | ## Readme | 48 | ## Readme |
35 | 49 | ||
36 | Please include authorship (your name, github username, email), and optionally [a license that's GPL compatible](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses). | 50 | Please include authorship (your name, github username, email), and optionally [a license that's GPL compatible](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses). |
@@ -122,4 +136,4 @@ By default the userspace used will be the same as the keymap name. In some situa | |||
122 | 136 | ||
123 | ``` | 137 | ``` |
124 | USER_NAME := mylayout | 138 | USER_NAME := mylayout |
125 | ``` \ No newline at end of file | 139 | ``` |