diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-04 00:49:52 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-04 00:49:52 +0000 |
commit | f04daf3bb8696be31ba95fa58630045933ca2057 (patch) | |
tree | 107f589503d368433441b584052e1f4ce9465712 /lib | |
parent | 28a15075c8a9a48569dc45ff5b7ad1886533d153 (diff) |
merge revision(s) 36338: [Backport #6709]
* configure.in (DLDFLAGS): use TARGET_ENTRY to specify an entry point
instead of TARGET which may contain non-identifer characters.
* lib/mkmf.rb (create_makefile): add TARGET_NAME which is the first
part consists of only word characters. [ruby-core:46248][Bug #6709]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@40093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mkmf.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 00323a34f8..a7517615ff 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -1925,7 +1925,7 @@ def create_makefile(target, srcprefix = nil) makedef = %{-pe "$_.sub!(/^(?=\\w)/,'#{EXPORT_PREFIX}') unless 1../^EXPORTS$/i"} end else - makedef = %{-e "puts 'EXPORTS', '#{EXPORT_PREFIX}' + 'Init_$(TARGET)'.sub(/\\..*\\z/,'')"} + makedef = %{-e "puts 'EXPORTS', '$(TARGET_ENTRY)'"} end if makedef $cleanfiles << '$(DEFFILE)' @@ -1969,6 +1969,8 @@ LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS} SRCS = #{srcs.collect(&File.method(:basename)).join(' ')} OBJS = #{$objs.join(" ")} TARGET = #{target} +TARGET_NAME = #{target && target[/\A\w+/]} +TARGET_ENTRY = #{EXPORT_PREFIX || ''}Init_$(TARGET_NAME) DLLIB = #{dllib} EXTSTATIC = #{$static || ""} STATIC_LIB = #{staticlib unless $static.nil?} |