ref: 6fc50972786b987d1692edc1489dc0b9cf77c1d2
parent: 12f2f654dd9e524048b37654760b0f5d9edc3d13
author: ISSOtm <[email protected]>
date: Tue Sep 10 11:12:34 EDT 2019
Allow outputting dep files to stdout using `-`
--- a/src/asm/main.c
+++ b/src/asm/main.c
@@ -393,7 +393,10 @@
case 'M':
ep = strchr("GPQT", optarg[0]);
if (!ep || !*ep || optarg[1]) {
- dependfile = fopen(optarg, "w");
+ if (!strcmp("-", optarg))
+ dependfile = stdout;
+ else
+ dependfile = fopen(optarg, "w");
if (dependfile == NULL)
err(1, "Could not open dependfile %s",
optarg);