[#30220] schedule for Ruby 1.8.6 — "Akinori MUSHA" <knu@...>

 ruby-core を読んでいない人もいると思うので、ここでもアナウンス

20 messages 2007/01/30

[ruby-dev:30139] BASERUBY

From: "U.Nakamura" <usa@...>
Date: 2007-01-16 08:37:19 UTC
List: ruby-dev #30139
こんにちは、なかむら(う)です。

trunkで、BASERUBYが"ruby"決め打ちで何かと不便なので、configure
のオプションとして指定できるようにするパッチを作ってみました。
# configure.inの作法はいまいち理解してないので誰か改善希望

Index: configure.in
===================================================================
--- configure.in	(revision 11537)
+++ configure.in	(working copy)
@@ -1606,6 +1606,24 @@
 fi
 AC_SUBST(MANTYPE)
 
+AC_ARG_WITH(baseruby,
+	[  --with-baseruby=RUBY use RUBY as baseruby; RUBY is the pathname of ruby],
+	[
+		case "$withval" in
+		yes|no)
+			AC_MSG_ERROR(need ruby)
+			;;
+		easc
+		if test -z "$withval"; then
+			AC_MSG_ERROR(need ruby)
+		fi
+		BASERUBY=$withval
+	],
+	[
+		BASERUBY="ruby"
+	])
+AC_SUBST(BASERUBY)
+
 if test -f config.h && tr -d '\015' < confdefs.h | cmp -s config.h -; then
   echo "config.h unchanged"
 else
Index: common.mk
===================================================================
--- common.mk	(revision 11537)
+++ common.mk	(working copy)
@@ -524,7 +524,6 @@
 blockinlining.$(OBJEXT): {$(VPATH)}yarv.h {$(VPATH)}yarvcore.h vm_opts.h
 
 
-BASERUBY = ruby
 MATZRUBY = $(MATZRUBYDIR)ruby
 
 INSNS2VMOPT = $(CPPFLAGS) --srcdir=$(srcdir)
Index: win32/Makefile.sub
===================================================================
--- win32/Makefile.sub	(revision 11537)
+++ win32/Makefile.sub	(working copy)
@@ -51,6 +51,9 @@
 PURIFY =
 AUTOCONF = autoconf
 RM = $(COMSPEC) /C $(srcdir:/=\)\win32\rm.bat
+!if !defined(BASERUBY)
+BASERUBY = ruby
+!endif
 
 !if !defined(PROCESSOR_ARCHITECTURE)
 PROCESSOR_ARCHITECTURE = x86
Index: win32/configure.bat
===================================================================
--- win32/configure.bat	(revision 11537)
+++ win32/configure.bat	(working copy)
@@ -26,6 +26,7 @@
 if "%1" == "--disable-install-doc" goto :disable-rdoc
 if "%1" == "--extout" goto :extout
 if "%1" == "--path" goto :path
+if "%1" == "--with-baseruby" goto :baseruby
 if "%1" == "-h" goto :help
 if "%1" == "--help" goto :help
   echo>>confargs.tmp %1 \
@@ -94,6 +95,12 @@
   shift
   shift
 goto :loop
+:baseruby
+  echo>> ~tmp~.mak 	"BASERUBY=%2" \
+  echo>>confargs.tmp %1=%2 \
+  shift
+  shift
+goto :loop
 :help
   echo Configuration:
   echo   --help                  display this help
@@ -103,6 +110,7 @@
   echo System types:
   echo   --target=TARGET         configure for TARGET [i386-mswin32]
   echo Optional Package:
+  echo   --with-baseruby=RUBY    use RUBY as baseruby [ruby]
   echo   --with-static-linked-ext link external modules statically
   echo   --disable-install-doc   do not install rdoc indexes during install
   del *.tmp
Index: win32/setup.mak
===================================================================
--- win32/setup.mak	(revision 11537)
+++ win32/setup.mak	(working copy)
@@ -47,6 +47,9 @@
 !if defined(EXTOUT)
 EXTOUT = $(EXTOUT)
 !endif
+!if defined(BASERUBY)
+BASERUBY = $(BASERUBY)
+!endif
 <<
 
 -system-vars-: -osname- -runtime-
Index: Makefile.in
===================================================================
--- Makefile.in	(revision 11537)
+++ Makefile.in	(working copy)
@@ -12,6 +12,7 @@
 AUTOCONF = autoconf
 @SET_MAKE@
 MKFILES = @MAKEFILES@
+BASERUBY = @BASERUBY@
 
 prefix = @prefix@
 exec_prefix = @exec_prefix@
