support phony targets - close #25

This commit is contained in:
josh committed 2015-02-15 18:29:33 -05:00
1 parent 7698fbf618
commit 7a04bec2ff
5 files changed
+85 -14

No files matched your search

+4 -2
View File
@@ -87,8 +87,10 @@ module Rscons
# The name of the target on success or false on failure.
def standard_build(short_cmd_string, target, command, sources, env, cache)
unless cache.up_to_date?(target, command, sources, env)
cache.mkdir_p(File.dirname(target))
FileUtils.rm_f(target)
unless Rscons.phony_target?(target)
cache.mkdir_p(File.dirname(target))
FileUtils.rm_f(target)
end
return false unless env.execute(short_cmd_string, command)
cache.register_build(target, command, sources, env)
end