lib/rake.rb in drake-0.8.2.1.0.9 vs lib/rake.rb in drake-0.8.2.1.0.10
- old
+ new
@@ -27,11 +27,11 @@
#
# This is the main file for the Rake application. Normally it is referenced
# as a library via a require statement, but it can be distributed
# independently as an application.
-RAKEVERSION = '0.8.2.1.0.9'
+RAKEVERSION = '0.8.2.1.0.10'
require 'rbconfig'
require 'getoptlong'
require 'fileutils'
require 'singleton'
@@ -396,10 +396,12 @@
def initialize(value, tail)
@value = value
@tail = tail
end
+ attr_reader :value # :nodoc:
+
def member?(obj)
@value == obj || @tail.member?(obj)
end
def append(value)
@@ -612,9 +614,23 @@
if application.num_threads == 1
execute(task_args)
else
# gather tasks for batch execution
application.parallel_tasks[name] = [task_args, prereqs]
+
+ #
+ # Since this is a dry run, parents must be manually marked
+ # as needed. Files are not created or modified, so the
+ # the 'needed?' flag does not propagate.
+ #
+ unless invocation_chain == InvocationChain::EMPTY or
+ invocation_chain.value.needed?
+ invocation_chain.value.instance_eval {
+ def needed?
+ true
+ end
+ }
+ end
end
end
end
end
protected :invoke_with_call_chain