diff options
author | 2020-01-10 17:35:22 +0000 | |
---|---|---|
committer | 2020-01-10 17:35:22 +0000 | |
commit | e35e961aa925e6ab75daf455d36875b3d6511081 (patch) | |
tree | 27e9a02f9e216e9b25d7cafa03114b0cb02d2820 /android/androidmk.go | |
parent | 2827ccc126a37c0cff4336b2ea7155fa816b378c (diff) | |
parent | 05c25ccb4adb5329add700b533416c226cdbfa96 (diff) |
Merge "Sandbox soong_build by changing to root directory"
Diffstat (limited to 'android/androidmk.go')
-rw-r--r-- | android/androidmk.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/android/androidmk.go b/android/androidmk.go index f3c15e471..dbf3aa884 100644 --- a/android/androidmk.go +++ b/android/androidmk.go @@ -323,7 +323,7 @@ func (c *androidMkSingleton) GenerateBuildActions(ctx SingletonContext) { return } - err := translateAndroidMk(ctx, transMk.String(), androidMkModulesList) + err := translateAndroidMk(ctx, absolutePath(transMk.String()), androidMkModulesList) if err != nil { ctx.Errorf(err.Error()) } @@ -364,8 +364,8 @@ func translateAndroidMk(ctx SingletonContext, mkFile string, mods []blueprint.Mo } // Don't write to the file if it hasn't changed - if _, err := os.Stat(mkFile); !os.IsNotExist(err) { - if data, err := ioutil.ReadFile(mkFile); err == nil { + if _, err := os.Stat(absolutePath(mkFile)); !os.IsNotExist(err) { + if data, err := ioutil.ReadFile(absolutePath(mkFile)); err == nil { matches := buf.Len() == len(data) if matches { @@ -383,7 +383,7 @@ func translateAndroidMk(ctx SingletonContext, mkFile string, mods []blueprint.Mo } } - return ioutil.WriteFile(mkFile, buf.Bytes(), 0666) + return ioutil.WriteFile(absolutePath(mkFile), buf.Bytes(), 0666) } func translateAndroidMkModule(ctx SingletonContext, w io.Writer, mod blueprint.Module) error { |