[automerger skipped] DO NOT MERGE am: 679d6bb847  -s ours
am: d5f699af92  -s ours

Change-Id: Ice1060d4f5bf8ce0d57913b263a5db5bcdde3852
tree: ebd0da1d6ac04f1a88b1d09ff35d6a580db18044
  1. cmd/
  2. make-c/
  3. testcase/
  4. .clang-format
  5. .gitignore
  6. .travis.yml
  7. affinity.cc
  8. affinity.h
  9. Android.bp
  10. ast.go
  11. AUTHORS
  12. bootstrap.go
  13. buf.go
  14. buf_test.go
  15. command.cc
  16. command.h
  17. CONTRIBUTING.md
  18. CONTRIBUTORS
  19. dep.cc
  20. dep.go
  21. dep.h
  22. depgraph.go
  23. doc.go
  24. eval.cc
  25. eval.go
  26. eval.h
  27. evalcmd.go
  28. exec.cc
  29. exec.go
  30. exec.h
  31. expr.cc
  32. expr.go
  33. expr.h
  34. expr_test.go
  35. file.cc
  36. file.h
  37. file_cache.cc
  38. file_cache.h
  39. fileutil.cc
  40. fileutil.go
  41. fileutil.h
  42. fileutil_bench.cc
  43. find.cc
  44. find.h
  45. find_test.cc
  46. flags.cc
  47. flags.go
  48. flags.h
  49. func.cc
  50. func.go
  51. func.h
  52. func_test.go
  53. INTERNALS.md
  54. io.cc
  55. io.h
  56. LICENSE
  57. loc.h
  58. log.cc
  59. log.go
  60. log.h
  61. m2n
  62. main.cc
  63. make-c.sh
  64. Makefile
  65. Makefile.ckati
  66. Makefile.kati
  67. ninja.cc
  68. ninja.go
  69. ninja.h
  70. ninja_test.cc
  71. ninja_test.go
  72. OWNERS
  73. pack.sh
  74. parser.cc
  75. parser.go
  76. parser.h
  77. pathutil.go
  78. pathutil_test.go
  79. query.go
  80. README.md
  81. regen.cc
  82. regen.h
  83. regen_dump.cc
  84. rule.cc
  85. rule.h
  86. rule_parser.go
  87. rule_parser_test.go
  88. runtest.rb
  89. serialize.go
  90. shellutil.go
  91. shellutil_test.go
  92. stats.cc
  93. stats.go
  94. stats.h
  95. stmt.cc
  96. stmt.h
  97. string_piece.cc
  98. string_piece.h
  99. string_piece_test.cc
  100. stringprintf.cc
  101. stringprintf.h
  102. strutil.cc
  103. strutil.go
  104. strutil.h
  105. strutil_bench.cc
  106. strutil_test.cc
  107. strutil_test.go
  108. symtab.cc
  109. symtab.go
  110. symtab.h
  111. testutil.h
  112. thread_local.h
  113. thread_pool.cc
  114. thread_pool.h
  115. timeutil.cc
  116. timeutil.h
  117. var.cc
  118. var.go
  119. var.h
  120. version.go
  121. version.h
  122. version_unknown.cc
  123. worker.go
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

For Android-N+, ckati and ninja is used automatically. There is a prebuilt checked in under prebuilts/build-tools that is used.

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

How to use for Android (deprecated -- only for Android M or earlier)

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
% ./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