rakepp 0.1.5 → 0.1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/rakepp/gcccompiler.rb +12 -8
- metadata +21 -9
data/Rakefile
CHANGED
data/lib/rakepp/gcccompiler.rb
CHANGED
@@ -13,26 +13,31 @@ class GccCompiler < Compiler
|
|
13
13
|
end
|
14
14
|
|
15
15
|
recreateDepFileTask = task "#{depFile}.recreate" do | task |
|
16
|
-
puts "wird immer gemacht"
|
17
16
|
if (!File.exists?(depFile))
|
18
17
|
calcDependencies(artifact, depFile)
|
19
18
|
end
|
20
19
|
deps = YAML.load_file(depFile)
|
21
|
-
|
22
|
-
|
20
|
+
missing = deps.inject(false) do |memo, d|
|
21
|
+
memo || !File.exists?(d)
|
22
|
+
end
|
23
|
+
if (missing)
|
24
|
+
calcDependencies(artifact, depFile)
|
25
|
+
deps = YAML.load_file(depFile)
|
23
26
|
end
|
27
|
+
depFileTask.enhance(deps)
|
24
28
|
end
|
25
29
|
|
26
|
-
outFile = file outName => ["#{
|
30
|
+
outFile = file outName => ["#{outName}.apply"] do | task |
|
27
31
|
command = "#{compiler(artifact)} -c #{defines(artifact)} #{includes(artifact)} -o #{outName} #{artifact.source.fullPath}"
|
28
32
|
sh command
|
29
33
|
end
|
30
|
-
|
34
|
+
|
31
35
|
applyTask = task "#{outFile}.apply" => recreateDepFileTask do |task|
|
32
36
|
deps = YAML.load_file(depFile)
|
33
37
|
if (deps)
|
34
38
|
outFile.enhance(deps)
|
35
39
|
end
|
40
|
+
outFile.enhance([depFile])
|
36
41
|
end
|
37
42
|
|
38
43
|
outFile.enhance([applyTask])
|
@@ -77,8 +82,7 @@ class GccCompiler < Compiler
|
|
77
82
|
|
78
83
|
def calcDependencies(artifact, taskToEnhance)
|
79
84
|
source = artifact.source
|
80
|
-
command = "#{compiler(artifact)} -
|
81
|
-
puts command
|
85
|
+
command = "#{compiler(artifact)} -M #{defines(artifact)} #{includes(artifact)} #{source.fullPath}"
|
82
86
|
deps = `#{command}`
|
83
87
|
if deps.length == 0
|
84
88
|
raise 'cannot calc dependencies'
|
@@ -88,7 +92,7 @@ class GccCompiler < Compiler
|
|
88
92
|
f.write(deps.to_yaml)
|
89
93
|
end
|
90
94
|
end
|
91
|
-
|
95
|
+
|
92
96
|
def startOfSourceLibCommand(outName, artifact)
|
93
97
|
return "ar -r #{outName}"
|
94
98
|
end
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rakepp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 6
|
9
|
+
- 1
|
10
|
+
version: 0.1.6.1
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Christian Koestlin
|
@@ -9,19 +15,23 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date: 2010-
|
18
|
+
date: 2010-04-07 00:00:00 +02:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: progressbar
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
25
|
requirements:
|
21
26
|
- - ">="
|
22
27
|
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
- 0
|
31
|
+
- 3
|
23
32
|
version: 0.0.3
|
24
|
-
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
25
35
|
description: " Some more high level building blocks for cpp projects.\n"
|
26
36
|
email: gizmoATflopcodeDOTcom
|
27
37
|
executables: []
|
@@ -64,18 +74,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
64
74
|
requirements:
|
65
75
|
- - ">="
|
66
76
|
- !ruby/object:Gem::Version
|
77
|
+
segments:
|
78
|
+
- 0
|
67
79
|
version: "0"
|
68
|
-
version:
|
69
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
81
|
requirements:
|
71
82
|
- - ">="
|
72
83
|
- !ruby/object:Gem::Version
|
84
|
+
segments:
|
85
|
+
- 0
|
73
86
|
version: "0"
|
74
|
-
version:
|
75
87
|
requirements: []
|
76
88
|
|
77
89
|
rubyforge_project: rakepp
|
78
|
-
rubygems_version: 1.3.
|
90
|
+
rubygems_version: 1.3.6
|
79
91
|
signing_key:
|
80
92
|
specification_version: 3
|
81
93
|
summary: Cpp Support for Rake.
|