summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-31 23:34:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-31 23:34:17 +0000
commit48a66a58b048f1f9b1efeac154f64f0b1f33b5cb (patch)
tree6f54129d261f623e92f0e7826ec5290e2403063c
parenta8438d3033a87f93f7a3a8c6ce32f6279ca7ad84 (diff)
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
-rw-r--r--Makefile.in2
-rw-r--r--template/ruby-runner.c.in6
2 files changed, 5 insertions, 3 deletions
diff --git a/Makefile.in b/Makefile.in
index 10c396a..ba64e24 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 2b285bf..c4ee2f1 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;
}