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
Hide 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
file
libfile
(
"
#{
build_dir
}
/lib/libmruby"
)
=>
libmruby
.
flatten
do
|
t
|
archiver
.
run
t
.
name
,
t
.
prerequisites
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_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
}
f
.
puts
'LIBS = "%s"'
%
linker
.
library_flags
(
gem_libraries
).
gsub
(
'"'
,
'\\"'
)
f
.
puts
'
MRUBY_
LIBS = "%s"'
%
linker
.
library_flags
(
gem_libraries
).
gsub
(
'"'
,
'\\"'
)
end
end
end
tasks/mruby_build.rake
View file @
3a95e3fb
...
...
@@ -29,10 +29,6 @@ module MRuby
conf
.
instance_eval
(
&
@initializer
)
end
def
toolchain
(
name
)
@@toolchains
[
name
.
to_s
].
setup
(
self
)
end
def
self
.
load
Dir
.
glob
(
"
#{
File
.
dirname
(
__FILE__
)
}
/toolchains/*.rake"
).
each
do
|
file
|
Kernel
.
load
file
...
...
@@ -63,12 +59,11 @@ module MRuby
if
ENV
[
'OS'
]
==
'Windows_NT'
@exts
=
Exts
.
new
(
'.o'
,
'.exe'
,
'.a'
)
@file_separator
=
'\\'
else
@exts
=
Exts
.
new
(
'.o'
,
''
,
'.a'
)
@file_separator
=
'/'
end
@file_separator
=
'/'
@cc
=
Command
::
Compiler
.
new
(
self
,
%w(.c)
)
@cxx
=
Command
::
Compiler
.
new
(
self
,
%w(.cc .cxx .cpp)
)
@objc
=
Command
::
Compiler
.
new
(
self
,
%w(.m)
)
...
...
@@ -94,7 +89,9 @@ module MRuby
end
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
def
build_dir
...
...
tasks/mruby_build_gem.rake
View file @
3a95e3fb
...
...
@@ -2,7 +2,11 @@ module MRuby
module
LoadGems
def
gem
(
gemdir
,
&
block
)
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
.
build
=
MRuby
::
Build
.
current
Gem
.
current
.
build_config_initializer
=
block
...
...
tasks/ruby_ext.rake
View file @
3a95e3fb
...
...
@@ -22,7 +22,11 @@ class String
end
str
else
sprintf
(
self
,
params
)
if
params
.
is_a?
(
Array
)
sprintf
(
self
,
*
params
)
else
sprintf
(
self
,
params
)
end
end
end
end
...
...
tasks/toolchains/vs2012.rake
View file @
3a95e3fb
...
...
@@ -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
.
include_paths
=
[
"
#{
root
}
/include"
]
cc
.
defines
=
%w(DISABLE_GEMS)
cc
.
option_include_path
=
'
-
I%s'
cc
.
option_define
=
'
-
D%s'
cc
.
compile_options
=
"%{flags} /Fo%{outfile}
-c
%{infile}"
cc
.
option_include_path
=
'
/
I%s'
cc
.
option_define
=
'
/
D%s'
cc
.
compile_options
=
"%{flags} /Fo%{outfile} %{infile}"
end
conf
.
linker
do
|
linker
|
linker
.
command
=
ENV
[
'LD'
]
||
'link.exe'
linker
.
flags
=
[
ENV
[
'LDFLAGS'
]
||
%w(/nologo)
]
linker
.
libraries
=
%w(
kernel32 user32 gdi32 winspool comdlg32 advapi32 shell32 ole32 oleaut32 uuid odbc32 odbccp32
)
linker
.
library_paths
=
[]
linker
.
option_library
=
'
-l
%s'
linker
.
option_library_path
=
'
-L
%s'
linker
.
libraries
=
%w()
linker
.
library_paths
=
%w()
linker
.
option_library
=
'%s'
linker
.
option_library_path
=
'
/LIBPATH:
%s'
linker
.
link_options
=
"%{flags} /OUT:%{outfile} %{objs} %{libs}"
end
conf
.
archiver
do
|
archiver
|
archiver
.
command
=
ENV
[
'AR'
]
||
'lib.exe'
archiver
.
archive_options
=
'/OUT:%{outfile} %{objs}'
archiver
.
archive_options
=
'/
nologo /
OUT:%{outfile} %{objs}'
end
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