aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/cleanup.go
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2015-07-13 18:11:49 -0700
committerDan Willemsen <dwillemsen@google.com>2015-08-01 20:07:37 -0700
commitf0ca90124a5cb6ea7995e005c9d2ce9985292347 (patch)
tree08e80e116422357ec69e53c53d9087c36a62a2e7 /bootstrap/cleanup.go
parent852191db67bfb39114bbef40e30d79e4e760057a (diff)
downloadandroid_build_blueprint-f0ca90124a5cb6ea7995e005c9d2ce9985292347.tar.gz
android_build_blueprint-f0ca90124a5cb6ea7995e005c9d2ce9985292347.tar.bz2
android_build_blueprint-f0ca90124a5cb6ea7995e005c9d2ce9985292347.zip
Support a separate build directory
To provide a consistent __FILE__ behavior with cpp, we want to be able to run with SRCDIR="." and the outputs be saved elsewhere. Other tools within android also expect to be run from $TOP. Change-Id: I572bce5c9086b0c3310b42065ae98cbf5a1c6399
Diffstat (limited to 'bootstrap/cleanup.go')
-rw-r--r--bootstrap/cleanup.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/bootstrap/cleanup.go b/bootstrap/cleanup.go
index dd698f4..1e1fc03 100644
--- a/bootstrap/cleanup.go
+++ b/bootstrap/cleanup.go
@@ -47,11 +47,12 @@ func removeAbandonedFiles(ctx *blueprint.Context, config *Config,
replacer := strings.NewReplacer(
"@@SrcDir@@", srcDir,
+ "@@BuildDir@@", BuildDir,
"@@BootstrapManifest@@", manifestFile)
targets := make(map[string]bool)
for target := range targetRules {
replacedTarget := replacer.Replace(target)
- targets[replacedTarget] = true
+ targets[filepath.Clean(replacedTarget)] = true
}
filePaths, err := parseNinjaLog(buildDir)