Merge remote-tracking branch 'aosp/upstream'

Mainly for 1ce0d14 which revives local_pool for goma build.

1ce0d14 Set local_pool after a command with gomacc is found
189ce7e [C++] Do not crash when .kati_stamp is missing
433ad99 [C++] Add a warning for undefined user functions
82e2009 [C++] Warn about weird expressions
bbe5548 [C++] Add a fast path for $(eval) which starts with #
644d6b9 [C++] Add --warn flag which produces extra warnings

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

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