From 736eb433bae71a162f8b5adbd42710bb718a3c91 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Thu, 29 Sep 2016 14:55:49 -0700 Subject: 39507: TMPSUFFIX for =(...) --- Src/exec.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Src/exec.c') diff --git a/Src/exec.c b/Src/exec.c index 04868bd37..e253d7b9e 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -4421,6 +4421,15 @@ getoutputfile(char *cmd, char **eptr) if (!s) child_unblock(); return NULL; + } else { + char *suffix = getsparam("TMPSUFFIX"); + if (suffix && *suffix && !strstr(suffix, "/")) { + suffix = dyncat(nam, unmeta(suffix)); + if (link(nam, suffix) == 0) { + addfilelist(nam, 0); + nam = ztrdup(suffix); + } + } } addfilelist(nam, 0); -- cgit 1.4.1