[2/7] binutils: build with mktemp

Message ID 20230119175507.25046-3-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
  ---
 binutils/Makefile.am | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Patch

diff --git a/binutils/Makefile.am b/binutils/Makefile.am
index 4ea343b1..b1ce8d4b 100644
--- a/binutils/Makefile.am
+++ b/binutils/Makefile.am
@@ -182,8 +182,9 @@  LIBIBERTY = ../libiberty/libiberty.a
 
 POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES)
 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
 
 EXPECT = expect
 RUNTEST = runtest