diff options
| author | Colin Cross <ccross@android.com> | 2015-06-16 16:38:17 -0700 |
|---|---|---|
| committer | Colin Cross <ccross@android.com> | 2015-06-17 10:18:35 -0700 |
| commit | 1f8c52be73d31f3347bcf7f8fb29b49e87b3864e (patch) | |
| tree | 23616e741990bb453c70fa2168dc31c9f690aa4a /common/util.go | |
| parent | 6a745c6ad0ff590e1175cd76b81ca3fef2ec0731 (diff) | |
| download | build_soong-1f8c52be73d31f3347bcf7f8fb29b49e87b3864e.tar.gz build_soong-1f8c52be73d31f3347bcf7f8fb29b49e87b3864e.tar.bz2 build_soong-1f8c52be73d31f3347bcf7f8fb29b49e87b3864e.zip | |
Add per-directory build targets
Build a map of blueprint directory to modules built from that
directory, and then add phony rules to build.ninja that emulate
the behavior of mma in the current build system.
Also fixes checkbuild to depend on checkbuild files and installable
files, but not installed files.
Change-Id: I8bad6e93387940df7439dbd4554f6d79f924c65f
Diffstat (limited to 'common/util.go')
| -rw-r--r-- | common/util.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/util.go b/common/util.go index 599b3b17..0a0ed138 100644 --- a/common/util.go +++ b/common/util.go @@ -14,6 +14,8 @@ package common +import "sort" + func JoinWithPrefix(strs []string, prefix string) string { if len(strs) == 0 { return "" @@ -65,3 +67,12 @@ func JoinWithPrefixAndQuote(strs []string, prefix string) string { } return string(ret) } + +func sortedKeys(m map[string][]string) []string { + s := make([]string, 0, len(m)) + for k := range m { + s = append(s, k) + } + sort.Strings(s) + return s +} |
