mirror of
https://github.com/TinyCC/tinycc.git
synced 2025-11-16 04:24:45 +00:00
Have '-MF -' write to stdout
If a dash ("-") is specified to -MF, write to stdout instead of a file
called "-"
This commit is contained in:
@@ -537,8 +537,11 @@ ST_FUNC void gen_makedeps(TCCState *s1, const char *target, const char *filename
|
||||
if (s1->verbose)
|
||||
printf("<- %s\n", filename);
|
||||
|
||||
/* XXX return err codes instead of error() ? */
|
||||
depout = fopen(filename, "w");
|
||||
if(!strcmp(filename, "-"))
|
||||
depout = fdopen(1, "w");
|
||||
else
|
||||
/* XXX return err codes instead of error() ? */
|
||||
depout = fopen(filename, "w");
|
||||
if (!depout)
|
||||
tcc_error("could not open '%s'", filename);
|
||||
fprintf(depout, "%s:", target);
|
||||
|
||||
Reference in New Issue
Block a user