Trigger binary installation in Soong from Make

We prepended Soong's binary installation path to PATH, but now
rebuilding binaries that are in Soong and exported to Make produces
inconsistent results. From an empty out directory:

Run `m -j hidl-gen`, PATH will get a hidl-gen binary in out/host/...
Run `m -j android.hardware.tests.foo@1.0`, PATH will get a new hidl-gen
binary in out/soong/host/...
Make a change to hidl-gen, then run `m -j hidl-gen`. The hidl-gen first
in PATH is still the one without the changes.

Bug: 31742855
Test: m -j hidl-gen showcommands
Change-Id: If01a76d10d786dac6f16f31d1142634af4964228
diff --git a/cc/androidmk.go b/cc/androidmk.go
index f446333..676ae30 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -192,6 +192,12 @@
 }
 
 func (installer *baseInstaller) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) {
+	// Soong installation is only supported for host modules. Have Make
+	// installation trigger Soong installation.
+	if ctx.Target().Os.Class == android.Host {
+		ret.OutputFile = android.OptionalPathForPath(installer.path)
+	}
+
 	ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error {
 		path := installer.path.RelPathString()
 		dir, file := filepath.Split(path)