mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* instruby.rb: fix install directory if destdir and compile_dir are
not in the same drive. * ext/extmk.rb: ditto. * win32/Makefile.sub, win32/README.win32, win32/configure.bat, win32/setup.mak: new configure scheme. use ``configure --prefix=dir'' instead of ``nmake DESTDIR=dir install''. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bb2030498a
commit
923b55d35b
7 changed files with 68 additions and 25 deletions
11
ChangeLog
11
ChangeLog
|
@ -2,6 +2,17 @@ Mon Dec 29 02:20:54 2003 Dave Thomas <dave@wireless_3.local.thomases.com>
|
||||||
|
|
||||||
* eval.c: Add RDoc for class Proc, Method, UnboundMethod
|
* eval.c: Add RDoc for class Proc, Method, UnboundMethod
|
||||||
|
|
||||||
|
Mon Dec 29 02:20:26 2003 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* instruby.rb: fix install directory if destdir and compile_dir are
|
||||||
|
not in the same drive.
|
||||||
|
|
||||||
|
* ext/extmk.rb: ditto.
|
||||||
|
|
||||||
|
* win32/Makefile.sub, win32/README.win32, win32/configure.bat,
|
||||||
|
win32/setup.mak: new configure scheme. use ``configure --prefix=dir''
|
||||||
|
instead of ``nmake DESTDIR=dir install''.
|
||||||
|
|
||||||
Mon Dec 29 00:41:44 2003 Dave Thomas <dave@pragprog.com>
|
Mon Dec 29 00:41:44 2003 Dave Thomas <dave@pragprog.com>
|
||||||
|
|
||||||
* math.c: Add RDoc comments
|
* math.c: Add RDoc comments
|
||||||
|
|
|
@ -149,7 +149,7 @@ def parse_args()
|
||||||
end
|
end
|
||||||
|
|
||||||
$continue = $mflags.set?(?k)
|
$continue = $mflags.set?(?k)
|
||||||
$mflags |= ["DESTDIR=#{$destdir}"]
|
$mflags |= ["DESTDIR=#{$destdir}"] unless $destdir.to_s.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
parse_args()
|
parse_args()
|
||||||
|
|
24
instruby.rb
24
instruby.rb
|
@ -71,19 +71,29 @@ def makedirs(dirs)
|
||||||
super(dirs, :mode => 0755, :verbose => true) unless dirs.empty?
|
super(dirs, :mode => 0755, :verbose => true) unless dirs.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def join(dir1, dir2)
|
||||||
|
# same scheme as DESTDIR of lib/mkmf.rb
|
||||||
|
drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/
|
||||||
|
if dir1.empty? || dir2.scan(drive).empty?
|
||||||
|
dir1 + dir2
|
||||||
|
else
|
||||||
|
dir1 + $'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
exeext = CONFIG["EXEEXT"]
|
exeext = CONFIG["EXEEXT"]
|
||||||
|
|
||||||
ruby_install_name = CONFIG["ruby_install_name"]
|
ruby_install_name = CONFIG["ruby_install_name"]
|
||||||
rubyw_install_name = CONFIG["rubyw_install_name"]
|
rubyw_install_name = CONFIG["rubyw_install_name"]
|
||||||
|
|
||||||
version = CONFIG["ruby_version"]
|
version = CONFIG["ruby_version"]
|
||||||
bindir = $destdir+CONFIG["bindir"]
|
bindir = join($destdir, CONFIG["bindir"])
|
||||||
libdir = $destdir+CONFIG["libdir"]
|
libdir = join($destdir, CONFIG["libdir"])
|
||||||
rubylibdir = $destdir+CONFIG["rubylibdir"]
|
rubylibdir = join($destdir, CONFIG["rubylibdir"])
|
||||||
archlibdir = $destdir+CONFIG["archdir"]
|
archlibdir = join($destdir, CONFIG["archdir"])
|
||||||
sitelibdir = $destdir+CONFIG["sitelibdir"]
|
sitelibdir = join($destdir, CONFIG["sitelibdir"])
|
||||||
sitearchlibdir = $destdir+CONFIG["sitearchdir"]
|
sitearchlibdir = join($destdir, CONFIG["sitearchdir"])
|
||||||
mandir = File.join($destdir+CONFIG["mandir"], "man")
|
mandir = File.join(join($destdir, CONFIG["mandir"]), "man")
|
||||||
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
|
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
|
||||||
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
|
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
|
||||||
dll = CONFIG["LIBRUBY_SO"]
|
dll = CONFIG["LIBRUBY_SO"]
|
||||||
|
|
|
@ -84,9 +84,6 @@ exec_prefix = $(prefix)
|
||||||
!if !defined(libdir)
|
!if !defined(libdir)
|
||||||
libdir = $(exec_prefix)/lib
|
libdir = $(exec_prefix)/lib
|
||||||
!endif
|
!endif
|
||||||
!if !defined(DESTDIR)
|
|
||||||
DESTDIR = $(prefix)
|
|
||||||
!endif
|
|
||||||
!if !defined(CFLAGS)
|
!if !defined(CFLAGS)
|
||||||
CFLAGS = -MD $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG)
|
CFLAGS = -MD $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG)
|
||||||
!endif
|
!endif
|
||||||
|
@ -305,7 +302,7 @@ s,@FFLAGS@,$(FFLAGS),;t t
|
||||||
s,@LDFLAGS@,,;t t
|
s,@LDFLAGS@,,;t t
|
||||||
s,@LIBS@,$(LIBS),;t t
|
s,@LIBS@,$(LIBS),;t t
|
||||||
s,@exec_prefix@,$${prefix},;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,@program_transform_name@,s,,,,;t t
|
||||||
s,@bindir@,$${exec_prefix}/bin,;t t
|
s,@bindir@,$${exec_prefix}/bin,;t t
|
||||||
s,@sbindir@,$${exec_prefix}/sbin,;t t
|
s,@sbindir@,$${exec_prefix}/sbin,;t t
|
||||||
|
|
|
@ -6,11 +6,7 @@
|
||||||
|
|
||||||
(1) Visual C++ 5.0 or later.
|
(1) Visual C++ 5.0 or later.
|
||||||
|
|
||||||
(2) If you want to run `((%nmake clean%))' or `((%nmake distclean%))'
|
(2) Please set environment variable (({INCLUDE})), (({LIB})), (({PATH}))
|
||||||
properly, you must install UNIX compatible `((%rm%))' command on
|
|
||||||
your ((|PATH|)) if you want to clean after compile.
|
|
||||||
|
|
||||||
(3) Please set environment variable (({INCLUDE})), (({LIB})), (({PATH}))
|
|
||||||
to run required commands properly from the command line.
|
to run required commands properly from the command line.
|
||||||
|
|
||||||
Note: building ruby requires following commands.
|
Note: building ruby requires following commands.
|
||||||
|
@ -19,11 +15,18 @@
|
||||||
* lib
|
* lib
|
||||||
* dumpbin
|
* dumpbin
|
||||||
|
|
||||||
|
(3) If you want to build from CVS source, following commands are required.
|
||||||
|
* byacc
|
||||||
|
* sed
|
||||||
|
|
||||||
== How to compile and install
|
== How to compile and install
|
||||||
|
|
||||||
(1) Execute win32\configure.bat on your build directory.
|
(1) Execute win32\configure.bat on your build directory.
|
||||||
You can specify the target platform as an argument.
|
You can specify the target platform as an argument.
|
||||||
For example, run `((%configure i686-mswin32%))'
|
For example, run `((%configure i686-mswin32%))'
|
||||||
|
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}))
|
(2) Change ((|RUBY_INSTALL_NAME|)) and ((|RUBY_SO_NAME|)) in (({Makefile}))
|
||||||
if you want to change the name of the executable files.
|
if you want to change the name of the executable files.
|
||||||
|
@ -36,7 +39,7 @@
|
||||||
|
|
||||||
(5) Run `((%nmake test%))'
|
(5) Run `((%nmake test%))'
|
||||||
|
|
||||||
(6) Run `((%nmake DESTDIR=<install_directory> install%))'
|
(6) Run `((%nmake install%))'
|
||||||
|
|
||||||
This command will create following directories and install files onto them.
|
This command will create following directories and install files onto them.
|
||||||
* <install_directory>\bin
|
* <install_directory>\bin
|
||||||
|
@ -81,10 +84,10 @@ in Japanese, but you can download at least.
|
||||||
|
|
||||||
C:
|
C:
|
||||||
cd \ruby
|
cd \ruby
|
||||||
win32\configure
|
win32\configure --prefix=/usr/local
|
||||||
nmake
|
nmake
|
||||||
nmake test
|
nmake test
|
||||||
nmake DESTDIR=/usr/local install
|
nmake install
|
||||||
|
|
||||||
* Build on the relative directory from the ruby source directory.
|
* Build on the relative directory from the ruby source directory.
|
||||||
|
|
||||||
|
@ -97,10 +100,10 @@ in Japanese, but you can download at least.
|
||||||
cd \ruby
|
cd \ruby
|
||||||
mkdir mswin32
|
mkdir mswin32
|
||||||
cd mswin32
|
cd mswin32
|
||||||
..\win32\configure
|
..\win32\configure --prefix=/usr/local
|
||||||
nmake
|
nmake
|
||||||
nmake test
|
nmake test
|
||||||
nmake DESTDIR=/usr/local install
|
nmake install
|
||||||
|
|
||||||
* Build on the different drive.
|
* Build on the different drive.
|
||||||
|
|
||||||
|
@ -111,10 +114,10 @@ in Japanese, but you can download at least.
|
||||||
|
|
||||||
D:
|
D:
|
||||||
cd D:\build\ruby
|
cd D:\build\ruby
|
||||||
C:\src\ruby\win32\configure
|
C:\src\ruby\win32\configure --prefix=C:/usr/local
|
||||||
nmake
|
nmake
|
||||||
nmake test
|
nmake test
|
||||||
nmake DESTDIR=C:/usr/local install
|
nmake install
|
||||||
|
|
||||||
== Bugs
|
== Bugs
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,13 @@ echo>> ~tmp~.mak @del ~tmp~.mak
|
||||||
echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)/setup.mak \
|
echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)/setup.mak \
|
||||||
:loop
|
:loop
|
||||||
if "%1" == "" goto :end
|
if "%1" == "" goto :end
|
||||||
|
if "%1" == "--prefix" goto :prefix
|
||||||
if "%1" == "--srcdir" goto :srcdir
|
if "%1" == "--srcdir" goto :srcdir
|
||||||
if "%1" == "srcdir" goto :srcdir
|
if "%1" == "srcdir" goto :srcdir
|
||||||
if "%1" == "--target" goto :target
|
if "%1" == "--target" goto :target
|
||||||
if "%1" == "target" goto :target
|
if "%1" == "target" goto :target
|
||||||
|
if "%1" == "-h" goto :help
|
||||||
|
if "%1" == "--help" goto :help
|
||||||
echo>> ~tmp~.mak "%1" \
|
echo>> ~tmp~.mak "%1" \
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
|
@ -22,11 +25,27 @@ goto :loop
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
|
:prefix
|
||||||
|
echo>> ~tmp~.mak "prefix=%2" \
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
:target
|
:target
|
||||||
echo>> ~tmp~.mak "%2" \
|
echo>> ~tmp~.mak "%2" \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
|
:help
|
||||||
|
echo Configuration:
|
||||||
|
echo --help display this help
|
||||||
|
echo --srcdir=DIR find the sources in DIR [configure dir or `..']
|
||||||
|
echo Installation directories:
|
||||||
|
echo --prefix=PREFIX install files in PREFIX [/usr]
|
||||||
|
echo System types:
|
||||||
|
echo --target=TARGET configure for TARGET [i386-mswin32]
|
||||||
|
del ~tmp~.mak
|
||||||
|
goto :exit
|
||||||
:end
|
:end
|
||||||
echo>> ~tmp~.mak WIN32DIR=$(@D)
|
echo>> ~tmp~.mak WIN32DIR=$(@D)
|
||||||
nmake -alf ~tmp~.mak
|
nmake -alf ~tmp~.mak
|
||||||
|
:exit
|
||||||
|
|
|
@ -9,6 +9,9 @@ srcdir = $(WIN32DIR:/win32=)
|
||||||
!else
|
!else
|
||||||
srcdir = $(WIN32DIR)/..
|
srcdir = $(WIN32DIR)/..
|
||||||
!endif
|
!endif
|
||||||
|
!if "$(prefix)" == ""
|
||||||
|
prefix = /usr
|
||||||
|
!endif
|
||||||
OS = mswin32
|
OS = mswin32
|
||||||
RT = msvcrt
|
RT = msvcrt
|
||||||
INCLUDE = !include
|
INCLUDE = !include
|
||||||
|
@ -32,6 +35,7 @@ alpha-$(OS): -prologue- -alpha- -epilogue-
|
||||||
@type << > $(MAKEFILE)
|
@type << > $(MAKEFILE)
|
||||||
### Makefile for ruby $(OS) ###
|
### Makefile for ruby $(OS) ###
|
||||||
srcdir = $(srcdir:\=/)
|
srcdir = $(srcdir:\=/)
|
||||||
|
prefix = $(prefix:\=/)
|
||||||
<<
|
<<
|
||||||
@cl -nologo -EP -I$(srcdir) <<"Creating $(MAKEFILE)" >> $(MAKEFILE)
|
@cl -nologo -EP -I$(srcdir) <<"Creating $(MAKEFILE)" >> $(MAKEFILE)
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
@ -73,7 +77,6 @@ $(CPU) = $(PROCESSOR_LEVEL)
|
||||||
# RT = $(RT)
|
# RT = $(RT)
|
||||||
# RUBY_INSTALL_NAME = ruby
|
# RUBY_INSTALL_NAME = ruby
|
||||||
# RUBY_SO_NAME = $$(RT)-$$(RUBY_INSTALL_NAME)$$(MAJOR)$$(MINOR)
|
# RUBY_SO_NAME = $$(RT)-$$(RUBY_INSTALL_NAME)$$(MAJOR)$$(MINOR)
|
||||||
# prefix = /usr
|
|
||||||
# CFLAGS = -nologo -MD $$(DEBUGFLAGS) $$(OPTFLAGS) $$(PROCESSOR_FLAG)
|
# CFLAGS = -nologo -MD $$(DEBUGFLAGS) $$(OPTFLAGS) $$(PROCESSOR_FLAG)
|
||||||
# CPPFLAGS = -I. -I$$(srcdir) -I$$(srcdir)/missing -DLIBRUBY_SO=\"$$(LIBRUBY_SO)\"
|
# CPPFLAGS = -I. -I$$(srcdir) -I$$(srcdir)/missing -DLIBRUBY_SO=\"$$(LIBRUBY_SO)\"
|
||||||
# STACK = 0x2000000
|
# STACK = 0x2000000
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue