autobuild 1.7.11.rc4 → 1.7.11.rc5
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -0
- data/lib/autobuild/environment.rb +6 -9
- data/lib/autobuild/tools.rb +9 -5
- data/lib/autobuild/version.rb +1 -1
- metadata +3 -3
data/Rakefile
CHANGED
@@ -9,6 +9,8 @@ Utilrb::Rake.hoe do
|
|
9
9
|
self.description = "Collection of classes to handle build systems (CMake, autotools, ...) and import mechanisms (tarballs, CVS, SVN, git, ...). It also offers a Rake integration to import and build such software packages. It is the backbone of the autoproj (http://rock-robotics.org/autoproj) integrated software project management tool."
|
10
10
|
self.email = %q{rock-dev@dfki.de}
|
11
11
|
|
12
|
+
license 'BSD'
|
13
|
+
|
12
14
|
self.extra_deps <<
|
13
15
|
['rake', '>= 0.9.0'] <<
|
14
16
|
['utilrb', '>= 1.6.0'] <<
|
@@ -22,10 +22,6 @@ module Autobuild
|
|
22
22
|
ENV.each do |k, v|
|
23
23
|
ORIGINAL_ENV[k] = v
|
24
24
|
end
|
25
|
-
ENV_LIST_SEPARATOR =
|
26
|
-
if windows? then ';'
|
27
|
-
else ':'
|
28
|
-
end
|
29
25
|
SHELL_VAR_EXPANSION =
|
30
26
|
if windows? then "%%%s%%"
|
31
27
|
else "$%s"
|
@@ -55,7 +51,8 @@ module Autobuild
|
|
55
51
|
# List of the environment that should be set before calling a subcommand
|
56
52
|
#
|
57
53
|
# It is a map from environment variable name to the corresponding value.
|
58
|
-
# If the value is an array, it is joined using the
|
54
|
+
# If the value is an array, it is joined using the operating system's
|
55
|
+
# path separator (File::PATH_SEPARATOR)
|
59
56
|
attr_reader :environment
|
60
57
|
|
61
58
|
# In generated environment update shell files, indicates whether an
|
@@ -172,7 +169,7 @@ module Autobuild
|
|
172
169
|
|
173
170
|
def self.env_init_from_env(name)
|
174
171
|
if env_inherit?(name) && (parent_env = ORIGINAL_ENV[name])
|
175
|
-
inherited_environment[name] = parent_env.split(
|
172
|
+
inherited_environment[name] = parent_env.split(File::PATH_SEPARATOR)
|
176
173
|
else
|
177
174
|
inherited_environment[name] = Array.new
|
178
175
|
end
|
@@ -262,7 +259,7 @@ module Autobuild
|
|
262
259
|
|
263
260
|
def self.env_update_var(name)
|
264
261
|
if value = env_value(name)
|
265
|
-
ENV[name] = value.join(
|
262
|
+
ENV[name] = value.join(File::PATH_SEPARATOR)
|
266
263
|
else
|
267
264
|
ENV.delete(name)
|
268
265
|
end
|
@@ -336,9 +333,9 @@ module Autobuild
|
|
336
333
|
if !value_with_inheritance
|
337
334
|
shell_line = SHELL_UNSET_COMMAND % [name]
|
338
335
|
elsif value_with_inheritance == value_without_inheritance # no inheritance
|
339
|
-
shell_line = SHELL_SET_COMMAND % [name, value_with_inheritance.join(
|
336
|
+
shell_line = SHELL_SET_COMMAND % [name, value_with_inheritance.join(File::PATH_SEPARATOR)]
|
340
337
|
else
|
341
|
-
shell_line = SHELL_CONDITIONAL_SET_COMMAND % [name, value_with_inheritance.join(
|
338
|
+
shell_line = SHELL_CONDITIONAL_SET_COMMAND % [name, value_with_inheritance.join(File::PATH_SEPARATOR), value_without_inheritance.join(File::PATH_SEPARATOR)]
|
342
339
|
end
|
343
340
|
io.puts shell_line
|
344
341
|
end
|
data/lib/autobuild/tools.rb
CHANGED
@@ -21,6 +21,14 @@ module Autobuild
|
|
21
21
|
programs[name.to_sym] || programs[name.to_s] || name.to_s
|
22
22
|
end
|
23
23
|
|
24
|
+
def find_in_path(file)
|
25
|
+
path = ENV['PATH'].split(File::PATH_SEPARATOR).
|
26
|
+
find { |dir| File.exists?(File.join(dir, file)) }
|
27
|
+
if path
|
28
|
+
return File.join(path, file)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
24
32
|
# Resolves the absolute path to a given tool
|
25
33
|
def tool_in_path(name)
|
26
34
|
path, path_name, path_env = programs_in_path[name]
|
@@ -32,11 +40,7 @@ module Autobuild
|
|
32
40
|
# This is already a full path
|
33
41
|
path = current
|
34
42
|
else
|
35
|
-
path =
|
36
|
-
find { |dir| File.exists?(File.join(dir, current)) }
|
37
|
-
if path
|
38
|
-
path = File.join(path, current)
|
39
|
-
end
|
43
|
+
path = find_in_path(current)
|
40
44
|
end
|
41
45
|
|
42
46
|
if !path
|
data/lib/autobuild/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autobuild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.11.
|
4
|
+
version: 1.7.11.rc5
|
5
5
|
prerelease: 7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-05-
|
12
|
+
date: 2014-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -157,7 +157,7 @@ files:
|
|
157
157
|
- .gemtest
|
158
158
|
homepage: http://rock-robotics.org/stable/documentation/autoproj
|
159
159
|
licenses:
|
160
|
-
-
|
160
|
+
- BSD
|
161
161
|
post_install_message:
|
162
162
|
rdoc_options:
|
163
163
|
- --main
|