Merge remote-tracking branch 'aosp/upstream' into kati

4421dda [C++] ifdef should fail when there are multiple variables
407d8d4 [C++] Resolve symlinks in the top directory
31505ba [C++] Fix find -name for symlinks
f2d3172 [C++] Fix a memory corruption
6ce977d [C++] Regenerate ninja files when symlink was changed
9c5ec1d [go] Mark find_command.mk and wildcard.mk as FAIL
b717561 [C++] Make FindEmulator's symlink support better
14ea0f1 [C++] Fix NormalizePath("../../foo")
bd3bb23 [C++] Fix FindEmulator for paths in symlinks
c58db99 [C++] Make the fast pass of EscapeShell consistent with the rest
5de5826 [C++] Do not escape ! in a shell script
71cf60b [C++] Stop using realpath(1) to handle $(realpath) in recipe
cb4724e [C++] Fix realpath implementation for multiple parameters
34556cc [C++] Do not find first Makefile when -f is specified
171dc82 [C++] Make the output of find_test compatible with find(1)
680e98b Exit 1 in runtest.rb
9fe05bf Install realpath
9d918f8 Remove ninja_normalized_path2.mk
212b7a5 [C++] Fix a off-by-one error in StripShellComment
d0251f7 Change the shell in Travis CI to bash
0613e01 Revert "Always use SHELL=/bin/bash in our test"
a73e93b Always use SHELL=/bin/bash in our test
b7be8f1 [C++] Fix err_include.mk for -c -n
3c60c12 [C++] Fix err_include.mk
e3c6231 Install ninja-build on Travis CI

Bug: 24580686
Change-Id: I2419d78affcd4cfd1de284a7dc79c0e8a4535fc9
tree: 2b2bc9a8cc66b65a08e5128f4097cda2f5888f34
  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. io.cc
  49. io.h
  50. LICENSE
  51. loc.h
  52. log.cc
  53. log.go
  54. log.h
  55. m2n
  56. main.cc
  57. make-c.sh
  58. Makefile
  59. Makefile.ckati
  60. Makefile.kati
  61. ninja.cc
  62. ninja.go
  63. ninja.h
  64. ninja_test.cc
  65. ninja_test.go
  66. pack.sh
  67. parser.cc
  68. parser.go
  69. parser.h
  70. pathutil.go
  71. pathutil_test.go
  72. query.go
  73. README.md
  74. rule.cc
  75. rule.h
  76. rule_parser.go
  77. rule_parser_test.go
  78. run_integration_test.rb
  79. runtest.rb
  80. serialize.go
  81. shellutil.go
  82. shellutil_test.go
  83. stats.cc
  84. stats.go
  85. stats.h
  86. stmt.cc
  87. stmt.h
  88. string_piece.cc
  89. string_piece.h
  90. string_piece_test.cc
  91. stringprintf.cc
  92. stringprintf.h
  93. strutil.cc
  94. strutil.go
  95. strutil.h
  96. strutil_test.cc
  97. strutil_test.go
  98. symtab.cc
  99. symtab.go
  100. symtab.h
  101. testutil.h
  102. timeutil.cc
  103. timeutil.h
  104. var.cc
  105. var.go
  106. var.h
  107. version.go
  108. version.h
  109. 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