-
-
Notifications
You must be signed in to change notification settings - Fork 39.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make arguments redo, subproject elimination #1784
Conversation
This failed the check, but only because it ran out of time :/ |
Also attempt to get the BLE thing more properly integrated. Also also fix led_set() to call led_set_kb().
* restructure converters each converter is its own keyboard and different hardware variants are different subprojects. remove (seemingly) old method of loading layouts from main Makefile * call led_set_kb() from overridden led_set() * put converter back into one folder * revert some structure changes to bring in line with #1784. Also attempt to get the BLE thing more properly integrated. Also also fix led_set() to call led_set_kb().
The original comment here has some good information that I couldn't find in the current docs. I think the comment could be copied pretty much as-is to a page in the docs. |
It was copied here - I think the docs could definitely use more info, but we're trying to put transitional information like this on qmk.fm instead of in the docs - they're also an rss feed of those sort of changes there. |
Hm... I don't know about your plans for the future but how is that info transitional? Are you planning on further changing the structure and/or process? |
It was written for those that were familiar with QMK and needed to convert projects over to the new system - most of the info applies to those unfamiliar/newcomers as well. |
Reflects the changes in qmk#1784
Reflects the changes in #1784
* restructure converters each converter is its own keyboard and different hardware variants are different subprojects. remove (seemingly) old method of loading layouts from main Makefile * call led_set_kb() from overridden led_set() * put converter back into one folder * revert some structure changes to bring in line with qmk#1784. Also attempt to get the BLE thing more properly integrated. Also also fix led_set() to call led_set_kb().
Reflects the changes in qmk#1784
* redo make args to use colons, better folder structuring system [skip ci] * don't put spaces after statements - hard lessons in makefile development * fix-up some other rules.mk * give travis a chance * reset KEYMAPS variable * start converting keyboards to new system * try making all with travis * redo make args to use colons, better folder structuring system [skip ci] * don't put spaces after statements - hard lessons in makefile development * fix-up some other rules.mk * give travis a chance * reset KEYMAPS variable * start converting keyboards to new system * try making all with travis * start to update readmes and keyboards * look in keyboard directories for board.mk * update visualizer rules * fix up some other keyboards/keymaps * fix arm board ld includes * fix board rules * fix up remaining keyboards * reset layout variable * reset keyboard_layouts * fix remainging keymaps/boards * update readmes, docs * add note to makefile error * update readmes * remove planck keymap warnings * update references and docs * test out tarvis build stages * don't use stages for now * don't use stages for now
* restructure converters each converter is its own keyboard and different hardware variants are different subprojects. remove (seemingly) old method of loading layouts from main Makefile * call led_set_kb() from overridden led_set() * put converter back into one folder * revert some structure changes to bring in line with qmk#1784. Also attempt to get the BLE thing more properly integrated. Also also fix led_set() to call led_set_kb().
Reflects the changes in qmk#1784
This reflects the changes discussed in #1710 - please direct comments on the concept to that issue, and use this PR for ones about the implementation.
Make arguments
Rather than using
-
to separate rules in QMK, we're now using:
, so a basic build command will look like this:In addition, subprojects no longer exist, and revisions/folder organisations are now referenced with their path, like this:
There can be up to 5 folders of depth this way (not including
keyboards/
), allowing for quite a lot of organisation within projects.Upon compliation, folders/keymaps are combined with
_
, keeping theplanck_rev4_default.hex
filename format.rules.mk
If a
rules.mk
file exists in a keyboard folder, it's assumed to be a project folder that can be compiled, otherwise it's just an organisational folder (e.g.converter
,handwired
). Default revisions can be set via therules.mk
:The full path minus
keyboards/
is needed here. For example, this is found inkeyboards/planck/rules.mk
:This allows
make planck:default
to default to theplanck/rev4
revision, but can be overrided withmake planck/rev3:default
.Each level's
rules.mk
file is included, from most broad to most specific, e.g.:planck/rules.mk
planck/rev4/rules.mk
config.h
Each level's
config.h
is included if it exists, from most broad to most specific, e.g.:planck/config.h
planck/rev4/config.h
planck/keymaps/<keymap>/config.h
Each
config.h
file should now use this line at the top, rather than including files in other directories:Be sure to use a different
#ifdef CONFIG_H
line for each file, or things won't be included correctly. Some examples:Paths
All folder levels are added to the path.
folder.c
All
<folder>.c
files are now included automatically if they exist. e.g.:are both added.
folder.h
Each folder level's
<folder>.h
file should be including the parent's<folder>.h
, and in some instances, it should include their children's as well - the easiest way to do this with a conditional is like this in thefolder1.h
file:For example,
/keyboards/planck/planck.h
has this:Keymaps
Keymaps can exist at any level, but are only available if that folder is in the project path, for example,
/keyboards/planck/keymaps
and/keyboards/planck/rev4/keymaps
are accessible to bothplanck/rev4
andplanck
(becauseplanck/rev4
is the default folder), but only/keyboards/planck/keymaps
is accessible toplanck/rev3
.Generally, keymaps should exist in the broadest folder available.
Layouts
Layouts are included automatically and can be added to any
rules.mk
file, e.g.:Chibios
bootloader_defs.h
and theboards
directory (and necessary files) can exist at any folder level, and are included automatically. Your board'sboard.mk
will need to use$(BOARD_PATH)
in the path, e.g.: