山本です。

これが現在の HEAD に対するパッチです。


* bcc32/Makefile.sub, bcc32/README.bcc32, bcc32/configure.bat,
  bcc32/setup.mak: new configure scheme. use ``configure --prefix=dir''
  instead of ``make DESTDIR=dir install''.
  --with-static-linked-ext support on mswin32. [ruby-dev:23034]

* bcc32/setup.mak: "configure --disable-install-doc" is now working.

* win32/setup.mak: ditto.


cvs diff -u -wb -p bcc32\configure.bat bcc32\Makefile.sub bcc32\README.bcc32 bcc32\setup.mak win32\setup.mak (in directory E:\ruby-cvs\ruby\)
Index: bcc32/configure.bat
===================================================================
RCS file: /ruby/ruby/bcc32/configure.bat,v
retrieving revision 1.9
diff -u -w -b -p -r1.9 configure.bat
--- bcc32/configure.bat	28 Feb 2004 06:20:14 -0000	1.9
+++ bcc32/configure.bat	28 Feb 2004 10:26:54 -0000
@@ -8,13 +8,14 @@ echo>> ~tmp~.mak conf = %0

 echo>> ~tmp~.mak $(conf:\=/): nul

 echo>> ~tmp~.mak 	@del ~tmp~.mak

 echo>> ~tmp~.mak 	@-$(MAKE) -l$(MAKEFLAGS) -f $(@D)setup.mak \

-echo>> ~tmp~.mak 	bcc32dir="$(@D)" \

 :loop

 if "%1" == "" goto :end

+if "%1" == "--prefix" goto :prefix

 if "%1" == "--srcdir" goto :srcdir

 if "%1" == "srcdir" goto :srcdir

 if "%1" == "--target" goto :target

 if "%1" == "target" goto :target

+if "%1" == "--with-static-linked-ext" goto :extstatic

 if "%1" == "--program-suffix" goto :suffix

 if "%1" == "--program-name" goto :progname

 if "%1" == "--enable-install-doc" goto :enable-rdoc

@@ -29,6 +30,11 @@ goto :loop

   shift

   shift

 goto :loop

+:prefix

+  echo>> ~tmp~.mak 	-D"prefix=%2" \

+  shift

+  shift

+goto :loop

 :suffix

   echo>> ~tmp~.mak 	-D"RUBY_SUFFIX=%2" \

   shift

@@ -45,10 +51,14 @@ goto :loop

   shift

 goto :loop

 :target

-  echo>> ~tmp~.mak 	%2 \

+  echo>> ~tmp~.mak 	"%2" \

   shift

   shift

 goto :loop

+:extstatic

+  echo>> ~tmp~.mak 	-D"EXTSTATIC=static" \

+  shift

+goto :loop

 :enable-rdoc

   echo>> ~tmp~.mak 	-D"RDOCTARGET=install-doc" \

   shift

@@ -71,6 +81,6 @@ goto :loop

   del ~tmp~.mak

 goto :exit

 :end

-echo.>> ~tmp~.mak

+echo>> ~tmp~.mak 	bcc32dir="$(@D)"

 make -s -f ~tmp~.mak

 :exit

Index: bcc32/Makefile.sub
===================================================================
RCS file: /ruby/ruby/bcc32/Makefile.sub,v
retrieving revision 1.52
diff -u -w -b -p -r1.52 Makefile.sub
--- bcc32/Makefile.sub	22 Feb 2004 05:44:35 -0000	1.52
+++ bcc32/Makefile.sub	27 Feb 2004 14:13:28 -0000
@@ -94,9 +94,6 @@ libdir = $(exec_prefix)/lib
 !if !defined(datadir)
 datadir = $(prefix)/share
 !endif
-!ifndef DESTDIR
-DESTDIR = $(prefix)
-!endif
 !ifndef EXTOUT
 EXTOUT = .ext
 !endif
@@ -313,7 +310,7 @@ s,@FFLAGS@,$(FFLAGS),;t t
 s,@LDFLAGS@,,;t t
 s,@LIBS@,$(LIBS),;t t
 s,@exec_prefix@,$${prefix},;t t
-s,@prefix@,,;t t
+s,@prefix@,$(prefix),;t t
 s,@program_transform_name@,s,,,,;t t
 s,@bindir@,$${exec_prefix}/bin,;t t
 s,@sbindir@,$${exec_prefix}/sbin,;t t
Index: bcc32/README.bcc32
===================================================================
RCS file: /ruby/ruby/bcc32/README.bcc32,v
retrieving revision 1.2
diff -u -w -b -p -r1.2 README.bcc32
--- bcc32/README.bcc32	22 Oct 2002 10:54:11 -0000	1.2
+++ bcc32/README.bcc32	27 Feb 2004 14:15:20 -0000
@@ -6,11 +6,7 @@
 
 (1) Borland C++ 5.0 or later.
 
