Allow outputting dep files to stdout using -

This commit is contained in:
ISSOtm
2019-09-10 15:12:34 +02:00
parent 12f2f654dd
commit 6fc5097278

View File

@@ -393,6 +393,9 @@ int main(int argc, char *argv[])
case 'M': case 'M':
ep = strchr("GPQT", optarg[0]); ep = strchr("GPQT", optarg[0]);
if (!ep || !*ep || optarg[1]) { if (!ep || !*ep || optarg[1]) {
if (!strcmp("-", optarg))
dependfile = stdout;
else
dependfile = fopen(optarg, "w"); dependfile = fopen(optarg, "w");
if (dependfile == NULL) if (dependfile == NULL)
err(1, "Could not open dependfile %s", err(1, "Could not open dependfile %s",