diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-09 12:08:56 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-09 12:08:56 +0000 |
commit | 3c06d3a6bd2051fb2c321e04291951ae8df127bc (patch) | |
tree | 52bb3121bef8c689cf29bd89648610e2f0daed9f | |
parent | f2e1c710fc3796b14bae35d8cd2b212f04c00c50 (diff) | |
download | ruby-3c06d3a6bd2051fb2c321e04291951ae8df127bc.tar.gz |
fiddle: jobserver for libffi
* ext/fiddle/depend (libffi): use $(MAKE) explicitly for recursive
make, so that jobserver works.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ext/fiddle/depend | 19 | ||||
-rw-r--r-- | ext/fiddle/extconf.rb | 7 |
2 files changed, 17 insertions, 9 deletions
diff --git a/ext/fiddle/depend b/ext/fiddle/depend index 470e15efef..7e00a6e429 100644 --- a/ext/fiddle/depend +++ b/ext/fiddle/depend @@ -26,22 +26,29 @@ $(LIBFFI_DIR)/Makefile: $(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) diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb index 0359355193..43d3053a48 100644 --- a/ext/fiddle/extconf.rb +++ b/ext/fiddle/extconf.rb @@ -149,9 +149,9 @@ create_makefile 'fiddle' do |conf| 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| 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 |