summaryrefslogtreecommitdiff
path: root/tools/aapt/Package.cpp
diff options
context:
space:
mode:
author Josiah Gaskin <josiahgaskin@google.com> 2011-08-15 18:33:44 -0700
committer Josiah Gaskin <josiahgaskin@google.com> 2011-08-16 08:14:51 -0700
commitb711f3f7ee0544685ef26a1a4b4755d5a6233dba (patch)
treea597541ade9616440906a10db603d377d2211506 /tools/aapt/Package.cpp
parentd144748d4767b2ccfb13857e23f78bc944e9531d (diff)
Change generated dependency file names
This changes the name of the generated dependency files to R.java.d and <ApkName>.ap_.d respectively. Change-Id: I17e18770fc0d0a5d31c7b37b40ac1949f45ef13a
Diffstat (limited to 'tools/aapt/Package.cpp')
-rw-r--r--tools/aapt/Package.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/aapt/Package.cpp b/tools/aapt/Package.cpp
index 62af30e77b70..46ba3c1ff2bc 100644
--- a/tools/aapt/Package.cpp
+++ b/tools/aapt/Package.cpp
@@ -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);
}