diff --git a/cmd/merge_zips/merge_zips.go b/cmd/merge_zips/merge_zips.go index e16c00ef9..207b161ca 100644 --- a/cmd/merge_zips/merge_zips.go +++ b/cmd/merge_zips/merge_zips.go @@ -78,7 +78,7 @@ func main() { // parse args flag.Parse() args := flag.Args() - if len(args) < 2 { + if len(args) < 1 { flag.Usage() os.Exit(1) } diff --git a/java/java.go b/java/java.go index 26514f33c..1f7ba65a6 100644 --- a/java/java.go +++ b/java/java.go @@ -689,15 +689,11 @@ func (j *Module) compileJavaHeader(ctx android.ModuleContext, srcFiles android.P var headerJar android.Path jars = append(jars, deps.staticHeaderJars...) - if len(jars) == 0 { - panic("The turbine.jar is empty without any sources and static libs.") - } else { - // we cannot skip the combine step for now if there is only one jar - // since we have to strip META-INF/TRANSITIVE dir from turbine.jar - combinedJar := android.PathForModuleOut(ctx, "turbine-combined", jarName) - TransformJarsToJar(ctx, combinedJar, "for turbine", jars, android.OptionalPath{}, false, []string{"META-INF"}) - headerJar = combinedJar - } + // we cannot skip the combine step for now if there is only one jar + // since we have to strip META-INF/TRANSITIVE dir from turbine.jar + combinedJar := android.PathForModuleOut(ctx, "turbine-combined", jarName) + TransformJarsToJar(ctx, combinedJar, "for turbine", jars, android.OptionalPath{}, false, []string{"META-INF"}) + headerJar = combinedJar if j.properties.Jarjar_rules != nil { jarjar_rules := android.PathForModuleSrc(ctx, *j.properties.Jarjar_rules) diff --git a/java/system_modules.go b/java/system_modules.go index a459b7a0f..c3e40caca 100644 --- a/java/system_modules.go +++ b/java/system_modules.go @@ -138,6 +138,7 @@ func (system *SystemModules) AndroidMk() android.AndroidMkData { fmt.Fprintln(w) fmt.Fprintln(w, makevar, ":=", system.outputFile.String()) fmt.Fprintln(w, ".KATI_READONLY", ":=", makevar) + fmt.Fprintln(w, name+":", "$("+makevar+")") } }, }