You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can kati be used for conversion of ordinary makefiles? #165
If I have the makefile for some project, can I use kati to convert the makefile to ninja file and make by ninja. If it can works, it can make 'make' more fast.
If it can, could you write to tell us how we convert?
Depending on your makefile, it may be possible, yes. The most likely problem that you may run into is that Kati does not support recursive make when combined with the ninja output.
But you can probably start with something simple, depending on the structure of your build (this assumes you write everything into an out/* directory):
If your source tree is large, I'd recommend trying --use_find_emulator to see if it works for you, it can be a rather big speedup if you've got expensive find commands that it can get rid of.
--color_warnings is nice, as is --detect_android_echo if your rules begin with an echo command.
Many of the rest are for extra warnings / errors that help bring sanity to large & diverse codebases.
If you do move to Kati, there are a number of extensions to the make language as well -- .KATI_DEPFILE is the most important to use, .KATI_RESTAT can be useful in some cases too, and .KATI_IMPLICIT_OUTPUTS to support multiple outputs of a single command (that requires a custom ninja currently). There are a number of others that can help with large codebase sanity as well (readonly / deprecated / obsolete variables)
I don't see any reference to an input makefile in this command:
ckati --ninja --ninja_dir=out --regen
Does it mean that ckati does not take input arguments, and instead it crawls my project looking for makefiles? Or does the makefile have to be in the current directory and named Makefile or something?
Activity
danw commentedon May 8, 2019
Depending on your makefile, it may be possible, yes. The most likely problem that you may run into is that Kati does not support recursive make when combined with the ninja output.
Android uses a bunch of arguments to kati:
But you can probably start with something simple, depending on the structure of your build (this assumes you write everything into an out/* directory):
If your source tree is large, I'd recommend trying
--use_find_emulatorto see if it works for you, it can be a rather big speedup if you've got expensive find commands that it can get rid of.--color_warningsis nice, as is--detect_android_echoif your rules begin with an echo command.Many of the rest are for extra warnings / errors that help bring sanity to large & diverse codebases.
If you do move to Kati, there are a number of extensions to the make language as well --
.KATI_DEPFILEis the most important to use,.KATI_RESTATcan be useful in some cases too, and.KATI_IMPLICIT_OUTPUTSto support multiple outputs of a single command (that requires a custom ninja currently). There are a number of others that can help with large codebase sanity as well (readonly / deprecated / obsolete variables)rulatir commentedon Oct 8, 2020
I don't see any reference to an input makefile in this command:
Does it mean that ckati does not take input arguments, and instead it crawls my project looking for makefiles? Or does the makefile have to be in the current directory and named
Makefileor something?