rakeoe 0.0.5 → 0.0.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16889146f1dfe6b18c54134600a1bb0d50cbcb73
4
- data.tar.gz: 16f665ef351341f58ac49a24ba606ae5076347c8
3
+ metadata.gz: 0c5335857ee888f2e6ba2d8c9a82713e533fc89d
4
+ data.tar.gz: 55e7546b4b68dbc570d40348df9e7f091bd42d91
5
5
  SHA512:
6
- metadata.gz: 1799f93d02f059d70422b2ab668d7e9f25a2fcbcec36d34b6be561407ff4d826537bb4c492ec42e2b26d03696c8b2e971208d77947bbd7b8eafa9fbcc8551fd8
7
- data.tar.gz: 0b4bafea9ed296b87b908bd993102d8ba65da52edb1dabf80ee3af10f5d115a2e5d0e470345f10a54be6b258606ec6f02594aaf46bc6e9276418edcb20d4a525
6
+ metadata.gz: c22c1fc32d6dc1798ac197d417b9e0c1bfc9af88bcc95af19b3f089d3b56cd4850dd44fac322d6bca7a46dcce7cd20d25081c1f5937ea37d0dc55651498b1594
7
+ data.tar.gz: e9e6f9f72480d54cf854ad98e076b0a913b213f04d7fa7326a5fe822854417a2175e4953d079779461406269f98d4af5215277a82b04e328a0779e33c463d89d
data/README.md CHANGED
@@ -1,234 +1,38 @@
1
+ [![Gem Version](https://badge.fury.io/rb/rakeoe.png)](http://badge.fury.io/rb/rakeoe)
2
+
1
3
  # RakeOE : Rake Optimized for Embedded
2
4
 
3
5
  **A build system for test driven Embedded C/C++ Development based on Ruby rake**
4
6
 
5
- RakeOE is a build system for application development. It can parse OpenEmbedded / Yocto environment files.<br/>
6
- In this way it knows how to cross compile in whatever target platform the cross compiler builds.<br/>
7
- It uses automatically the appropriate include paths and libraries of the given platform.<br/>
8
- If not otherwise specified, it uses the native toolchain of the host platform.<br/>
9
-
10
- RakeOE uses a *convention over configuration* paradigm to enable a fast jump start for developers.<br/>
11
- E.g. it assumes that the project follows a certain directory hierarchy or how sub projects are organized.<br/>
12
- It is possible to override default settings, though one can get a long way without doing so.<br/>
13
-
14
- ## Prerequisites
15
- ### OS
16
- Rake OE has been tested on Linux, Windows and Mac OSX. It should work on whatever platform Ruby/Rake runs on.<br/>
17
-
18
- ### GCC or GCC-compatible compiler
19
- For the time beeing, **gcc** or a gcc-compatible compiler like **clang** or **icc** is required.<br/>
20
- Besides compilation, gcc is used e.g. for header file dependency generation or platform information.
21
-
22
- ### Ruby
23
- RakeOE is based on Rake. Rake comes bundled with Ruby. Therefore you should have installed a recent [Ruby version](http://www.ruby-lang.org/en/ "[Latest Ruby") on your development machine.<br/>
24
- Recommended is **Ruby >= 2.0.0**.
25
-
26
- ### OpenEmbedded / Yocto
27
- If you want to use RakeOE for cross development, you should also have some flavour of OpenEmbedded installed on your host platform.<br/> When cross compilating for target platforms via Yocto/OpenEmbedded, a Linux host machine is a must.<br/>
28
- RakeOE has been tested with [ELDK-5.3/Yocto Danny](http://www.denx.de/wiki/ELDK-5/ "[ELDK-5.3/Yocto Danny") but other OpenEmbedded based toolchains should work similarly well.<br/>
29
-
30
- ## Features
31
- ### Subproject autodiscovery
32
- Any subdirectory inside the configured source directories will be scanned for a **prj.rake** file. This file contains standardized settings<br/>
33
- for building libraries or applications and defining dependencies. Any subproject that has such a prj.rake file will be automatically<br/>
34
- picked up for building.
35
-
36
- ### Qt
37
- RakeOE has built-in support for Qt. It will automatically parse header files in Qt enabled sub projects and run the moc compiler <br/>
38
- on them if a **Q_OBJECT** declaration is encountered.
39
-
40
- ### Subproject specific settings
41
- Here is an overview of the settings that can be specified in the subprojects **prj.rake** file.<br/>
42
- See the documentation of each setting for explanations.
43
-
44
- # Project type, possible values are APP for applications, LIB for static libraries,
45
- # SOLIB for shared objects and DISABLED if this project should be excluded from building.
46
- PRJ_TYPE = 'DISABLED'
47
-
48
- # Additional white space separated list of sub directories this project uses for finding source files.
49
- # By default only sources in the projects top directory will be used for compilation.
50
- ADD_SOURCE_DIRS = ''
51
-
52
- # White space separated list of ignored source files. These will be excluded from compilation.
53
- IGNORED_SOURCES = ''
54
-
55
- # Additional white space separated list of sub directories this project uses for finding includes.
56
- # By default the subdirectory 'include/' is always supposed.
57
- ADD_INC_DIRS = ''
58
-
59
- # White space separated list of test source directories.
60
- TEST_SOURCE_DIRS = ''
61
-
62
- # Additional white space separated list of CFLAGS. Used for all platforms.
63
- # E.g. '-O3 -Wextra'
64
- ADD_CFLAGS = ''
65
-
66
- # Additional white space separated list of CXXFLAGS. Used for all platforms.
67
- # E.g. '-O3 -Wextra'
68
- ADD_CXXFLAGS = ''
69
-
70
- # Additional white space separated list of libraries this project depends on. These can be either libraries provided
71
- # from other subprojects or external libraries. In case of the former the include/ directory of that library
72
- # is used for compilation as well. Used for all platforms.
73
- # e.g. 'pthread rt m'
74
- ADD_LIBS = ''
75
-
76
- # Additional white space separated list of linker flags. Used for all platforms.
77
- ADD_LDFLAGS = ''
78
-
79
- # Set to 1 if you need Qt support. If enabled, all header files will be parsed for the
80
- # declaration of the keyword Q_OBJECT and if found used as input for the moc compiler.
81
- # By default QtCore and QtNetwork libs are enabled. If you need more Qt libraries,
82
- # place them in ADD_LIBS variable.
83
- USE_QT = 0
84
-
85
- # White space separated list of ignored platforms, i.e. platforms this project will _not_ be compiled for.
86
- # Possible values depend on your toolchain.
87
- # E.g. 'arm-linux-gnueabi i686-linux-gnu'
88
- IGNORED_PLATFORMS = ''
89
-
90
-
91
- ### Pass Version String
92
- You can pass a version string to all compiled files via environment variable SW_VERSION_ENV. The content of this environment
93
- variable is passed to the build in CFLAGS/CXXFLAGS as -DPROGRAM_VERSION.
94
- The default value in case no such environment variable is present is "unversioned".
95
-
96
-
97
- ## Usage:
98
- rake <target> <TOOLCHAIN_ENV=filename> <RELEASE=1>
99
-
100
-
101
- Use **` rake all`**<br/>
102
- to compile all applications and libraries
103
-
104
- Use **` rake app:all`**<br/>
105
- to compile only applications
106
-
107
- Use **` rake lib:all`**<br/>
108
- to compile only libraries
109
-
110
- Use **` rake test`**<br/>
111
- to execute all unit tests for applications/libraries
112
-
113
- Use **` rake -T `**<br/>
114
- for a list of important targets with explanation.
115
-
116
- Use **` rake -T -A `**<br/>
117
- for a list of all possible targets.
118
-
119
-
120
- If no parameter given, **`rake all`** is assumed and the native compiler of the host system is used.<br/>
121
- Furthermore without any parameters, no compiler optimization settings are enabled.
122
-
123
- If **`RELEASE`** is set to any value, compilation is executed with optimizations **and** debugging set to on.
124
-
125
- By setting the variable **`TOOLCHAIN_ENV`**, the native toolchain settings can be overwritten with the environment file.<br/>
126
- from OpenEmbedded. This file is parsed by RakeOE and configures the specific toolchain settings.
127
-
128
- ## Examples:
129
-
130
- 1. **`rake`**
131
- Uses the native host toolchain as defined in rake/toolchain/environment-setup-native-linux-gnu
132
-
133
- 1. **`rake all RELEASE=1`**
134
- Same as above but a release build will be triggered
135
-
136
- 1. **`rake all TOOLCHAIN_ENV=/data/eldk-5.3/nitrogen/environment-setup-armv7a-vfp-neon-linux-gnueabi`**
137
- Cross compiles in debug mode with the cross compiler definitions found in provided ELDK-5.3 environment
138
- file.<br/>In this particular case it would cross compile with the armv7a-vfp-neon gcc of a 5.3 ELDK
139
-
140
-
141
-
142
- ## Shell autocompletion for rake:
143
-
144
- If you'd like to save on key presses when trying to find out which rake task to run, add bash autocompletion for rake tasks like this:
145
-
146
- 1. download https://github.com/mernen/completion-ruby/blob/master/completion-rake
147
- 1. copy downloaded file to /etc/bash_completion.d/rake
148
-
149
-
150
- * * *
151
-
152
- ## Defaults:
153
-
154
- ### Directory layout
155
- The build systems assumes a directory layout similar to this:
156
-
157
- project-root
158
- ├── build
159
- │   └── <platform>
160
- │   ├── dbg
161
- │   │   ├── apps
162
- │   │   └── libs
163
- │   └── release
164
- │   ├── apps
165
- │   └── libs
166
- ├── rake
167
- ├── Rakefile
168
- └── src
169
- ├── 3rdparty
170
- │   └── CppUTest
171
- │   └── prj.rake
172
- ├── app
173
- │   └── appA
174
- │   └── prj.rake
175
- └── lib
176
- └── libB
177
- └── prj.rake
178
-
179
- ####build/
180
- The build sub directory contains all build artefacts. `<platform>` is the platform specific build directory. For each unique platform a new build<br/>
181
- directory is created. Inside those directories the directories `dbg` and `release` are created, depending on if you<br/>
182
- started a debug or a release build.<br/>
183
- Directly therunder the directories `apps/` and `libs/` can be found in which either application or library binaries are built.<br/>
184
-
185
- Whenever you start a build with a different build configuration of either platform or debug mode, instead of overwriting<br/>
186
- binaries from the previous build configuration a separate new directory is used.<br/>
187
-
188
- The build directory setting can be changed via Rakefile.<br/>
189
-
190
- ####rake/
191
- In this directory most build system relevant files and classes can be found. Most are internal and typically will not<br/>
192
- be changed by the user.
193
-
194
- ####Rakefile
195
- This file is the main Rakefile and will be automatically parsed by Rake. You can do configuration changes here like setting<br/>
196
- paths of source/build directories, file suffix assignments, etc.
197
-
198
- ####src/
199
- The RakeOE build system knows the build primitives *library* and *application*. It expects libraries and<br/>
200
- applications to be in separate source directories.<br/>
201
-
202
- By default these are in `src/lib` and `src/app`. The directory `src/3rdparty/` is treated by RakeOE as a normal library<br/>
203
- directory and is meant as structural separation between 3rd party components that are not part of the platform SDK and<br/>
204
- project specific libraries in `src/lib`.<br/>
205
- The directory `src/app/appA` contains some user application project and `src/lib/libB` some user library project.<br/>
206
- As mentioned above all those projects beneath `src/` have to contain a `prj.rake` file.
207
-
208
- The source directory setting can be changed via Rakefile.<br/>
209
-
210
- ## Installation
211
-
212
- Add this line to your application's Gemfile:
7
+ RakeOE is a build system for application/library development. RakeOE utilizes the power of [Rake](http://rake.rubyforge.org/) and the easyness of Ruby to make build management for embedded C/C++ development as easy and straight-forward as possible. It's possible to use it on the command line or to integrate it into an IDE like Eclipse. It runs on Windows, Linux and Mac OS X.<br/>
8
+ <br/>
9
+ RakeOE uses the *convention over configuration* paradigm to enable a fast jump start for developers. It's meant to be used by the casual maker and professional C/C++ developer alike.<br/>
10
+ Though it's possible to override defaults, tweak library specific platform flags and do all kind of configuration management settings, one can get a long way without doing so.<br/>
11
+ <br/>
12
+ RakeOE uses OpenEmbedded / Yocto environment files to automatically pick up all appropriate paths and flags for the given build platform. In this way it supports cross compilation in whatever target platform the cross compiler builds. But it's also possible and encouraged to use it for native host development.<br/>
13
+ <br/>
14
+ The toolchain has to be [gcc](http://gcc.gnu.org/) compatible at the moment, i.e. has to implement the **-dumpmachine**, **-MM**, **-MF** and **-MT** options among others. [Clang](http://clang.llvm.org/) qualifies for that as well.
213
15
 
214
- gem 'rakeoe'
16
+ ## Acknowledgements
215
17
 
216
- And then execute:
18
+ The work on this build system has been kindly sponsored by [ifm syntron](http://www.ifm.com/ifmgb/web/home.htm)<br/>
19
+ ![ifm syntron](http://www.ifm.com/img/head_logo.gif)
217
20
 
218
- $ bundle
219
21
 
220
- Or install it yourself as:
22
+ ## Getting Started
221
23
 
222
- $ gem install rakeoe
24
+ * [Feature list](https://github.com/rakeoe/rakeoe/wiki/Features)
25
+ * Make sure you have all [prerequisites](https://github.com/rakeoe/rakeoe/wiki/Prerequisites)
26
+ * [Install](https://github.com/rakeoe/rakeoe/wiki/Installation) the gem
27
+ * Get familiar with the [basic usage](https://github.com/rakeoe/rakeoe/wiki/Basic-Usage)
223
28
 
224
- ## Usage
29
+ ## Diving In
225
30
 
226
- TODO: Write usage instructions here
31
+ * Look at the [examples](https://github.com/rakeoe/rakeoe/wiki/Examples)
32
+ * Clone the [Demo projects](https://github.com/rakeoe/rakeoe/wiki/Demo-Projects)
33
+ * Add [Bash autocompletion](https://github.com/rakeoe/rakeoe/wiki/Shell-autocompletion-for-rake)
34
+ * Study the [Reference](https://github.com/rakeoe/rakeoe/wiki/Reference) section
227
35
 
228
- ## Contributing
36
+ ## License
229
37
 
230
- 1. Fork it
231
- 2. Create your feature branch (`git checkout -b my-new-feature`)
232
- 3. Commit your changes (`git commit -am 'Add some feature'`)
233
- 4. Push to the branch (`git push origin my-new-feature`)
234
- 5. Create new Pull Request
38
+ See [LICENSE](https://github.com/rakeoe/rakeoe/blob/master/LICENSE)
data/Rakefile CHANGED
@@ -1 +1,12 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+
5
+ # Default directory to look in is `/spec`
6
+ # Run with `rake spec`
7
+ RSpec::Core::RakeTask.new(:spec) do |task|
8
+ task.rspec_opts = ['--color', '--format', 'nested']
9
+ end
10
+
11
+ task :default => :spec
12
+ task :test => :spec
@@ -1,8 +1,10 @@
1
1
  # -*- ruby -*-
2
2
  require 'rake'
3
3
 
4
+ # XXX DS: here we should use Rake::pathmap for all mapping of source => destination files
5
+
4
6
  module RakeOE
5
-
7
+
6
8
  # Base class for all projects that assemble binary data
7
9
  class BinaryBase
8
10
  include Rake::DSL
@@ -26,6 +28,7 @@ module RakeOE
26
28
 
27
29
  @name = params[:name]
28
30
  @settings = params[:settings]
31
+ fixup_settings
29
32
  @src_dir = @settings['PRJ_HOME']
30
33
  @bin_dir = params[:bin_dir]
31
34
  @tc = params[:toolchain]
@@ -80,19 +83,36 @@ module RakeOE
80
83
  end
81
84
 
82
85
  if (@settings['TEST_FRAMEWORK'].nil? or @settings['TEST_FRAMEWORK'].empty?)
83
- @test_fw = @tc.default_test_framework
86
+ @test_fw = @tc.default_test_framework
84
87
  else
85
88
  @test_fw = @tc.test_framework(@settings['TEST_FRAMEWORK'])
86
89
  end
87
90
 
88
91
  @test_binary = "#{bin_dir}/#{name}-test"
89
- @test_inc_dirs = @test_fw.include.join(' ')
92
+ @test_inc_dirs = @settings['TEST_SOURCE_DIRS'].empty? ? '' : @test_fw.include.join(' ')
90
93
 
91
94
  handle_prj_type
92
95
  handle_qt if '1' == @settings['USE_QT']
93
96
  # todo check all directories for existence ?
94
97
  end
95
98
 
99
+
100
+ # Fixes any missing settings from project file
101
+ def fixup_settings
102
+ @settings['ADD_SOURCE_DIRS'] ||= ''
103
+ @settings['IGNORED_SOURCES'] ||= ''
104
+ @settings['EXPORTED_INC_DIRS'] ||= ''
105
+ @settings['ADD_INC_DIRS'] ||= ''
106
+ @settings['TEST_SOURCE_DIRS'] ||= ''
107
+ @settings['ADD_CFLAGS'] ||= ''
108
+ @settings['ADD_CXXFLAGS'] ||= ''
109
+ @settings['ADD_LIBS'] ||= ''
110
+ @settings['ADD_LDFLAGS'] ||= ''
111
+ @settings['USE_QT'] ||= ''
112
+ @settings['IGNORED_PLATFORMS'] ||= ''
113
+ end
114
+
115
+
96
116
  # Check params given to #initialize
97
117
  #
98
118
  # @param [Hash] params
@@ -239,9 +259,9 @@ module RakeOE
239
259
  end
240
260
 
241
261
 
242
- # Returns if any test directories are set
262
+ # Returns if any test sources found
243
263
  def has_tests?
244
- return @test_dirs.any?
264
+ return @test_srcs.any?
245
265
  end
246
266
 
247
267
  # Loads dependency files if already generated
@@ -431,6 +451,28 @@ module RakeOE
431
451
  end
432
452
  end
433
453
 
454
+
455
+ # Returns unique list of dependent libraries for given parameter.
456
+ #
457
+ # @param [Array] libs Libraries for using dependent libs
458
+ #
459
+ # @return [Set] All dependent libs
460
+ #
461
+ def all_lib_deps(libs)
462
+ @lib_type ||= PrjFileCache.entries_reversed(['LIB', 'SOLIB'])
463
+ @dependent_libs ||= Set.new
464
+
465
+ libs.each do |name|
466
+ if (@lib_cache.has_key?(name))
467
+ unless @dependent_libs.contain?(name)
468
+ @dependent_libs += all_lib_deps(PrjFileCache.get(@lib_type[name], name, 'ADD_LIBS'))
469
+ end
470
+ end
471
+ end
472
+ @dependent_libs
473
+ end
474
+
475
+
434
476
  # Search dependent libraries as specified in ADD_LIBS setting
435
477
  # of prj.rake file
436
478
  #
@@ -4,13 +4,15 @@ require 'rake'
4
4
 
5
5
 
6
6
  module RakeOE
7
-
7
+
8
8
  # Finds all project files and reads them into memory
9
9
  # Maps project path => project file
10
10
  # XXX DS: IDEA: generate all runtime dependencies at the beginning for each prj,
11
11
  # XXX DS: e.g. lib includes, source files, dependency files etc. and cache those as own variable in @prj_list
12
12
  class PrjFileCache
13
13
 
14
+ attr_accessor :prj_list
15
+
14
16
  # Introduce hash of projects. Contains list of project with key 'PRJ_TYPE'
15
17
  @prj_list = {}
16
18
 
@@ -84,10 +86,24 @@ module RakeOE
84
86
  @prj_list[prj_type].each_pair &block
85
87
  end
86
88
 
89
+
90
+ # Returns all entries for given project types as an array
91
+ # of reversed prj_name => prj_type mappings
92
+ #
93
+ # @param prj_types [Array] project types as defined by the PRJ_TYPE property
94
+ #
95
+ # @return [Array] Array of hashes prj_name => prj_type
96
+ #
97
+ def self.entries_reversed(prj_types)
98
+ prj_types.each_with_object(Hash.new) do |prj_type, h|
99
+ h.merge!(@prj_list[prj_type].reverse) if @prj_list.has_key?(prj_type)
100
+ end
101
+ end
102
+
87
103
  #
88
104
  # SEMANTIC METHODS
89
105
  #
90
-
106
+
91
107
  # Returns exported include directories of a library project.
92
108
  # If given name does not exist in local library projects, an empty array
93
109
  # is returned.
@@ -104,7 +120,9 @@ module RakeOE
104
120
  # try SOLIB
105
121
  exported_inc_dirs = self.get('SOLIB', name, 'EXPORTED_INC_DIRS')
106
122
  unless exported_inc_dirs.to_s.empty?
107
- rv << self.get('SOLIB', name, 'PRJ_HOME') + '/' + dir
123
+ exported_inc_dirs.split.each do |dir|
124
+ rv << self.get('SOLIB', name, 'PRJ_HOME') + '/' + dir
125
+ end
108
126
  end
109
127
  else
110
128
  exported_inc_dirs.split.each do |dir|
@@ -1,5 +1,5 @@
1
1
  module RakeOE
2
-
2
+
3
3
  class TestFramework
4
4
 
5
5
  #
@@ -28,7 +28,6 @@ module RakeOE
28
28
  # Returns test framework include path
29
29
  def include
30
30
  raise 'No test framework include directory exported!' if @params[:include_dir].empty?
31
-
32
31
  @params[:include_dir]
33
32
  end
34
33
 
@@ -218,7 +218,7 @@ class Toolchain
218
218
  @settings['CFLAGS'] += ' -fPIC'
219
219
  end
220
220
  # !! don't change order of the following string components without care !!
221
- @settings['LDFLAGS'] = @settings['LDFLAGS'] + " -L #{@settings['LIB_OUT']} #{@settings['SYS_LFLAGS']} -Wl,--no-as-needed -Wl,--start-group"
221
+ @settings['LDFLAGS'] = @settings['LDFLAGS'] + " -L #{@settings['LIB_OUT']} #{@settings['SYS_LFLAGS']} -Wl,--start-group"
222
222
  end
223
223
 
224
224
  # Executes the command
@@ -1,3 +1,3 @@
1
1
  module RakeOE
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
data/rakeoe.gemspec CHANGED
@@ -8,11 +8,11 @@ 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{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.
11
+ spec.description = %q{Rake Optimized for Embedded: RakeOE is a build system for application/library development.
12
+ RakeOE utilizes the power of Rake and the easyness of Ruby to make build management for
13
+ embedded C/C++ development as easy and straight-forward as possible.
14
+ It's possible to use it on the command line or to integrate it into an IDE like Eclipse.
15
+ It runs on Windows, Linux and Mac OS X.
16
16
  }
17
17
  spec.summary = %q{Rake Optimized for Embedded: build system for test driven Embedded C/C++ Development based on Ruby Rake.}
18
18
  spec.homepage = "http://rakeoe.github.io/rakeoe/"
@@ -26,6 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "bundler", "~> 1.3"
27
27
  spec.add_development_dependency "rake"
28
28
  spec.add_development_dependency "rspec"
29
+ spec.add_development_dependency "factory_girl", "~> 4.0"
29
30
 
30
31
  spec.add_dependency "rake"
31
32
  end
data/spec/factories.rb ADDED
@@ -0,0 +1,5 @@
1
+ FactoryGirl.define do
2
+ factory :prj_file_cache, class: PrjFileCache do
3
+ prj_list { { 'APP' => { 'hello' => {'PRJ_HOME' => '.', 'PRJ_FILE' => './prj.rake'}}} }
4
+ end
5
+ end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe RakeOE do
4
+ it 'does stuff' do
5
+ pending # no code yet
6
+ end
7
+ end
8
+
9
+ describe PrjFileCache do
10
+ it 'does read prj.rake files' do
11
+ prj_cache = build(:prj_file_cache)
12
+ expect(prj_cache.class.get('APP', 'hello', 'PRJ_HOME')).to equal('.')
13
+ end
14
+
15
+ end
@@ -0,0 +1,11 @@
1
+ require 'bundler/setup'
2
+ Bundler.setup
3
+
4
+ require 'rakeoe'
5
+ require 'factory_girl'
6
+
7
+ FactoryGirl.find_definitions
8
+
9
+ RSpec.configure do |config|
10
+ config.include FactoryGirl::Syntax::Methods
11
+ end
@@ -0,0 +1,46 @@
1
+ export PATH="/opt/install/gcc-arm-none-eabi-4_8-2013q4/bin/:$PATH"
2
+ export PKG_CONFIG_SYSROOT_DIR=
3
+ export PKG_CONFIG_PATH=
4
+ export CONFIG_SITE=
5
+ export CC="arm-none-eabi-gcc"
6
+ export CXX="arm-none-eabi-g++"
7
+ export CPP="arm-none-eabi-gcc -E"
8
+ export AS="arm-none-eabi-as"
9
+ export LD="arm-none-eabi-ld"
10
+ export GDB="arm-none-eabi-gdb"
11
+ export STRIP="arm-none-eabi-strip"
12
+ export RANLIB="arm-none-eabi-ranlib"
13
+ export OBJCOPY="arm-none-eabi-objcopy"
14
+ export OBJDUMP="arm-none-eabi-objdump"
15
+ export AR="arm-none-eabi-ar"
16
+ export NM="arm-none-eabi-nm"
17
+ export SIZE="arm-none-eabi-size"
18
+ export M4=
19
+ export TARGET_PREFIX=arm-none-eabi-
20
+ export CONFIGURE_FLAGS=
21
+ export CFLAGS=' -std=gnu99 -mcpu=cortex-m0 -mthumb -fomit-frame-pointer -fdata-sections -ffunction-sections -D__ASSEMBLY__'
22
+ export CXXFLAGS=' -mcpu=cortex-m0 -mthumb -fomit-frame-pointer -fdata-sections -ffunction-sections -D__ASSEMBLY__'
23
+ export LDFLAGS=' -mcpu=cortex-m0 -mthumb -g -nostartfiles -Wl,--gc-sections -Xlinker -Tlinker/stm32f0_linker.ld'
24
+ export CPPFLAGS=
25
+ export OECORE_NATIVE_SYSROOT=
26
+ export OECORE_TARGET_SYSROOT=
27
+ export OECORE_ACLOCAL_OPTS=
28
+ export OECORE_DISTRO_VERSION=
29
+ export OECORE_SDK_VERSION=
30
+ export OE_QMAKE_CFLAGS=
31
+ export OE_QMAKE_CXXFLAGS=
32
+ export OE_QMAKE_LDFLAGS=
33
+ export OE_QMAKE_CC=
34
+ export OE_QMAKE_CXX=
35
+ export OE_QMAKE_LINK=
36
+ export OE_QMAKE_AR=
37
+ export OE_QMAKE_LIBDIR_QT=
38
+ export OE_QMAKE_INCDIR_QT=
39
+ export OE_QMAKE_MOC=
40
+ export OE_QMAKE_UIC=
41
+ export OE_QMAKE_UIC3=
42
+ export OE_QMAKE_RCC=
43
+ export OE_QMAKE_QDBUSCPP2XML=
44
+ export OE_QMAKE_QDBUSXML2CPP=
45
+ export OE_QMAKE_QT_CONFIG=
46
+ export QMAKESPEC=
@@ -0,0 +1,48 @@
1
+ #
2
+ # Template for Yocto danny based ELDK-5.3 for armv7a based (e.g. Freescale i.MX6) processors
3
+ #
4
+ export PATH=/opt/eldk-5.3/armv7a/sysroots/i686-eldk-linux/usr/bin:/opt/eldk-5.3/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi:$PATH
5
+ export PKG_CONFIG_SYSROOT_DIR=/opt/eldk-5.3/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi
6
+ export PKG_CONFIG_PATH=/opt/eldk-5.3/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi/usr/lib/pkgconfig
7
+ export CONFIG_SITE=/opt/eldk-5.3/armv7a/site-config-armv7a-vfp-neon-linux-gnueabi
8
+ export CC="arm-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon --sysroot=/opt/eldk-5.3/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi"
9
+ export CXX="arm-linux-gnueabi-g++ -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon --sysroot=/opt/eldk-5.3/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi"
10
+ export CPP="arm-linux-gnueabi-gcc -E -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon --sysroot=/opt/eldk-5.3/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi"
11
+ export AS="arm-linux-gnueabi-as "
12
+ export LD="arm-linux-gnueabi-ld --sysroot=/opt/eldk-5.3/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi"
13
+ export GDB=arm-linux-gnueabi-gdb
14
+ export STRIP=arm-linux-gnueabi-strip
15
+ export RANLIB=arm-linux-gnueabi-ranlib
16
+ export OBJCOPY=arm-linux-gnueabi-objcopy
17
+ export OBJDUMP=arm-linux-gnueabi-objdump
18
+ export AR=arm-linux-gnueabi-ar
19
+ export NM=arm-linux-gnueabi-nm
20
+ export M4=m4
21
+ export TARGET_PREFIX=arm-linux-gnueabi-
22
+ export CONFIGURE_FLAGS="--target=arm-linux-gnueabi --host=arm-linux-gnueabi --build=i686-linux --with-libtool-sysroot=/opt/eldk-5.3/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi"
23
+ export CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types"
24
+ export CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types -fpermissive"
25
+ export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
26
+ export CPPFLAGS=""
27
+ export OECORE_NATIVE_SYSROOT="/opt/eldk-5.3/armv7a/sysroots/i686-eldk-linux"
28
+ export OECORE_TARGET_SYSROOT="/opt/eldk-5.3/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi"
29
+ export OECORE_ACLOCAL_OPTS="-I /opt/eldk-5.3/armv7a/sysroots/i686-eldk-linux/usr/share/aclocal"
30
+ export OECORE_DISTRO_VERSION="5.3"
31
+ export OECORE_SDK_VERSION="5.3"
32
+ export OE_QMAKE_CFLAGS="$CFLAGS"
33
+ export OE_QMAKE_CXXFLAGS="$CXXFLAGS"
34
+ export OE_QMAKE_LDFLAGS="$LDFLAGS"
35
+ export OE_QMAKE_CC=arm-linux-gnueabi-gcc
36
+ export OE_QMAKE_CXX=arm-linux-gnueabi-g++
37
+ export OE_QMAKE_LINK=arm-linux-gnueabi-g++
38
+ export OE_QMAKE_AR=arm-linux-gnueabi-ar
39
+ export OE_QMAKE_LIBDIR_QT=/opt/eldk-5.3/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi//usr/lib
40
+ export OE_QMAKE_INCDIR_QT=/opt/eldk-5.3/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi//usr/include/qtopia
41
+ export OE_QMAKE_MOC=/opt/eldk-5.3/armv7a/sysroots/i686-eldk-linux/usr/bin/moc4
42
+ export OE_QMAKE_UIC=/opt/eldk-5.3/armv7a/sysroots/i686-eldk-linux/usr/bin/uic4
43
+ export OE_QMAKE_UIC3=/opt/eldk-5.3/armv7a/sysroots/i686-eldk-linux/usr/bin/uic34
44
+ export OE_QMAKE_RCC=/opt/eldk-5.3/armv7a/sysroots/i686-eldk-linux/usr/bin/rcc4
45
+ export OE_QMAKE_QDBUSCPP2XML=/opt/eldk-5.3/armv7a/sysroots/i686-eldk-linux/usr/bin/qdbuscpp2xml4
46
+ export OE_QMAKE_QDBUSXML2CPP=/opt/eldk-5.3/armv7a/sysroots/i686-eldk-linux/usr/bin/qdbusxml2cpp4
47
+ export OE_QMAKE_QT_CONFIG=/opt/eldk-5.3/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi//usr/share/qtopia/mkspecs/qconfig.pri
48
+ export QMAKESPEC=/opt/eldk-5.3/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi//usr/share/qtopia/mkspecs/linux-g++
@@ -0,0 +1,46 @@
1
+ export PATH=$PATH
2
+ export PKG_CONFIG_SYSROOT_DIR=/
3
+ export PKG_CONFIG_PATH=/usr/lib/pkgconfig
4
+ export CONFIG_SITE=
5
+ export CC="gcc"
6
+ export CXX="g++"
7
+ export CPP="gcc -E"
8
+ export AS="as"
9
+ export LD="ld"
10
+ export GDB="gdb"
11
+ export STRIP="strip"
12
+ export RANLIB="ranlib"
13
+ export OBJCOPY="objcopy"
14
+ export OBJDUMP="objdump"
15
+ export AR="ar"
16
+ export NM="nm"
17
+ export SIZE="size"
18
+ export M4="m4"
19
+ export TARGET_PREFIX=x86-
20
+ export CONFIGURE_FLAGS=
21
+ export CFLAGS=" -pipe -g -feliminate-unused-debug-types"
22
+ export CXXFLAGS=" -pipe -g -feliminate-unused-debug-types -fpermissive"
23
+ export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
24
+ export CPPFLAGS=
25
+ export OECORE_NATIVE_SYSROOT=
26
+ export OECORE_TARGET_SYSROOT=
27
+ export OECORE_ACLOCAL_OPTS=
28
+ export OECORE_DISTRO_VERSION="native"
29
+ export OECORE_SDK_VERSION="native"
30
+ export OE_QMAKE_CFLAGS="$CFLAGS"
31
+ export OE_QMAKE_CXXFLAGS="$CXXFLAGS"
32
+ export OE_QMAKE_LDFLAGS="$LDFLAGS"
33
+ export OE_QMAKE_CC=gcc
34
+ export OE_QMAKE_CXX=g++
35
+ export OE_QMAKE_LINK=g++
36
+ export OE_QMAKE_AR=ar
37
+ export OE_QMAKE_LIBDIR_QT=/usr/lib
38
+ export OE_QMAKE_INCDIR_QT=/usr/include
39
+ export OE_QMAKE_MOC=/usr/bin/moc
40
+ export OE_QMAKE_UIC=/usr/bin/uic
41
+ export OE_QMAKE_UIC3=/usr/bin/uic3
42
+ export OE_QMAKE_RCC=/usr/bin/rcc
43
+ export OE_QMAKE_QDBUSCPP2XML=/usr/bin/qdbuscpp2xml
44
+ export OE_QMAKE_QDBUSXML2CPP=/usr/bin/qdbusxml2cpp
45
+ export OE_QMAKE_QT_CONFIG=/usr/share/qt4/mkspecs/qconfig.pri
46
+ export QMAKESPEC=/usr/share/qt4/mkspecs/linux-g++
@@ -0,0 +1,46 @@
1
+ export PATH=$PATH
2
+ export PKG_CONFIG_SYSROOT_DIR=/
3
+ export PKG_CONFIG_PATH=/usr/lib/pkgconfig
4
+ export CONFIG_SITE=
5
+ export CC="gcc"
6
+ export CXX="g++"
7
+ export CPP="gcc -E"
8
+ export AS="as"
9
+ export LD="ld"
10
+ export GDB="gdb"
11
+ export STRIP="strip"
12
+ export RANLIB="ranlib"
13
+ export OBJCOPY="objcopy"
14
+ export OBJDUMP="objdump"
15
+ export AR="ar"
16
+ export NM="nm"
17
+ export SIZE="size"
18
+ export M4="m4"
19
+ export TARGET_PREFIX=x86-
20
+ export CONFIGURE_FLAGS=
21
+ export CFLAGS=" -pipe -g -feliminate-unused-debug-types"
22
+ export CXXFLAGS=" -pipe -g -feliminate-unused-debug-types -fpermissive"
23
+ export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
24
+ export CPPFLAGS=
25
+ export OECORE_NATIVE_SYSROOT=
26
+ export OECORE_TARGET_SYSROOT=
27
+ export OECORE_ACLOCAL_OPTS=
28
+ export OECORE_DISTRO_VERSION="native"
29
+ export OECORE_SDK_VERSION="native"
30
+ export OE_QMAKE_CFLAGS="$CFLAGS"
31
+ export OE_QMAKE_CXXFLAGS="$CXXFLAGS"
32
+ export OE_QMAKE_LDFLAGS="$LDFLAGS"
33
+ export OE_QMAKE_CC=gcc
34
+ export OE_QMAKE_CXX=g++
35
+ export OE_QMAKE_LINK=g++
36
+ export OE_QMAKE_AR=ar
37
+ export OE_QMAKE_LIBDIR_QT=/usr/lib
38
+ export OE_QMAKE_INCDIR_QT=/usr/include
39
+ export OE_QMAKE_MOC=/usr/bin/moc
40
+ export OE_QMAKE_UIC=/usr/bin/uic
41
+ export OE_QMAKE_UIC3=/usr/bin/uic3
42
+ export OE_QMAKE_RCC=/usr/bin/rcc
43
+ export OE_QMAKE_QDBUSCPP2XML=/usr/bin/qdbuscpp2xml
44
+ export OE_QMAKE_QDBUSXML2CPP=/usr/bin/qdbusxml2cpp
45
+ export OE_QMAKE_QT_CONFIG=/usr/share/qt4/mkspecs/qconfig.pri
46
+ export QMAKESPEC=/usr/share/qt4/mkspecs/linux-g++
metadata CHANGED
@@ -1,86 +1,98 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rakeoe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
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-30 00:00:00.000000000 Z
11
+ date: 2014-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: factory_girl
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '4.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '4.0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rake
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - '>='
73
+ - - ">="
60
74
  - !ruby/object:Gem::Version
61
75
  version: '0'
62
76
  type: :runtime
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - '>='
80
+ - - ">="
67
81
  - !ruby/object:Gem::Version
68
82
  version: '0'
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 "
83
+ description: "Rake Optimized for Embedded: RakeOE is a build system for application/library
84
+ development.\n RakeOE utilizes the power of Rake and the
85
+ easyness of Ruby to make build management for\n embedded
86
+ C/C++ development as easy and straight-forward as possible.\n It's
87
+ possible to use it on the command line or to integrate it into an IDE like Eclipse.\n
88
+ \ It runs on Windows, Linux and Mac OS X.\n "
77
89
  email:
78
90
  - dschnell@skerpa.com
79
91
  executables: []
80
92
  extensions: []
81
93
  extra_rdoc_files: []
82
94
  files:
83
- - .gitignore
95
+ - ".gitignore"
84
96
  - Gemfile
85
97
  - LICENSE
86
98
  - README.md
@@ -103,6 +115,13 @@ files:
103
115
  - lib/rakeoe/toolchain/environment-arm-stm32f072-eabi.osx
104
116
  - lib/rakeoe/version.rb
105
117
  - rakeoe.gemspec
118
+ - spec/factories.rb
119
+ - spec/rakoe_spec.rb
120
+ - spec/spec_helper.rb
121
+ - templates/platform/environment-arm-stm32f0-eabi
122
+ - templates/platform/environment-setup-armv7a-vfp-neon-linux-gnueabi
123
+ - templates/platform/environment-x86-linux-gnu.suse.11
124
+ - templates/platform/environment-x86-linux-gnu.ubuntu_12.04
106
125
  homepage: http://rakeoe.github.io/rakeoe/
107
126
  licenses:
108
127
  - GPLv3
@@ -113,12 +132,12 @@ require_paths:
113
132
  - lib
114
133
  required_ruby_version: !ruby/object:Gem::Requirement
115
134
  requirements:
116
- - - '>='
135
+ - - ">="
117
136
  - !ruby/object:Gem::Version
118
137
  version: '0'
119
138
  required_rubygems_version: !ruby/object:Gem::Requirement
120
139
  requirements:
121
- - - '>='
140
+ - - ">="
122
141
  - !ruby/object:Gem::Version
123
142
  version: '0'
124
143
  requirements: []
@@ -128,4 +147,7 @@ signing_key:
128
147
  specification_version: 4
129
148
  summary: 'Rake Optimized for Embedded: build system for test driven Embedded C/C++
130
149
  Development based on Ruby Rake.'
131
- test_files: []
150
+ test_files:
151
+ - spec/factories.rb
152
+ - spec/rakoe_spec.rb
153
+ - spec/spec_helper.rb