summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in6
-rw-r--r--common.mk2
-rw-r--r--win32/Makefile.sub5
3 files changed, 11 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index aaabcb8bc30..3781d1ac3fd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -248,6 +248,7 @@ PRE_LIBRUBY_UPDATE = [ -n "$(LIBRUBY_SO_UPDATE)" ] || $(exec) $(RM) $(LIBRUBY_EX
# supported.
$(LIBRUBY_A):
@$(RM) $@
+ @-[ -z "$(EXTSTATIC)" ] || $(PRE_LIBRUBY_UPDATE)
$(ECHO) linking static-library $@
$(Q) $(AR) $(ARFLAGS) $@ $(LIBRUBY_A_OBJS) $(INITOBJS)
@-$(RANLIB) $@ 2> /dev/null || true
@@ -258,7 +259,7 @@ verify-static-library: $(LIBRUBY_A)
@$(RMALL) conftest$(EXEEXT) conftest.c conftest.dSYM
$(LIBRUBY_SO):
- @-$(PRE_LIBRUBY_UPDATE)
+ @-[ -n "$(EXTSTATIC)" ] || $(PRE_LIBRUBY_UPDATE)
$(ECHO) linking shared-library $@
$(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(EXTSOLIBS) $(OUTFLAG)$@
-$(Q) $(OBJCOPY) -w -L '$(SYMBOL_PREFIX)Init_*' -L '$(SYMBOL_PREFIX)ruby_static_id_*' \
@@ -268,6 +269,9 @@ $(LIBRUBY_SO):
File.symlink "$(LIBRUBY_SO)", link}' \
$(LIBRUBY_ALIASES) || true
+LIBRUBY_WITH_EXT = @LIBRUBY_WITH_EXT@
+$(LIBRUBY_$(LIBRUBY_WITH_EXT)): $(LIBRUBY_SO_UPDATE)
+
ruby_pc = @ruby_pc@
$(ruby_pc):
@./config.status --file=$@:$(srcdir)/template/ruby.pc.in
diff --git a/common.mk b/common.mk
index 5a083dfead2..9deb8cb3dde 100644
--- a/common.mk
+++ b/common.mk
@@ -322,7 +322,7 @@ $(PROGRAM) $(WPROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SETUP) $(PREP
$(LIBRUBY_A): $(LIBRUBY_A_OBJS) $(MAINOBJ) $(INITOBJS) $(ARCHFILE)
-$(LIBRUBY_SO): $(OBJS) $(DLDOBJS) $(LIBRUBY_A) $(PREP) $(LIBRUBY_SO_UPDATE) $(BUILTIN_ENCOBJS)
+$(LIBRUBY_SO): $(OBJS) $(DLDOBJS) $(LIBRUBY_A) $(PREP) $(BUILTIN_ENCOBJS)
$(LIBRUBY_EXTS):
@exit > $@
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 9ac87ab6e39..6cfb917acb9 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -1064,6 +1064,9 @@ PRE_LIBRUBY_UPDATE =
!endif
$(LIBRUBY_A): $(OBJS) $(INITOBJS)
+!if "$(EXTSTATIC)" != ""
+ @-$(PRE_LIBRUBY_UPDATE)
+!endif
$(ECHO) linking static-library $(@:\=/)
$(Q) $(AR) $(ARFLAGS)$@ $(OBJS) $(INITOBJS)
@@ -1073,7 +1076,9 @@ $(LIBRUBY): $(RUBYDEF)
$(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
@echo $(DLDOBJS)
+!if "$(EXTSTATIC)" == ""
@-$(PRE_LIBRUBY_UPDATE)
+!endif
$(ECHO) linking shared-library $(@:\=/)
$(Q) $(LDSHARED) $(MAINOBJ) $(DLDOBJS) $(LIBRUBY_A) \
$(RUBY_SO_NAME).res $(SOLIBS) $(EXTSOLIBS) $(LIBS) -Fe$@ -link $(LDFLAGS) \