rakeoe 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/lib/rakeoe/config.rb +20 -4
- data/lib/rakeoe/defaults.rb +0 -3
- data/lib/rakeoe/key_value_reader.rb +3 -1
- data/lib/rakeoe/toolchain.rb +20 -1
- data/lib/rakeoe/version.rb +1 -1
- data/lib/rakeoe.rb +1 -1
- data/rakeoe.gemspec +7 -6
- metadata +13 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9717944f0f38cc7be538370c7f19245a4dc9a05f
|
4
|
+
data.tar.gz: 06a0a2466d02d5afb248dd0e378d87e631aedf6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e65408d603b81beb5fb4b4cb392fe49013eb38b6044d689124f92616d78f81e9626ebff16c825d2a3abb5838d4d74652efc53e7db16e3e68d8a7d0c17c5bcb9
|
7
|
+
data.tar.gz: 6929a06b98572b38e3314c7f5c2fd9c49cc3a88e57ab3a4ff386995439c98a261a221604293c735e28d76cd87d0b61fa26c7015a6eee61033342f7c150d69c50
|
data/lib/rakeoe/config.rb
CHANGED
@@ -39,7 +39,7 @@ module RakeOE
|
|
39
39
|
# This is the absolute path to the platform definition file
|
40
40
|
#
|
41
41
|
# This parameter can be overridden via environment variable TOOLCHAIN_ENV
|
42
|
-
@platform = ENV['TOOLCHAIN_ENV'].nil? ?
|
42
|
+
@platform = ENV['TOOLCHAIN_ENV'].nil? ? '' : ENV['TOOLCHAIN_ENV']
|
43
43
|
|
44
44
|
# Release mode used for the project
|
45
45
|
# It can take the values "dbg" or "release" and influences the build behaviour.
|
@@ -49,7 +49,7 @@ module RakeOE
|
|
49
49
|
#
|
50
50
|
# This parameter can be overridden via environment variable RELEASE. If the latter
|
51
51
|
# is defined, this configuration variable has the value "release"
|
52
|
-
@release = ENV['RELEASE'].nil? ? 'release'
|
52
|
+
@release = ENV['RELEASE'].nil? ? RakeOE::DEFAULT_RELEASE : 'release'
|
53
53
|
|
54
54
|
# Test framework used for linking test case binaries
|
55
55
|
# This takes the name of the test framework that has to be integrated into the project
|
@@ -75,15 +75,31 @@ module RakeOE
|
|
75
75
|
end
|
76
76
|
|
77
77
|
|
78
|
+
# Checks configuration, e.g. if given files do exist or if vital configuration settings are missing
|
79
|
+
#
|
80
|
+
# @return [bool] true if checks pass, false otherwise
|
81
|
+
#
|
82
|
+
def checks_pass?
|
83
|
+
rv = true
|
84
|
+
unless File.exist?(@platform)
|
85
|
+
puts "No platform or invalid platform configuration given: (#{@platform}) !"
|
86
|
+
puts "Use either property 'platform' via RakeOE::Config object in the Rakefile or environment variable TOOLCHAIN_ENV"
|
87
|
+
rv = false
|
88
|
+
end
|
89
|
+
rv
|
90
|
+
end
|
91
|
+
|
92
|
+
|
78
93
|
# Dumps configuration to stdout
|
79
94
|
def dump
|
95
|
+
puts 'RakeOE::Config:'
|
80
96
|
puts "Directories : #{@directories}"
|
81
97
|
puts "Suffixes : #{@suffixes}"
|
82
98
|
puts "Platform : #{@platform}"
|
83
99
|
puts "Release mode : #{@release}"
|
84
100
|
puts "Test framework : #{@test_fw}"
|
85
|
-
puts "
|
86
|
-
puts "
|
101
|
+
puts "Optimization dbg : #{@optimization_dbg}"
|
102
|
+
puts "Optimization release : #{@optimization_release}"
|
87
103
|
puts "Language Standard for C : #{@language_std_c}"
|
88
104
|
puts "Language Standard for C++ : #{@language_std_cpp}"
|
89
105
|
puts "Software version string : #{@sw_version}"
|
data/lib/rakeoe/defaults.rb
CHANGED
@@ -22,9 +22,6 @@ module RakeOE
|
|
22
22
|
:build => 'build'
|
23
23
|
}
|
24
24
|
|
25
|
-
# Default platform configuration used for the project
|
26
|
-
DEFAULT_PLATFORM = File.dirname(__FILE__)+'/toolchain/environment-arm-stm32f072-eabi.osx'
|
27
|
-
|
28
25
|
# Default release mode used for the project if no such parameter given via Rakefile
|
29
26
|
DEFAULT_RELEASE = 'dbg'
|
30
27
|
|
@@ -19,6 +19,8 @@ class KeyValueReader
|
|
19
19
|
attr_accessor :env
|
20
20
|
|
21
21
|
def initialize(env_file)
|
22
|
+
raise "No such file #{env_file}" unless File.exist?(env_file)
|
23
|
+
|
22
24
|
@file_name = env_file
|
23
25
|
@env = self.class.read_file(@file_name)
|
24
26
|
self.class.substitute_dollar_symbols!(@env)
|
@@ -154,7 +156,7 @@ class KeyValueReader
|
|
154
156
|
|
155
157
|
# Dumps all parsed variables as debugging aid
|
156
158
|
def dump
|
157
|
-
puts "#{@file_name}
|
159
|
+
puts "#{@file_name}"
|
158
160
|
@env.each_pair do |key, value|
|
159
161
|
puts "[#{key}]: #{value}"
|
160
162
|
end
|
data/lib/rakeoe/toolchain.rb
CHANGED
@@ -19,9 +19,17 @@ class Toolchain
|
|
19
19
|
# @param [RakeOE::Config] config Project wide configurations
|
20
20
|
#
|
21
21
|
def initialize(config)
|
22
|
+
raise 'Configuration failure' unless config.checks_pass?
|
23
|
+
|
22
24
|
@config = config
|
23
25
|
|
24
|
-
|
26
|
+
begin
|
27
|
+
@kvr = KeyValueReader.new(config.platform)
|
28
|
+
rescue Exception => e
|
29
|
+
puts e.message
|
30
|
+
raise
|
31
|
+
end
|
32
|
+
|
25
33
|
@settings = @kvr.env
|
26
34
|
fixup_env
|
27
35
|
|
@@ -46,6 +54,16 @@ class Toolchain
|
|
46
54
|
def sanity
|
47
55
|
# TODO DS: check if libs and apps directories exist
|
48
56
|
# TODO DS: check if test frameworks exist
|
57
|
+
# check if target is valid
|
58
|
+
|
59
|
+
if @settings['CC'].empty?
|
60
|
+
raise "No Compiler specified. Either add platform configuration via RakeOE::Config object in Rakefile or use TOOLCHAIN_ENV environment variable"
|
61
|
+
end
|
62
|
+
|
63
|
+
if @target.nil? || @target.empty?
|
64
|
+
raise "Compiler #{@settings['CC']} does not work. Fix platform settings or use TOOLCHAIN_ENV environment variable "
|
65
|
+
end
|
66
|
+
|
49
67
|
end
|
50
68
|
|
51
69
|
# returns the build directory
|
@@ -449,6 +467,7 @@ puts
|
|
449
467
|
end
|
450
468
|
|
451
469
|
def dump
|
470
|
+
print "Platform configuration: "
|
452
471
|
@kvr.dump
|
453
472
|
end
|
454
473
|
|
data/lib/rakeoe/version.rb
CHANGED
data/lib/rakeoe.rb
CHANGED
data/rakeoe.gemspec
CHANGED
@@ -8,12 +8,13 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = RakeOE::VERSION
|
9
9
|
spec.authors = ["Daniel Schnell"]
|
10
10
|
spec.email = ["dschnell@skerpa.com"]
|
11
|
-
spec.description = %q{
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
spec.description = %q{Rake Optimized for Embedded: build system for test driven Embedded C/C++ Development based on Ruby Rake.
|
12
|
+
RakeOE can be used for application and library development on Windows, Mac OSX and Linux.
|
13
|
+
It uses OpenEmbedded/Yocto compatible platform files to compile in whatever target platform the compiler builds. It is
|
14
|
+
used for MicroControllers and Linux-flavored systems alike. It's possible to combine multiple platforms in one
|
15
|
+
common project. RakeOE is easy to use while maintaining strict dependency tracking.
|
16
|
+
}
|
17
|
+
spec.summary = %q{Rake Optimized for Embedded: build system for test driven Embedded C/C++ Development based on Ruby Rake.}
|
17
18
|
spec.homepage = "http://rakeoe.github.io/rakeoe/"
|
18
19
|
spec.license = "GPLv3"
|
19
20
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rakeoe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Schnell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,12 +66,14 @@ dependencies:
|
|
66
66
|
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
description:
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
69
|
+
description: "Rake Optimized for Embedded: build system for test driven Embedded C/C++
|
70
|
+
Development based on Ruby Rake.\n RakeOE can be used for
|
71
|
+
application and library development on Windows, Mac OSX and Linux.\n It
|
72
|
+
uses OpenEmbedded/Yocto compatible platform files to compile in whatever target
|
73
|
+
platform the compiler builds. It is\n used for MicroControllers
|
74
|
+
and Linux-flavored systems alike. It's possible to combine multiple platforms in
|
75
|
+
one\n common project. RakeOE is easy to use while maintaining
|
76
|
+
strict dependency tracking.\n "
|
75
77
|
email:
|
76
78
|
- dschnell@skerpa.com
|
77
79
|
executables: []
|
@@ -121,9 +123,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
123
|
version: '0'
|
122
124
|
requirements: []
|
123
125
|
rubyforge_project:
|
124
|
-
rubygems_version: 2.0.
|
126
|
+
rubygems_version: 2.0.14
|
125
127
|
signing_key:
|
126
128
|
specification_version: 4
|
127
|
-
summary: '
|
128
|
-
|
129
|
+
summary: 'Rake Optimized for Embedded: build system for test driven Embedded C/C++
|
130
|
+
Development based on Ruby Rake.'
|
129
131
|
test_files: []
|