Add -MT option

Allows overriding the output file in dependencies, which also allows
outputting those without also outputting the object file.
This, again, mimicks GCC's option.
This commit is contained in:
ISSOtm
2019-09-10 03:02:53 +02:00
parent bfa8da78a6
commit 1fb9f90f0f
3 changed files with 22 additions and 9 deletions

View File

@@ -338,7 +338,8 @@ FILE *fstk_FindFile(char *fname, char **incPathUsed)
if (f != NULL || errno != ENOENT) {
if (dependfile) {
fprintf(dependfile, "%s: %s\n", tzObjectname, fname);
fprintf(dependfile, "%s: %s\n", tzTargetFileName,
fname);
if (oGeneratePhonyDeps)
fprintf(dependfile, "%s:\n", fname);
}
@@ -366,8 +367,8 @@ FILE *fstk_FindFile(char *fname, char **incPathUsed)
if (f != NULL || errno != ENOENT) {
if (dependfile) {
fprintf(dependfile, "%s: %s\n", tzObjectname,
fname);
fprintf(dependfile, "%s: %s\n",
tzTargetFileName, fname);
if (oGeneratePhonyDeps)
fprintf(dependfile, "%s:\n", fname);
}