public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Vincent Smeets <Vincent.VSmeets@GMail.com>
To: gdb-patches@sourceware.org
Cc: Vincent Smeets <Vincent.VSmeets@GMail.com>
Subject: [PATCH 6/7] ld: build with mktemp
Date: Thu, 19 Jan 2023 18:55:06 +0100	[thread overview]
Message-ID: <20230119175507.25046-7-Vincent.VSmeets@GMail.com> (raw)
In-Reply-To: <20230119175507.25046-1-Vincent.VSmeets@GMail.com>

---
 ld/Makefile.am | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/ld/Makefile.am b/ld/Makefile.am
index e74a7aba..8c71a653 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -543,12 +543,14 @@ SRC_POTFILES = $(CFILES) $(HFILES)
 BLD_POTFILES = $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES)
 
 po/SRC-POTFILES.in: @MAINT@ Makefile
-	for f in $(SRC_POTFILES); do echo $$f; done | LC_ALL=C sort > $@-tmp \
-	  && mv $@-tmp $(srcdir)/po/SRC-POTFILES.in
+	tmp=`mktemp --tmpdir=. SRC-POTFILES.XXXXXX.in`; \
+	for f in $(SRC_POTFILES); do echo $$f; done | LC_ALL=C sort > $$tmp \
+	  && mv $$tmp $(srcdir)/po/SRC-POTFILES.in
 
 po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES)
-	for f in $(BLD_POTFILES); do echo $$f; done | LC_ALL=C sort > $@-tmp \
-	  && mv $@-tmp $(srcdir)/po/BLD-POTFILES.in
+	tmp=`mktemp --tmpdir=. BLD-POTFILES.XXXXXX.in`; \
+	for f in $(BLD_POTFILES); do echo $$f; done | LC_ALL=C sort > $$tmp \
+	  && mv $$tmp $(srcdir)/po/BLD-POTFILES.in
 
 ldmain.@OBJEXT@: ldmain.c config.status
 if am__fastdepCC
@@ -600,6 +602,7 @@ endif
 endif
 
 ldemul-list.h: Makefile
+	tmp=`mktemp --tmpdir=. ldemul-list.XXXXXX.h`; \
 	(echo "/* This file is automatically generated.  DO NOT EDIT! */";\
 	for f in `echo " " ${EMULATION_OFILES} "" \
 	 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
@@ -611,8 +614,8 @@ ldemul-list.h: Makefile
 	 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
 	    echo "  &ld_$${f}_emulation, \\"; \
 	done;\
-	echo "  0") >ldemul-tmp.h
-	mv ldemul-tmp.h ldemul-list.h
+	echo "  0") >$$tmp; \
+	mv $$tmp ldemul-list.h
 
 stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
 	  $(AM_V_GEN)cp ${srcdir}/emultempl/$(STRINGIFY) stringify.sed
-- 
2.39.0


  parent reply	other threads:[~2023-01-19 17:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 17:55 [Bug binutils/30022] concurrent builds can fail Vincent Smeets
2023-01-19 17:55 ` [PATCH 1/7] bfd: build with mktemp Vincent Smeets
2023-01-19 17:55 ` [PATCH 2/7] binutils: " Vincent Smeets
2023-01-19 17:55 ` [PATCH 3/7] gas: " Vincent Smeets
2023-01-19 17:55 ` [PATCH 4/7] gold: " Vincent Smeets
2023-01-19 17:55 ` [PATCH 5/7] gprof: " Vincent Smeets
2023-01-19 17:55 ` Vincent Smeets [this message]
2023-01-19 17:55 ` [PATCH 7/7] opcodes: " Vincent Smeets
2023-01-19 20:32 ` [Bug binutils/30022] concurrent builds can fail Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230119175507.25046-7-Vincent.VSmeets@GMail.com \
    --to=vincent.vsmeets@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).