mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-22 20:18:57 +08:00
[Vendor] Always clean all build dirs, including actual object files.
No need to do it differently for different types of vendoring.
This commit is contained in:
2
NEWS
2
NEWS
@@ -14,6 +14,8 @@
|
||||
Kazuhiro NISHIYAMA for the detective work.
|
||||
* Fixed a bug where a boxed struct would incorrectly be interpreted as a
|
||||
object type, leading to the dispatcher not recognizing a signature.
|
||||
* Fixed a bug where compiled object files of a vendored project were not
|
||||
actually being cleaned when running `rake clean.
|
||||
|
||||
= RubyMotion 2.10 =
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ module Motion; module Project;
|
||||
class Vendor
|
||||
include Rake::DSL if Rake.const_defined?(:DSL)
|
||||
|
||||
XcodeBuildDir = '.build'
|
||||
|
||||
def initialize(path, type, config, opts)
|
||||
@path = path.to_s
|
||||
@type = type
|
||||
@@ -45,7 +47,13 @@ module Motion; module Project;
|
||||
end
|
||||
|
||||
def clean
|
||||
send gen_method('clean')
|
||||
[XcodeBuildDir, 'build', 'build-iPhoneSimulator', 'build-iPhoneOS'].each do |build_dir|
|
||||
build_dir = File.join(@path, build_dir)
|
||||
if File.exist?(build_dir)
|
||||
App.info 'Delete', build_dir
|
||||
FileUtils.rm_rf build_dir
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def build_static(platform, opts)
|
||||
@@ -132,17 +140,6 @@ EOS
|
||||
end
|
||||
end
|
||||
|
||||
def clean_static
|
||||
['iPhoneSimulator', 'iPhoneOS'].each do |platform|
|
||||
build_dir = File.join(@path, "build-#{platform}")
|
||||
if File.exist?(build_dir)
|
||||
App.info 'Delete', build_dir
|
||||
FileUtils.rm_rf build_dir
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
XcodeBuildDir = '.build'
|
||||
def build_xcode(platform, opts)
|
||||
Dir.chdir(@path) do
|
||||
build_dir = "build-#{platform}"
|
||||
@@ -207,12 +204,6 @@ EOS
|
||||
end
|
||||
end
|
||||
|
||||
def clean_xcode
|
||||
Dir.chdir(@path) do
|
||||
[XcodeBuildDir, 'build-iPhoneOS', 'build-iPhoneSimulator'].each { |x| rm_rf x }
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def gen_method(prefix)
|
||||
|
||||
Reference in New Issue
Block a user