CKATI(1) | User Commands | CKATI(1) |
ckati - experimental GNU make clone
ckati [OPTION]... [TARGET]...
ckati is a C++ implementation of kati, an experimental make clone.
The motivation of kati was to speed up Android platform build. The Android platform’s build system is built on GNU make and allows developers to write build rules in a descriptive way.
ckati is a complete rewrite of GNU make from scratch, focused on speeding up incremental builds.
ckati supports two modes of execution. It can directly execute the commands specified in the Makefile, or it can generate a ninja file corresponding to the Makefile.
The ninja generator mode is the main mode of operation, since the built-in executor of ckati lacks important features for a build system like parallel builds.
The ninja generator mode is not fully compatible with GNU make due to a feature mismatch between make and ninja. Since ninja only allows one command per a rule, when the Makefile has multiple commands, ckati generates a rule with the commands joined with &&. When $(shell ...) is used, ckati translates it into shell’s $(...). This works in many cases, but doesn’t when the result of $(shell ...) is passed to another function:
all: echo $(if $(shell echo),FAIL,PASS)
If -\-regen flag is specified, ckati checks if anything in your environment has changed after the previous run. If the ninja file doesn’t need to be regenerated, it finishes quickly.
The following is checked when deciding whether the ninja file should be regenerated or not:
Ckati doesn’t run $(shell date ...) and $(shell echo ...) during these checks.
Ckati optimises $(shell find ...) calls, since the Android’s build system uses a lot of them to create a list of all .java/.mk files under a directory, and they are slow. Ckati has a built-in emulator of GNU find. The find emulator traverse the directory tree and creates an in-memory directory tree. When $(shell find ...) is used, the find emulator returns results of find commands using the cached tree, giving a performance boost.
The following options can emit warnings or errors if certain Makefile features are used:
Text functions:
File name functions:
Conditional functions:
Make control functions:
Miscellaneous:
ckati exits with a status of zero if all Makefiles were successfully parsed and no targets that were built failed.
make(1), ninja(1)
This manual page was written by Andrej Shadura for the Debian project.
ckati |