ryb 0.2.1.0 → 0.2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/TODO +5 -0
  3. data/lib/ryb.rb +23 -23
  4. data/lib/ryb/gem.rb +1 -1
  5. data/lib/ryb/ninja.rb +10 -5
  6. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f669ebc63d3f7cd43065a2fa8f720c5e766d473d
4
- data.tar.gz: b8173d293781e933906d75631e9e8d7d3ebf4724
3
+ metadata.gz: 967b64b65c0a4e6e0b55cf72f91ee5c12ee9c317
4
+ data.tar.gz: 3c5bc20bdc03baeed7642fcb17c6afc93738282f
5
5
  SHA512:
6
- metadata.gz: b0e7d3cac2c0d76bfd21d46ec982aa7c1ccd24edf55703bcba05e69ed4c1fed78d4d8769ebfcd3dcd961ae92c5a7fee5e9229cc5c5dbbd14db5c6094cf076ea4
7
- data.tar.gz: a00d6dee9ce6f61d26a97cb31d08a03cd9986cfffd0fac16a50b354acbc41d792868ea97cf9129243ef8cf764fb42e254713a8a1de8aed4500539fbe07349280
6
+ metadata.gz: 355d9136fb7b6242c4f2e6827917affcb14de3afe52d0e9cef2f60bf65bca23c928f069dc87ebdac99af9d99862aafafd4d73f9db71a737107a468038f924641
7
+ data.tar.gz: 433e4402f912ec821ea9a811549e89097989a18c4d5cf7fc20526cc8810e34bf0301e16bc95e243a0499949bacbccea1b1d2b01763d6e8182f25d3d9bf5a4763
data/TODO CHANGED
@@ -1,4 +1,9 @@
1
+ - Move `ninja-gen` to builder pattern.
2
+ - Move everything to "manglers."
3
+ - Provide a default mangler class (`Ryb::Mangler`?) that allows declarative rewriting? (It just needs to override `#call`!)
4
+
1
5
  - How should we handle conflicts between say, a Ryb::Configuration and a Ryb::Platform?
6
+
2
7
  - Memoization.
3
8
  - http://www.justinweiss.com/articles/4-simple-memoization-patterns-in-ruby-and-one-gem/
4
9
  - http://gavinmiller.io/2013/basics-of-ruby-memoization/
data/lib/ryb.rb CHANGED
@@ -6,34 +6,34 @@ require 'visual_studio'
6
6
  require 'ninja'
7
7
 
8
8
  module Ryb
9
- require 'ryb/gem'
9
+ require_relative 'ryb/gem'
10
10
 
11
- require 'ryb/helpers/defaults'
12
- require 'ryb/helpers/pretty_string'
11
+ require_relative 'ryb/helpers/defaults'
12
+ require_relative 'ryb/helpers/pretty_string'
13
13
 
14
- require 'ryb/name'
15
- require 'ryb/paths'
16
- require 'ryb/languages'
17
- require 'ryb/source_file'
14
+ require_relative 'ryb/name'
15
+ require_relative 'ryb/paths'
16
+ require_relative 'ryb/languages'
17
+ require_relative 'ryb/source_file'
18
18
 
19
- require 'ryb/environment'
20
- require 'ryb/flags'
21
- require 'ryb/preprocessor'
22
- require 'ryb/code'
23
- require 'ryb/dependency'
24
- require 'ryb/dependencies'
25
- require 'ryb/configuration'
26
- require 'ryb/configurations'
27
- require 'ryb/product'
28
- require 'ryb/project'
19
+ require_relative 'ryb/environment'
20
+ require_relative 'ryb/flags'
21
+ require_relative 'ryb/preprocessor'
22
+ require_relative 'ryb/code'
23
+ require_relative 'ryb/dependency'
24
+ require_relative 'ryb/dependencies'
25
+ require_relative 'ryb/configuration'
26
+ require_relative 'ryb/configurations'
27
+ require_relative 'ryb/product'
28
+ require_relative 'ryb/project'
29
29
 
30
- require 'ryb/dsl'
30
+ require_relative 'ryb/dsl'
31
31
 
