mtbuild 0.1.2 → 0.1.3
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/CHANGES.md +13 -0
- data/README.md +3 -1
- data/lib/mtbuild.rb +1 -1
- data/lib/mtbuild/application.rb +15 -0
- data/lib/mtbuild/compiled_configuration.rb +1 -1
- data/lib/mtbuild/project.rb +0 -7
- data/lib/mtbuild/utils.rb +1 -1
- data/lib/mtbuild/workspace.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a217788ed422994acb0e8b158ddb179f84298f9f
|
|
4
|
+
data.tar.gz: 5c385e802f9c2fd223f993a93b0009cfb7d984ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e02b69f8cf243376deaf87e298b5855adbbc0885003ee3e6a9a73adcf5124c011aa4efd4b013db361fcbb092ccd1ba1e68362829f83f0af7cdc7a8f40352df6
|
|
7
|
+
data.tar.gz: f8f2ff9949627b0216253280b44ccfa7ed9625f5f22e7a921678c09a1c9fb86616902eae46f34f0f33fd03428fc879cdd74ec0c8cf260cf30ad1b9832bcee481
|
data/CHANGES.md
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
# Release Notes #
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## MTBuild 0.1.3 ##
|
|
5
|
+
|
|
6
|
+
### Changes ###
|
|
7
|
+
|
|
8
|
+
* Changed 'default' task to 'all' task to be more compatible with 'make'
|
|
9
|
+
conventions.
|
|
10
|
+
* Fixed bug where source files couldn't be excluded with 'excludes'
|
|
11
|
+
configuration property.
|
|
12
|
+
* Renamed the 'excludes' property to 'source_excludes' and documented it.
|
|
13
|
+
(Source file exclusion was previously undocumented--probably because it
|
|
14
|
+
didn't work.)
|
|
15
|
+
|
|
16
|
+
|
|
4
17
|
## MTBuild 0.1.2 ##
|
|
5
18
|
|
|
6
19
|
### Changes ###
|
data/README.md
CHANGED
|
@@ -461,7 +461,9 @@ Application Project configurations offer the following optional settings:
|
|
|
461
461
|
|
|
462
462
|
* ```:dependencies``` - The Rake task names of one or more dependencies. For example, ```'MyLibrary:Debug'``` or ```['MyLibrary1:Debug', 'MyLibrary2:Debug']```
|
|
463
463
|
|
|
464
|
-
* ```:sources``` -
|
|
464
|
+
* ```:sources``` - Source files to build in this configuration. Specified as one or more source file names or source file glob patterns. For example, ```'main.c'``` or ```['main.c', 'startup.c']``` or ```['src/main.c', 'src/*.cpp']```. Note that the source file paths should be relative to the project folder.
|
|
465
|
+
|
|
466
|
+
* ```:excluded_sources``` - Source files to exclude from the configuration. Specified as one or more source file names or source file glob patterns. For example, ```'badmain.c'``` or ```['badmain.c', 'badstartup.c']``` or ```['src/badmain.c', 'src/bad*.cpp']```. Note that the source file paths should be relative to the project folder.
|
|
465
467
|
|
|
466
468
|
* ```:tests``` - The Rake task names of one or more unit test applications. For example, ```'MyLibraryTest:Test'``` or ```['MyLibraryTest1:Test', 'MyLibraryTest2:Test']```
|
|
467
469
|
|
data/lib/mtbuild.rb
CHANGED
data/lib/mtbuild/application.rb
CHANGED
|
@@ -34,6 +34,7 @@ module MTBuild
|
|
|
34
34
|
standard_exception_handling do
|
|
35
35
|
init
|
|
36
36
|
load_rakefile
|
|
37
|
+
create_default_task_if_none_exists
|
|
37
38
|
top_level
|
|
38
39
|
end
|
|
39
40
|
end
|
|
@@ -74,6 +75,20 @@ module MTBuild
|
|
|
74
75
|
sort_options(options)
|
|
75
76
|
end
|
|
76
77
|
|
|
78
|
+
def create_default_task_if_none_exists
|
|
79
|
+
if lookup(default_task_name).nil?
|
|
80
|
+
task default_task_name do
|
|
81
|
+
puts 'Nothing to do because no projects specified default tasks.'
|
|
82
|
+
puts 'Use the -T flag to see the list of tasks you can build.'
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
def default_task_name
|
|
88
|
+
'all'
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
include Rake::DSL
|
|
77
92
|
end
|
|
78
93
|
|
|
79
94
|
end
|
|
@@ -22,7 +22,7 @@ module MTBuild
|
|
|
22
22
|
@default_toolchain_config = configuration[:toolchain]
|
|
23
23
|
@default_toolchain = Toolchain.create_toolchain(self, @default_toolchain_config)
|
|
24
24
|
|
|
25
|
-
@source_files = Utils.expand_file_list(configuration.fetch(:sources, []), configuration.fetch(:
|
|
25
|
+
@source_files = Utils.expand_file_list(configuration.fetch(:sources, []), configuration.fetch(:excluded_sources, []), @project_folder)
|
|
26
26
|
@toolchains = {@default_toolchain => @source_files}
|
|
27
27
|
|
|
28
28
|
@tests = namespace_tasks(Utils.ensure_array(configuration.fetch(:tests, [])))
|
data/lib/mtbuild/project.rb
CHANGED
|
@@ -40,13 +40,6 @@ module MTBuild
|
|
|
40
40
|
Cleaner.generate_clean_task_for_project(@project_name, @clean_list)
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
#TODO: This is a strange way to do this. Should probably be moved to "application" functionality.
|
|
44
|
-
if @parent_workspace.nil? and Rake.application.lookup(:default).nil?
|
|
45
|
-
task :default do
|
|
46
|
-
puts 'Nothing to do. Use the -T flag to see the list of tasks you can build.'
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
|
|
50
43
|
MTBuild::BuildRegistry.exit_project
|
|
51
44
|
end
|
|
52
45
|
|
data/lib/mtbuild/utils.rb
CHANGED
|
@@ -21,7 +21,7 @@ module MTBuild
|
|
|
21
21
|
file_list.include(included_files)
|
|
22
22
|
|
|
23
23
|
excluded_files = Utils.ensure_array(excluded_files).flatten.collect{|e| base_folder ? File.join(base_folder, e) : e}
|
|
24
|
-
file_list.exclude(excluded_files)
|
|
24
|
+
file_list.exclude(*excluded_files)
|
|
25
25
|
|
|
26
26
|
return file_list.to_ary.collect{|f| File.expand_path(f)}
|
|
27
27
|
end
|
data/lib/mtbuild/workspace.rb
CHANGED
|
@@ -70,7 +70,7 @@ module MTBuild
|
|
|
70
70
|
|
|
71
71
|
# Only register default tasks and generate global clean if we're the top-level workspace.
|
|
72
72
|
if @parent_workspace.nil?
|
|
73
|
-
task
|
|
73
|
+
task Rake.application.default_task_name => @default_tasks
|
|
74
74
|
Cleaner.generate_global_clean_task
|
|
75
75
|
end
|
|
76
76
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mtbuild
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jerry Ryle
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-09-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|