autobuild 1.5.3 → 1.5.4

Sign up to get free protection for your applications and to get access to all the features.
data/Changes.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == Version 1.5.4
2
+ * support orogen's --extended-states
3
+ * small API fix when subclassing CMake package handler
4
+
1
5
  == Version 1.5.3
2
6
  * quickfix for RUBYLIB on OSes that install libraries in usr/lib32 or usr/lib64
3
7
  instead of usr/lib
data/lib/autobuild.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Autobuild
2
- VERSION = "1.5.3" unless defined? Autobuild::VERSION
2
+ VERSION = "1.5.4" unless defined? Autobuild::VERSION
3
3
  end
4
4
 
5
5
  require 'autobuild/config'
@@ -85,6 +85,23 @@ module Autobuild
85
85
  nil
86
86
  end
87
87
 
88
+ def prepare_for_forced_build
89
+ autodetect_needed_stages
90
+ if using[:autoconf]
91
+ FileUtils.rm_f File.join(srcdir, 'configure')
92
+ end
93
+
94
+ if using[:automake]
95
+ Find.find(srcdir) do |path|
96
+ if File.basename(path) == "Makefile.in"
97
+ FileUtils.rm_f path
98
+ end
99
+ end
100
+ end
101
+
102
+ FileUtils.rm_f configurestamp
103
+ end
104
+
88
105
  def prepare
89
106
  super
90
107
 
@@ -113,6 +130,26 @@ module Autobuild
113
130
  end
114
131
 
115
132
  private
133
+ def autodetect_needed_stages
134
+ # Autodetect autoconf/aclocal/automake
135
+ #
136
+ # Let the user disable the use of autoconf explicitely by using 'false'.
137
+ # 'nil' means autodetection
138
+ if using[:autoconf].nil?
139
+ if File.file?(File.join(srcdir, 'configure.in')) || File.file?(File.join(srcdir, 'configure.ac'))
140
+ using[:autoconf] = true
141
+ end
142
+ end
143
+ using[:aclocal] = using[:autoconf] if using[:aclocal].nil?
144
+ if using[:automake].nil?
145
+ using[:automake] = File.exists?(File.join(srcdir, 'Makefile.am'))
146
+ end
147
+
148
+ if using[:libtool].nil?
149
+ using[:libtool] = File.exists?(File.join(srcdir, 'ltmain.sh'))
150
+ end
151
+ end
152
+
116
153
  # Adds a target to rebuild the autotools environment
117
154
  def create_regen_target(confsource = nil)
118
155
  conffile = "#{srcdir}/configure"
@@ -130,31 +167,15 @@ module Autobuild
130
167
  using[:autogen] = %w{autogen autogen.sh}.find { |f| File.exists?(f) }
131
168
  end
132
169
 
170
+ autodetect_needed_stages
171
+
133
172
  progress "generating build system for %s"
173
+ if using[:libtool]
174
+ Subprocess.run(self, 'configure', Autobuild.tool('libtoolize'), '--copy')
175
+ end
134
176
  if using[:autogen]
135
177
  Subprocess.run(self, 'configure', File.expand_path(using[:autogen]))
136
178
  else
137
- # Autodetect autoconf/aclocal/automake
138
- #
139
- # Let the user disable the use of autoconf explicitely by using 'false'.
140
- # 'nil' means autodetection
141
- if using[:autoconf].nil?
142
- if File.file?(File.join(srcdir, 'configure.in')) || File.file?(File.join(srcdir, 'configure.ac'))
143
- using[:autoconf] = true
144
- end
145
- end
146
- using[:aclocal] = using[:autoconf] if using[:aclocal].nil?
147
- if using[:automake].nil?
148
- using[:automake] = File.exists?(File.join(srcdir, 'Makefile.am'))
149
- end
150
-
151
- if using[:libtool].nil?
152
- using[:libtool] = File.exists?(File.join(srcdir, 'ltmain.sh'))
153
- end
154
- if using[:libtool]
155
- Subprocess.run(self, 'configure', Autobuild.tool('libtoolize'), '--copy')
156
- end
157
-
158
179
  [ :aclocal, :autoconf, :autoheader, :automake ].each do |tool|
