summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-04-26 09:42:44 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-04-26 09:42:44 +0000
commite67e5adf4e33b79c3bc2f2c8a8b4a790a88adcf2 (patch)
tree6ef7eae93ed8a768a02dee1baa8ba80a4425b5e0 /ext
parentf6e04e38cd1f121111d388865e8b201ea3402452 (diff)
aix shlib link
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/aix_mksym.rb35
-rw-r--r--ext/extmk.rb.in37
-rw-r--r--ext/tk/lib/tktext.rb4
3 files changed, 59 insertions, 17 deletions
diff --git a/ext/aix_mksym.rb b/ext/aix_mksym.rb
new file mode 100644
index 0000000000..ae7cf4e5d1
--- /dev/null
+++ b/ext/aix_mksym.rb
@@ -0,0 +1,35 @@
+
+def uniq(data)
+ last=nil
+ data.delete_if do |name|
+ if last == name
+ TRUE
+ else
+ last = name
+ FALSE
+ end
+ end
+end
+
+def extract(nm, out)
+ data = nm.readlines.collect{|line|
+ line = line.split
+ case line[1]
+ when "B", "D"
+ line[0]
+ else
+ next
+ end
+ }.compact!.sort!
+ uniq(data)
+ exp = open(out, "w")
+ exp.printf "#!\n"
+ for line in data
+ exp.printf "%s\n", line
+ end
+ exp.close
+ nm.close
+end
+if older("../ruby.imp", "../miniruby")
+ extract(open("|/usr/ccs/bin/nm -p ../*.o"), "../ruby.imp")
+end
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 3d77dd3b03..3e6c602d1e 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -1,7 +1,6 @@
#! /usr/local/bin/ruby
$".push 'mkmf.rb' #"
-load '@top_srcdir@/lib/find.rb'
if ARGV[0] == 'static'
$force_static = TRUE
@@ -31,6 +30,9 @@ if $topdir !~ "^/"
# get absolute path
$topdir = File.expand_path($topdir)
end
+$ruby_inc = "@top_srcdir@"
+
+load '@top_srcdir@/lib/find.rb'
## drive letter
if PLATFORM == "i386-os2_emx" then
@@ -302,6 +304,7 @@ libdir = @libdir@
#pkglibdir = $(libdir)/$(RUBY_INSTALL_NAME)/@MAJOR@.@MINOR@
pkglibdir = $(libdir)/ruby/@MAJOR@.@MINOR@
archdir = $(pkglibdir)/@arch@
+ruby_inc = #{$ruby_inc}
@SET_MAKE@
#### End of system configuration section. ####
@@ -322,14 +325,15 @@ archdir = $(pkglibdir)/@arch@
mfile.printf "\n"
mfile.printf <<EOS
-TARGET = #{target}.#{$static ? "a" : "@DLEXT@"}
+TARGET = #{target}
+DLLIB = $(TARGET).#{$static ? "a" : "@DLEXT@"}
INSTALL = #{$dots}@INSTALL@
INSTALL_DATA = @INSTALL_DATA@
binsuffix = @binsuffix@
-all: $(TARGET)
+all: $(DLLIB)
clean:; @rm -f *.o *.a *.so *.sl
@rm -f Makefile extconf.h conftest.*
@@ -347,7 +351,7 @@ install:
EOS
if !$static
mfile.printf "\
- $(INSTALL) $(TARGET) $(DESTDIR)$(archdir)/$(TARGET)
+ $(INSTALL) $(DLLIB) $(DESTDIR)$(archdir)/$(DLLIB)
"
end
install_rb(mfile)
@@ -355,30 +359,30 @@ EOS
if $static
mfile.printf "\
-$(TARGET): $(OBJS)
- @AR@ cru $(TARGET) $(OBJS)
- @-@RANLIB@ $(TARGET) 2> /dev/null || true
+$(DLLIB): $(OBJS)
+ @AR@ cru $(DLLIB) $(OBJS)
+ @-@RANLIB@ $(DLLIB) 2> /dev/null || true
"
elsif "@DLEXT@" != "o"
mfile.printf "\
-$(TARGET): $(OBJS)
- $(LDSHARED) $(DLDFLAGS) -o $(TARGET) $(OBJS) $(LIBS) $(LOCAL_LIBS)
+$(DLLIB): $(OBJS)
+ $(LDSHARED) $(DLDFLAGS) -o $(DLLIB) $(OBJS) $(LIBS) $(LOCAL_LIBS)
"
elsif not File.exist?(target + ".c") and not File.exist?(target + ".cc")
if PLATFORM == "m68k-human"
mfile.printf "\
-$(TARGET): $(OBJS)
- ar cru $(TARGET) $(OBJS)
+$(DLLIB): $(OBJS)
+ ar cru $(DLLIB) $(OBJS)
"
elsif PLATFORM =~ "-nextstep" || PLATFORM =~ "-openstep" || PLATFORM =~ "-rhapsody"
mfile.printf "\
-$(TARGET): $(OBJS)
- cc -r $(CFLAGS) -o $(TARGET) $(OBJS)
+$(DLLIB): $(OBJS)
+ cc -r $(CFLAGS) -o $(DLLIB) $(OBJS)
"
else
mfile.printf "\
-$(TARGET): $(OBJS)
- ld $(DLDFLAGS) -r -o $(TARGET) $(OBJS)
+$(DLLIB): $(OBJS)
+ ld $(DLDFLAGS) -r -o $(DLLIB) $(OBJS)
"
end
end
@@ -493,6 +497,9 @@ for d in Dir["#{$top_srcdir}/ext/*"]
print "cleaning ", d, "\n"
else
print "compiling ", d, "\n"
+ if PLATFORM =~ /ibm-aix/
+ load './aix_mksym.rb'
+ end
end
extmake(d)
end
diff --git a/ext/tk/lib/tktext.rb b/ext/tk/lib/tktext.rb
index 02d5a7f3e0..281435ef69 100644
--- a/ext/tk/lib/tktext.rb
+++ b/ext/tk/lib/tktext.rb
@@ -247,11 +247,11 @@ class TkText<TkTextWin
private :_tag_bind_core
def tag_bind(tag, seq, cmd=Proc.new, args=nil)
- _tag_bind_core('', tag, seq, cmd=Proc.new, args=nil)
+ _tag_bind_core('', tag, seq, cmd, args=nil)
end
def tag_bind_append(tag, seq, cmd=Proc.new, args=nil)
- _tag_bind_core('+', tag, seq, cmd=Proc.new, args=nil)
+ _tag_bind_core('+', tag, seq, cmd, args=nil)
end
def tag_bindinfo(tag, context=nil)