ruby-changes:2406
From: ko1@a...
Date: 12 Nov 2007 17:28:49 +0900
Subject: [ruby-changes:2406] nobu - Ruby:r13896 (ruby_1_8, trunk): * lib/mkmf.rb (create_makefile): rdoc about srcprefix. a patch from
nobu 2007-11-12 16:52:31 +0900 (Mon, 12 Nov 2007) New Revision: 13896 Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/lib/mkmf.rb trunk/ChangeLog trunk/lib/mkmf.rb Log: * lib/mkmf.rb (create_makefile): rdoc about srcprefix. a patch from Daniel Berger <djberg96 AT gmail.com> in [ruby-core:13378]. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/lib/mkmf.rb?r1=13896&r2=13895 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=13896&r2=13895 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13896&r2=13895 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/mkmf.rb?r1=13896&r2=13895 Index: ChangeLog =================================================================== --- ChangeLog (revision 13895) +++ ChangeLog (revision 13896) @@ -1,3 +1,8 @@ +Mon Nov 12 16:52:29 2007 Nobuyoshi Nakada <nobu@r...> + + * lib/mkmf.rb (create_makefile): rdoc about srcprefix. a patch from + Daniel Berger <djberg96 AT gmail.com> in [ruby-core:13378]. + Mon Nov 12 16:48:09 2007 Tanaka Akira <akr@f...> * Makefile.in, common.mk: add ext_prelude.o to OBJS. Index: lib/mkmf.rb =================================================================== --- lib/mkmf.rb (revision 13895) +++ lib/mkmf.rb (revision 13896) @@ -1265,6 +1265,37 @@ # load the file within a Ruby program later, that directory structure will # have to be followed, e.g. "require 'test/foo'". # +# The +srcprefix+ should be used when your source files are not in the same +# directory as your build script. This will not only eliminate the need for +# you to manually copy the source files into the same directory as your build +# script, but it also sets the proper +target_prefix+ in the generated +# Makefile. +# +# Setting the +target_prefix+ will, in turn, install the generated binary in +# a directory under your Config::CONFIG['sitearchdir'] that mimics your local +# filesystem when you run 'make install'. +# +# For example, given the following file tree: +# +# ext/ +# extconf.rb +# test/ +# foo.c +# +# And given the following code: +# +# create_makefile('test/foo', 'test') +# +# That will set the +target_prefix+ in the generated Makefile to 'test'. That, +# in turn, will create the following file tree when installed via the +# 'make install' command: +# +# /path/to/ruby/sitearchdir/test/foo.so +# +# It is recommended that you use this approach to generate your makefiles, +# instead of copying files around manually, because some third party +# libraries may depend on the +target_prefix+ being set properly. +# def create_makefile(target, srcprefix = nil) $target = target libpath = $DEFLIBPATH|$LIBPATH Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 13895) +++ ruby_1_8/ChangeLog (revision 13896) @@ -1,3 +1,8 @@ +Mon Nov 12 16:52:29 2007 Nobuyoshi Nakada <nobu@r...> + + * lib/mkmf.rb (create_makefile): rdoc about srcprefix. a patch from + Daniel Berger <djberg96 AT gmail.com> in [ruby-core:13378]. + Mon Nov 12 13:53:06 2007 Yukihiro Matsumoto <matz@r...> * misc/ruby-mode.el (ruby-parse-partial): handle stringified Index: ruby_1_8/lib/mkmf.rb =================================================================== --- ruby_1_8/lib/mkmf.rb (revision 13895) +++ ruby_1_8/lib/mkmf.rb (revision 13896) @@ -1221,6 +1221,37 @@ # load the file within a Ruby program later, that directory structure will # have to be followed, e.g. "require 'test/foo'". # +# The +srcprefix+ should be used when your source files are not in the same +# directory as your build script. This will not only eliminate the need for +# you to manually copy the source files into the same directory as your build +# script, but it also sets the proper +target_prefix+ in the generated +# Makefile. +# +# Setting the +target_prefix+ will, in turn, install the generated binary in +# a directory under your Config::CONFIG['sitearchdir'] that mimics your local +# filesystem when you run 'make install'. +# +# For example, given the following file tree: +# +# ext/ +# extconf.rb +# test/ +# foo.c +# +# And given the following code: +# +# create_makefile('test/foo', 'test') +# +# That will set the +target_prefix+ in the generated Makefile to 'test'. That, +# in turn, will create the following file tree when installed via the +# 'make install' command: +# +# /path/to/ruby/sitearchdir/test/foo.so +# +# It is recommended that you use this approach to generate your makefiles, +# instead of copying files around manually, because some third party +# libraries may depend on the +target_prefix+ being set properly. +# def create_makefile(target, srcprefix = nil) $target = target libpath = $DEFLIBPATH|$LIBPATH -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml