diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-22 21:51:18 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-22 21:51:18 +0000 |
| commit | 403d91a99aa63f9e8e037a4c97fe07886a00b4a2 (patch) | |
| tree | 15ced240be27475c70a6645645580817ee9df3fe /enc/depend | |
| parent | 5e801a856fb8f1ff7c0cbf35f40fed10cc742571 (diff) | |
| download | ruby-403d91a99aa63f9e8e037a4c97fe07886a00b4a2.tar.gz ruby-403d91a99aa63f9e8e037a4c97fe07886a00b4a2.tar.xz ruby-403d91a99aa63f9e8e037a4c97fe07886a00b4a2.zip | |
* enc/depend (link_so): replaces $(TARGET) with basename of the
target. [ruby-talk:330286]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/depend')
| -rw-r--r-- | enc/depend | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/enc/depend b/enc/depend index f5aa76ef7..7186179ef 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 @@ -103,12 +105,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| |
