[3/7] gas: build with mktemp

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

Patch

diff --git a/gas/Makefile.am b/gas/Makefile.am
index ba289658..32c69ca0 100644
--- a/gas/Makefile.am
+++ b/gas/Makefile.am
@@ -368,8 +368,9 @@  POTFILES = $(MULTI_CFILES) $(CONFIG_ATOF_CFILES) \
 	$(OBJ_FORMAT_CFILES) $(TARGET_CPU_HFILES) $(TARGET_CPU_CFILES) \
 	$(TARGET_EXTRA_FILES) $(HFILES) $(CFILES)
 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
 
 # Note: GASP is now deprecated and has been removed.  It is still
 # available in the CVS archive or older binutils releases if it is needed.