Merge pull request #178 from danw/fake_outputs

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