ruby-changes:50333
From: nobu <ko1@a...>
Date: Sat, 17 Feb 2018 14:52:27 +0900 (JST)
Subject: [ruby-changes:50333] nobu:r62448 (trunk): LIBRUBY_A with exts
nobu 2018-02-17 14:52:21 +0900 (Sat, 17 Feb 2018) New Revision: 62448 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62448 Log: LIBRUBY_A with exts * Makefile.in, win32/Makefile.sub (LIBRUBY_A): link with extension libraries if EXTSTATIC is set, so that static-ruby would work too. Modified files: trunk/Makefile.in trunk/common.mk trunk/win32/Makefile.sub Index: common.mk =================================================================== --- common.mk (revision 62447) +++ common.mk (revision 62448) @@ -322,7 +322,7 @@ $(PROGRAM) $(WPROGRAM): $(LIBRUBY) $(MAI https://github.com/ruby/ruby/blob/trunk/common.mk#L322 $(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 > $@ Index: win32/Makefile.sub =================================================================== --- win32/Makefile.sub (revision 62447) +++ win32/Makefile.sub (revision 62448) @@ -1064,6 +1064,9 @@ PRE_LIBRUBY_UPDATE = https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L1064 !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) https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L1076 $(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) \ Index: Makefile.in =================================================================== --- Makefile.in (revision 62447) +++ Makefile.in (revision 62448) @@ -248,6 +248,7 @@ PRE_LIBRUBY_UPDATE = [ -n "$(LIBRUBY_SO_ https://github.com/ruby/ruby/blob/trunk/Makefile.in#L248 # 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) https://github.com/ruby/ruby/blob/trunk/Makefile.in#L259 @$(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): https://github.com/ruby/ruby/blob/trunk/Makefile.in#L269 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/