-
-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
Makefile overhaul #666
Makefile overhaul #666
Conversation
Only handles allkb at the moment.
Does not handle keyboards without subprojects correctly yet.
Seems like I forgot the new amj60 keyboard. |
To avoid full recompilation when the git commit hash changes.
To speed up the compilation
A single keyboard is always by default compiled in verbose mode. While multiple keyboards are compiled in silent mode. This can be overriden by the silent variable from the command line
When running make from either a keyboard folder or a subproject it runs all keymaps for all subprojects and the selected subproject respectively. Without this fix, the same doesn't happen if your run make clean for example. As it would just provide you with an error message. Now this will work as expected.
I fixed a small inconsistency issue. When running |
Closing and re-opening to trigger Travis. |
It had been added for some strange reason, allthough it's supposed to be there only in another branch.
This pull request is getting a bit hard to keep up to date and I will soon have the unit testing pull request, which builds on this, ready. So it would be good if it could be merged soon. There are some line ending inconsistencies (most likely caused by the .gitattributes changes that prevents me from rebasing properly, so the last two updates had to be done through merges. But unfortunately it also means that any change made to a keyboard or subproject makefile won't propagate to the rules.mk file anymore. And I have to resolve that manually, so it's very error prone. Personally I haven't found any problems with this. One quick way to test different make commands is to use the show_path target, which doesn't compile, but still shows what would be done, so it's much faster that way. Edit: |
Led should have been added to KC60, not GH60
Agreed! I'd like to merge this soon - I'll try to set aside some time today to dive into it. It's been a while since I've been able to pull/compile locally :) |
FWIW, this runs okay for me. i'd probably add an alias to clean all ("make clean"?) |
Yes, adding a make clean from the root would be a good idea. I think I'll implement it so that it just deletes the whole .build folder, instead of calling each target sepearately, which Edit: I'll make that in a separate pull request, in order to not keep adding features to this one |
Hm When working on the unit test compilation, I just noticed that compiled_push doesn't work.
So this probably have to be fixed before merging. @jackhumbert Why is it trying to compile the Ergodox keyboards again there? |
There's a line (
|
Yes, that should work, but I changed it to the more simple form
|
Everything seems to be OK now, I assume that the |
Awesome! Yeah, I really got lucky there with avoiding that issue :) Merging now! |
Here comes a scary pull request(it turned out to be much bigger than I had anticipated)... I recommend that we let it rest a little bit for proper review and/or testing by several people before merging.
I have been testing it quite much myself, but the magnitude of the changes are huge, and I hope I have been taken care of everything.
The readme.md file best explains the new syntax for running make.
The biggest reason for the huge number of files changed is that keyboard and subproject makefiles have been split into Makefile and rules.mk. The documentation also had to be updated in many files. Other than that the changes are quite localized.
The individual commit descriptions best describe what have been made. But here's a quick overview of what has been done from issue #591, (1. and 2. and 9. were fixed before). 3, 4, 5, 7 (partly), 8 (but keymaps still use only a single Makefile).
Additionally there are a couple of optimizations.
#582, or keep going even after a keyboard compilation fails is now on by default (it doesn't check the -c option). I figured it was better to do without, as you can always press Ctrl-c if you want to abort the compilation in the middle.
There's also an unrelated change, since my previous make file changes, diff-utils have been needed for the cmp command. So that have now been added to Travis and install-dependencies.sh. The instructions have not been updated since they seemed to be incomplete even before, and needs a separate update pass.
The root Makefile, could perhaps benefit from a bit more comments, an I will probably add that tomorrow.