Fix checkbuild for modules with last variant disabled

The soong checkbuild target is created by the last varaint of each
module.  Don't return early if the variant is disabled, which would
prevent creating the checkbuild target.

Test: m -j checkbuild
Change-Id: Ib260bae7fb4be7255f5c1b34dfbd50225f308005
diff --git a/android/module.go b/android/module.go
index e415c0a..95bd9ea 100644
--- a/android/module.go
+++ b/android/module.go
@@ -366,10 +366,6 @@
 }
 
 func (a *ModuleBase) generateModuleTarget(ctx blueprint.ModuleContext) {
-	if a != ctx.FinalModule().(Module).base() {
-		return
-	}
-
 	allInstalledFiles := Paths{}
 	allCheckbuildFiles := Paths{}
 	ctx.VisitAllModuleVariants(func(module blueprint.Module) {
@@ -439,21 +435,21 @@
 		missingDeps:            ctx.GetMissingDependencies(),
 	}
 
-	if !a.Enabled() {
-		return
+	if a.Enabled() {
+		a.module.GenerateAndroidBuildActions(androidCtx)
+		if ctx.Failed() {
+			return
+		}
+
+		a.installFiles = append(a.installFiles, androidCtx.installFiles...)
+		a.checkbuildFiles = append(a.checkbuildFiles, androidCtx.checkbuildFiles...)
 	}
 
-	a.module.GenerateAndroidBuildActions(androidCtx)
-	if ctx.Failed() {
-		return
-	}
-
-	a.installFiles = append(a.installFiles, androidCtx.installFiles...)
-	a.checkbuildFiles = append(a.checkbuildFiles, androidCtx.checkbuildFiles...)
-
-	a.generateModuleTarget(ctx)
-	if ctx.Failed() {
-		return
+	if a == ctx.FinalModule().(Module).base() {
+		a.generateModuleTarget(ctx)
+		if ctx.Failed() {
+			return
+		}
 	}
 }