[4/7] gold: build with mktemp

Message ID 20230119175507.25046-5-Vincent.VSmeets@GMail.com
State Not applicable
Headers
Series [1/7] bfd: build with mktemp |

Commit Message

Vincent Smeets Jan. 19, 2023, 5:55 p.m. UTC
  ---
 gold/Makefile.am | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gold/Makefile.am b/gold/Makefile.am
index 0999c5fc..ea0c1ede 100644
--- a/gold/Makefile.am
+++ b/gold/Makefile.am
@@ -247,8 +247,9 @@  install-exec-local: ld-new$(EXEEXT)
 POTFILES= $(CCFILES) $(HFILES) $(TARGETSOURCES)
 
 po/POTFILES.in: @MAINT@ Makefile
-	for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \
-	  && mv tmp $(srcdir)/po/POTFILES.in
+	tmp=`mktemp --tmpdir=. POTFILES.XXXXXX.in`; \
+	for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > $$tmp \
+	  && mv $$tmp $(srcdir)/po/POTFILES.in
 
 # Bootstrap test support.  We use ld-new to build ld1, then use ld1 to
 # build ld2.  ld1 and ld2 should be identical.  ld-new need not be