[前][次][番号順一覧][スレッド一覧]

ruby-changes:45510

From: nobu <ko1@a...>
Date: Thu, 9 Feb 2017 21:09:00 +0900 (JST)
Subject: [ruby-changes:45510] nobu:r57583 (trunk): fiddle: jobserver for libffi

nobu	2017-02-09 21:08:56 +0900 (Thu, 09 Feb 2017)

  New Revision: 57583

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57583

  Log:
    fiddle: jobserver for libffi
    
    * ext/fiddle/depend (libffi): use $(MAKE) explicitly for recursive
      make, so that jobserver works.

  Modified files:
    trunk/ext/fiddle/depend
    trunk/ext/fiddle/extconf.rb
Index: ext/fiddle/depend
===================================================================
--- ext/fiddle/depend	(revision 57582)
+++ ext/fiddle/depend	(revision 57583)
@@ -26,22 +26,29 @@ $(LIBFFI_DIR)/Makefile: https://github.com/ruby/ruby/blob/trunk/ext/fiddle/depend#L26
 	$(Q) $(CONFIGURE_LIBFFI)
 
 build-libffi: $(LIBFFI_A)
-build-libffi $(LIBFFI_A):
-	$(Q) $(SUBMAKE_LIBFFI)
+$(LIBFFI_A):
+	$(Q) $(SUBMAKE_PRE) $(MAKE) $(SUBMAKE_ARG)
 
+clean-none:
 clean-libffi:
-	$(Q) $(SUBMAKE_LIBFFI) clean
+libffi/clean: libffi/clean
+	$(Q) $(SUBMAKE_PRE) $(MAKE) $(SUBMAKE_ARG) clean
 
-distclean-libffi:
-	$(Q) $(SUBMAKE_LIBFFI) distclean
+distclean-none:
+distclean-libffi: libffi/distclean
+libffi/distclean:
+	$(Q) $(SUBMAKE_PRE) $(MAKE) $(SUBMAKE_ARG) distclean
 	$(Q) $(RM) $(LIBFFI_DIR)/local.exp
 	$(Q) $(RUBY) -rfileutils -e "FileUtils.rmdir(Dir.glob(ARGV[0]+'/**/{,.*/}'), :parents=>true)" $(LIBFFI_DIR)
 
-realclean-libffi:
+realclean-none:
+realclean-libffi: libffi/realclean
+libffi/realclean:
 	$(Q) $(RMALL) $(LIBFFI_DIR)
 
 .PHONY: clean-libffi distclean-libffi realclean-libffi
 .PHONY: clean-none distclean-none realclean-none
+.PHONY: libffi/clean libffi/distclean libffi/realclean
 
 clean: clean-$(LIBFFI_CLEAN)
 distclean: distclean-$(LIBFFI_CLEAN)
Index: ext/fiddle/extconf.rb
===================================================================
--- ext/fiddle/extconf.rb	(revision 57582)
+++ ext/fiddle/extconf.rb	(revision 57583)
@@ -149,9 +149,9 @@ create_makefile 'fiddle' do |conf| https://github.com/ruby/ruby/blob/trunk/ext/fiddle/extconf.rb#L149
   if !libffi
     next conf << "LIBFFI_CLEAN = none\n"
   elsif $gnumake && !$nmake
-    submake = "$(MAKE) -C $(LIBFFI_DIR)\n"
+    submake_arg = "-C $(@D)\n"
   else
-    submake = "cd $(LIBFFI_DIR) && \\\n\t\t" << "#{config_string("exec")} $(MAKE)".strip
+    submake_pre = "cd $(@D) && #{config_string("exec")}".strip
   end
   if $nmake
     cmd = "$(RUBY) -C $(LIBFFI_DIR) #{libffi_config} --srcdir=$(LIBFFI_SRCDIR)"
@@ -170,7 +170,8 @@ create_makefile 'fiddle' do |conf| https://github.com/ruby/ruby/blob/trunk/ext/fiddle/extconf.rb#L170
    LIBFFI_CFLAGS = #{libffi.cflags}
    LIBFFI_LDFLAGS = #{libffi.ldflags}
    FFI_H = $(LIBFFI_DIR)/include/ffi.h
-   SUBMAKE_LIBFFI = #{submake}
+   SUBMAKE_PRE = #{submake_pre}
+   SUBMAKE_ARG = #{submake_arg}
    LIBFFI_CLEAN = libffi
   MK
 end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]