Do not configure for clean tasks when not yet configured - close #158
This commit is contained in:
1 parent
1bf1c30242
commit
b3df37e9ea
3 files changed
+40
-3
No files matched your search
@@ -81,8 +81,10 @@ module Rscons
|
||||
end
|
||||
end
|
||||
@script = Script.new
|
||||
@script.load(rsconscript)
|
||||
enable_variants
|
||||
if should_load_script
|
||||
@script.load(rsconscript)
|
||||
enable_variants
|
||||
end
|
||||
if show_tasks
|
||||
show_script_tasks(all_tasks)
|
||||
return 0
|
||||
@@ -170,8 +172,8 @@ module Rscons
|
||||
def distclean
|
||||
cache = Cache.instance
|
||||
clean
|
||||
FileUtils.rm_rf(@build_dir)
|
||||
cache.clear
|
||||
FileUtils.rm_rf(@build_dir)
|
||||
end
|
||||
|
||||
# Check if the project needs to be configured.
|
||||
@@ -394,6 +396,13 @@ module Rscons
|
||||
end
|
||||
end
|
||||
|
||||
def should_load_script
|
||||
return true if @tasks_and_params.empty?
|
||||
return true if Cache.instance["configuration_data"]["configured"]
|
||||
return false if (@tasks_and_params.keys - %w[distclean clean uninstall]).empty?
|
||||
true
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user