History

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.

Michael Matz committed 14 years ago

Commit 0394caf1 parent 9ca9c821 file · +1 −1Browse files

Unified · Split

libtcc.c+1−1
@@ -1667,7 +1667,7 @@ PUB_FUNC void tcc_gen_makedeps(TCCState *s, const char *target, const char *file · 1666 unmodified lines
1667 1667
1668 fprintf(depout, "%s : \\\n", target);1668 fprintf(depout, "%s : \\\n", target);
1669 for (i=0; i<s->nb_target_deps; ++i)1669 for (i=0; i<s->nb_target_deps; ++i)
1670 fprintf(depout, "\t%s \\\n", s->target_deps[i]);1670 fprintf(depout, " %s \\\n", s->target_deps[i]);
1671 fprintf(depout, "\n");1671 fprintf(depout, "\n");
1672 fclose(depout);1672 fclose(depout);
1673}1673}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t