autobuild 1.6.2.b8 → 1.6.2.b9

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,8 @@ require 'set'
2
2
  module Autobuild
3
3
  @inherited_environment = Hash.new
4
4
  @environment = Hash.new
5
- @env_source_files = Set.new
5
+ @env_source_before = Set.new
6
+ @env_source_after = Set.new
6
7
 
7
8
  class << self
8
9
  # List of the environment that should be set before calling a subcommand
@@ -27,7 +28,11 @@ module Autobuild
27
28
 
28
29
  # List of files that should be sourced in the generated environment
29
30
  # variable setting shell scripts
30
- attr_reader :env_source_files
31
+ attr_reader :env_source_before
32
+
33
+ # List of files that should be sourced in the generated environment
34
+ # variable setting shell scripts
35
+ attr_reader :env_source_after
31
36
  end
32
37
 
33
38
  # Removes any settings related to the environment varialbe +name+, or for
@@ -92,7 +97,19 @@ module Autobuild
92
97
  # Require that generated environment variable scripts source the given shell
93
98
  # script
94
99
  def self.env_source_file(file)
95
- @env_source_files << file
100
+ env_source_after(file)
101
+ end
102
+
103
+ # Require that generated environment variable scripts source the given shell
104
+ # script
105
+ def self.env_source_before(file)
106
+ @env_source_before << file
107
+ end
108
+
109
+ # Require that generated environment variable scripts source the given shell
110
+ # script
111
+ def self.env_source_after(file)
112
+ @env_source_after << file
96
113
  end
97
114
 
98
115
  # Generates a shell script that sets the environment variable listed in
@@ -101,6 +118,10 @@ module Autobuild
101
118
  #
102
119
  # It also sources the files added by Autobuild.env_source_file
103
120
  def self.export_env_sh(io)
121
+ env_source_before.each do |path|
122
+ io.puts ". \"#{path}\""
123
+ end
124
+
104
125
  variables = []
105
126
  Autobuild.environment.each do |name, value|
106
127
  variables << name
@@ -117,7 +138,7 @@ module Autobuild
117
138
  variables.each do |var|
118
139
  io.puts "export #{var}"
119
140
  end
120
- env_source_files.each do |path|
141
+ env_source_after.each do |path|
121
142
  io.puts ". \"#{path}\""
122
143
  end
123
144
  end
@@ -1,5 +1,5 @@
1
1
  module Autobuild
2
- VERSION = "1.6.2.b8" unless defined? Autobuild::VERSION
2
+ VERSION = "1.6.2.b9" unless defined? Autobuild::VERSION
3
3
  end
4
4
 
5
5
 
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.6.2.b8
4
+ version: 1.6.2.b9
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-10-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &10655240 !ruby/object:Gem::Requirement
16
+ requirement: &10069680 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.7.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *10655240
24
+ version_requirements: *10069680
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: utilrb
27
- requirement: &10652940 !ruby/object:Gem::Requirement
27
+ requirement: &10066560 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.3.3
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *10652940
35
+ version_requirements: *10066560
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rdoc
38
- requirement: &10651860 !ruby/object:Gem::Requirement
38
+ requirement: &10065060 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '3.10'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *10651860
46
+ version_requirements: *10065060
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: hoe
49
- requirement: &10650040 !ruby/object:Gem::Requirement
49
+ requirement: &10063820 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '3.0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *10650040
57
+ version_requirements: *10063820
58
58
  description: Collection of classes to handle build systems (CMake, autotools, ...)
59
59
  and import mechanisms (tarballs, CVS, SVN, git, ...). It also offers a Rake integration
60
60
  to import and build such software packages. It is the backbone of the autoproj (http://rock-robotics.org/autoproj)