soong_ui: Add build actions commands in soong_ui.

Add the following build actions {BUILD_MODULES_IN_A_DIRECTORY,
BUILD_MODULES_IN_DIRECTORIES} in soong_ui config so the bash code version of
build commands (m, mm, mma, mmm, mmma) in build/make/envsetup.sh can be deprecated.
This is to allow up to date bug fixes on the build commands.

Bug: b/130049705
Test: Unit test cases
Change-Id: I772db1d4e9c1da5273374d1994eb5e8f17cd52f2
This commit is contained in:
Patrice Arruda
2019-04-22 17:12:02 -07:00
parent 1b033f5c4c
commit 1384822a63
3 changed files with 1109 additions and 6 deletions

View File

@@ -44,6 +44,17 @@ func inList(s string, list []string) bool {
return indexList(s, list) != -1
}
// removeFromlist removes all occurrences of the string in list.
func removeFromList(s string, list []string) []string {
filteredList := make([]string, 0, len(list))
for _, ls := range list {
if s != ls {
filteredList = append(filteredList, ls)
}
}
return filteredList
}
// ensureDirectoriesExist is a shortcut to os.MkdirAll, sending errors to the ctx logger.
func ensureDirectoriesExist(ctx Context, dirs ...string) {
for _, dir := range dirs {