-(2) If you want to run `((%make clean%))' or `((%make distclean%))'
-    properly, you must install UNIX compatible `((%rm%))' command on
-    your ((|PATH|)).
-
-(3) Please set environment variable (({INCLUDE})), (({LIB})), (({PATH}))
+(2) Please set environment variable (({INCLUDE})), (({LIB})), (({PATH}))
     to run required commands properly from the command line.
 
     Note: building ruby requires following commands.
@@ -19,10 +15,19 @@
      * tlib
      * ilink
 
+(3) If you want to build from CVS source, following commands are required.
+     * byacc
+     * sed
+
 == How to compile and install
 
 (1) Execute bcc32\configure.bat on your build directory.
-     ex. c:\ruby-1.6.7>bcc32\configure.bat
+     ex. c:\src\ruby> bcc32\configure.bat
+    You can specify the target platform as an argument.
+    For example, run `((%configure i686-bccwin32%))'
+    You can also specify the install directory.
+    For example, run `((%configure --prefix=<install_directory>%))'
+    Default of the install directory is /usr .
      
 (2) Change ((|RUBY_INSTALL_NAME|)) and ((|RUBY_SO_NAME|)) in (({Makefile}))
     if you want to change the name of the executable files. 
@@ -33,7 +38,7 @@
 
 (4) Run `((%make test%))'
 
-(5) Run `((%make DESTDIR=<install_directory> install%))'
+(5) Run `((%make install%))'
 
     This command will create following directories and install files onto them.
       * <install_directory>\bin
@@ -46,7 +51,7 @@
       * <install_directory>\lib\ruby\site_ruby\<MAJOR>.<MINOR>\<PLATFORM>
       * <install_directory>\man\man1
     If Ruby's version is `x.y.z', the ((|<MAJOR>|)) is `x' and the ((|<MINOR>|)) is `y'.
-    The ((|<PLATFORM>|)) is usually `(({i586-bccwin32}))'.
+    The default ((|<PLATFORM>|)) is `(({i386-bccwin32}))'.
 
 == Icons
 
@@ -78,10 +83,10 @@ in Japanese, but you can download at lea
 
     C:
     cd \ruby
-    bcc32\configure
+    bcc32\configure --prefix=/usr/local
     make
     make test
-    make DESTDIR=/usr/local install
+    make install
 
 * Build on the relative directory from the ruby source directory and CPU type 
   i386.
@@ -96,10 +101,10 @@ in Japanese, but you can download at lea
     cd \ruby
     mkdir bccwin32
     cd bccwin32
-    ..\bcc32\configure target i386-bccwin32
+    ..\bcc32\configure --prefix=/usr/local
     make
     make test
-    make DESTDIR=/usr/local install
+    make install
 
 * Build on the different drive.
 
@@ -110,10 +115,10 @@ in Japanese, but you can download at lea
 
     D:
     cd D:\build\ruby
-    C:\src\ruby\bcc32\configure
+    C:\src\ruby\bcc32\configure --prefix=C:/usr/local
     make
     make test
-    make DESTDIR=C:/usr/local install
+    make install
 
 == Bugs
 
Index: bcc32/setup.mak
===================================================================
RCS file: /ruby/ruby/bcc32/setup.mak,v
retrieving revision 1.8
diff -u -w -b -p -r1.8 setup.mak
--- bcc32/setup.mak	16 Feb 2004 11:30:35 -0000	1.8
+++ bcc32/setup.mak	28 Feb 2004 10:27:36 -0000
@@ -9,7 +9,9 @@ srcdir = $(bcc32dir:/bcc32/=/)
 !else
 srcdir = $(bcc32dir)../
 !endif
-
+!if "$(prefix)" == ""
+prefix = /usr
+!endif
 OS = bccwin32
 RT = $(OS)
 INCLUDE = !include
@@ -33,6 +35,9 @@ alpha-$(OS): -prologue- -alpha- -epilogu
 	@type > $(MAKEFILE) &&|
 \#\#\# Makefile for ruby $(OS) \#\#\#
 srcdir = $(srcdir:\=/)
+prefix = $(prefix:\=/)
+EXTSTATIC = $(EXTSTATIC)
+RDOCTARGET = $(RDOCTARGET)
 |
 	@cpp32 -I$(srcdir) -P- -o$(MAKEFILE) > nul &&|
 \#include "version.h"
@@ -77,7 +82,6 @@ PROCESSOR_LEVEL = $(PROCESSOR_LEVEL)
 \# RT = $(RT)
 \# RUBY_INSTALL_NAME = ruby
 \# RUBY_SO_NAME = $$(RT)-$$(RUBY_INSTALL_NAME)$$(MAJOR)$$(MINOR)
-\# prefix = /usr
 \# CFLAGS = -q $$(DEBUGFLAGS) $$(OPTFLAGS) $$(PROCESSOR_FLAG) -w- -wsus -wcpt -wdup -wext -wrng -wrpt -wzdi
 \# CPPFLAGS = -I. -I$$(srcdir) -I$$(srcdir)missing -DLIBRUBY_SO=\"$$(LIBRUBY_SO)\"
 \# STACK = 0x2000000
Index: win32/setup.mak
===================================================================
RCS file: /ruby/ruby/win32/setup.mak,v
retrieving revision 1.15
diff -u -w -b -p -r1.15 setup.mak
--- win32/setup.mak	19 Jan 2004 04:10:53 -0000	1.15
+++ win32/setup.mak	28 Feb 2004 11:02:38 -0000
@@ -37,6 +37,7 @@ alpha-$(OS): -prologue- -alpha- -epilogu
 srcdir = $(srcdir:\=/)
 prefix = $(prefix:\=/)
 EXTSTATIC = $(EXTSTATIC)
+RDOCTARGET = $(RDOCTARGET)
 <<
 	@cl -nologo -EP -I$(srcdir) <<"Creating $(MAKEFILE)" >> $(MAKEFILE)
 #include "version.h"