159
180
  if tool_flag = using[tool]
160
181
  tool_program = if tool_flag.respond_to?(:to_str)
@@ -44,7 +44,8 @@ module Autobuild
44
44
  end
45
45
  end
46
46
 
47
- def configurestamp; File.join(builddir, "CMakeCache.txt") end
47
+ def cmake_cache; File.join(builddir, "CMakeCache.txt") end
48
+ def configurestamp; cmake_cache end
48
49
 
49
50
  def initialize(options)
50
51
  @defines = Hash.new
@@ -105,13 +106,13 @@ module Autobuild
105
106
  #
106
107
  # Delete the CMakeCache to force reconfiguration
107
108
  if !File.exists?( File.join(builddir, 'Makefile') )
108
- FileUtils.rm_f configurestamp
109
+ FileUtils.rm_f cmake_cache
109
110
  end
110
111
 
111
- if File.exists?(configurestamp)
112
+ if File.exists?(cmake_cache)
112
113
  all_defines = defines.dup
113
114
  all_defines['CMAKE_INSTALL_PREFIX'] = prefix
114
- cache = File.read(configurestamp)
115
+ cache = File.read(cmake_cache)
115
116
  did_change = all_defines.any? do |name, value|
116
117
  cache_line = cache.each_line.find do |line|
117
118
  line =~ /^#{name}:/
@@ -131,7 +132,7 @@ module Autobuild
131
132
  if Autobuild.debug
132
133
  puts "CMake configuration changed, forcing a reconfigure"
133
134
  end
134
- FileUtils.rm_f configurestamp
135
+ FileUtils.rm_f cmake_cache
135
136
  end
136
137
  end
137
138
 
@@ -150,7 +151,7 @@ module Autobuild
150
151
 
151
152
  progress "generating and configuring build system for %s"
152
153
  if full_reconfigures?
153
- FileUtils.rm_f configurestamp
154
+ FileUtils.rm_f cmake_cache
154
155
  end
155
156
  Subprocess.run(self, 'configure', *command)
156
157
  end
@@ -136,6 +136,7 @@ module Autobuild
136
136
  class Orogen < CMake
137
137
  class << self
138
138
  attr_accessor :corba
139
+ attr_accessor :extended_states
139
140
  end
140
141
 
141
142
  @orocos_target = nil
@@ -187,9 +188,13 @@ module Autobuild
187
188
  @corba || (@corba.nil? && Orogen.corba)
188
189
  end
189
190
 
191
+ attr_writer :extended_states
192
+ def extended_states
193
+ @extended_states || (@extended_states.nil? && Orogen.extended_states)
194
+ end
195
+
190
196
  attr_accessor :orogen_file
191
197
  def initialize(*args, &config)
192
- @corba = Orogen.corba
193
198
  super
194
199
 
195
200
  @orocos_target = nil
@@ -266,6 +271,7 @@ module Autobuild
266
271
  def regen
267
272
  cmdline = [guess_ruby_name, self.class.orogen_bin]
268
273
  cmdline << '--corba' if corba
274
+ cmdline << '--extended-states' if extended_states
269
275
  cmdline << orogen_file
270
276
 
271
277
  progress "generating oroGen project %s"
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.5.3
4
+ version: 1.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Joyeux
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-15 00:00:00 +01:00
12
+ date: 2010-03-01 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -70,7 +70,7 @@ dependencies:
70
70
  requirements:
71
71
  - - ">="
72
72
  - !ruby/object:Gem::Version
73
- version: 0.3.0
73
+ version: 0.2.1
74
74
  version:
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: hoe