Use correct install paths in generated Android.mk

Extract Soong's install path and put it in the generated Android.mk file
so that tests get installed in the correct place.

Change-Id: Id4726855c5677855406de20773a5da533bdd4cea
This commit is contained in:
Colin Cross
2016-03-24 13:14:12 -07:00
parent ca860ac720
commit a23446680f
5 changed files with 28 additions and 6 deletions

View File

@@ -76,8 +76,8 @@ type AndroidModuleContext interface {
ExpandSources(srcFiles, excludes []string) Paths
Glob(outDir, globPattern string, excludes []string) Paths
InstallFile(installPath OutputPath, srcPath Path, deps ...Path) Path
InstallFileName(installPath OutputPath, name string, srcPath Path, deps ...Path) Path
InstallFile(installPath OutputPath, srcPath Path, deps ...Path) OutputPath
InstallFileName(installPath OutputPath, name string, srcPath Path, deps ...Path) OutputPath
CheckbuildFile(srcPath Path)
AddMissingDependencies(deps []string)
@@ -531,7 +531,7 @@ func (a *androidBaseContextImpl) InstallInData() bool {
}
func (a *androidModuleContext) InstallFileName(installPath OutputPath, name string, srcPath Path,
deps ...Path) Path {
deps ...Path) OutputPath {
fullInstallPath := installPath.Join(a, name)
@@ -552,7 +552,7 @@ func (a *androidModuleContext) InstallFileName(installPath OutputPath, name stri
return fullInstallPath
}
func (a *androidModuleContext) InstallFile(installPath OutputPath, srcPath Path, deps ...Path) Path {
func (a *androidModuleContext) InstallFile(installPath OutputPath, srcPath Path, deps ...Path) OutputPath {
return a.InstallFileName(installPath, filepath.Base(srcPath.String()), srcPath, deps...)
}