]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Make depend paths relative earlier for depend mode
authorAnders F Björklund <anders.f.bjorklund@gmail.com>
Sat, 25 Aug 2018 17:56:21 +0000 (19:56 +0200)
committerAnders F Björklund <anders.f.bjorklund@gmail.com>
Sat, 25 Aug 2018 18:11:16 +0000 (20:11 +0200)
src/ccache.c

index 8c9c317fb489767cb5b7889ccc8d4bb9511fc743..0a1392408c0feb22cd85bb639a021c975c13979e 100644 (file)
@@ -1394,6 +1394,10 @@ to_cache(struct args *args, struct mdfour *depend_mode_hash)
                failed();
        }
 
+       if (generating_dependencies) {
+               use_relative_paths_in_depfile(output_dep);
+       }
+
        if (conf->depend_mode) {
                struct file_hash *object_hash = object_hash_from_depfile(output_dep, depend_mode_hash);
                if (!object_hash)
@@ -1435,8 +1439,6 @@ to_cache(struct args *args, struct mdfour *depend_mode_hash)
 
        copy_file_to_cache(output_obj, cached_obj);
        if (generating_dependencies) {
-               // GJK: TODO: need to execute this earlier when in depend_mode
-               use_relative_paths_in_depfile(output_dep);
                copy_file_to_cache(output_dep, cached_dep);
        }
        if (generating_coverage) {