An experimental GNU make clone
C++ Go Makefile Shell Ruby Python C
Switch branches/tags
Nothing to show
Clone or download
danw Merge pull request #140 from asmundak/master
Clean up Symbol handling.
Latest commit 5d8e5d7 Aug 15, 2018
Permalink
Failed to load latest commit information.
cmd/kati [go] implement find emulator Jul 31, 2015
make-c add make-c to measure time to parse android makefiles. Jun 16, 2015
testcase Do not rewrite dependencies on implicit outputs to be the primary output Jul 27, 2018
.clang-format Add clang-format configuration, add exceptions Oct 12, 2017
.gitignore Add unit tests for invalid string accesses Jun 30, 2016
.travis.yml Travis: switch to trusty, ninja 1.7 Aug 10, 2017
AUTHORS [AUTHORS] Fix kati instead of glog Dec 1, 2016
Android.bp Remove default libs Sep 29, 2017
CONTRIBUTING.md Add CONTRIBUTING.md Jul 9, 2015
CONTRIBUTORS Add Koichi Shiraishi to AUTHORS/CONTRIBUTORS Nov 29, 2016
INTERNALS.md Fix a misuse of "dependent" in INTERNALS.md Oct 31, 2015
LICENSE Add LICENSE and licence headers Jun 10, 2015
Makefile Remove Go related targets from test and clean Apr 27, 2016
Makefile.ckati Add simple benchmark for RunCommand Oct 1, 2016
Makefile.kati [go] fix ldflags foramt to add '=' for -X flag Nov 28, 2016
README.md Add build status to README.md Sep 10, 2015
affinity.cc `clang-format -i -style=file *.cc *.h` Oct 12, 2017
affinity.h [C++] Set CPU affinity Feb 16, 2016
ast.go [go] fix override_export.mk Jul 15, 2015
bootstrap.go [C++] Define MAKE=make -j cpus/2 Sep 4, 2015
buf.go use sync.Pool for evalBuffer and wordBuffer Jul 9, 2015
buf_test.go use sync.Pool for evalBuffer and wordBuffer Jul 9, 2015
command.cc `clang-format -i -style=file *.cc *.h` Oct 12, 2017
command.h `clang-format -i -style=file *.cc *.h` Oct 12, 2017
dep.cc Clean up Symbol handling. Aug 15, 2018
dep.go [go] implement find emulator Jul 31, 2015
dep.h Do not rewrite dependencies on implicit outputs to be the primary output Jul 27, 2018
depgraph.go [go] fix ninja vpath.mk and vpath_directive.mk Jul 29, 2015
doc.go Add a license header for doc.go Jul 3, 2015
eval.cc Clean up Symbol handling. Aug 15, 2018
eval.go [go] fix nested_call.mk Aug 10, 2015
eval.h Clean up Symbol handling. Aug 15, 2018
evalcmd.go [go] backport [C++] Fix info, warning, and error for ninja Jul 28, 2015
exec.cc Do not rewrite dependencies on implicit outputs to be the primary output Jul 27, 2018
exec.go [go] fix nothing_to_do.mk Jul 17, 2015
exec.h Do not rewrite dependencies on implicit outputs to be the primary output Jul 27, 2018
expr.cc Clean up Symbol handling. Aug 15, 2018
expr.go use github.com/golang/glog Jul 10, 2015
expr.h Clean up Symbol handling. Aug 15, 2018
expr_test.go fix unmatched_paren.mk Jul 3, 2015
file.cc Handle EINTR on read Apr 11, 2016
file.h [C++] NULL terminate the buffer of files Feb 29, 2016
file_cache.cc `clang-format -i -style=file *.cc *.h` Oct 12, 2017
file_cache.h [C++] Add a rule for ninja file regeneration Jul 23, 2015
fileutil.cc `clang-format -i -style=file *.cc *.h` Oct 12, 2017
fileutil.go [go] implement vpath directive Jul 15, 2015
fileutil.h `clang-format -i -style=file *.cc *.h` Oct 12, 2017
fileutil_bench.cc `clang-format -i -style=file *.cc *.h` Oct 12, 2017
find.cc Fail find parsing for \* Feb 13, 2018
find.h `clang-format -i -style=file *.cc *.h` Oct 12, 2017
find_test.cc Fail find parsing for \* Feb 13, 2018
flags.cc Add options to limit non-PHONY target prefixes Jun 11, 2018
flags.go [go] implement find emulator Jul 31, 2015
flags.h Add options to limit non-PHONY target prefixes Jun 11, 2018
func.cc Clean up Symbol handling. Aug 15, 2018
func.go [go] fix nested_call.mk Aug 10, 2015
func.h Merge pull request #97 from danw/file_func Oct 4, 2016
func_test.go use sync.Pool for evalBuffer and wordBuffer Jul 9, 2015
io.cc [C++] Do not die for incomplete .kati_stamp file Aug 29, 2015
io.h `clang-format -i -style=file *.cc *.h` Oct 12, 2017
loc.h `clang-format -i -style=file *.cc *.h` Oct 12, 2017
log.cc `clang-format -i -style=file *.cc *.h` Oct 12, 2017
log.go use github.com/golang/glog Jul 10, 2015
log.h `clang-format -i -style=file *.cc *.h` Oct 12, 2017
m2n Detect depfiles only when --detect_depfiles is specified Mar 14, 2016
main.cc Do not rewrite dependencies on implicit outputs to be the primary output Jul 27, 2018
make-c.sh add make-c to measure time to parse android makefiles. Jun 16, 2015
ninja.cc Clean up Symbol handling. Aug 15, 2018
ninja.go Remove ninja shortcuts Aug 25, 2015
ninja.h Do not rewrite dependencies on implicit outputs to be the primary output Jul 27, 2018
ninja_test.cc `clang-format -i -style=file *.cc *.h` Oct 12, 2017
ninja_test.go [go] backport [C++] Do not strip words which do not start with '#' Jul 15, 2015
pack.sh Now release package has ckati binary Jul 6, 2015
parser.cc `clang-format -i -style=file *.cc *.h` Oct 12, 2017
parser.go [go] fix func_backslash.mk and err_invalid_ifeq5.mk Sep 4, 2015
parser.h `clang-format -i -style=file *.cc *.h` Oct 12, 2017
pathutil.go [go] fix stat.Dev type to uint64 Nov 28, 2016
pathutil_test.go [go] fix find_command.mk - "cd xxx && find ." Aug 11, 2015
query.go order only is not attribute of dep node. Jun 30, 2015
regen.cc `clang-format -i -style=file *.cc *.h` Oct 12, 2017
regen.h [C++] Move NeedsRegen from ninja.cc to regen.cc Jan 20, 2016
regen_dump.cc Add environment dumping to regen_dump Nov 21, 2017
rule.cc Fix bug around empty targets in static pattern rules Jun 16, 2018
rule.h `clang-format -i -style=file *.cc *.h` Oct 12, 2017
rule_parser.go [go] implement find emulator Jul 31, 2015
rule_parser_test.go fix equal_in_target.mk Jul 7, 2015
runtest.rb Do not rewrite dependencies on implicit outputs to be the primary output Jul 27, 2018
serialize.go [go] simpleVar has []string to make append faster Jul 15, 2015
shellutil.go [go] fix find_command.mk Aug 10, 2015
shellutil_test.go unexport Func and Expr Jun 25, 2015
stats.cc Dump the top 10 slowest $(shell) calls Feb 1, 2018
stats.go [go] implement find emulator Jul 31, 2015
stats.h Dump the top 10 slowest $(shell) calls Feb 1, 2018
stmt.cc Clean up Symbol handling. Aug 15, 2018
stmt.h Clean up Symbol handling. Aug 15, 2018
string_piece.cc `clang-format -i -style=file *.cc *.h` Oct 12, 2017
string_piece.h `clang-format -i -style=file *.cc *.h` Oct 12, 2017
string_piece_test.cc [C++] Compare last 8 bytes first in StringPiece::operator== Feb 17, 2016
stringprintf.cc Fix warnings reported by clang Jul 30, 2015
stringprintf.h Add Apache license header to recently added files Jun 23, 2015
strutil.cc `clang-format -i -style=file *.cc *.h` Oct 12, 2017
strutil.go [go] fix recipe_var.mk Jul 22, 2015
strutil.h `clang-format -i -style=file *.cc *.h` Oct 12, 2017
strutil_bench.cc [C++] add +build ignore magic comment for go build Nov 28, 2016
strutil_test.cc `clang-format -i -style=file *.cc *.h` Oct 12, 2017
strutil_test.go fix run_integration_test android case Jul 8, 2015
symtab.cc Clean up Symbol handling. Aug 15, 2018
symtab.go go gettable for github.com/google/kati Jun 25, 2015
symtab.h Clean up Symbol handling. Aug 15, 2018
testutil.h `clang-format -i -style=file *.cc *.h` Oct 12, 2017
thread_local.h `clang-format -i -style=file *.cc *.h` Oct 12, 2017
thread_pool.cc `clang-format -i -style=file *.cc *.h` Oct 12, 2017
thread_pool.h [C++] Re-invent C++11-ish thread library Jan 27, 2016
timeutil.cc `clang-format -i -style=file *.cc *.h` Oct 12, 2017
timeutil.h [C++] Rename time.h to timeutil.h Jul 4, 2015
var.cc Clean up Symbol handling. Aug 15, 2018
var.go [go] simpleVar has []string to make append faster Jul 15, 2015
var.h Clean up Symbol handling. Aug 15, 2018
version.go [go] backport [C++] Record kati's version in ninja file Jul 14, 2015
version.h [C++] Record kati's version in ninja file Jul 13, 2015
version_unknown.cc Allow building Kati with Soong for Android Jan 13, 2016
worker.go [go] fix func_backslash.mk and err_invalid_ifeq5.mk Sep 4, 2015

README.md

kati

Build Status

kati is an experimental GNU make clone. The main goal of this tool is to speed-up incremental build of Android.

Currently, kati does not offer a faster build by itself. It instead converts your Makefile to a ninja file.

How to use for Android

Now AOSP has kati and ninja, so all you have to do is

% export USE_NINJA=true

All Android's build commands (m, mmm, mmma, etc.) should just work.

How to use for Android (deprecated way)

Set up kati:

% cd ~/src
% git clone https://github.com/google/kati
% cd kati
% make

Build Android:

% cd <android-directory>
% source build/envsetup.sh
% lunch <your-choice>
% ~/src/kati/m2n --kati_stats  # Use --goma if you are a Googler.
% ./ninja.sh

You need ninja in your $PATH.

More usage examples (deprecated way)

"make clean"

% ./ninja.sh -t clean

Note ./ninja.sh passes all parameters to ninja.

Build a specific target

For example, the following is equivalent to "make cts":

% ./ninja.sh cts

Or, if you know the path you want, you can do:

% ./ninja.sh out/host/linux-x86/bin/adb