summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorydah <[email protected]>2025-01-12 19:30:06 +0900
committerYudai Takada <[email protected]>2025-01-14 17:20:02 +0900
commitccb4ba45ed0439764fc44a40469e396187d83a71 (patch)
tree4c94c75b30f00d38e5a6db5befb5014321dccba8
parenteafba0d5d3c10678fae23ae35e2923c3cb70de66 (diff)
Use LRAMA instead of YACC
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12556
-rw-r--r--common.mk2
-rw-r--r--template/Makefile.in2
-rwxr-xr-xtool/make-snapshot6
-rw-r--r--win32/Makefile.sub6
4 files changed, 8 insertions, 8 deletions
diff --git a/common.mk b/common.mk
index d826a35e46..116455b21b 100644
--- a/common.mk
+++ b/common.mk
@@ -1070,7 +1070,7 @@ PHONY:
{$(srcdir)}.y.c:
$(ECHO) generating $@
$(Q)$(BASERUBY) $(tooldir)/id2token.rb $(SRC_FILE) | \
- $(YACC) $(YFLAGS) -o$@ -H$*.h - parse.y
+ $(LRAMA) $(YFLAGS) -o$@ -H$*.h - parse.y
$(PLATFORM_D):
$(Q) $(MAKEDIRS) $(PLATFORM_DIR) $(@D)
diff --git a/template/Makefile.in b/template/Makefile.in
index bef5a08539..695f7cec55 100644
--- a/template/Makefile.in
+++ b/template/Makefile.in
@@ -29,7 +29,7 @@ CPP = @CPP@
LD = @LD@
RUSTC = @RUSTC@
CARGO = @CARGO@
-YACC = $(BASERUBY) $(tooldir)/lrama/exe/lrama
+LRAMA = $(BASERUBY) $(tooldir)/lrama/exe/lrama
PURIFY =
AUTOCONF = autoconf
CONFIGURE = @CONFIGURE@
diff --git a/tool/make-snapshot b/tool/make-snapshot
index 3479e2ac85..44cbcd070a 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -72,7 +72,7 @@ GITURL = URI.parse("https://github.com/ruby/ruby.git")
RUBY_VERSION_PATTERN = /^\#define\s+RUBY_VERSION\s+"([\d.]+)"/
ENV["VPATH"] ||= "include/ruby"
-YACC = ENV["YACC"] ||= "#{$tooldir}/lrama/exe/lrama"
+LRAMA = ENV["LRAMA"] ||= "#{$tooldir}/lrama/exe/lrama"
ENV["BASERUBY"] ||= "ruby"
ENV["RUBY"] ||= "ruby"
ENV["MV"] ||= "mv"
@@ -118,7 +118,7 @@ $digests ||= DIGESTS
$patch_file &&= File.expand_path($patch_file)
path = ENV["PATH"].split(File::PATH_SEPARATOR)
-%w[YACC BASERUBY RUBY MV MINIRUBY].each do |var|
+%w[LRAMA BASERUBY RUBY MV MINIRUBY].each do |var|
cmd, = ENV[var].shellsplit
unless path.any? {|dir|
file = File.expand_path(cmd, dir)
@@ -514,7 +514,7 @@ touch-unicode-files:
end
print "prerequisites"
else
- system(*%W"#{YACC} -o parse.c parse.y")
+ system(*%W"#{LRAMA} -o parse.c parse.y")
end
vcs.after_export(".") if exported
clean.concat(Dir.glob("ext/**/autom4te.cache"))
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 0cd89c0bd9..3129f0804c 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -105,8 +105,8 @@ CC = cl -nologo
!if !defined(CPP) || "$(CPP)" == "cl"
CPP = $(CC) -E
!endif
-!if !defined(YACC)
-YACC = $(BASERUBY) $(top_srcdir)/tool/lrama/exe/lrama
+!if !defined(LRAMA)
+LRAMA = $(BASERUBY) $(top_srcdir)/tool/lrama/exe/lrama
!endif
AR = lib -nologo
PURIFY =
@@ -1040,7 +1040,7 @@ s,@CC@,$(CC),;t t
s,@CPP@,$(CPP),;t t
s,@CXX@,$$(CC),;t t
s,@LD@,$$(CC),;t t
-s,@YACC@,$(YACC),;t t
+s,@LRAMA@,$(LRAMA),;t t
s,@RANLIB@,,;t t
s,@AR@,$(AR),;t t
s,@ARFLAGS@,$(ARFLAGS),;t t