build-tool 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
@@ -1,2 +1 @@
1
- Q#^F��Ox�����C<�7���j�1|(%r��fRe#���7�����"��eQ]��m)G�߼9��� /$�rEl<|�|j�����ǯ�t��^߀���A!>�4N>ss���?�^�h��+��x�+M/Xv���
2
- ���g � �A���t����d;���\�?�d�,�Q�V����=�|֟T��p��MA���i��h�+�F��$H;��N)� �5%�D��Hr?���������YMd�� ׄnDt�
1
+ Cs�it���`x�=r�x��>DZ�����1I�4Ӿ�Y� �6���Aq(�eq袐@Y1=>2t�`����Xǀ��NՌ11_�0�!_���^x���P�ѩ&t�q"*��fHg�"���L��� ���S}�¤��j�j`x/öH"�(
data/.gemtest ADDED
File without changes
data/History.txt CHANGED
@@ -1,3 +1,22 @@
1
+ == 0.4.4
2
+ - Enhancements
3
+ - More ways to specify a module on the command line.
4
+ - foo matches any module foo disregarding namespaces as long as only one matching module is
5
+ found. ( kdelibs -> KDE/kdelibs )
6
+ - foo/ matches any module that has foo/ as a namespace part.
7
+ ( kdebase/ -> kdebase/(runtime, workspace, apps )
8
+ - Implement kdesrc-builds --resume-from feature. Skips all modules before the module specified is
9
+ found.
10
+ - kde-build build --resume-from kdebase/runtime KDE/
11
+ - kde-build build --resume-from runtime KDE/
12
+ - Build System Qt: Print a message when running bin/synqt after each rebase.
13
+ - Build System Autotools: Try autoconf to bootstrap. May fail.
14
+ - Build System Package: Be more verbose about what we do.
15
+ - CMD: build - If a module is not checked out ignore it when --update is not given on the command line.
16
+ - Bugfix
17
+ - The command "environment set [env] did set a wrong shell var to the name of the environment
18
+ set. Use the documented BUILD_TOOL_ENV instead.
19
+
1
20
  == 0.4.3
2
21
  - Ruby 1.9 Compatibility.
3
22
 
data/Manifest.txt CHANGED
@@ -19,11 +19,9 @@ lib/build-tool/build-system/kdel10n.rb
19
19
  lib/build-tool/build-system/none.rb
20
20
  lib/build-tool/build-system/qmake.rb
21
21
  lib/build-tool/build-system/qt.rb
22
- lib/build-tool/cfg/lexer.rb
23
22
  lib/build-tool/cfg/lexer.rex
24
23
  lib/build-tool/cfg/lexer_base.rb
25
24
  lib/build-tool/cfg/node.rb
26
- lib/build-tool/cfg/parser.rb
27
25
  lib/build-tool/cfg/parser.y
28
26
  lib/build-tool/cfg/visitor.rb
29
27
  lib/build-tool/command_actions.rb
@@ -76,7 +74,6 @@ lib/mj/tools/ssh.rb
76
74
  lib/mj/tools/subprocess.rb
77
75
  lib/mj/vcs/git.rb
78
76
  lib/mj/visitor.rb
79
- tasks/genfiles.rake
80
77
  tasks/rspec.rake
81
78
  test/commands/test_build.rb
82
79
  test/test_build_system.rb
data/Rakefile CHANGED
@@ -7,6 +7,7 @@ require './lib/build-tool'
7
7
  Hoe.plugin :git
8
8
  Hoe.plugin :doofus
9
9
  Hoe.plugin :debugging
10
+ Hoe.plugin :racc
10
11
 
11
12
  # Generate all the Rake tasks
12
13
  # Run 'rake -T' to see list of generated tasks (from gem root directory)
@@ -40,6 +41,8 @@ Hoe.spec( 'build-tool' ) do
40
41
  ['racc', ">= 1.4.6"] <<
41
42
  ['rexical', ">= 1.0.5"]
42
43
 
44
+ self.rex_flags = ""
45
+
43
46
  end
44
47
 
45
48
  Dir['tasks/**/*.rake'].each { |t| load t }
data/lib/build-tool.rb CHANGED
@@ -2,6 +2,6 @@
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module BuildTool
5
- VERSION = '0.4.3'
5
+ VERSION = '0.4.4'
6
6
  end
7
7
 
@@ -69,7 +69,12 @@ def bootstrap
69
69
  end
70
70
  rc
71
71
  else
72
- raise AutoConfError, "No idea how to bootstrap this project!"
72
+ logger.trace "Trying autoconf. May fail!!"
73
+ rc = self.class.execute "autoconf", source_directory, env
74
+ if rc != 0
75
+ raise AutoConfError, "'autoconf' failed with error #{rc}!"
76
+ end
77
+ rc
73
78
  end
74
79
  end
75
80
 
@@ -43,6 +43,7 @@ def _configure( command, wd = build_directory )
43
43
 
44
44
  def after_rebase
45
45
  if configured?
46
+ logger.info "Running bin/syncqt"
46
47
  rc = self.class.execute( "bin/syncqt", build_directory, self.module.environment.values )
47
48
  end
48
49
  end
@@ -378,7 +378,7 @@ def complete_modules( name, include_templates = false )
378
378
  # 1. name = mod.name
379
379
  # 2. name/ matches beginning of mod.name
380
380
  # 3. name equals last part of mod.name (behind /) and is unique
381
- if name.end_with?('/') and mod.name.index "/#{name}" or mod.name.start_with? name
381
+ if name.end_with?('/') and ( mod.name.index "/#{name}" or mod.name.start_with? name )
382
382
  found = true
383
383
  # Now check if it is active.
384
384
  next if !( mod.active? || @all )
@@ -413,6 +413,15 @@ def complete_modules( name, include_templates = false )
413
413
  return res
414
414
  end
415
415
 
416
+ def complete_module( name, include_templates = false )
417
+ modules = complete_modules( name, include_templates )
418
+ case modules.size
419
+ when 0 then return nil
420
+ when 1 then return modules[0]
421
+ else raise UsageError, "#{name} is ambiguous. Please be more specific"
422
+ end
423
+ end
424
+
416
425
  def while_logging_to( dir, fname, level, &block )
417
426
  got_exception = false
418
427
  # Only create a logfile if we do real work
@@ -479,6 +488,15 @@ class ModuleBasedCommand < Standard
479
488
  def initialize( *args )
480
489
  super( *args )
481
490
  @failed_modules = []
491
+ @resume_from = nil
492
+ end
493
+
494
+ def initialize_options
495
+ options.on( "--resume-from [module]", "Skip all module before module." ) { |t|
496
+ @resume_from = complete_module( t )
497
+ }
498
+
499
+ super
482
500
  end
483
501
 
484
502
  def is_module_ready?( mod )
@@ -521,7 +539,17 @@ def do_execute( args )
521
539
 
522
540
  modules.each_with_index do |mod, index|
523
541
 
542
+ if not @resume_from.nil?
543
+ if mod.name == @resume_from.name
544
+ @resume_from = nil
545
+ else
546
+ logger.info "Skipping module #{mod.name} (#{index+1}/#{modules.size})"
547
+ next
548
+ end
549
+ end
550
+
524
551
  begin
552
+
525
553
  logger.info ""
526
554
  logger.info "#### Module #{mod.name} (#{index+1}/#{modules.size})"
527
555
  do_execute_module( mod )
@@ -74,6 +74,14 @@ def is_module_ready?( mod )
74
74
  end # is_module_ready
75
75
 
76
76
  def do_execute_module( mod )
77
+
78
+ if not ( $noop or mod.checkedout? or @update )
79
+ # If the module is not checked out or $noop is active skip the module
80
+ logger.warn "Module is not checked out! Use -u to check it out."
81
+ logger.warn "skipped!"
82
+ return 0
83
+ end
84
+
77
85
  if @from_scratch or @clean
78
86
  clean( mod, @from_scratch )
79
87
  end
@@ -87,29 +95,21 @@ def do_execute_module( mod )
87
95
  end
88
96
  end
89
97
 
90
- if $noop or mod.checkedout?
91
- if @configure or @reconfigure or !mod.configured?
92
- if @reconfigure
93
- reconfigure( mod )
94
- else
95
- # See outer if. @configure or !mod.configured?
96
- configure( mod )
97
- end
98
- end
99
-
100
- if @build
101
- make( mod )
102
- end
103
-
104
- if @install
105
- install( mod, true )
98
+ if @configure or @reconfigure or !mod.configured?
99
+ if @reconfigure
100
+ reconfigure( mod )
101
+ else
102
+ # See outer if. @configure or !mod.configured?
103
+ configure( mod )
106
104
  end
105
+ end
107
106
 
108
- else
109
-
110
- logger.warn "Module is not checked out! Use -u to check it out."
111
- logger.warn "skipped!"
107
+ if @build
108
+ make( mod )
109
+ end
112
110
 
111
+ if @install
112
+ install( mod, true )
113
113
  end
114
114
 
115
115
  end # do_execute_module
@@ -74,7 +74,7 @@ def set( name, value )
74
74
  # the prompt.
75
75
  def shell( wd = nil )
76
76
  begin
77
- ENV['JAM_PROJECT'] = name
77
+ ENV['BUILD_TOOL_ENV'] = name
78
78
  self.class.adjust_environment( wd, values ) {
79
79
  logger.info "Starting #{ENV['SHELL']}"
80
80
  system( ENV['SHELL'] )
@@ -82,7 +82,7 @@ def shell( wd = nil )
82
82
  return 0;
83
83
  }
84
84
  ensure
85
- ENV['JAM_PROJECT'] = nil
85
+ ENV['BUILD_TOOL_ENV'] = nil
86
86
  end
87
87
  end
88
88
 
@@ -89,14 +89,14 @@ def clone
89
89
  def fetch()
90
90
  # Check if the archive is already downloaded
91
91
  if File.exist? archive_local_path
92
- logger.debug "Archive already fetched. Skipping."
92
+ logger.trace "Archive already fetched. Skipping."
93
93
  return 0
94
94
  end
95
95
 
96
96
  # If the archive doesn't exist we assume the unpacked archive
97
97
  # should not exist too.
98
98
  if local_path_exist?
99
- logger.debug "We fetch a new archive. Remove the old sources."
99
+ logger.trace "We fetch a new archive. Remove the old sources."
100
100
  FileUtils.rm_rf local_path if !$noop
101
101
  end
102
102
 
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-tool
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
5
4
  prerelease:
6
- segments:
7
- - 0
8
- - 4
9
- - 3
10
- version: 0.4.3
5
+ version: 0.4.4
11
6
  platform: ruby
12
7
  authors:
13
8
  - Michael Jansen
@@ -36,7 +31,7 @@ cert_chain:
36
31
  M3zOaQdtTmiQPBqNIsE=
37
32
  -----END CERTIFICATE-----
38
33
 
39
- date: 2011-01-04 00:00:00 +01:00
34
+ date: 2011-02-07 00:00:00 +01:00
40
35
  default_executable:
41
36
  dependencies:
42
37
  - !ruby/object:Gem::Dependency
@@ -47,11 +42,6 @@ dependencies:
47
42
  requirements:
48
43
  - - ">="
49
44
  - !ruby/object:Gem::Version
50
- hash: 1
51
- segments:
52
- - 1
53
- - 4
54
- - 3
55
45
  version: 1.4.3
56
46
  type: :runtime
57
47
  version_requirements: *id001
@@ -63,11 +53,6 @@ dependencies:
63
53
  requirements:
64
54
  - - ">="
65
55
  - !ruby/object:Gem::Version
66
- hash: 79
67
- segments:
68
- - 3
69
- - 18
70
- - 0
71
56
  version: 3.18.0
72
57
  type: :runtime
73
58
  version_requirements: *id002
@@ -79,11 +64,6 @@ dependencies:
79
64
  requirements:
80
65
  - - ">="
81
66
  - !ruby/object:Gem::Version
82
- hash: 25
83
- segments:
84
- - 1
85
- - 3
86
- - 1
87
67
  version: 1.3.1
88
68
  type: :runtime
89
69
  version_requirements: *id003
@@ -95,110 +75,86 @@ dependencies:
95
75
  requirements:
96
76
  - - ">="
97
77
  - !ruby/object:Gem::Version
98
- hash: 27
99
- segments:
100
- - 1
101
- - 2
102
- - 2
103
78
  version: 1.2.2
104
79
  type: :runtime
105
80
  version_requirements: *id004
106
81
  - !ruby/object:Gem::Dependency
107
- name: hoe-debugging
82
+ name: racc
108
83
  prerelease: false
109
84
  requirement: &id005 !ruby/object:Gem::Requirement
110
85
  none: false
111
86
  requirements:
112
- - - ">="
87
+ - - ~>
113
88
  - !ruby/object:Gem::Version
114
- hash: 21
115
- segments:
116
- - 1
117
- - 0
118
- - 1
119
- version: 1.0.1
89
+ version: 1.4.7
120
90
  type: :development
121
91
  version_requirements: *id005
122
92
  - !ruby/object:Gem::Dependency
123
- name: hoe-doofus
93
+ name: hoe-debugging
124
94
  prerelease: false
125
95
  requirement: &id006 !ruby/object:Gem::Requirement
126
96
  none: false
127
97
  requirements:
128
98
  - - ">="
129
99
  - !ruby/object:Gem::Version
130
- hash: 23
131
- segments:
132
- - 1
133
- - 0
134
- - 0
135
- version: 1.0.0
100
+ version: 1.0.1
136
101
  type: :development
137
102
  version_requirements: *id006
138
103
  - !ruby/object:Gem::Dependency
139
- name: hoe-git
104
+ name: hoe-doofus
140
105
  prerelease: false
141
106
  requirement: &id007 !ruby/object:Gem::Requirement
142
107
  none: false
143
108
  requirements:
144
109
  - - ">="
145
110
  - !ruby/object:Gem::Version
146
- hash: 27
147
- segments:
148
- - 1
149
- - 3
150
- - 0
151
- version: 1.3.0
111
+ version: 1.0.0
152
112
  type: :development
153
113
  version_requirements: *id007
154
114
  - !ruby/object:Gem::Dependency
155
- name: racc
115
+ name: hoe-git
156
116
  prerelease: false
157
117
  requirement: &id008 !ruby/object:Gem::Requirement
158
118
  none: false
159
119
  requirements:
160
120
  - - ">="
161
121
  - !ruby/object:Gem::Version
162
- hash: 11
163
- segments:
164
- - 1
165
- - 4
166
- - 6
167
- version: 1.4.6
122
+ version: 1.3.0
168
123
  type: :development
169
124
  version_requirements: *id008
170
125
  - !ruby/object:Gem::Dependency
171
- name: rexical
126
+ name: racc
172
127
  prerelease: false
173
128
  requirement: &id009 !ruby/object:Gem::Requirement
174
129
  none: false
175
130
  requirements:
176
131
  - - ">="
177
132
  - !ruby/object:Gem::Version
178
- hash: 29
179
- segments:
180
- - 1
181
- - 0
182
- - 5
183
- version: 1.0.5
133
+ version: 1.4.6
184
134
  type: :development
185
135
  version_requirements: *id009
186
136
  - !ruby/object:Gem::Dependency
187
- name: hoe
137
+ name: rexical
188
138
  prerelease: false
189
139
  requirement: &id010 !ruby/object:Gem::Requirement
190
140
  none: false
191
141
  requirements:
192
142
  - - ">="
193
143
  - !ruby/object:Gem::Version
194
- hash: 47
195
- segments:
196
- - 2
197
- - 8
198
- - 0
199
- version: 2.8.0
144
+ version: 1.0.5
200
145
  type: :development
201
146
  version_requirements: *id010
147
+ - !ruby/object:Gem::Dependency
148
+ name: hoe
149
+ prerelease: false
150
+ requirement: &id011 !ruby/object:Gem::Requirement
151
+ none: false
152
+ requirements:
153
+ - - ">="
154
+ - !ruby/object:Gem::Version
155
+ version: 2.9.0
156
+ type: :development
157
+ version_requirements: *id011
202
158
  description: |-
203
159
  This project is inspired by kdesrc-build[http://kdesrc-build.kde.org/].
204
160
 
@@ -236,11 +192,9 @@ files:
236
192
  - lib/build-tool/build-system/none.rb
237
193
  - lib/build-tool/build-system/qmake.rb
238
194
  - lib/build-tool/build-system/qt.rb
239
- - lib/build-tool/cfg/lexer.rb
240
195
  - lib/build-tool/cfg/lexer.rex
241
196
  - lib/build-tool/cfg/lexer_base.rb
242
197
  - lib/build-tool/cfg/node.rb
243
- - lib/build-tool/cfg/parser.rb
244
198
  - lib/build-tool/cfg/parser.y
245
199
  - lib/build-tool/cfg/visitor.rb
246
200
  - lib/build-tool/command_actions.rb
@@ -293,7 +247,6 @@ files:
293
247
  - lib/mj/tools/subprocess.rb
294
248
  - lib/mj/vcs/git.rb
295
249
  - lib/mj/visitor.rb
296
- - tasks/genfiles.rake
297
250
  - tasks/rspec.rake
298
251
  - test/commands/test_build.rb
299
252
  - test/test_build_system.rb
@@ -310,6 +263,7 @@ files:
310
263
  - test/test_ssh_key.rb
311
264
  - test/test_svn_parser.rb
312
265
  - test/test_vcs.rb
266
+ - .gemtest
313
267
  has_rdoc: true
314
268
  homepage: http://michael-jansen.biz/build-tool
315
269
  licenses: []
@@ -325,23 +279,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
325
279
  requirements:
326
280
  - - ">="
327
281
  - !ruby/object:Gem::Version
328
- hash: 3
329
- segments:
330
- - 0
331
282
  version: "0"
332
283
  required_rubygems_version: !ruby/object:Gem::Requirement
333
284
  none: false
334
285
  requirements:
335
286
  - - ">="
336
287
  - !ruby/object:Gem::Version
337
- hash: 3
338
- segments:
339
- - 0
340
288
  version: "0"
341
289
  requirements: []
342
290
 
343
291
  rubyforge_project: build-tool
344
- rubygems_version: 1.4.1
292
+ rubygems_version: 1.5.0
345
293
  signing_key:
346
294
  specification_version: 3
347
295
  summary: This project is inspired by kdesrc-build[http://kdesrc-build.kde.org/]