]> git.saurik.com Git - android/aapt.git/blobdiff - Package.cpp
am f4750724: am 9d829f98: am 21e6e2de: Merge "Change generated dependency file names"
[android/aapt.git] / Package.cpp
index c9f687088b4f1afb92b22c22a78ff50c4372fff3..1e3efdeca17639015a0dd4618d2bcbd8fa5ed518 100644 (file)
@@ -177,12 +177,17 @@ status_t writeAPK(Bundle* bundle, const sp<AaptAssets>& assets,
         }
     }
 
+    // If we've been asked to generate a dependency file for the .ap_ package,
+    // do so here
     if (bundle->getGenDependencies()) {
-        // Add this file to the dependency file
-        String8 dependencyFile = outputFile.getBasePath();
+        // The dependency file gets output to the same directory
+        // as the specified output file with an additional .d extension.
+        // e.g. bin/resources.ap_.d
+        String8 dependencyFile = outputFile;
         dependencyFile.append(".d");
 
         FILE* fp = fopen(dependencyFile.string(), "a");
+        // Add this file to the dependency file
         fprintf(fp, "%s \\\n", outputFile.string());
         fclose(fp);
     }