daedalus-core 0.0.3 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/daedalus.rb +23 -1
  3. data/lib/daedalus/version.rb +1 -1
  4. metadata +13 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ceab94baa6293fd163c39bf26ff28cf1bee5817
4
- data.tar.gz: 1332e7d94769834b5cc82b6841f556edfa772761
3
+ metadata.gz: d182965f5ac8c393603b218ab1d0ff6bc001e466
4
+ data.tar.gz: 34f6b50c1e69d38b8805497ef7acb406299e0d56
5
5
  SHA512:
6
- metadata.gz: 1a53464f28c9e26fc046877e22c434f616dbbfbe69b93630c7c8791348624b5278bc148b2e7c9b90811b6a976754b6672310624f798e740a88a3aab77a4eb5e7
7
- data.tar.gz: 45b3fc6462344aeb054dcb19923451bed5f0f1bcbf95dfee7c8bafa2894c84f4a49223e5eabdee6612dc4dbf6d086bcffdbeaf9a6b85cc511b26766cd5dc806c
6
+ metadata.gz: 9c9a82c2cc4bb5017b5bb27c130b9356bcbfa257b2820f88af20b83c238a0b3079b7c3612472357b15bf9fe7b5590d76d72c6f8d3f285af6e4f05c8c7c72e410
7
+ data.tar.gz: 931103962cf724fbadecaabc2734dccf4eb8488fe55da17ca0a2de368a5e1a8e3e58427edbb030fb1ed67c821f46599b9fb7478175eb8a9af981cf9ac29565de
data/lib/daedalus.rb CHANGED
@@ -147,6 +147,7 @@ module Daedalus
147
147
  @cxxflags = []
148
148
  @ldflags = []
149
149
  @libraries = []
150
+ @pre_link_cmds = []
150
151
  @log = logger
151
152
  @blueprint = blueprint
152
153
 
@@ -182,7 +183,8 @@ module Daedalus
182
183
  dirs
183
184
  end
184
185
 
185
- attr_reader :cc, :cxx, :ldshared, :ldsharedxx, :path, :cflags, :cxxflags, :ldflags, :log
186
+ attr_reader :cc, :cxx, :ldshared, :ldsharedxx, :path,
187
+ :cflags, :cxxflags, :ldflags, :log
186
188
 
187
189
  def add_library(lib)
188
190
  if f = lib.cflags
@@ -196,6 +198,10 @@ module Daedalus
196
198
  end
197
199
  end
198
200
 
201
+ def add_pre_link(cmd, &b)
202
+ @pre_link_cmds << [cmd, b]
203
+ end
204
+
199
205
  def mtime(path)
200
206
  @mod_times[path]
201
207
  end
@@ -228,6 +234,21 @@ module Daedalus
228
234
  @log.command "#{@cxx} #{@cflags.join(' ')} #{@cxxflags.join(' ')} -c -o #{object} #{source}"
229
235
  end
230
236
 
237
+ def pre_link(files)
238
+ @pre_link_cmds.each do |cmd, blk|
239
+ file_list = files
240
+
241
+ if cmd.index("%objects%")
242
+ if blk
243
+ file_list = blk.call file_list
244
+ end
245
+ cmd = cmd.gsub(/%objects%/, file_list.join(" "))
246
+ end
247
+
248
+ @log.command cmd
249
+ end
250
+ end
251
+
231
252
  def link(path, files)
232
253
  @log.show "LD", path
233
254
  @log.command "#{@cxx} -o #{path} #{files.join(' ')} #{@libraries.join(' ')} #{@ldflags.join(' ')}"
@@ -749,6 +770,7 @@ module Daedalus
749
770
 
750
771
  def build(ctx)
751
772
  ctx.log.inc!
773
+ ctx.pre_link objects
752
774
  ctx.link @path, objects
753
775
  end
754
776
 
@@ -1,3 +1,3 @@
1
1
  module Daedalus
2
- VERSION = "0.0.3"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daedalus-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Shirai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-27 00:00:00.000000000 Z
11
+ date: 2014-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.9'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.9'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '2.8'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.8'
41
41
  description: |
@@ -50,7 +50,7 @@ extra_rdoc_files:
50
50
  - README.md
51
51
  - LICENSE
52
52
  files:
53
- - .gitignore
53
+ - ".gitignore"
54
54
  - LICENSE
55
55
  - README.md
56
56
  - daedalus-core.gemspec
@@ -63,26 +63,26 @@ licenses:
63
63
  metadata: {}
64
64
  post_install_message:
65
65
  rdoc_options:
66
- - --title
66
+ - "--title"
67
67
  - Daedalus Gem
68
- - --main
68
+ - "--main"
69
69
  - README
70
- - --line-numbers
70
+ - "--line-numbers"
71
71
  require_paths:
72
72
  - lib
73
73
  required_ruby_version: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - '>='
75
+ - - ">="
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  requirements: []
84
84
  rubyforge_project:
85
- rubygems_version: 2.0.7
85
+ rubygems_version: 2.2.2
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Daedalus is a build system extracted from Rubinius. Almost no functionality