Merge remote-tracking branch 'aosp/upstream'

a84e670c9b2d Merge pull request #37 from colincross/no_ignore_dirty
f23ae8caf11b Add --no_ignore_dirty flag
40307068f60d Merge pull request #36 from colincross/env
27df5311c5ea [C++] separate ninja shell script into two
4e3b421f1362 [C++] Remove gen_all_phony_targets flag
b67a299ca5eb [C++] Fix a CHECK failure
7d261aa20217 Fix a misuse of "dependent" in INTERNALS.md
d573ec6f826d Fix typos and do some cosmetic changes for INTERNALS.md
40127c2af7d4 Add the first version of INTERNALS.md
9f127b26c74a [C++] Show the number of interned strings with --kati_stats
748969f39dfb [C++] Do not trim trailing spaces in variable assignments
760f959ba462 Add two testcases for previous change
d236eb03fbed [C++] Let ifdef allow trailing spaces in a variable name

Change-Id: If465fd656fd03477cf5c21bb2ddb9c0c9148377d
tree: 3d03862f08b132b3f202023c2a8bed7b9e2776c2
  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