summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-01 15:00:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-01 15:00:45 +0000
commitb004fa242818626bb581ea7e060ce0ef7b582e1b (patch)
tree0616a23242d4550b050e07c59b1d0378daff51d9
parenteba3d4587f96a113ea0a7792de6eadb56c893b53 (diff)
* Makefile.in, common.mk, ext/extmk.rb, win{32,ce}/Makefile.in: keep
LIBRUBY_SO unless need to be removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--Makefile.in1
-rw-r--r--common.mk11
-rw-r--r--ext/extmk.rb4
-rw-r--r--win32/Makefile.sub1
-rw-r--r--wince/Makefile.sub1
6 files changed, 18 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 418dc9b0f64..801a7d4f107 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Oct 1 23:56:52 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * Makefile.in, common.mk, ext/extmk.rb, win{32,ce}/Makefile.in: keep
+ LIBRUBY_SO unless need to be removed.
+
Sun Oct 1 23:12:19 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/optparse.rb (OptionParser#make_switch): pass arguments directly.
diff --git a/Makefile.in b/Makefile.in
index 1961d502766..ba1c1ac66ef 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -113,6 +113,7 @@ $(LIBRUBY_A):
@-$(RANLIB) $@ 2> /dev/null || true
$(LIBRUBY_SO):
+ @-$(PRE_LIBRUBY_UPDATE)
$(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(OUTFLAG)$@
@-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link if File.exist? link; \
File.symlink "$(LIBRUBY_SO)", link}' \
diff --git a/common.mk b/common.mk
index f6b58b338d2..c837940aa41 100644
--- a/common.mk
+++ b/common.mk
@@ -8,6 +8,7 @@ STATIC_RUBY = static-ruby
EXTCONF = extconf.rb
RBCONFIG = ./.rbconfig.time
+LIBRUBY_EXTS = ./.libruby-with-ext.time
RDOCOUT = $(EXTOUT)/rdoc
DMYEXT = dmyext.$(OBJEXT)
@@ -70,6 +71,9 @@ SCRIPT_ARGS = --dest-dir="$(DESTDIR)" \
EXTMK_ARGS = $(SCRIPT_ARGS) --extension $(EXTS) --extstatic $(EXTSTATIC) --
INSTRUBY_ARGS = $(SCRIPT_ARGS) --installed-list $(INSTALLED_LIST)
+PRE_LIBRUBY_UPDATE = $(MINIRUBY) -e 'ARGV[1] or File.unlink(ARGV[0]) rescue nil' -- \
+ $(LIBRUBY_EXTS) $(LIBRUBY_SO_UPDATE)
+
all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY)
@$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS)
prog: $(PROGRAM) $(WPROGRAM)
@@ -80,7 +84,10 @@ $(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SETUP) $(PREP)
$(LIBRUBY_A): $(OBJS) $(DMYEXT) $(ARCHFILE)
-$(LIBRUBY_SO): $(OBJS) $(DLDOBJS) $(LIBRUBY_A) $(PREP)
+$(LIBRUBY_SO): $(OBJS) $(DLDOBJS) $(LIBRUBY_A) $(PREP) $(LIBRUBY_SO_UPDATE)
+
+$(LIBRUBY_EXTS):
+ @exit > $@
$(STATIC_RUBY)$(EXEEXT): $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A)
@$(RM) $@
@@ -250,7 +257,7 @@ install-prereq:
clean: clean-ext clean-local
clean-local::
@$(RM) $(OBJS) $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY) $(LIBRUBY_ALIASES)
- @$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) $(ARCHFILE)
+ @$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) $(ARCHFILE) .*.time
clean-ext:
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS) clean
diff --git a/ext/extmk.rb b/ext/extmk.rb
index fcd2f101f89..87c284a3eb8 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -471,6 +471,7 @@ void Init_ext _((void))\n{\n char *src;#$extinit}
$extpath.delete("$(topdir)")
$extflags = libpathflag($extpath) << " " << $extflags.strip
conf = [
+ ['LIBRUBY_SO_UPDATE', '$(LIBRUBY_EXTS)'],
['SETUP', $setup],
[enable_config("shared", $enable_shared) ? 'DLDOBJS' : 'EXTOBJS', $extobjs],
['EXTLIBS', $extlibs.join(' ')], ['EXTLDFLAGS', $extflags]
@@ -496,9 +497,6 @@ Dir.chdir ".."
unless $destdir.to_s.empty?
$mflags.defined?("DESTDIR") or $mflags << "DESTDIR=#{$destdir}"
end
-unless $extlist.empty?
- rm_f(Config::CONFIG["LIBRUBY_SO"])
-end
puts "making #{rubies.join(', ')}"
$stdout.flush
$mflags.concat(rubies)
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index c4e2f2c66db..83c635f4a85 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -497,6 +497,7 @@ $(LIBRUBY): $(RUBYDEF)
$(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
@echo. $(DLDOBJS)
+ @-$(PRE_LIBRUBY_UPDATE)
$(LDSHARED) $(MAINOBJ) $(DLDOBJS) $(LIBRUBY_A) \
$(RUBY_SO_NAME).res $(LIBS) -Fe$@ $(LDFLAGS) \
$(LIBRUBY_DLDFLAGS)
diff --git a/wince/Makefile.sub b/wince/Makefile.sub
index a2afe7997ab..e17348c3342 100644
--- a/wince/Makefile.sub
+++ b/wince/Makefile.sub
@@ -444,6 +444,7 @@ $(LIBRUBY): $(RUBYDEF)
$(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
@echo. $(DLDOBJS)
+ @-$(PRE_LIBRUBY_UPDATE)
$(LDSHARED) $(MAINOBJ) $(DLDOBJS) $(LIBRUBY_A) \
$(RUBY_SO_NAME).res $(LIBS) -Fe$@ $(LDFLAGS) \
$(LIBRUBY_DLDFLAGS)