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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f3e4d1cccbe7c5456ef353cb5fd432eeccf0d06b
4
- data.tar.gz: c0c996673e3682024d8514d67d51f93e204fdca7
3
+ metadata.gz: a217788ed422994acb0e8b158ddb179f84298f9f
4
+ data.tar.gz: 5c385e802f9c2fd223f993a93b0009cfb7d984ce
5
5
  SHA512:
6
- metadata.gz: c38f7fc92990df74599b2e7fbd4ab3a91a11e97582246afc2d891383ebeb1c713799a16ca363968021f6bf257857903577eb1d56ba72440ae4256ed5fa82c9f3
7
- data.tar.gz: 34bea4ad42b155151ffb6324c6f2cf17a1308b9721c78b7fcf4d659f392faf594efc2857ea4871081843b6a11c931a664f69f1d948f8c6168aeeda3d58deff2a
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``` - 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.
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
 
@@ -1,6 +1,6 @@
1
1
  module MTBuild
2
2
  # The current MTBuild version.
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
 
6
6
  require 'rake'
@@ -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(:excludes, []), @project_folder)
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, [])))
@@ -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
 
@@ -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
@@ -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 :default => @default_tasks
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.2
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-08-27 00:00:00.000000000 Z
11
+ date: 2015-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake