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
This commit is contained in:
nobu 2015-10-31 23:34:17 +00:00
Родитель a8438d3033
Коммит 48a66a58b0
2 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -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)

Просмотреть файл

@ -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;
}