cgen: split GUILE setting out

Message ID 20210630000345.524-1-vapier@gentoo.org
State New
Headers show
Series
  • cgen: split GUILE setting out
Related show

Commit Message

H.J. Lu via Binutils June 30, 2021, 12:03 a.m.
This makes it easier to override to point to an older version of guile.
The current cgen code doesn't work with guile-2, so need to point to an
older guile-1.8.
---
 opcodes/Makefile.am       | 3 ++-
 opcodes/Makefile.in       | 3 ++-
 sim/common/Make-common.in | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

-- 
2.31.1

Comments

H.J. Lu via Binutils July 1, 2021, 11:08 a.m. | #1
Hi Mike,

> This makes it easier to override to point to an older version of guile.

> The current cgen code doesn't work with guile-2, so need to point to an

> older guile-1.8.

> ---

>   opcodes/Makefile.am       | 3 ++-

>   opcodes/Makefile.in       | 3 ++-

>   sim/common/Make-common.in | 3 ++-

>   3 files changed, 6 insertions(+), 3 deletions(-)

> 


Approved - please apply - with a ChangeLog entry.

Cheers
   Nick

Patch

diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index ddae8bd9052f..0e04b4c05c4a 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -363,7 +363,8 @@  CLEANFILES = \
 
 CGENDIR = @cgendir@
 CPUDIR = $(srcdir)/../cpu
-CGEN = "`if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi` -l ${cgendir}/guile.scm -s"
+GUILE = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
+CGEN = "$(GUILE) -l ${cgendir}/guile.scm -s"
 CGENFLAGS = -v
 
 CGENDEPS = \
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index 23a52bcd69ac..42c15f00d30e 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -722,7 +722,8 @@  CLEANFILES = \
 
 CGENDIR = @cgendir@
 CPUDIR = $(srcdir)/../cpu
-CGEN = "`if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi` -l ${cgendir}/guile.scm -s"
+GUILE = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
+CGEN = "$(GUILE) -l ${cgendir}/guile.scm -s"
 CGENFLAGS = -v
 CGENDEPS = \
 	$(CGENDIR)/desc.scm $(CGENDIR)/desc-cpu.scm \
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index c203b4e1c7bf..15042e59317b 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -545,7 +545,8 @@  Makefile: Makefile.in $(srccom)/Make-common.in $(config.status)
 
 # CGEN support
 
-CGEN = "`if [ -f ../../guile/libguile/guile ]; then echo ../../guile/libguile/guile; else echo guile ; fi` -l $(CGENDIR)/guile.scm -s"
+GUILE = `if [ -f ../../guile/libguile/guile ]; then echo ../../guile/libguile/guile; else echo guile ; fi`
+CGEN = "$(GUILE) -l $(CGENDIR)/guile.scm -s"
 CGENFLAGS = -v
 CGEN_CPU_DIR = $(CGENDIR)/cpu