From 48a66a58b048f1f9b1efeac154f64f0b1f33b5cb Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 31 Oct 2015 23:34:17 +0000 Subject: [PATCH] ruby-runner: RUBY_INSTALL_NAME * Makefile.in (ruby-runner), template/ruby-runner.c.in: use expanded RUBY_INSTALL_NAME, not RUBY_BASE_NAME. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- Makefile.in | 2 +- template/ruby-runner.c.in | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index 10c396a656..ba64e24e7c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -256,7 +256,7 @@ ruby-runner.c: template/ruby-runner.c.in @./config.status --file=$@:$(srcdir)/template/$(@F).in ruby-runner$(EXEEXT): ruby-runner.c - $(Q) $(PURIFY) $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(LIBS) $(OUTFLAG)$@ ruby-runner.c + $(Q) $(PURIFY) $(CC) $(CFLAGS) $(CPPFLAGS) -DRUBY_INSTALL_NAME=$(RUBY_INSTALL_NAME) $(LDFLAGS) $(LIBS) $(OUTFLAG)$@ ruby-runner.c $(RBCONFIG): $($(CROSS_COMPILING:no=)PREP) diff --git a/template/ruby-runner.c.in b/template/ruby-runner.c.in index 2b285bf540..c4ee2f1ee4 100644 --- a/template/ruby-runner.c.in +++ b/template/ruby-runner.c.in @@ -6,7 +6,9 @@ #define BUILDDIR "@abs_top_builddir@" #define LIBPATHENV "@LIBPATHENV@" #define PATH_SEP '@PATH_SEPARATOR@' -#define RUBY_INSTALL_NAME "@RUBY_BASE_NAME@" + +#define STRINGIZE(expr) STRINGIZE0(expr) +#define STRINGIZE0(expr) #expr int main(int argc, char **argv) @@ -28,6 +30,6 @@ main(int argc, char **argv) libpath = builddir; } setenv(LIBPATHENV, libpath, 1); - execv(BUILDDIR"/"RUBY_INSTALL_NAME, argv); + execv(BUILDDIR"/"STRINGIZE(RUBY_INSTALL_NAME), argv); return -1; }