Only change behavior when actually embedded in make
The change to enable embedding in make change the default behavior to
produce an Android.mk file, change the ninja builddir, and add the
-soong suffix to the end of target names. These don't make sense if
we're not building inside make, so detect if we're running under make
by checking for a .soong.in_make file in the builddir.
Change-Id: I1a0f4c1becb327c769b8a130cafef11d83eb49f4
diff --git a/common/androidmk.go b/common/androidmk.go
index 06aa30c..9470b6b 100644
--- a/common/androidmk.go
+++ b/common/androidmk.go
@@ -55,6 +55,10 @@
hasBPDir := make(map[string]bool)
bpDirs := []string{}
+ if !ctx.Config().(Config).EmbeddedInMake() {
+ return
+ }
+
ctx.SetNinjaBuildDir(pctx, filepath.Join(ctx.Config().(Config).buildDir, ".."))
ctx.VisitAllModules(func(module blueprint.Module) {