rake-builder 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.rdoc +3 -0
  2. data/lib/rake/builder.rb +13 -7
  3. metadata +4 -4
data/README.rdoc CHANGED
@@ -48,6 +48,8 @@ include paths.
48
48
  Rake::Builder collects all such information in one file:
49
49
  '.rake-builder'
50
50
 
51
+ For namespaced tasks, e.g. 'test:build', the file is '.rake-builer.test'
52
+
51
53
  This file should be created in the same
52
54
  directory as the Rakefile.
53
55
 
@@ -131,3 +133,4 @@ So, if there are two source files with the same name, they will overwrite each o
131
133
  * rakepp - another customisation of Rake for C++ projects
132
134
  * Scons
133
135
  * waf[http://code.google.com/p/waf/]
136
+ * http://felix-lang.org/blog/2010/aug/30/fbuild-0-2/
data/lib/rake/builder.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'rubygems' if RUBY_VERSION < '1.9'
2
2
  require 'logger'
3
+ require 'yaml'
3
4
  require 'rake'
4
5
  require 'rake/tasklib'
5
6
  require 'rake/path'
@@ -22,7 +23,7 @@ module Rake
22
23
  module VERSION #:nodoc:
23
24
  MAJOR = 0
24
25
  MINOR = 0
25
- TINY = 11
26
+ TINY = 12
26
27
 
27
28
  STRING = [ MAJOR, MINOR, TINY ].join('.')
28
29
  end
@@ -269,7 +270,9 @@ module Rake
269
270
  desc "Build '#{ target_basename }'"
270
271
  file @target => [ scoped_task( :compile ), *@target_prerequisites ] do |t|
271
272
  shell "rm -f #{ t.name }"
272
- shell build_command
273
+ build_commands.each do | command |
274
+ shell command
275
+ end
273
276
  raise BuildFailureError if ! File.exist?( t.name )
274
277
  end
275
278
 
@@ -282,7 +285,9 @@ module Rake
282
285
  define_compile_task( src )
283
286
  end
284
287
 
285
- file @makedepend_file => [ *project_files ] do
288
+ directory @objects_path
289
+
290
+ file @makedepend_file => [ @objects_path, *project_files ] do
286
291
  @logger.add( Logger::DEBUG, "Analysing dependencies" )
287
292
  command = "makedepend -f- -- #{ include_path } -- #{ file_list( source_files ) } 2>/dev/null > #{ @makedepend_file }"
288
293
  shell command
@@ -367,14 +372,15 @@ module Rake
367
372
  end
368
373
  end
369
374
 
370
- def build_command
375
+ def build_commands
371
376
  case @target_type
372
377
  when :executable
373
- "#{ @linker } #{ link_flags } -o #{ @target } #{ file_list( object_files ) }"
378
+ [ "#{ @linker } #{ link_flags } -o #{ @target } #{ file_list( object_files ) }" ]
374
379
  when :static_library
375
- "ar -cq #{ @target } #{ file_list( object_files ) }"
380
+ [ "ar -cq #{ @target } #{ file_list( object_files ) }",
381
+ "ranlib #{ @target }" ]
376
382
  when :shared_library
377
- "#{ @linker } -shared -o #{ @target } #{ file_list( object_files ) } #{ link_flags }"
383
+ [ "#{ @linker } -shared -o #{ @target } #{ file_list( object_files ) } #{ link_flags }" ]
378
384
  end
379
385
  end
380
386
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-builder
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 11
10
- version: 0.0.11
9
+ - 12
10
+ version: 0.0.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - Joe Yates
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-28 00:00:00 +01:00
18
+ date: 2010-12-30 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency