From 0394caf784124f867d9294dab700e6005e99cea4 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sun, 13 May 2012 02:03:47 +0200 Subject: [PATCH] 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. --- libtcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtcc.c b/libtcc.c index 01280de1..b0a9b1a4 100644 --- a/libtcc.c +++ b/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; inb_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); } -- 2.11.4.GIT