Merge remote-tracking branch 'aosp/upstream'

* aosp/upstream:
  On-demand find emulator initialization
  Support '*' in finddirs
  Support '..' in find emulation
  Add new check for non-phony targets that have no commands
  Remove unused `parents` from DepNode

Test: treehugger
Change-Id: Idd4196c17eaa6e265e2f5dd0f7f552468e7a43e0
tree: 699f6fa2bcc091cd4f17f4e3795d17c69f9d6f54
  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. clang-format-check
  16. command.cc
  17. command.h
  18. CONTRIBUTING.md
  19. CONTRIBUTORS
  20. dep.cc
  21. dep.go
  22. dep.h
  23. depgraph.go
  24. doc.go
  25. eval.cc
  26. eval.go
  27. eval.h
  28. evalcmd.go
  29. exec.cc
  30. exec.go
  31. exec.h
  32. expr.cc
  33. expr.go
  34. expr.h
  35. expr_test.go
  36. file.cc
  37. file.h
  38. file_cache.cc
  39. file_cache.h
  40. fileutil.cc
  41. fileutil.go
  42. fileutil.h
  43. fileutil_bench.cc
  44. find.cc
  45. find.h
  46. find_test.cc
  47. flags.cc
  48. flags.go
  49. flags.h
  50. func.cc
  51. func.go
  52. func.h
  53. func_test.go
  54. INTERNALS.md
  55. io.cc
  56. io.h
  57. LICENSE
  58. loc.h
  59. log.cc
  60. log.go
  61. log.h
  62. m2n
  63. main.cc
  64. make-c.sh
  65. Makefile
  66. Makefile.ckati
  67. Makefile.kati
  68. ninja.cc
  69. ninja.go
  70. ninja.h
  71. ninja_test.cc
  72. ninja_test.go
  73. OWNERS
  74. pack.sh
  75. parser.cc
  76. parser.go
  77. parser.h
  78. pathutil.go
  79. pathutil_test.go
  80. query.go
  81. README.md
  82. regen.cc
  83. regen.h
  84. regen_dump.cc
  85. rule.cc
  86. rule.h
  87. rule_parser.go
  88. rule_parser_test.go
  89. runtest.rb
  90. serialize.go
  91. shellutil.go
  92. shellutil_test.go
  93. stats.cc
  94. stats.go
  95. stats.h
  96. stmt.cc
  97. stmt.h
  98. string_piece.cc
  99. string_piece.h
  100. string_piece_test.cc
  101. stringprintf.cc
  102. stringprintf.h
  103. strutil.cc
  104. strutil.go
  105. strutil.h
  106. strutil_bench.cc
  107. strutil_test.cc
  108. strutil_test.go
  109. symtab.cc
  110. symtab.go
  111. symtab.h
  112. testutil.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