rscons 1.16.0 → 1.17.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
  SHA256:
3
- metadata.gz: e6ab9f61dc793cbbd24e94de699b62fad0c5f7d7da1d09e4ed117d6660b8ed77
4
- data.tar.gz: 8bb4e4698a8cc54941c9e2757857de1ccc8914b95596a2f6fc308f7b717e7db8
3
+ metadata.gz: d1c35c3bc6732619150b8db82fef940d7b52158928e840d1476b50e67ac1bc12
4
+ data.tar.gz: 8a7824b24ddc5b8f0f0a137f90614e1f07c34aaba6a155b7ff3aad4025481cea
5
5
  SHA512:
6
- metadata.gz: 18d50b38e720459b289e51b0fd3a101294ff9bb5ac168c5923145ff39bd38eacefe9fef9d140bd252bf0f4eb1342ba9dc1e7e9569c9a5d641447b0d79b02d64f
7
- data.tar.gz: 82d2339ac692f1338da75d2d1def8e817f13cfba1373f98be9e785016d03c55a183cc8775dc827b2174d70a1ca8883026202264c9d94f5c225dcfb2d2a44c1c0
6
+ metadata.gz: 49f2d855f39126acd3a1776211971b7605f8a391dad8aa85cce9f6951b12ee02abe94564ac2332d1fdbe1f25a2beae0b79d8035fb0af46f2b79543b7105d69a5
7
+ data.tar.gz: 549b3b08fee0046a7f210fa42b3a0a51cb3eb61e79ad172c720007ee187ebe781ac69dca2693dde8646b8b7d49739cdf277465b44f1305eaf803ed57d444ce64
@@ -30,7 +30,7 @@ module Rscons
30
30
  'ASSUFFIX' => ['.S'],
31
31
  'ASPPPATH' => '${CPPPATH}',
32
32
  'ASPPFLAGS' => '${CPPFLAGS}',
33
- 'ASDEPGEN' => ['-MMD', '-MF', '${_DEPFILE}', '-MT', 'TARGET'],
33
+ 'ASDEPGEN' => ['-MMD', '-MF', '${_DEPFILE}'],
34
34
  'ASCMD' => ['${AS}', '-c', '-o', '${_TARGET}', '${ASDEPGEN}', '${INCPREFIX}${ASPPPATH}', '${ASPPFLAGS}', '${ASFLAGS}', '${_SOURCES}'],
35
35
 
36
36
  'CPPFLAGS' => ['${CPPDEFPREFIX}${CPPDEFINES}'],
@@ -42,19 +42,19 @@ module Rscons
42
42
  'CC' => 'gcc',
43
43
  'CFLAGS' => [],
44
44
  'CSUFFIX' => ['.c'],
45
- 'CCDEPGEN' => ['-MMD', '-MF', '${_DEPFILE}', '-MT', 'TARGET'],
45
+ 'CCDEPGEN' => ['-MMD', '-MF', '${_DEPFILE}'],
46
46
  'CCCMD' => ['${CC}', '-c', '-o', '${_TARGET}', '${CCDEPGEN}', '${INCPREFIX}${CPPPATH}', '${CPPFLAGS}', '${CFLAGS}', '${CCFLAGS}', '${_SOURCES}'],
47
47
 
48
48
  'CXX' => 'g++',
49
49
  'CXXFLAGS' => [],
50
50
  'CXXSUFFIX' => ['.cc', '.cpp', '.cxx', '.C'],
51
- 'CXXDEPGEN' => ['-MMD', '-MF', '${_DEPFILE}', '-MT', 'TARGET'],
51
+ 'CXXDEPGEN' => ['-MMD', '-MF', '${_DEPFILE}'],
52
52
  'CXXCMD' =>['${CXX}', '-c', '-o', '${_TARGET}', '${CXXDEPGEN}', '${INCPREFIX}${CPPPATH}', '${CPPFLAGS}', '${CXXFLAGS}', '${CCFLAGS}', '${_SOURCES}'],
53
53
 
54
54
  'DC' => 'gdc',
55
55
  'DFLAGS' => [],
56
56
  'DSUFFIX' => ['.d'],
57
- 'DDEPGEN' => ['-MMD', '-MF', '${_DEPFILE}', '-MT', 'TARGET'],
57
+ 'DDEPGEN' => ['-MMD', '-MF', '${_DEPFILE}'],
58
58
  'D_IMPORT_PATH' => [],
59
59
  'DCCMD' => ['${DC}', '-c', '-o', '${_TARGET}', '${DDEPGEN}', '${INCPREFIX}${D_IMPORT_PATH}', '${DFLAGS}', '${_SOURCES}'],
60
60
  }
@@ -115,7 +115,7 @@ module Rscons
115
115
  if options[:command_status]
116
116
  target, deps, cache, env, vars = options.values_at(:target, :sources, :cache, :env, :vars)
117
117
  if File.exists?(vars['_DEPFILE'])
118
- deps += Environment.parse_makefile_deps(vars['_DEPFILE'], 'TARGET')
118
+ deps += Environment.parse_makefile_deps(vars['_DEPFILE'])
119
119
  FileUtils.rm_f(vars['_DEPFILE'])
120
120
  end
121
121
  cache.register_build(target, options[:tc].command, deps.uniq, env)
@@ -55,7 +55,7 @@ module Rscons
55
55
  if options[:command_status]
56
56
  target, deps, cache, env, vars = options.values_at(:target, :sources, :cache, :env, :vars)
57
57
  if File.exists?(vars['_DEPFILE'])
58
- deps += Environment.parse_makefile_deps(vars['_DEPFILE'], nil)
58
+ deps += Environment.parse_makefile_deps(vars['_DEPFILE'])
59
59
  FileUtils.rm_f(vars['_DEPFILE'])
60
60
  end
61
61
  cache.register_build(target, options[:tc].command, deps.uniq, env)
@@ -100,7 +100,7 @@ module Rscons
100
100
  if options[:command_status]
101
101
  target, deps, cache, env, vars = options.values_at(:target, :sources, :cache, :env, :vars)
102
102
  if File.exists?(vars['_DEPFILE'])
103
- deps += Environment.parse_makefile_deps(vars['_DEPFILE'], 'TARGET')
103
+ deps += Environment.parse_makefile_deps(vars['_DEPFILE'])
104
104
  FileUtils.rm_f(vars['_DEPFILE'])
105
105
  end
106
106
  cache.register_build(target, options[:tc].command, deps.uniq, env)
@@ -385,12 +385,12 @@ module Rscons
385
385
 
386
386
  # Expand a construction variable reference.
387
387
  #
388
- # @param varref [Array, String] Variable reference to expand.
388
+ # @param varref [nil, String, Array, Proc, Symbol, TrueClass, FalseClass] Variable reference to expand.
389
389
  # @param extra_vars [Hash, VarSet]
390
390
  # Extra variables to use in addition to (or replace) the Environment's
391
391
  # construction variables when expanding the variable reference.
392
392
  #
393
- # @return [Array, String] Expansion of the variable reference.
393
+ # @return [nil, String, Array, Symbol, TrueClass, FalseClass] Expansion of the variable reference.
394
394
  def expand_varref(varref, extra_vars = nil)
395
395
  vars = if extra_vars.nil?
396
396
  @varset
@@ -1065,16 +1065,14 @@ module Rscons
1065
1065
  end
1066
1066
  end
1067
1067
 
1068
- # Parse dependencies for a given target from a Makefile.
1068
+ # Parse dependencies from a Makefile.
1069
1069
  #
1070
1070
  # This method is used internally by Rscons builders.
1071
1071
  #
1072
1072
  # @param mf_fname [String] File name of the Makefile to read.
1073
- # @param target [String, nil]
1074
- # Name of the target to gather dependencies for, nil for any/all.
1075
1073
  #
1076
1074
  # @return [Array<String>] Paths of dependency files.
1077
- def self.parse_makefile_deps(mf_fname, target)
1075
+ def self.parse_makefile_deps(mf_fname)
1078
1076
  deps = []
1079
1077
  buildup = ''
1080
1078
  File.read(mf_fname).each_line do |line|
@@ -1082,11 +1080,9 @@ module Rscons
1082
1080
  buildup += ' ' + $1
1083
1081
  else
1084
1082
  buildup += ' ' + line
1085
- if buildup =~ /^(.*): (.*)$/
1086
- mf_target, mf_deps = $1.strip, $2
1087
- if target.nil? or mf_target == target
1088
- deps += mf_deps.split(' ').map(&:strip)
1089
- end
1083
+ if buildup =~ /^.*: (.*)$/
1084
+ mf_deps = $1
1085
+ deps += mf_deps.split(' ').map(&:strip)
1090
1086
  end
1091
1087
  buildup = ''
1092
1088
  end
@@ -86,12 +86,12 @@ module Rscons
86
86
  # Replace "$!{var}" variable references in varref with the expanded
87
87
  # variables' values, recursively.
88
88
  #
89
- # @param varref [nil, String, Array, Proc]
89
+ # @param varref [nil, String, Array, Proc, Symbol, TrueClass, FalseClass]
90
90
  # Value containing references to variables.
91
91
  # @param lambda_args [Array]
92
92
  # Arguments to pass to any lambda variable values to be expanded.
93
93
  #
94
- # @return [nil, String, Array]
94
+ # @return [nil, String, Array, Symbol, TrueClass, FalseClass]
95
95
  # Expanded value with "$!{var}" variable references replaced.
96
96
  def expand_varref(varref, lambda_args)
97
97
  if varref.is_a?(String)
@@ -118,6 +118,10 @@ module Rscons
118
118
  nil
119
119
  elsif varref.is_a?(Symbol)
120
120
  varref
121
+ elsif varref.is_a?(TrueClass)
122
+ varref
123
+ elsif varref.is_a?(FalseClass)
124
+ varref
121
125
  else
122
126
  raise "Unknown varref type: #{varref.class} (#{varref.inspect})"
123
127
  end
@@ -1,4 +1,4 @@
1
1
  module Rscons
2
2
  # gem version
3
- VERSION = "1.16.0"
3
+ VERSION = "1.17.0"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rscons
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.0
4
+ version: 1.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Holtrop
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-24 00:00:00.000000000 Z
11
+ date: 2018-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json