mirror of
https://github.com/frida/tinycc
synced 2025-01-27 13:39:27 +03:00
Emit spaces for -MD
TCCs make dependency generator is incompatible with the GNU depcomp script which is widely used. For TCC it has to go over the output of -MD, (it detects it as ICC compatible), but the sed commands it uses are confused by tabs in the output, so that some rewrites aren't done. Those tabs will then finally confuse make itself when the generated .d files are included. It reads them as goal commands (leading tab), and is totally lost then. Short of changing depcomp (hard because distributed with all kinds of software), simply emit spaces for -MD.
This commit is contained in:
parent
9ca9c82ff8
commit
0394caf784
2
libtcc.c
2
libtcc.c
@ -1667,7 +1667,7 @@ PUB_FUNC void tcc_gen_makedeps(TCCState *s, const char *target, const char *file
|
||||
|
||||
fprintf(depout, "%s : \\\n", target);
|
||||
for (i=0; i<s->nb_target_deps; ++i)
|
||||
fprintf(depout, "\t%s \\\n", s->target_deps[i]);
|
||||
fprintf(depout, " %s \\\n", s->target_deps[i]);
|
||||
fprintf(depout, "\n");
|
||||
fclose(depout);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user