drake 0.8.2.1.0.11 → 0.8.2.1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES.drake +4 -0
- data/lib/rake.rb +21 -12
- metadata +2 -2
data/CHANGES.drake
CHANGED
data/lib/rake.rb
CHANGED
@@ -29,10 +29,9 @@
|
|
29
29
|
# as a library via a require statement, but it can be distributed
|
30
30
|
# independently as an application.
|
31
31
|
|
32
|
-
RAKEVERSION = '0.8.2.1.0.
|
32
|
+
RAKEVERSION = '0.8.2.1.0.12'
|
33
33
|
|
34
34
|
require 'rbconfig'
|
35
|
-
require 'getoptlong'
|
36
35
|
require 'fileutils'
|
37
36
|
require 'singleton'
|
38
37
|
require 'monitor'
|
@@ -581,6 +580,7 @@ module Rake
|
|
581
580
|
end
|
582
581
|
application.parallel_lock.synchronize {
|
583
582
|
application.parallel_tasks.clear
|
583
|
+
application.parallel_parent_flags.clear
|
584
584
|
base_invoke(*args)
|
585
585
|
application.invoke_parallel_tasks
|
586
586
|
}
|
@@ -610,10 +610,21 @@ module Rake
|
|
610
610
|
invoke_prerequisites_parallel(task_args, new_chain)
|
611
611
|
end
|
612
612
|
|
613
|
-
if
|
614
|
-
|
613
|
+
if application.num_threads == 1
|
614
|
+
#
|
615
|
+
# single-threaded mode
|
616
|
+
#
|
617
|
+
if needed?
|
615
618
|
execute(task_args)
|
616
|
-
|
619
|
+
end
|
620
|
+
else
|
621
|
+
#
|
622
|
+
# parallel mode
|
623
|
+
#
|
624
|
+
# Either the task knows it's needed or we've marked it as
|
625
|
+
# such. See next comments.
|
626
|
+
#
|
627
|
+
if application.parallel_parent_flags[self] or needed?
|
617
628
|
# gather tasks for batch execution
|
618
629
|
application.parallel_tasks[name] = [task_args, prereqs]
|
619
630
|
|
@@ -622,13 +633,9 @@ module Rake
|
|
622
633
|
# as needed. Files are not created or modified, so the
|
623
634
|
# the 'needed?' flag does not propagate.
|
624
635
|
#
|
625
|
-
unless invocation_chain == InvocationChain::EMPTY
|
626
|
-
|
627
|
-
|
628
|
-
def needed?
|
629
|
-
true
|
630
|
-
end
|
631
|
-
}
|
636
|
+
unless invocation_chain == InvocationChain::EMPTY
|
637
|
+
application.
|
638
|
+
parallel_parent_flags[invocation_chain.value] = true
|
632
639
|
end
|
633
640
|
end
|
634
641
|
end
|
@@ -1761,6 +1768,7 @@ module Rake
|
|
1761
1768
|
attr_accessor :num_threads
|
1762
1769
|
attr_reader :parallel_tasks #:nodoc:
|
1763
1770
|
attr_reader :parallel_lock #:nodoc:
|
1771
|
+
attr_reader :parallel_parent_flags #:nodoc:
|
1764
1772
|
|
1765
1773
|
def initialize
|
1766
1774
|
super
|
@@ -1772,6 +1780,7 @@ module Rake
|
|
1772
1780
|
@num_threads = 1
|
1773
1781
|
@parallel_tasks = Hash.new
|
1774
1782
|
@parallel_lock = Mutex.new
|
1783
|
+
@parallel_parent_flags = Hash.new
|
1775
1784
|
end
|
1776
1785
|
|
1777
1786
|
def create_rule(*args, &block)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.2.1.0.
|
4
|
+
version: 0.8.2.1.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James M. Lawrence
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-09-
|
12
|
+
date: 2008-09-19 00:00:00 -04:00
|
13
13
|
default_executable: drake
|
14
14
|
dependencies: []
|
15
15
|
|