[C++] Add support for multiple filenames to findleaves emulation

Add support for the new findleaves multiple filename searching
implemented in
https://android.googlesource.com/platform/build/+/9808645cd9800a7bf7afeb208f3f25c208c64c20:

Add support for a new --dir= option to specify one or more directories
to search, and then treat any remaining options as filenames.  If no
directories are specified, fall back to treating only the last option as
a filename and the rest as directories.

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