Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
3a95e3fb
Commit
3a95e3fb
authored
Jan 22, 2013
by
Yukihiro Matz Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:mruby/mruby
parents
323d8501
461a03ca
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
20 deletions
+25
-20
tasks/libmruby.rake
tasks/libmruby.rake
+3
-3
tasks/mruby_build.rake
tasks/mruby_build.rake
+4
-7
tasks/mruby_build_gem.rake
tasks/mruby_build_gem.rake
+5
-1
tasks/ruby_ext.rake
tasks/ruby_ext.rake
+5
-1
tasks/toolchains/vs2012.rake
tasks/toolchains/vs2012.rake
+8
-8
No files found.
tasks/libmruby.rake
View file @
3a95e3fb
...
@@ -2,14 +2,14 @@ MRuby.each_target do
...
@@ -2,14 +2,14 @@ MRuby.each_target do
file
libfile
(
"
#{
build_dir
}
/lib/libmruby"
)
=>
libmruby
.
flatten
do
|
t
|
file
libfile
(
"
#{
build_dir
}
/lib/libmruby"
)
=>
libmruby
.
flatten
do
|
t
|
archiver
.
run
t
.
name
,
t
.
prerequisites
archiver
.
run
t
.
name
,
t
.
prerequisites
open
(
"
#{
build_dir
}
/lib/libmruby.flags.mak"
,
'w'
)
do
|
f
|
open
(
"
#{
build_dir
}
/lib/libmruby.flags.mak"
,
'w'
)
do
|
f
|
f
.
puts
'CFLAGS = "%s"'
%
cc
.
all_flags
.
gsub
(
'"'
,
'\\"'
)
f
.
puts
'
MRUBY_
CFLAGS = "%s"'
%
cc
.
all_flags
.
gsub
(
'"'
,
'\\"'
)
gem_flags
=
gems
.
map
{
|
g
|
g
.
linker
.
flags
}
gem_flags
=
gems
.
map
{
|
g
|
g
.
linker
.
flags
}
gem_library_paths
=
gems
.
map
{
|
g
|
g
.
linker
.
library_paths
}
gem_library_paths
=
gems
.
map
{
|
g
|
g
.
linker
.
library_paths
}
f
.
puts
'LDFLAGS = "%s"'
%
linker
.
all_flags
(
gem_library_paths
,
gem_flags
).
gsub
(
'"'
,
'\\"'
)
f
.
puts
'
MRUBY_
LDFLAGS = "%s"'
%
linker
.
all_flags
(
gem_library_paths
,
gem_flags
).
gsub
(
'"'
,
'\\"'
)
gem_libraries
=
gems
.
map
{
|
g
|
g
.
linker
.
libraries
}
gem_libraries
=
gems
.
map
{
|
g
|
g
.
linker
.
libraries
}
f
.
puts
'LIBS = "%s"'
%
linker
.
library_flags
(
gem_libraries
).
gsub
(
'"'
,
'\\"'
)
f
.
puts
'
MRUBY_
LIBS = "%s"'
%
linker
.
library_flags
(
gem_libraries
).
gsub
(
'"'
,
'\\"'
)
end
end
end
end
end
end
tasks/mruby_build.rake
View file @
3a95e3fb
...
@@ -29,10 +29,6 @@ module MRuby
...
@@ -29,10 +29,6 @@ module MRuby
conf
.
instance_eval
(
&
@initializer
)
conf
.
instance_eval
(
&
@initializer
)
end
end
def
toolchain
(
name
)
@@toolchains
[
name
.
to_s
].
setup
(
self
)
end
def
self
.
load
def
self
.
load
Dir
.
glob
(
"
#{
File
.
dirname
(
__FILE__
)
}
/toolchains/*.rake"
).
each
do
|
file
|
Dir
.
glob
(
"
#{
File
.
dirname
(
__FILE__
)
}
/toolchains/*.rake"
).
each
do
|
file
|
Kernel
.
load
file
Kernel
.
load
file
...
@@ -63,12 +59,11 @@ module MRuby
...
@@ -63,12 +59,11 @@ module MRuby
if
ENV
[
'OS'
]
==
'Windows_NT'
if
ENV
[
'OS'
]
==
'Windows_NT'
@exts
=
Exts
.
new
(
'.o'
,
'.exe'
,
'.a'
)
@exts
=
Exts
.
new
(
'.o'
,
'.exe'
,
'.a'
)
@file_separator
=
'\\'
else
else
@exts
=
Exts
.
new
(
'.o'
,
''
,
'.a'
)
@exts
=
Exts
.
new
(
'.o'
,
''
,
'.a'
)
@file_separator
=
'/'
end
end
@file_separator
=
'/'
@cc
=
Command
::
Compiler
.
new
(
self
,
%w(.c)
)
@cc
=
Command
::
Compiler
.
new
(
self
,
%w(.c)
)
@cxx
=
Command
::
Compiler
.
new
(
self
,
%w(.cc .cxx .cpp)
)
@cxx
=
Command
::
Compiler
.
new
(
self
,
%w(.cc .cxx .cpp)
)
@objc
=
Command
::
Compiler
.
new
(
self
,
%w(.m)
)
@objc
=
Command
::
Compiler
.
new
(
self
,
%w(.m)
)
...
@@ -94,7 +89,9 @@ module MRuby
...
@@ -94,7 +89,9 @@ module MRuby
end
end
def
toolchain
(
name
)
def
toolchain
(
name
)
Toolchain
.
toolchains
[
name
.
to_s
].
setup
(
self
)
tc
=
Toolchain
.
toolchains
[
name
.
to_s
]
fail
"Unknown
#{
name
}
toolchain"
unless
tc
tc
.
setup
(
self
)
end
end
def
build_dir
def
build_dir
...
...
tasks/mruby_build_gem.rake
View file @
3a95e3fb
...
@@ -2,7 +2,11 @@ module MRuby
...
@@ -2,7 +2,11 @@ module MRuby
module
LoadGems
module
LoadGems
def
gem
(
gemdir
,
&
block
)
def
gem
(
gemdir
,
&
block
)
gemdir
=
load_external_gem
(
gemdir
)
if
gemdir
.
is_a?
(
Hash
)
gemdir
=
load_external_gem
(
gemdir
)
if
gemdir
.
is_a?
(
Hash
)
load
File
.
join
(
gemdir
,
"mrbgem.rake"
)
gemrake
=
File
.
join
(
gemdir
,
"mrbgem.rake"
)
fail
"Can't find
#{
gemrake
}
"
unless
File
.
exists?
(
gemrake
)
load
gemrake
Gem
.
current
.
dir
=
gemdir
Gem
.
current
.
dir
=
gemdir
Gem
.
current
.
build
=
MRuby
::
Build
.
current
Gem
.
current
.
build
=
MRuby
::
Build
.
current
Gem
.
current
.
build_config_initializer
=
block
Gem
.
current
.
build_config_initializer
=
block
...
...
tasks/ruby_ext.rake
View file @
3a95e3fb
...
@@ -21,10 +21,14 @@ class String
...
@@ -21,10 +21,14 @@ class String
str
.
gsub!
(
"%{
#{
k
}
}"
,
v
)
str
.
gsub!
(
"%{
#{
k
}
}"
,
v
)
end
end
str
str
else
if
params
.
is_a?
(
Array
)
sprintf
(
self
,
*
params
)
else
else
sprintf
(
self
,
params
)
sprintf
(
self
,
params
)
end
end
end
end
end
end
end
class
Symbol
class
Symbol
...
...
tasks/toolchains/vs2012.rake
View file @
3a95e3fb
...
@@ -4,24 +4,24 @@ MRuby::Toolchain.new(:vs2012) do |conf|
...
@@ -4,24 +4,24 @@ MRuby::Toolchain.new(:vs2012) do |conf|
cc
.
flags
=
[
ENV
[
'CFLAGS'
]
||
%w(/c /nologo /W3 /D_DEBUG /MDd /Zi /Od /RTC1 /DDISABLE_GEMS /DHAVE_STRING_H /DNO_GETTIMEOFDAY /D_CRT_SECURE_NO_WARNINGS)
]
cc
.
flags
=
[
ENV
[
'CFLAGS'
]
||
%w(/c /nologo /W3 /D_DEBUG /MDd /Zi /Od /RTC1 /DDISABLE_GEMS /DHAVE_STRING_H /DNO_GETTIMEOFDAY /D_CRT_SECURE_NO_WARNINGS)
]
cc
.
include_paths
=
[
"
#{
root
}
/include"
]
cc
.
include_paths
=
[
"
#{
root
}
/include"
]
cc
.
defines
=
%w(DISABLE_GEMS)
cc
.
defines
=
%w(DISABLE_GEMS)
cc
.
option_include_path
=
'
-
I%s'
cc
.
option_include_path
=
'
/
I%s'
cc
.
option_define
=
'
-
D%s'
cc
.
option_define
=
'
/
D%s'
cc
.
compile_options
=
"%{flags} /Fo%{outfile}
-c
%{infile}"
cc
.
compile_options
=
"%{flags} /Fo%{outfile} %{infile}"
end
end
conf
.
linker
do
|
linker
|
conf
.
linker
do
|
linker
|
linker
.
command
=
ENV
[
'LD'
]
||
'link.exe'
linker
.
command
=
ENV
[
'LD'
]
||
'link.exe'
linker
.
flags
=
[
ENV
[
'LDFLAGS'
]
||
%w(/nologo)
]
linker
.
flags
=
[
ENV
[
'LDFLAGS'
]
||
%w(/nologo)
]
linker
.
libraries
=
%w(
kernel32 user32 gdi32 winspool comdlg32 advapi32 shell32 ole32 oleaut32 uuid odbc32 odbccp32
)
linker
.
libraries
=
%w()
linker
.
library_paths
=
[]
linker
.
library_paths
=
%w()
linker
.
option_library
=
'
-l
%s'
linker
.
option_library
=
'%s'
linker
.
option_library_path
=
'
-L
%s'
linker
.
option_library_path
=
'
/LIBPATH:
%s'
linker
.
link_options
=
"%{flags} /OUT:%{outfile} %{objs} %{libs}"
linker
.
link_options
=
"%{flags} /OUT:%{outfile} %{objs} %{libs}"
end
end
conf
.
archiver
do
|
archiver
|
conf
.
archiver
do
|
archiver
|
archiver
.
command
=
ENV
[
'AR'
]
||
'lib.exe'
archiver
.
command
=
ENV
[
'AR'
]
||
'lib.exe'
archiver
.
archive_options
=
'/OUT:%{outfile} %{objs}'
archiver
.
archive_options
=
'/
nologo /
OUT:%{outfile} %{objs}'
end
end
conf
.
yacc
do
|
yacc
|
conf
.
yacc
do
|
yacc
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment