-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmrbgem.rake
More file actions
39 lines (34 loc) · 1.23 KB
/
Copy pathmrbgem.rake
File metadata and controls
39 lines (34 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!ruby
begin
require "mruby/source"
rescue LoadError
$: << File.join(MRUBY_ROOT, "lib")
require "mruby/source"
end
MRuby::Gem::Specification.new("mruby-delegate") do |s|
s.summary = "Delegator implementation for mruby"
version = File.read(File.join(__dir__, "README.ja.md"), encoding: "UTF-8").scan(/^\s*[\-\*] version:\s*(\d+(?:\.\w+)+)/i).flatten[-1]
s.version = version if version
s.license = "CC0"
s.author = "dearblue"
s.homepage = "https://github.com/dearblue/mruby-delegate"
if MRuby::Source::MRUBY_RELEASE_NO < 30000
s.rbfiles = Dir.glob("#{dir}/mrblib{,/mruby30-}/*.rb")
else
s.rbfiles = Dir.glob("#{dir}/mrblib{,/mruby30+}/*.rb")
end
s.rbfiles.sort!
if cc.command =~ /\b(?:g?cc|clang)\d*\b/
cc.flags << %w(-Wno-declaration-after-statement)
if false
cc.flags << %w(-Weverything)
cc.flags << %w(
-Wpadded -Wc11-extensions -Wc++11-extensions -Wc99-extensions
-Wsign-conversion -Wdocumentation -Wdocumentation-unknown-command
-Wswitch-enum -Wunused-parameter -Wunreachable-code-return
-Wmissing-prototypes -Wunused-macros -Wgnu-anonymous-struct
-Wold-style-cast -Wmissing-field-initializers
).map { |w| w.insert(2, "no-") }
end
end
end