diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-07-13 18:02:10 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-07-13 18:02:10 +0000 |
commit | 6ecd6fe37bf6395850d3825bab3fb88d5d345c82 (patch) | |
tree | 6a8f662c6d95b95b08903131d1d4f7da63a0df61 /ext/extmk.rb.in | |
parent | 9cf764b8ffa5154393fd61b0f5619cb944a7fb01 (diff) | |
download | ruby-6ecd6fe37bf6395850d3825bab3fb88d5d345c82.tar.gz |
* 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
Diffstat (limited to 'ext/extmk.rb.in')
-rw-r--r-- | ext/extmk.rb.in | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index adbc350b80..53cb46ae17 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -174,10 +174,10 @@ def install_rb(mfile, srcdir = nil) end for f in dir 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 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 @@ -436,6 +436,7 @@ libdir = @libdir@ #pkglibdir = $(libdir)/$(RUBY_INSTALL_NAME)/@MAJOR@.@MINOR@ pkglibdir = $(libdir)/ruby/@MAJOR@.@MINOR@ archdir = $(pkglibdir)/@arch@ +target_prefix = #{target_prefix} @SET_MAKE@ #### End of system configuration section. #### @@ -491,11 +492,12 @@ EOS mfile.printf <<EOS 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 unless $static 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 install_rb(mfile, $srcdir) @@ -624,6 +626,7 @@ def extmake(target) dir_config("opt") begin + dir = Dir.pwd Dir.mkdir target unless File.directory?(target) Dir.chdir target $target = target @@ -648,7 +651,7 @@ def extmake(target) end if File.exist?("./Makefile") if $static - $extlist.push [$static,$target] + $extlist.push [$static, File.basename($target)] end if $install system "#{$make} install DESTDIR=#{$destdir}" @@ -670,7 +673,7 @@ def extmake(target) end ensure rm_f "conftest*" - Dir.chdir ".." + Dir.chdir dir end end @@ -699,11 +702,12 @@ for setup in ["@setup@", "#{$top_srcdir}/ext/@setup@"] 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.file?(d + "/MANIFEST") || next - d = File.basename(d) + d.slice!(0, ext_prefix.length + 1) if $install print "installing ", d, "\n" elsif $clean @@ -734,7 +738,7 @@ if $extlist.size > 0 $extinit += format("\ \tInit_%s();\n\ \trb_provide(\"%s.so\");\n\ -", t, t) +", t, s) $extobjs += "ext/" $extobjs += f $extobjs += " " |