Fix java resource glob file list location

The source path was being appended to the module out directory
to create the file list file, which was resulting in .. in the
source path moving the file list file up the directory tree.
Use SrcDirRelPath to convert the globbed resource directories
to be relatiave to $srcDir before appending them.

Also do the same fix to generated aidl, logtags, yacc, and lex
files.

Change-Id: I2e636bd30abf03bc1d80a897951a9812cc3e09ef
This commit is contained in:
Colin Cross
2015-07-14 18:55:36 -07:00
parent cbac5fbe78
commit 6e18ca49f8
4 changed files with 19 additions and 7 deletions

View File

@@ -56,7 +56,8 @@ func ResourceDirsToJarSpecs(ctx common.AndroidModuleContext, resourceDirs, exclu
resourceDir := filepath.Join(common.ModuleSrcDir(ctx), resourceDir)
dirs := ctx.Glob("java_resources", resourceDir, nil)
for _, dir := range dirs {
fileListFile := filepath.Join(common.ModuleOutDir(ctx), "res", dir, "resources.list")
relDir := common.SrcDirRelPath(ctx, dir)
fileListFile := filepath.Join(common.ModuleOutDir(ctx), "res", relDir, "resources.list")
depFile := fileListFile + ".d"
glob := filepath.Join(dir, "**/*")