summaryrefslogtreecommitdiff
path: root/common.mk
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
commitc9710f3bebfa3339811a2b7b4087839060526eaf (patch)
tree436e04d283e96b9b815610f2bd41508dcfaa29af /common.mk
parentb4c9aa8e828bbc4b23dd5c0eb91911b6218952db (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/branches/ruby_1_8@11060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk11
1 files changed, 9 insertions, 2 deletions
diff --git a/common.mk b/common.mk
index e379ad5..d32f790 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)
@@ -61,6 +62,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)
@@ -71,7 +75,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) $@
@@ -241,7 +248,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