1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

fiddle: clean-libffi

* ext/fiddle/depend (clean-libffi): clean libffi directory.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-12-23 11:33:54 +00:00
parent 802d4f9fb2
commit 276065f870
2 changed files with 21 additions and 2 deletions

View file

@ -25,4 +25,21 @@ build-libffi: $(LIBFFI_A)
build-libffi $(LIBFFI_A):
$(Q) $(SUBMAKE_LIBFFI)
clean-libffi:
$(Q) $(SUBMAKE_LIBFFI) clean
distclean-libffi:
$(Q) $(SUBMAKE_LIBFFI) distclean
$(Q) $(RM) $(LIBFFI_DIR)/local.exp
$(Q) $(RUBY) -rfileutils -e 'FileUtils.rmdir(Dir.glob(ARGV[0]+"/**/"), :parents=>true)' $(LIBFFI_DIR)
realclean-libffi:
$(Q) $(RMDIRS) $(LIBFFI_DIR)
clean-none distclean-none realclean-none:
clean: clean-$(LIBFFI_CLEAN)
distclean: distclean-$(LIBFFI_CLEAN)
realclean: realclean-$(LIBFFI_CLEAN)
configure: configure-libffi

View file

@ -127,8 +127,9 @@ if libffi
$LOCAL_LIBS.prepend("#{libffi.a} ").strip!
end
create_makefile 'fiddle' do |conf|
next conf unless libffi
if $mswin
if !libffi
next conf << "LIBFFI_CLEAN = none\n"
elsif $mswin
submake = "make -C $(LIBFFI_DIR)\n"
elsif $gnumake
submake = "$(MAKE) -C $(LIBFFI_DIR)\n"
@ -148,6 +149,7 @@ create_makefile 'fiddle' do |conf|
LIBFFI_LDFLAGS = #{libffi.ldflags}
FFI_H = $(LIBFFI_DIR)/include/ffi.h
SUBMAKE_LIBFFI = #{submake}
LIBFFI_CLEAN = libffi
MK
end