summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-19 13:34:00 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-19 13:34:00 +0000
commitb99461f98ad8cb0b614d89021f85407315f085d1 (patch)
treef70f1ea7a45c62c5cb305b8393d595526d35fe2a
parentf1620182c060dd5bc97c1b30c484a13a04c50f05 (diff)
merges r23035 from trunk into ruby_1_9_1.
-- * enc/depend (link_so): replaces $(TARGET) with basename of the target. [ruby-talk:330286] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@23222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--enc/depend11
2 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 874450571..9d3638fa4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Mar 23 06:51:16 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * enc/depend (link_so): replaces $(TARGET) with basename of the
+ target. [ruby-talk:330286]
+
Wed Mar 18 02:41:33 2009 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
* lib/drb/drb.rb (open_server_inaddr_any): fixed multiple network
diff --git a/enc/depend b/enc/depend
index b3c8f01f0..91a3265e3 100644
--- a/enc/depend
+++ b/enc/depend
@@ -1,3 +1,5 @@
+% CONFIG["DLDFLAGS"].sub!(/(\A|\s)(-\S+(?:\s*\w*)?\$\(TARGET\)\S*)/, '\1')
+% dldflags = $2
% enable_shared = CONFIG['ENABLE_SHARED'] == 'yes'
% deffile = (true if /\$\(DEFFILE\)/ =~ CONFIG["LINK_SO"])
% encs = Dir.open($srcdir) {|d| d.grep(/.+\.c\z/)} - BUILTIN_ENCS
@@ -102,12 +104,17 @@ $(TRANSOBJS): ruby.h intern.h config.h defines.h missing.h encoding.h oniguruma.
% obj = "enc/#{e}.$(OBJEXT)"
% df = ("enc/#{e}.def" if deffile)
$(ENCSODIR)/<%=e%>.$(DLEXT): <%=obj%>
+% cmd = link_so.sub(/\$\(OBJS\)/) {obj}
+% base = File.basename(e)
+% cmd.sub!(/(?=\$\(DLDFLAGS\))/) {dldflags.sub(/\$\(TARGET\)/) {base} + " "} if dldflags
% if df
echo> <%=df%> EXPORTS
- echo>> <%=df%> <%=EXPORT_PREFIX%>Init_<%=File.basename(e)%>
+ echo>> <%=df%> <%=EXPORT_PREFIX%>Init_<%=base%>
+% cmd.sub!(/\$\(DEFFILE\)/) {df}
+% cmd.gsub!(/-(?:implib|pdb):/) {|s|"#{s}enc/#{e.sub(/[^\/]+\z/, '')}"}
% end
@$(MAKEDIRS) "$(@D)"
- <%=link_so.sub(/\$\(OBJS\)/) {obj}.sub(/\$\(DEFFILE\)/) {df}.gsub(/-(?:implib|pdb):/) {|s|"#{s}enc/#{e.sub(/[^\/]+\z/, '')}"}%>
+ <%=cmd%>
% end
% dependencies.each do |e|