summaryrefslogtreecommitdiff
path: root/android/module.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/module.go')
-rw-r--r--android/module.go23
1 files changed, 16 insertions, 7 deletions
diff --git a/android/module.go b/android/module.go
index 072f41b4c..bd60829f1 100644
--- a/android/module.go
+++ b/android/module.go
@@ -1444,7 +1444,7 @@ func (m *ModuleBase) generateModuleTarget(ctx ModuleContext) {
if len(deps) > 0 {
suffix := ""
- if ctx.Config().EmbeddedInMake() {
+ if ctx.Config().KatiEnabled() {
suffix = "-soong"
}
@@ -2324,7 +2324,7 @@ func (m *moduleContext) skipInstall(fullInstallPath InstallPath) bool {
}
if m.Device() {
- if m.Config().EmbeddedInMake() && !m.InstallBypassMake() {
+ if m.Config().KatiEnabled() && !m.InstallBypassMake() {
return true
}
@@ -2377,7 +2377,7 @@ func (m *moduleContext) installFile(installPath InstallPath, name string, srcPat
Input: srcPath,
Implicits: implicitDeps,
OrderOnly: orderOnlyDeps,
- Default: !m.Config().EmbeddedInMake(),
+ Default: !m.Config().KatiEnabled(),
})
m.installFiles = append(m.installFiles, fullInstallPath)
@@ -2409,7 +2409,7 @@ func (m *moduleContext) InstallSymlink(installPath InstallPath, name string, src
Description: "install symlink " + fullInstallPath.Base(),
Output: fullInstallPath,
Input: srcPath,
- Default: !m.Config().EmbeddedInMake(),
+ Default: !m.Config().KatiEnabled(),
Args: map[string]string{
"fromPath": relPath,
},
@@ -2440,7 +2440,7 @@ func (m *moduleContext) InstallAbsoluteSymlink(installPath InstallPath, name str
Rule: Symlink,
Description: "install symlink " + fullInstallPath.Base() + " -> " + absPath,
Output: fullInstallPath,
- Default: !m.Config().EmbeddedInMake(),
+ Default: !m.Config().KatiEnabled(),
Args: map[string]string{
"fromPath": absPath,
},
@@ -2582,6 +2582,15 @@ func outputFilesForModule(ctx PathContext, module blueprint.Module, tag string)
return nil, fmt.Errorf("failed to get output files from module %q", pathContextName(ctx, module))
}
return paths, nil
+ } else if sourceFileProducer, ok := module.(SourceFileProducer); ok {
+ if tag != "" {
+ return nil, fmt.Errorf("module %q is a SourceFileProducer, not an OutputFileProducer, and so does not support tag %q", pathContextName(ctx, module), tag)
+ }
+ paths := sourceFileProducer.Srcs()
+ if len(paths) == 0 {
+ return nil, fmt.Errorf("failed to get output files from module %q", pathContextName(ctx, module))
+ }
+ return paths, nil
} else {
return nil, fmt.Errorf("module %q is not an OutputFileProducer", pathContextName(ctx, module))
}
@@ -2669,7 +2678,7 @@ func (c *buildTargetSingleton) GenerateBuildActions(ctx SingletonContext) {
})
suffix := ""
- if ctx.Config().EmbeddedInMake() {
+ if ctx.Config().KatiEnabled() {
suffix = "-soong"
}
@@ -2677,7 +2686,7 @@ func (c *buildTargetSingleton) GenerateBuildActions(ctx SingletonContext) {
ctx.Phony("checkbuild"+suffix, checkbuildDeps...)
// Make will generate the MODULES-IN-* targets
- if ctx.Config().EmbeddedInMake() {
+ if ctx.Config().KatiEnabled() {
return
}