X-Git-Url: https://git.saurik.com/android/aapt.git/blobdiff_plain/a498fc6fc0fd9b85b3c847f825bf794b73e3b1d8..7996e7101a9137363c08bd96686d19cc6e33c80b:/Package.cpp diff --git a/Package.cpp b/Package.cpp index c9f6870..3930117 100644 --- a/Package.cpp +++ b/Package.cpp @@ -6,6 +6,7 @@ #include "Main.h" #include "AaptAssets.h" #include "ResourceTable.h" +#include "ResourceFilter.h" #include #include @@ -177,12 +178,17 @@ status_t writeAPK(Bundle* bundle, const sp& 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); }