Merge remote-tracking branch \'aosp/upstream\' into master am: ff2d59e2e0 am: 2ca84c70fc
am: 32b10dc028

* commit '32b10dc02806b70ffdad7a6e3c5b767c5a6de507': (35 commits)
  Handle nested define/endef
  Update findleaves.py and add a few testcases
  [C++] Add support for multiple filenames to findleaves emulation
  Support all kinds of command line variables
  Allow NULL filename for -d flag
  [C++] Add -d flag to make debugging slightly easier
  Normalize log for recent ninja
  Always sort glob results
  Skip 3 tests which fail with make 4
  Skip shell_var_with_args.mk with GNU make 4
  Use override in posix_var.mk to fix test with make 4
  Stop overwriting /bin/sh by bash on travis
  Normalize Unicode quotes for recent find
  Explicitly use SHELL=/bin/bash
  [C++] Stop using an uninitialized value
  Fix multi_implicit_output_patterns.mk for GNU make 4
  Clean up normalization in runtest.rb a bit
  Remove test output in ckati_clean
  Normalize GNU make 4.00 in runtest.rb
  Suppress GNU make jobserver magic in runtest.rb
  ...

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