OSDN Git Service

Add phony source target in the generated dependency file of aidl.
authorYing Wang <wangying@google.com>
Thu, 23 Jul 2015 00:42:35 +0000 (17:42 -0700)
committerYing Wang <wangying@google.com>
Thu, 23 Jul 2015 00:49:56 +0000 (17:49 -0700)
This fixes make error when the source .aidl file is moved around but
its path relative to LOCAL_PATH doesn't change.

Bug: 22666539
Change-Id: Idf2492145e4927779d184932a09d61e4fe8ded0f

tools/aidl/aidl.cpp

index 14c9f95..e31b03c 100644 (file)
@@ -675,6 +675,10 @@ generate_dep_file(const Options& options, const document_item_type* items)
 
     fprintf(to, "\n");
 
+    // Output "<input_aidl_file>: " so make won't fail if the input .aidl file
+    // has been deleted, moved or renamed in incremental build.
+    fprintf(to, "%s :\n", options.inputFileName.c_str());
+
     // Output "<imported_file>: " so make won't fail if the imported file has
     // been deleted, moved or renamed in incremental build.
     import = g_imports;