bake-toolkit 2.39.1 → 2.40.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37c9ada3c69825228c2c91cf6b3402c5db5999c5
4
- data.tar.gz: 1ef73767df14105792adb00059813cbf2141c0bc
3
+ metadata.gz: bb0adac43c63f67a6209eb737f5fea0441715416
4
+ data.tar.gz: 8f8b68bad2c337986352025b60cde6630e9ae7a5
5
5
  SHA512:
6
- metadata.gz: 89bb98b431c4175de864c7e124b2d8f889937e0ad1d254a6367c15308394f9b337aeef439a4fe8ca58d48a06744388820d3bde36373a4e2853a0d2b128dcaf4d
7
- data.tar.gz: ff4f583bc45946c011a3b944e0be9ef6146442a9241fedbdbfb34bb802cfeba45caa13813754c7622bbec448f88125703861fd8649cb99fbb61300d4013feb22
6
+ metadata.gz: 0ae585591499cfb4c85cd413388d7e07679c79f07b0e7d415849dc2e008393a8f2af0c787457f2554d1445d94e2fa77bbed6fd3f9feb80e8f362d86053fca820
7
+ data.tar.gz: ad887fd898e1e4b8570e1b8c334fad34669957cee3c44f7678dbe3dbec2c55f30872f367884df4e234f3ef16334b37041c53b37974cd3315c895d31d852bb058
@@ -24,7 +24,7 @@ module Bake
24
24
  attr_reader :conversion_info, :stopOnFirstError, :clean, :rebuild, :show_includes, :show_includes_and_defines, :projectPaths, :qac, :dry, :syncedOutput, :debug_threads # Boolean
25
25
  attr_reader :linkOnly, :compileOnly, :no_autodir, :clobber, :docu, :debug, :prepro, :oldLinkOrder, :prebuild, :printTime, :json, :wparse # Boolean
26
26
  attr_reader :threads, :socket # Fixnum
27
- attr_reader :vars # map
27
+ attr_reader :vars, :include_filter_args # map
28
28
  attr_reader :verbose
29
29
  attr_reader :filelist # set
30
30
  attr_reader :consoleOutput_fullnames, :consoleOutput_visualStudio
@@ -77,6 +77,7 @@ module Bake
77
77
  @roots = []
78
78
  @socket = 0
79
79
  @include_filter = []
80
+ @include_filter_args = {}
80
81
  @exclude_filter = []
81
82
  @main_project_name = ""
82
83
  @adapt = []
@@ -120,7 +121,7 @@ module Bake
120
121
  add_option(["--toolchain-info", "--toolchain_info" ], lambda { |x| ToolchainInfo.showToolchain(x) })
121
122
  add_option(["--toolchain-names", "--toolchain_names" ], lambda { ToolchainInfo.showToolchainList })
122
123
  add_option(["--dot", ], lambda { |x| @dot = x })
123
- add_option(["--do", "--include_filter" ], lambda { |x| @include_filter << x })
124
+ add_option(["--do", "--include_filter" ], lambda { |x| set_filter(x) })
124
125
  add_option(["--omit", "--exclude_filter" ], lambda { |x| @exclude_filter << x })
125
126
  add_option(["--abs-paths", "--show_abs_paths" ], lambda { @consoleOutput_fullnames = true })
126
127
  add_option(["--prebuild" ], lambda { @prebuild = true })
@@ -326,6 +327,12 @@ module Bake
326
327
  @vars[ar[0]] = ar[1..-1].join("=")
327
328
  end
328
329
 
330
+ def set_filter(f)
331
+ splitted = f.split("=", 2)
332
+ @include_filter << splitted[0]
333
+ @include_filter_args[splitted[0]] = splitted[1] if splitted.length == 2
334
+ end
335
+
329
336
  end
330
337
 
331
338
  end
@@ -38,7 +38,8 @@ module Bake
38
38
  puts " --toolchain-info <name> Prints default values of a toolchain."
39
39
  puts " --toolchain-names Prints available toolchains."
