зеркало из https://github.com/github/ruby.git
* ext/extmk.rb.in: support multi-level ext/ directories.
(e.g. you can have ext/foo, ext/foo/bar and ext/foo/baz) * ext/.cvsignore: let cvs ignore extinit.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
9cf764b8ff
Коммит
6ecd6fe37b
|
@ -1,3 +1,12 @@
|
||||||
|
Sat Jul 14 02:56:19 2001 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
|
* ext/extmk.rb.in: support multi-level ext/ directories.
|
||||||
|
(e.g. you can have ext/foo, ext/foo/bar and ext/foo/baz)
|
||||||
|
|
||||||
|
Sat Jul 14 02:55:02 2001 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
|
* ext/.cvsignore: let cvs ignore extinit.c.
|
||||||
|
|
||||||
Fri Jul 13 22:26:09 2001 Akinori MUSHA <knu@iDaemons.org>
|
Fri Jul 13 22:26:09 2001 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
* lib/mkmf.rb: use File::split to split a target into a prefix and
|
* lib/mkmf.rb: use File::split to split a target into a prefix and
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
|
extinit.c
|
||||||
extmk.log
|
extmk.log
|
||||||
extmk.rb
|
extmk.rb
|
||||||
|
|
|
@ -174,10 +174,10 @@ def install_rb(mfile, srcdir = nil)
|
||||||
end
|
end
|
||||||
for f in dir
|
for f in dir
|
||||||
next if f == "."
|
next if f == "."
|
||||||
mfile.printf "\t@$(RUBY) -r ftools -e 'File::makedirs(*ARGV)' $(DESTDIR)$(pkglibdir)/%s\n", f
|
mfile.printf "\t@$(RUBY) -r ftools -e 'File::makedirs(*ARGV)' $(DESTDIR)$(pkglibdir)$(target_prefix)/%s\n", f
|
||||||
end
|
end
|
||||||
for f in path
|
for f in path
|
||||||
mfile.printf "\t@$(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0644, true)' $(srcdir)/lib/%s $(DESTDIR)$(pkglibdir)/%s\n", f, f
|
mfile.printf "\t@$(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0644, true)' $(srcdir)/lib/%s $(DESTDIR)$(pkglibdir)$(target_prefix)/%s\n", f, f
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -436,6 +436,7 @@ libdir = @libdir@
|
||||||
#pkglibdir = $(libdir)/$(RUBY_INSTALL_NAME)/@MAJOR@.@MINOR@
|
#pkglibdir = $(libdir)/$(RUBY_INSTALL_NAME)/@MAJOR@.@MINOR@
|
||||||
pkglibdir = $(libdir)/ruby/@MAJOR@.@MINOR@
|
pkglibdir = $(libdir)/ruby/@MAJOR@.@MINOR@
|
||||||
archdir = $(pkglibdir)/@arch@
|
archdir = $(pkglibdir)/@arch@
|
||||||
|
target_prefix = #{target_prefix}
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
#### End of system configuration section. ####
|
#### End of system configuration section. ####
|
||||||
|
@ -491,11 +492,12 @@ EOS
|
||||||
mfile.printf <<EOS
|
mfile.printf <<EOS
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@$(RUBY) -r ftools -e 'File::makedirs(*ARGV)' $(DESTDIR)$(libdir) $(DESTDIR)$(pkglibdir) $(DESTDIR)$(archdir)
|
@$(RUBY) -r ftools -e 'File::makedirs(*ARGV)' $(DESTDIR)$(libdir) $(DESTDIR)$(pkglibdir) $(DESTDIR)$(archdir)$(target_prefix)
|
||||||
|
|
||||||
EOS
|
EOS
|
||||||
unless $static
|
unless $static
|
||||||
mfile.printf "\
|
mfile.printf "\
|
||||||
@$(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0555, true)' $(DLLIB) $(DESTDIR)$(archdir)/$(DLLIB)
|
@$(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0555, true)' $(DLLIB) $(DESTDIR)$(archdir)$(target_prefix)/$(DLLIB)
|
||||||
"
|
"
|
||||||
end
|
end
|
||||||
install_rb(mfile, $srcdir)
|
install_rb(mfile, $srcdir)
|
||||||
|
@ -624,6 +626,7 @@ def extmake(target)
|
||||||
dir_config("opt")
|
dir_config("opt")
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
dir = Dir.pwd
|
||||||
Dir.mkdir target unless File.directory?(target)
|
Dir.mkdir target unless File.directory?(target)
|
||||||
Dir.chdir target
|
Dir.chdir target
|
||||||
$target = target
|
$target = target
|
||||||
|
@ -648,7 +651,7 @@ def extmake(target)
|
||||||
end
|
end
|
||||||
if File.exist?("./Makefile")
|
if File.exist?("./Makefile")
|
||||||
if $static
|
if $static
|
||||||
$extlist.push [$static,$target]
|
$extlist.push [$static, File.basename($target)]
|
||||||
end
|
end
|
||||||
if $install
|
if $install
|
||||||
system "#{$make} install DESTDIR=#{$destdir}"
|
system "#{$make} install DESTDIR=#{$destdir}"
|
||||||
|
@ -670,7 +673,7 @@ def extmake(target)
|
||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
rm_f "conftest*"
|
rm_f "conftest*"
|
||||||
Dir.chdir ".."
|
Dir.chdir dir
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -699,11 +702,12 @@ for setup in ["@setup@", "#{$top_srcdir}/ext/@setup@"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for d in Dir["#{$top_srcdir}/ext/*"]
|
ext_prefix = "#{$top_srcdir}/ext"
|
||||||
|
for d in Dir["#{ext_prefix}/**/*"]
|
||||||
File.directory?(d) || next
|
File.directory?(d) || next
|
||||||
File.file?(d + "/MANIFEST") || next
|
File.file?(d + "/MANIFEST") || next
|
||||||
|
|
||||||
d = File.basename(d)
|
d.slice!(0, ext_prefix.length + 1)
|
||||||
if $install
|
if $install
|
||||||
print "installing ", d, "\n"
|
print "installing ", d, "\n"
|
||||||
elsif $clean
|
elsif $clean
|
||||||
|
@ -734,7 +738,7 @@ if $extlist.size > 0
|
||||||
$extinit += format("\
|
$extinit += format("\
|
||||||
\tInit_%s();\n\
|
\tInit_%s();\n\
|
||||||
\trb_provide(\"%s.so\");\n\
|
\trb_provide(\"%s.so\");\n\
|
||||||
", t, t)
|
", t, s)
|
||||||
$extobjs += "ext/"
|
$extobjs += "ext/"
|
||||||
$extobjs += f
|
$extobjs += f
|
||||||
$extobjs += " "
|
$extobjs += " "
|
||||||
|
|
Загрузка…
Ссылка в новой задаче