From 02f3add3a33ce563fb1172923ca0b5321f0edce1 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Fri, 12 May 2017 13:50:19 -0700 Subject: [PATCH] Clean OUT_DIR Otherwise Make and soong_ui disagree about where the soong.variables file should be. For example, when "OUT_DIR=out/": Error dumping make vars: Failed to parse make line: "make: Nothing to be done for `out/soong/soong.variables'." We would need to pass out//soong/soong.variables into make, since it doesn't attempt to match clean/unclean paths. Bug: 37553659 Test: OUT_DIR=out/ m -j Change-Id: Iebeea4868b96b11e8b08735f272e22be5db1d701 --- ui/build/config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/build/config.go b/ui/build/config.go index e21e1fab3..e677d9301 100644 --- a/ui/build/config.go +++ b/ui/build/config.go @@ -51,7 +51,9 @@ func NewConfig(ctx Context, args ...string) Config { } // Make sure OUT_DIR is set appropriately - if _, ok := ret.environ.Get("OUT_DIR"); !ok { + if outDir, ok := ret.environ.Get("OUT_DIR"); ok { + ret.environ.Set("OUT_DIR", filepath.Clean(outDir)) + } else { outDir := "out" if baseDir, ok := ret.environ.Get("OUT_DIR_COMMON_BASE"); ok { if wd, err := os.Getwd(); err != nil {