[前][次][番号順一覧][スレッド一覧]

ruby-changes:73394

From: Nobuyoshi <ko1@a...>
Date: Sat, 3 Sep 2022 19:27:54 +0900 (JST)
Subject: [ruby-changes:73394] 6f5305e0d2 (master): Exclude LIBPATHENV wrapper from PREP

https://git.ruby-lang.org/ruby.git/commit/?id=6f5305e0d2

From 6f5305e0d2b4711b186ece8160716c7f9439ea8d Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 3 Sep 2022 01:08:47 +0900
Subject: Exclude LIBPATHENV wrapper from PREP

---
 common.mk            | 4 ++--
 configure.ac         | 2 +-
 template/Makefile.in | 2 ++
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/common.mk b/common.mk
index 7e22c2372b..fa3100439c 100644
--- a/common.mk
+++ b/common.mk
@@ -925,11 +925,11 @@ $(PLATFORM_D): https://github.com/ruby/ruby/blob/trunk/common.mk#L925
 	$(Q) $(MAKEDIRS) $(PLATFORM_DIR) $(@D)
 	@$(NULLCMD) > $@
 
-exe/$(PROGRAM): ruby-runner.c ruby-runner.h exe/.time miniruby$(EXEEXT) {$(VPATH)}config.h
+exe/$(PROGRAM): ruby-runner.c ruby-runner.h exe/.time $(PREP) {$(VPATH)}config.h
 	$(Q) $(CC) $(CFLAGS) $(INCFLAGS) $(CPPFLAGS) -DRUBY_INSTALL_NAME=$(@F) $(COUTFLAG)ruby-runner.$(OBJEXT) -c $(CSRCFLAG)$(srcdir)/ruby-runner.c
 	$(Q) $(PURIFY) $(CC) $(CFLAGS) $(LDFLAGS) $(OUTFLAG)$@ ruby-runner.$(OBJEXT) $(LIBS)
 	$(Q) $(POSTLINK)
-	$(Q) ./miniruby$(EXEEXT) \
+	$(Q) $(BOOTSTRAPRUBY) \
 	    -e 'prog, dest, inst = ARGV; dest += "/ruby"' \
 	    -e 'exit unless prog==inst' \
 	    -e 'unless prog=="ruby"' \
diff --git a/configure.ac b/configure.ac
index 2fd68c0013..d6ed24c5b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3621,7 +3621,7 @@ AS_CASE("$cross_compiling:${LIBPATHENV}", [yes:* | no:], [], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L3621
     AC_MSG_CHECKING(whether wrapper for $LIBPATHENV is needed)
     AS_IF([env ${LIBPATHENV}=/lib /bin/sh -c ': ${'${LIBPATHENV}'?}' 2>/dev/null],
 	[AC_MSG_RESULT(no)],
-	[PREP="$PREP"' exe/$(PROGRAM)'
+	[AC_SUBST(XRUBY_LIBPATHENV_WRAPPER, 'exe/$(PROGRAM)')
 	AC_MSG_RESULT(yes)]
     )
 ])
diff --git a/template/Makefile.in b/template/Makefile.in
index f60986a53f..c5a926b538 100644
--- a/template/Makefile.in
+++ b/template/Makefile.in
@@ -297,6 +297,8 @@ $(PROGRAM): https://github.com/ruby/ruby/blob/trunk/template/Makefile.in#L297
 		$(Q) $(PURIFY) $(CC) $(EXE_LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(MAINLIBS) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@
 		$(Q) $(POSTLINK)
 
+$(PROGRAM): @XRUBY_LIBPATHENV_WRAPPER@
+
 PRE_LIBRUBY_UPDATE = [ -n "$(LIBRUBY_SO_UPDATE)" ] || $(gnumake:yes=exec) $(RM) $(LIBRUBY_EXTS)
 
 # We must `rm' the library each time this rule is invoked because "updating" a
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]