Merge remote-tracking branch 'aosp/upstream'

* aosp/upstream:
  Refine check for special targets and suffix rules

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