diff --git a/ChangeLog b/ChangeLog index f04764cade..deb1cf17b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Sep 3 01:54:20 2004 Nobuyoshi Nakada + + * ext/extmk.rb (extmake): extact target prefix from Makefiles. + + * ext/extmk.rb: already built-in libraries satisfy dependencies. + [ruby-dev:24028] + Wed Sep 1 21:16:50 2004 Hirokazu Yamamoto * ext/tk/lib/tk/spinbox.rb: fix typo diff --git a/ext/extmk.rb b/ext/extmk.rb index 7d49f49e39..c41354bf46 100644 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -103,7 +103,11 @@ def extmake(target) else if $static m = File.read(makefile) - $target = m[/^TARGET[ \s]*=[ \s]*(\S*)/, 1] or $static = nil + if !($target = m[/^TARGET[ \t]*=[ \t]*(\S*)/, 1]) + $static = nil + elsif target_prefix = m[/^target_prefix[ \t]*=[ \t]*\/(.*)/, 1] + $target = "#{target_prefix}/#{$target}" + end /^STATIC_LIB[ \t]*=[ \t]*\S+/ =~ m or $static = nil $preload = Shellwords.shellwords(m[/^preload[ \t]*=[ \t]*(.*)/, 1] || "") $DLDFLAGS += " " + (m[/^DLDFLAGS[ \t]*=[ \t]*(.*)/, 1] || "") @@ -353,9 +357,10 @@ if $extlist.size > 0 $extinit ||= "" $extobjs ||= "" list = $extlist.dup + built = [] while e = list.shift s,t,i,r = e - if r and !r.empty? + if r and !(r -= built).empty? l = list.size if (while l > 0; break true if r.include?(list[l-=1][1]) end) list.insert(l + 1, e) @@ -366,6 +371,7 @@ if $extlist.size > 0 if File.exist?(f) $extinit += "\tinit(Init_#{i}, \"#{t}.so\");\n" $extobjs += "ext/#{f} " + built << t end end