32
- require 'rybfile'
33
- require 'rybfile/walker'
32
+ require_relative 'rybfile'
33
+ require_relative 'rybfile/walker'
34
34
 
35
- require 'ryb/visual_studio'
36
- require 'ryb/ninja'
35
+ require_relative 'ryb/visual_studio'
36
+ require_relative 'ryb/ninja'
37
37
 
38
- require 'ryb/cli'
38
+ require_relative 'ryb/cli'
39
39
  end
@@ -41,7 +41,7 @@ module Ryb
41
41
  end
42
42
 
43
43
  module VERSION #:nodoc:
44
- MAJOR, MINOR, PATCH, PRE = [0, 2, 1, 0]
44
+ MAJOR, MINOR, PATCH, PRE = [0, 2, 2, 0]
45
45
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
46
46
  end
47
47
 
@@ -84,27 +84,32 @@ module Ryb
84
84
 
85
85
  @ninjafile.rule(
86
86
  "cc_#{namespace}",
87
- "ninja -t msvc -e #{env_block} -- cl.exe $#{namespace}_cflags_sys $#{namespace}_cflags /Fd$#{namespace}_symbols /Fo$out /Tc$in"
87
+ "ninja -t msvc -e #{env_block} -- cl.exe /showIncludes $#{namespace}_cflags_sys $#{namespace}_cflags /Fd$#{namespace}_symbols /Fo$out /Tc$in",
88
+ dependencies: :msvc
88
89
  )
89
90
 
90
91
  @ninjafile.rule(
91
92
  "cxx_#{namespace}",
92
- "ninja -t msvc -e #{env_block} -- cl.exe $#{namespace}_cxxflags_sys $#{namespace}_cxxflags /Fd$#{namespace}_symbols /Fo$out /Tp$in"
93
+ "ninja -t msvc -e #{env_block} -- cl.exe /showIncludes $#{namespace}_cxxflags_sys $#{namespace}_cxxflags /Fd$#{namespace}_symbols /Fo$out /Tp$in",
94
+ dependencies: :msvc
93
95
  )
94
96
 
95
97
  @ninjafile.rule(
96
98
  "ar_#{namespace}",
97
- "ninja -t msvc -e #{env_block} -- lib.exe $#{namespace}_arflags /OUT:$out $in"
99
+ "ninja -t msvc -e #{env_block} -- lib.exe @$out.rsp",
100
+ response_file: "$#{namespace}_arflags /OUT:$out $in"
98
101
  )
99
102
 
100
103
  @ninjafile.rule(
101
104
  "ld_#{namespace}",
102
- "ninja -t msvc -e #{env_block} -- link.exe $#{namespace}_ldflags_sys $#{namespace}_ldflags /OUT:$out $#{namespace}_deps $in"
105
+ "ninja -t msvc -e #{env_block} -- link.exe @$out.rsp",
106
+ response_file: "$#{namespace}_ldflags_sys $#{namespace}_ldflags /OUT:$out $#{namespace}_deps $in"
103
107
  )
104
108
 
105
109
  @ninjafile.rule(
106
110
  "so_#{namespace}",
107
- "ninja -t msvc -e #{env_block} -- link.exe $#{namespace}_ldflags_sys $#{namespace}_ldflags /DLL /IMPLIB:$#{namespace}_as_linkable /OUT:$out $#{namespace}_deps $in"
111
+ "ninja -t msvc -e #{env_block} -- link.exe @$out.rsp",
112
+ response_file: "$#{namespace}_ldflags_sys $#{namespace}_ldflags /DLL /IMPLIB:$#{namespace}_as_linkable /OUT:$out $#{namespace}_deps $in"
108
113
  )
109
114
 
110
115
  c_sources = sources.select{|src| src.language == :c}.map(&:path).map{|src| "#@root/#{src}"}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ryb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1.0
4
+ version: 0.2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-09 00:00:00.000000000 Z
11
+ date: 2017-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gli
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  version: '0'
187
187
  requirements: []
188
188
  rubyforge_project:
189
- rubygems_version: 2.4.5
189
+ rubygems_version: 2.6.8
190
190
  signing_key:
191
191
  specification_version: 4
192
192
  summary: Rubifiy your builds!