+ // If we've been asked to generate a dependency file, we need to finish up here.
+ // the writeResourceSymbols and writeAPK functions have already written the target
+ // half of the dependency file, now we need to write the prerequisites. (files that
+ // the R.java file or .ap_ file depend on)
+ if (bundle->getGenDependencies()) {
+ // Now that writeResourceSymbols or writeAPK has taken care of writing
+ // the targets to our dependency file, we'll write the prereqs
+ fp = fopen(dependencyFile, "a+");
+ fprintf(fp, " : ");
+ bool includeRaw = (outputAPKFile != NULL);
+ err = writeDependencyPreReqs(bundle, assets, fp, includeRaw);
+ // Also manually add the AndroidManifeset since it's not under res/ or assets/
+ // and therefore was not added to our pathstores during slurping
+ fprintf(fp, "%s \\\n", bundle->getAndroidManifestFile());
+ fclose(fp);
+ }
+