Index: bcc32/Makefile.sub
===================================================================
--- bcc32/Makefile.sub	(revision 11537)
+++ bcc32/Makefile.sub	(working copy)
@@ -55,6 +55,9 @@
 !ifndef AR
 AR = tlib
 !endif
+!ifndef BASERUBY
+BASERUBY = ruby
+!endif
 
 PURIFY =
 AUTOCONF = autoconf
Index: bcc32/configure.bat
===================================================================
--- bcc32/configure.bat	(revision 11537)
+++ bcc32/configure.bat	(working copy)
@@ -21,6 +21,7 @@
 if "%1" == "--enable-install-doc" goto :enable-rdoc
 if "%1" == "--disable-install-doc" goto :disable-rdoc
 if "%1" == "--extout" goto :extout
+if "%1" == "--with-baseruby" goto :baseruby
 if "%1" == "-h" goto :help
 if "%1" == "--help" goto :help
   echo>> ~tmp~.mak 	"%1" \
@@ -73,6 +74,11 @@
   shift
   shift
 goto :loop
+:baseruby
+  echo>> ~tmp~.mak 	-D"BASERUBY=%2" \
+  shift
+  shift
+goto :loop
 :help
   echo Configuration:
   echo   --help                  display this help
@@ -82,6 +88,7 @@
   echo System types:
   echo   --target=TARGET         configure for TARGET [i386-bccwin32]
   echo Optional Package:
+  echo   --with-baseruby=RUBY    use RUBY as baseruby [ruby]
   echo   --with-static-linked-ext link external modules statically
   echo   --disable-install-doc   do not install rdoc indexes during install
   del ~tmp~.mak
Index: bcc32/setup.mak
===================================================================
--- bcc32/setup.mak	(revision 11537)
+++ bcc32/setup.mak	(working copy)
@@ -53,6 +53,11 @@
 EXTOUT = $(EXTOUT)
 $(BANG)endif
 !endif
+!if defined(BASERUBY)
+$(BANG)ifndef BASERUBY
+BASERUBY = $(BASERUBY)
+$(BANG)endif
+!endif
 |
 	@type > usebormm.bat &&|
 @echo off
Index: wince/configure.bat
===================================================================
--- wince/configure.bat	(revision 11537)
+++ wince/configure.bat	(working copy)
@@ -21,6 +21,7 @@
 if "%1" == "--enable-install-doc" goto :enable-rdoc
 if "%1" == "--disable-install-doc" goto :disable-rdoc
 if "%1" == "--extout" goto :extout
+if "%1" == "--with-baseruby" goto :baseruby
 if "%1" == "-h" goto :help
 if "%1" == "--help" goto :help
 if "%1" == "CC" goto :define
@@ -83,6 +84,11 @@
   shift
   shift
 goto :loop
+:baseruby
+  echo>> ~tmp~.mak 	"BASERUBY=%2" \
+  shift
+  shift
+goto :loop
 :help
   echo Configuration:
   echo   --help                  display this help
@@ -92,6 +98,7 @@
   echo System types:
   echo   --target=TARGET         configure for TARGET [i386-mswin32]
   echo Optional Package:
+  echo   --with-baseruby=RUBY    use RUBY as baseruby [ruby]
   echo   --with-static-linked-ext link external modules statically
   echo   --enable-install-doc    install rdoc indexes during install
   del ~tmp~.mak
Index: wince/Makefile.sub
===================================================================
--- wince/Makefile.sub	(revision 11537)
+++ wince/Makefile.sub	(working copy)
@@ -45,6 +45,9 @@
 PURIFY =
 AUTOCONF = autoconf
 RM = $(srcdir)\win32\rm.bat
+!if !defined(BASERUBY)
+BASERUBY = ruby
+!endif
 
 !if !defined(PROCESSOR_ARCHITECTURE)
 PROCESSOR_ARCHITECTURE = x86
Index: wince/setup.mak
===================================================================
--- wince/setup.mak	(revision 11537)
+++ wince/setup.mak	(working copy)
@@ -58,6 +58,9 @@
 !if defined(EXTOUT)
 EXTOUT = $(EXTOUT)
 !endif
+!if defined(BASERUBY)
+BASERUBY = $(BASERUBY)
+!endif
 <<
 	@$(CPP) -I$(srcdir) -DRUBY_EXTERN="//" <<"Creating $(MAKEFILE)" >> $(MAKEFILE)
 #include "version.h"

それでは。
-- 
U.Nakamura <usa@garbagecollect.jp>



In This Thread

Prev Next