public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sim: bfin: move linux-fixed-code.h to top-level
@ 2022-11-05 12:51 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2022-11-05 12:51 UTC (permalink / raw)
  To: gdb-patches

---
 sim/Makefile.in      | 18 ++++++++++++++++++
 sim/bfin/Makefile.in | 17 -----------------
 sim/bfin/local.mk    | 18 ++++++++++++++++++
 3 files changed, 36 insertions(+), 17 deletions(-)

diff --git a/sim/bfin/Makefile.in b/sim/bfin/Makefile.in
index 5a36be78c3f1..0655a06d5f2a 100644
--- a/sim/bfin/Makefile.in
+++ b/sim/bfin/Makefile.in
@@ -62,20 +62,3 @@ SIM_EXTRA_HW_DEVICES = \
 SIM_EXTRA_CFLAGS = $(SDL_CFLAGS)
 
 ## COMMON_POST_CONFIG_FRAG
-
-$(srcdir)/linux-fixed-code.h: $(MAINT) $(srcdir)/linux-fixed-code.s Makefile.in
-	$(AS_FOR_TARGET) $(srcdir)/linux-fixed-code.s -o linux-fixed-code.o
-	(	set -e; \
-		echo "/* DO NOT EDIT: Autogenerated from linux-fixed-code.s.  */"; \
-		echo "static const unsigned char bfin_linux_fixed_code[] ="; \
-		echo "{"; \
-		$(OBJDUMP_FOR_TARGET) -d -z linux-fixed-code.o > $@.dis; \
-		sed -n \
-			-e 's:^[^	]*	:0x:' \
-			-e '/^0x/{s:	.*::;s: *$$:,:;s: :, 0x:g;p;}' \
-			$@.dis; \
-		rm -f $@.dis; \
-		echo "};" \
-	) > $@.tmp
-	rm -f linux-fixed-code.o
-	mv $@.tmp $@
diff --git a/sim/bfin/local.mk b/sim/bfin/local.mk
index f61c917d7121..956b3aec30da 100644
--- a/sim/bfin/local.mk
+++ b/sim/bfin/local.mk
@@ -23,3 +23,21 @@
 	$(SIM_COMMON_LIBS)
 
 noinst_PROGRAMS += %D%/run
+
+%D%/linux-fixed-code.h: @MAINT@ $(srcdir)/%D%/linux-fixed-code.s %D%/local.mk %D%/$(am__dirstamp)
+	$(AM_V_GEN)$(AS_FOR_TARGET_BFIN) $(srcdir)/%D%/linux-fixed-code.s -o %D%/linux-fixed-code.o
+	$(AM_V_at)(\
+		set -e; \
+		echo "/* DO NOT EDIT: Autogenerated from linux-fixed-code.s.  */"; \
+		echo "static const unsigned char bfin_linux_fixed_code[] ="; \
+		echo "{"; \
+		$(OBJDUMP_FOR_TARGET_BFIN) -d -z %D%/linux-fixed-code.o > $@.dis; \
+		sed -n \
+			-e 's:^[^	]*	:0x:' \
+			-e '/^0x/{s:	.*::;s: *$$:,:;s: :, 0x:g;p;}' \
+			$@.dis; \
+		rm -f $@.dis; \
+		echo "};" \
+	) > $@.tmp
+	$(AM_V_at)$(SHELL) $(srcroot)/move-if-change $@.tmp $(srcdir)/%D%/linux-fixed-code.h
+	$(AM_V_at)touch $(srcdir)/%D%/linux-fixed-code.h
-- 
2.38.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-05 12:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-05 12:51 [PATCH] sim: bfin: move linux-fixed-code.h to top-level Mike Frysinger

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).