Merge "Have androidmk ignore all-makefiles-under" am: f94700b563
am: e840be1bbc
am: 4d2a88a905
Change-Id: If09d16a6097f3e297c35bce2be05a6ea70c5ed5b
This commit is contained in:
commit
47a32a5869
|
@ -24,7 +24,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
clear_vars = "__android_mk_clear_vars"
|
clear_vars = "__android_mk_clear_vars"
|
||||||
|
include_ignored = "__android_mk_include_ignored"
|
||||||
)
|
)
|
||||||
|
|
||||||
type bpVariable struct {
|
type bpVariable struct {
|
||||||
|
@ -693,6 +694,10 @@ func allSubdirJavaFiles(args []string) string {
|
||||||
return "**/*.java"
|
return "**/*.java"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func includeIgnored(args []string) string {
|
||||||
|
return include_ignored
|
||||||
|
}
|
||||||
|
|
||||||
var moduleTypes = map[string]string{
|
var moduleTypes = map[string]string{
|
||||||
"BUILD_SHARED_LIBRARY": "cc_library_shared",
|
"BUILD_SHARED_LIBRARY": "cc_library_shared",
|
||||||
"BUILD_STATIC_LIBRARY": "cc_library_static",
|
"BUILD_STATIC_LIBRARY": "cc_library_static",
|
||||||
|
@ -729,6 +734,10 @@ func androidScope() mkparser.Scope {
|
||||||
globalScope.SetFunc("all-java-files-under", allJavaFilesUnder)
|
globalScope.SetFunc("all-java-files-under", allJavaFilesUnder)
|
||||||
globalScope.SetFunc("all-proto-files-under", allProtoFilesUnder)
|
globalScope.SetFunc("all-proto-files-under", allProtoFilesUnder)
|
||||||
globalScope.SetFunc("all-subdir-java-files", allSubdirJavaFiles)
|
globalScope.SetFunc("all-subdir-java-files", allSubdirJavaFiles)
|
||||||
|
globalScope.SetFunc("all-makefiles-under", includeIgnored)
|
||||||
|
globalScope.SetFunc("first-makefiles-under", includeIgnored)
|
||||||
|
globalScope.SetFunc("all-named-subdir-makefiles", includeIgnored)
|
||||||
|
globalScope.SetFunc("all-subdir-makefiles", includeIgnored)
|
||||||
|
|
||||||
for k, v := range moduleTypes {
|
for k, v := range moduleTypes {
|
||||||
globalScope.Set(k, v)
|
globalScope.Set(k, v)
|
||||||
|
|
|
@ -177,6 +177,9 @@ func convertFile(filename string, buffer *bytes.Buffer) (string, []error) {
|
||||||
makeModule(file, val)
|
makeModule(file, val)
|
||||||
case val == clear_vars:
|
case val == clear_vars:
|
||||||
resetModule(file)
|
resetModule(file)
|
||||||
|
case val == include_ignored:
|
||||||
|
// subdirs are already automatically included in Soong
|
||||||
|
continue
|
||||||
default:
|
default:
|
||||||
file.errorf(x, "unsupported include")
|
file.errorf(x, "unsupported include")
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -460,6 +460,13 @@ endif # b==false
|
||||||
// endif
|
// endif
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
desc: "ignore all-makefiles-under",
|
||||||
|
in: `
|
||||||
|
include $(call all-makefiles-under,$(LOCAL_PATH))
|
||||||
|
`,
|
||||||
|
expected: ``,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func reformatBlueprint(input string) string {
|
func reformatBlueprint(input string) string {
|
||||||
|
|
Loading…
Reference in New Issue