implement distclean operation - close #81
This commit is contained in:
1 parent
93ffed2eb2
commit
a98c111cd2
3 files changed
+37
No files matched your search
@@ -51,6 +51,8 @@ module Rscons
|
||||
clean
|
||||
when "configure"
|
||||
configure(operation_options)
|
||||
when "distclean"
|
||||
distclean
|
||||
else
|
||||
$stderr.puts "Unknown operation: #{operation}"
|
||||
1
|
||||
@@ -100,6 +102,19 @@ module Rscons
|
||||
0
|
||||
end
|
||||
|
||||
# Remove the build directory and clear the cache.
|
||||
#
|
||||
# @return [Integer]
|
||||
# Exit code.
|
||||
def distclean
|
||||
cache = Cache.instance
|
||||
build_dir = cache.configuration_data["build_dir"]
|
||||
clean
|
||||
FileUtils.rm_rf(build_dir)
|
||||
cache.clear
|
||||
0
|
||||
end
|
||||
|
||||
# Configure the project.
|
||||
#
|
||||
# @param options [Hash]
|
||||
|
||||
Reference in new issue
Block a user