diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | ext/extmk.rb | 2 | ||||
-rw-r--r-- | lib/mkmf.rb | 11 |
3 files changed, 19 insertions, 4 deletions
@@ -1,3 +1,13 @@ +Wed Nov 28 14:43:14 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/extmk.rb (extract_makefile): use dldflags instead of DLDFLAGS to + get rid of mixing $LDFLAGS and $ARCH_FLAG. + + * lib/mkmf.rb (configuration): ditto. + + * lib/mkmf.rb (create_makefile): support for extensions which has no + shared object. + Wed Nov 28 09:51:42 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * bignum.c (rb_big2str0): do not clobber space for sign. diff --git a/ext/extmk.rb b/ext/extmk.rb index a919381adc..06dd2f7c2c 100644 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -79,7 +79,7 @@ def extract_makefile(makefile, keep = true) $static ||= m[/^EXTSTATIC[ \t]*=[ \t]*(\S+)/, 1] || false /^STATIC_LIB[ \t]*=[ \t]*\S+/ =~ m or $static = nil $preload = Shellwords.shellwords(m[/^preload[ \t]*=[ \t]*(.*)/, 1] || "") - $DLDFLAGS += " " + (m[/^DLDFLAGS[ \t]*=[ \t]*(.*)/, 1] || "") + $DLDFLAGS += " " + (m[/^dldflags[ \t]*=[ \t]*(.*)/, 1] || "") if s = m[/^LIBS[ \t]*=[ \t]*(.*)/, 1] s.sub!(/^#{Regexp.quote($LIBRUBYARG)} */, "") s.sub!(/ *#{Regexp.quote($LIBS)}$/, "") diff --git a/lib/mkmf.rb b/lib/mkmf.rb index b90ee9a487..35750b5051 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -1162,7 +1162,10 @@ INCFLAGS = -I. #$INCFLAGS DEFS = #{CONFIG['DEFS']} CPPFLAGS = #{extconf_h}#{$CPPFLAGS} CXXFLAGS = $(CFLAGS) #{CONFIG['CXXFLAGS']} -DLDFLAGS = #$LDFLAGS #$DLDFLAGS #$ARCH_FLAG +ldflags = #{$LDFLAGS} +dldflags = #{$DLDFLAGS} +archflag = #{$ARCH_FLAG} +DLDFLAGS = $(ldflags) $(dldflags) $(archflag) LDSHARED = #{CONFIG['LDSHARED']} AR = #{CONFIG['AR']} EXEEXT = #{CONFIG['EXEEXT']} @@ -1353,11 +1356,11 @@ static: $(STATIC_LIB)#{$extout ? " install-rb" : ""} dirs = [] mfile.print "install: install-so install-rb\n\n" sodir = (dir = "$(RUBYARCHDIR)").dup - mfile.print("install-so: #{dir}\n") + mfile.print("install-so: ") if target f = "$(DLLIB)" dest = "#{dir}/#{f}" - mfile.print "install-so: #{dest}\n" + mfile.puts dir, "install-so: #{dest}" unless $extout mfile.print "#{dest}: #{f}\n" if (sep = config_string('BUILD_FILE_SEPARATOR')) @@ -1374,6 +1377,8 @@ static: $(STATIC_LIB)#{$extout ? " install-rb" : ""} mfile.print "\t@echo #{dir}/#{File.basename(f)}>>$(INSTALLED_LIST)\n" end end + else + mfile.puts "Makefile" end mfile.print("install-rb: pre-install-rb install-rb-default\n") mfile.print("install-rb-default: pre-install-rb-default\n") |