40
40
  puts " --dot <filename> Creates a .dot file of the config dependencies."
41
- puts " --do <name> Includes steps with this filter name (can be used multiple times)."
41
+ puts " --do <name>[=<arg>] Includes steps with this filter name (can be used multiple times)."
42
+ puts " Optional arguments which can be accessed in Project.meta via $(FilterArguments, <name>)."
42
43
  puts " 'PRE', 'POST', 'STARTUP', 'EXIT' or 'CLEAN' includes all according steps."
43
44
  puts " --omit <name> Excludes steps with this filter name (can be used multiple times)."
44
45
  puts " 'PRE', 'POST', 'STARTUP', 'EXIT' or 'CLEAN' excludes all according steps."
data/lib/bake/subst.rb CHANGED
@@ -163,7 +163,7 @@ module Bake
163
163
  @@resolvedVars += 1
164
164
  var = str[posStart+2..posEnd-1]
165
165
 
166
- splittedVar = var.split(",")
166
+ splittedVar = var.split(",").map { |v| v.strip() }
167
167
 
168
168
  if Bake.options.vars.has_key?(var)
169
169
  substStr << Bake.options.vars[var]
@@ -181,15 +181,21 @@ module Bake
181
181
  substStr << @@toolchainName
182
182
  elsif var == "ProjectName"
183
183
  substStr << @@projName
184
+ elsif var == "FilterArguments" or (splittedVar.length == 2 and splittedVar[0] == "FilterArguments")
185
+ if (var == "FilterArguments")
186
+ # default = nothing
187
+ else
188
+ args = Bake.options.include_filter_args[splittedVar[1]]
189
+ substStr << args if args
190
+ end
184
191
  elsif var == "ProjectDir" or (splittedVar.length == 2 and splittedVar[0] == "ProjectDir")
185
192
  if (var == "ProjectDir")
186
193
  substStr << @@projDir
187
194
  else
188
- out_proj_name = splittedVar[1].strip
195
+ out_proj_name = splittedVar[1]
189
196
  if @@referencedConfigs.has_key?out_proj_name
190
197
  configs = @@referencedConfigs[out_proj_name]
191
198
  config = configs.first
192
-
193
199
  substStr << File.rel_from_to_project(@@projDir,config.get_project_dir,false)
194
200
  else
195
201
  if Bake.options.verbose > 0
@@ -203,8 +209,8 @@ module Bake
203
209
  out_proj_name = @@projName
204
210
  out_conf_name = @@configName
205
211
  else
206
- out_proj_name = splittedVar[1].strip
207
- out_conf_name = splittedVar[2].strip
212
+ out_proj_name = splittedVar[1]
213
+ out_conf_name = splittedVar[2]
208
214
  end
209
215
  if @@referencedConfigs.has_key?out_proj_name
210
216
  configs = @@referencedConfigs[out_proj_name]
data/lib/common/root.rb CHANGED
@@ -87,8 +87,10 @@ module Bake
87
87
  array = Array.new(depth+1) {|i| root + '/*'*i + '/' + baseName}
88
88
  return Dir.glob(array).sort
89
89
  else
90
- str = "#{root}/**/#{baseName}"
91
- return Dir.glob(str).sort
90
+ # when using junctions, /**/ does not work, so the glob is splitted into two globs to find at least first level projects
91
+ str1 = "#{root}/#{baseName}"
92
+ str2 = "#{root}/*/**/#{baseName}"
93
+ return (Dir.glob(str1) + Dir.glob(str2)).sort
92
94
  end
93
95
  end
94
96
 
@@ -1,7 +1,7 @@
1
1
  module Bake
2
2
  class Version
3
3
  def self.number
4
- "2.39.1"
4
+ "2.40.0"
5
5
  end
6
6
 
7
7
  def self.printBakeVersion(ry = "")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bake-toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.39.1
4
+ version: 2.40.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Schaal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-19 00:00:00.000000000 Z
11
+ date: 2017-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rtext