* [binutils-gdb] Use GNU make pattern rule in ld Makefile
@ 2023-08-25 9:30 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2023-08-25 9:30 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7b793987b5e1f35a6a8a442da24ebd3f7dbf08f3
commit 7b793987b5e1f35a6a8a442da24ebd3f7dbf08f3
Author: Alan Modra <amodra@gmail.com>
Date: Thu Aug 24 18:10:17 2023 +0930
Use GNU make pattern rule in ld Makefile
Use the pattern rule in a comment from commit 77ac17b8453f.
* Makefile.am (run-genscripts): Delete. Use pattern rule
e%.c instead.
* Makefile.in: Regenerate.
Diff:
---
ld/Makefile.am | 13 ++-----------
ld/Makefile.in | 13 ++-----------
2 files changed, 4 insertions(+), 22 deletions(-)
diff --git a/ld/Makefile.am b/ld/Makefile.am
index be456275748..fcb93060a14 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -633,19 +633,10 @@ GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
@TDIRS@
-# We can't use pattern rules as we don't want to depend on GNU
-# make, or else these rules could have been expressed in one
-# two-liner: 'e%.c:' and ' ${GENSCRIPTS} $* "$(tdir_$*)"'.
-# (The recursive variable expansion is portable.)
-
-run-genscripts:
- $(AM_V_at)${GENSCRIPTS} $(script_target) "$($(script_tdirname))"
-
-.PHONY: run-genscripts
+e%.c:
+ $(AM_V_GEN)${GENSCRIPTS} $* "$(tdir_$*)"
$(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
- $(AM_V_GEN)base=`echo $@ | sed -e 's,e\(.*\).c,\1,'`; \
- $(MAKE) run-genscripts "script_target=$$base" "script_tdirname=tdir_$$base"
# It's a pity we can't generate these include "./deps/e*.Pc" lines
# from ALL_EMULATION_SOURCES and ALL_64_EMULATION_SOURCES, but that isn't
diff --git a/ld/Makefile.in b/ld/Makefile.in
index c6a79774f38..fc6dccbad20 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -2355,19 +2355,10 @@ stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
@TDIRS@
-# We can't use pattern rules as we don't want to depend on GNU
-# make, or else these rules could have been expressed in one
-# two-liner: 'e%.c:' and ' ${GENSCRIPTS} $* "$(tdir_$*)"'.
-# (The recursive variable expansion is portable.)
-
-run-genscripts:
- $(AM_V_at)${GENSCRIPTS} $(script_target) "$($(script_tdirname))"
-
-.PHONY: run-genscripts
+e%.c:
+ $(AM_V_GEN)${GENSCRIPTS} $* "$(tdir_$*)"
$(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
- $(AM_V_GEN)base=`echo $@ | sed -e 's,e\(.*\).c,\1,'`; \
- $(MAKE) run-genscripts "script_target=$$base" "script_tdirname=tdir_$$base"
# It's a pity we can't generate these include "./deps/e*.Pc" lines
# from ALL_EMULATION_SOURCES and ALL_64_EMULATION_SOURCES, but that isn't
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-25 9:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-25 9:30 [binutils-gdb] Use GNU make pattern rule in ld Makefile Alan Modra
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).