summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--ext/extmk.rb2
-rw-r--r--lib/mkmf.rb11
3 files changed, 19 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index c295a19c64..c931b63150 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 02:42:10 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* bignum.c (big2str_find_n1): removed extraneous element.
diff --git a/ext/extmk.rb b/ext/extmk.rb
index a237efdeab..898f8601c3 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 40fadb7958..9f450ad6e1 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -1208,7 +1208,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']}
LDSHAREDXX = #{config_string('LDSHAREDXX') || '$(LDSHARED)'}
AR = #{CONFIG['AR']}
@@ -1405,11 +1408,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'))
@@ -1426,6 +1429,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")