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
ae5463c9
Unverified
Commit
ae5463c9
authored
Oct 29, 2018
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
Oct 29, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4148 from take-cheeze/rename_libmruby_stuff
Rename `MRuby::Build#libmruby` stuff to avoid confusion
parents
63fade13
b37b3120
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
30 additions
and
19 deletions
+30
-19
Rakefile
Rakefile
+2
-2
lib/mruby/build.rb
lib/mruby/build.rb
+16
-2
lib/mruby/gem.rb
lib/mruby/gem.rb
+1
-1
mrbgems/mruby-bin-mrbc/mrbgem.rake
mrbgems/mruby-bin-mrbc/mrbgem.rake
+1
-1
mrbgems/mruby-bin-mruby-config/mrbgem.rake
mrbgems/mruby-bin-mruby-config/mrbgem.rake
+1
-1
mrbgems/mruby-compiler/mrbgem.rake
mrbgems/mruby-compiler/mrbgem.rake
+1
-1
mrbgems/mruby-test/mrbgem.rake
mrbgems/mruby-test/mrbgem.rake
+1
-4
mrblib/mrblib.rake
mrblib/mrblib.rake
+1
-1
src/mruby_core.rake
src/mruby_core.rake
+2
-2
tasks/libmruby.rake
tasks/libmruby.rake
+3
-3
tasks/mrbgems.rake
tasks/mrbgems.rake
+1
-1
No files found.
Rakefile
View file @
ae5463c9
...
...
@@ -65,7 +65,7 @@ MRuby.each_target do |target|
exec
=
exefile
(
"
#{
build_dir
}
/bin/
#{
bin
}
"
)
objs
=
Dir
.
glob
(
"
#{
current_dir
}
/tools/
#{
bin
}
/*.{c,cpp,cxx,cc}"
).
map
{
|
f
|
objfile
(
f
.
pathmap
(
"
#{
current_build_dir
}
/tools/
#{
bin
}
/%n"
))
}
file
exec
=>
objs
+
[
libfile
(
"
#{
build_dir
}
/lib/libmruby"
)]
do
|
t
|
file
exec
=>
objs
+
target
.
libraries
do
|
t
|
gem_flags
=
gems
.
map
{
|
g
|
g
.
linker
.
flags
}
gem_flags_before_libraries
=
gems
.
map
{
|
g
|
g
.
linker
.
flags_before_libraries
}
gem_flags_after_libraries
=
gems
.
map
{
|
g
|
g
.
linker
.
flags_after_libraries
}
...
...
@@ -100,7 +100,7 @@ MRuby.each_target do |target|
end
depfiles
+=
MRuby
.
targets
.
map
{
|
n
,
t
|
[
t
.
libfile
(
"
#{
t
.
build_dir
}
/lib/libmruby"
)]
t
.
libraries
}.
flatten
depfiles
+=
MRuby
.
targets
.
reject
{
|
n
,
t
|
n
==
'host'
}.
map
{
|
n
,
t
|
...
...
lib/mruby/build.rb
View file @
ae5463c9
...
...
@@ -45,9 +45,11 @@ module MRuby
include
Rake
::
DSL
include
LoadGems
attr_accessor
:name
,
:bins
,
:exts
,
:file_separator
,
:build_dir
,
:gem_clone_dir
attr_reader
:libmruby
,
:gems
,
:toolchains
attr_reader
:libmruby
_objs
,
:gems
,
:toolchains
attr_writer
:enable_bintest
,
:enable_test
alias
libmruby
libmruby_objs
COMPILERS
=
%w(cc cxx objc asm)
COMMANDS
=
COMPILERS
+
%w(linker archiver yacc gperf git exts mrbc)
attr_block
MRuby
::
Build
::
COMMANDS
...
...
@@ -81,7 +83,7 @@ module MRuby
@mrbc
=
Command
::
Mrbc
.
new
(
self
)
@bins
=
[]
@gems
,
@libmruby
=
MRuby
::
Gem
::
List
.
new
,
[]
@gems
,
@libmruby
_objs
=
MRuby
::
Gem
::
List
.
new
,
[]
@build_mrbtest_lib_only
=
false
@cxx_exception_enabled
=
false
@cxx_exception_disabled
=
false
...
...
@@ -327,6 +329,18 @@ EOS
puts
"================================================"
puts
end
def
libmruby_static
libfile
(
"
#{
build_dir
}
/lib/libmruby"
)
end
def
libmruby_core_static
libfile
(
"
#{
build_dir
}
/lib/libmruby_core"
)
end
def
libraries
[
libmruby_static
]
end
end
# Build
class
CrossBuild
<
Build
...
...
lib/mruby/gem.rb
View file @
ae5463c9
...
...
@@ -87,7 +87,7 @@ module MRuby
fail
"
#{
name
||
dir
}
required to set name, license(s) and author(s)"
end
build
.
libmruby
<<
@objs
build
.
libmruby
_objs
<<
@objs
instance_eval
(
&
@build_config_initializer
)
if
@build_config_initializer
end
...
...
mrbgems/mruby-bin-mrbc/mrbgem.rake
View file @
ae5463c9
...
...
@@ -8,7 +8,7 @@ MRuby::Gem::Specification.new 'mruby-bin-mrbc' do |spec|
exec
=
exefile
(
"
#{
build
.
build_dir
}
/bin/mrbc"
)
mrbc_objs
=
Dir
.
glob
(
"
#{
spec
.
dir
}
/tools/mrbc/*.c"
).
map
{
|
f
|
objfile
(
f
.
pathmap
(
"
#{
spec
.
build_dir
}
/tools/mrbc/%n"
))
}.
flatten
file
exec
=>
mrbc_objs
+
[
libfile
(
"
#{
build
.
build_dir
}
/lib/libmruby_core"
)
]
do
|
t
|
file
exec
=>
mrbc_objs
+
[
build
.
libmruby_core_static
]
do
|
t
|
build
.
linker
.
run
t
.
name
,
t
.
prerequisites
end
...
...
mrbgems/mruby-bin-mruby-config/mrbgem.rake
View file @
ae5463c9
...
...
@@ -20,7 +20,7 @@ MRuby.each_target do
@bins
<<
mruby_config
make_cfg
=
"
#{
build_dir
}
/lib/libmruby.flags.mak"
file
mruby_config_path
=>
[
lib
file
(
"
#{
build_dir
}
/lib/libmruby"
)
,
make_cfg
]
do
|
t
|
file
mruby_config_path
=>
[
lib
mruby_static
,
make_cfg
]
do
|
t
|
FileUtils
.
copy
"
#{
File
.
dirname
(
__FILE__
)
}
/
#{
mruby_config
}
"
,
t
.
name
config
=
Hash
[
open
(
make_cfg
).
read
.
split
(
"
\n
"
).
map
{
|
x
|
a
=
x
.
split
(
/\s*=\s*/
,
2
);
[
a
[
0
],
a
[
1
].
gsub
(
'\\"'
,
'"'
)
]}]
IO
.
write
(
t
.
name
,
File
.
open
(
t
.
name
)
{
|
f
|
...
...
mrbgems/mruby-compiler/mrbgem.rake
View file @
ae5463c9
...
...
@@ -35,6 +35,6 @@ MRuby::Gem::Specification.new 'mruby-compiler' do |spec|
gperf
.
run
t
.
name
,
t
.
prerequisites
.
first
end
file
libfile
(
"
#{
build
.
build_dir
}
/lib/libmruby_core"
)
=>
core_objs
file
build
.
libmruby_core_static
=>
core_objs
build
.
libmruby
<<
core_objs
end
mrbgems/mruby-test/mrbgem.rake
View file @
ae5463c9
...
...
@@ -16,9 +16,6 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
mlib
=
clib
.
ext
(
exts
.
object
)
exec
=
exefile
(
"
#{
build
.
build_dir
}
/bin/mrbtest"
)
libmruby
=
libfile
(
"
#{
build
.
build_dir
}
/lib/libmruby"
)
libmruby_core
=
libfile
(
"
#{
build
.
build_dir
}
/lib/libmruby_core"
)
mrbtest_lib
=
libfile
(
"
#{
build_dir
}
/mrbtest"
)
mrbtest_objs
=
[]
...
...
@@ -140,7 +137,7 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
end
unless
build
.
build_mrbtest_lib_only?
file
exec
=>
[
driver_obj
,
mlib
,
mrbtest_lib
,
libmruby_core
,
libmruby
]
do
|
t
|
file
exec
=>
[
driver_obj
,
mlib
,
mrbtest_lib
,
build
.
libmruby_static
]
do
|
t
|
gem_flags
=
build
.
gems
.
map
{
|
g
|
g
.
linker
.
flags
}
gem_flags_before_libraries
=
build
.
gems
.
map
{
|
g
|
g
.
linker
.
flags_before_libraries
}
gem_flags_after_libraries
=
build
.
gems
.
map
{
|
g
|
g
.
linker
.
flags_after_libraries
}
...
...
mrblib/mrblib.rake
View file @
ae5463c9
...
...
@@ -3,7 +3,7 @@ MRuby.each_target do
relative_from_root
=
File
.
dirname
(
__FILE__
).
relative_path_from
(
MRUBY_ROOT
)
current_build_dir
=
"
#{
build_dir
}
/
#{
relative_from_root
}
"
self
.
libmruby
<<
objfile
(
"
#{
current_build_dir
}
/mrblib"
)
self
.
libmruby
_objs
<<
objfile
(
"
#{
current_build_dir
}
/mrblib"
)
file
objfile
(
"
#{
current_build_dir
}
/mrblib"
)
=>
"
#{
current_build_dir
}
/mrblib.c"
file
"
#{
current_build_dir
}
/mrblib.c"
=>
[
mrbcfile
,
__FILE__
]
+
Dir
.
glob
(
"
#{
current_dir
}
/*.rb"
).
sort
do
|
t
|
...
...
src/mruby_core.rake
View file @
ae5463c9
...
...
@@ -12,9 +12,9 @@ MRuby.each_target do
if
cxx_exception_enabled?
objs
+=
%w(vm error)
.
map
{
|
v
|
compile_as_cxx
"
#{
current_dir
}
/
#{
v
}
.c"
,
"
#{
current_build_dir
}
/
#{
v
}
.cxx"
}
end
self
.
libmruby
<<
objs
self
.
libmruby
_objs
<<
objs
file
lib
file
(
"
#{
build_dir
}
/lib/libmruby_core"
)
=>
objs
do
|
t
|
file
lib
mruby_core_static
=>
objs
do
|
t
|
archiver
.
run
t
.
name
,
t
.
prerequisites
end
end
tasks/libmruby.rake
View file @
ae5463c9
MRuby
.
each_target
do
file
lib
file
(
"
#{
build_dir
}
/lib/libmruby"
)
=>
libmruby
.
flatten
do
|
t
|
file
lib
mruby_static
=>
libmruby_objs
.
flatten
do
|
t
|
archiver
.
run
t
.
name
,
t
.
prerequisites
end
file
"
#{
build_dir
}
/lib/libmruby.flags.mak"
=>
[
__FILE__
,
lib
file
(
"
#{
build_dir
}
/lib/libmruby"
)
]
do
|
t
|
file
"
#{
build_dir
}
/lib/libmruby.flags.mak"
=>
[
__FILE__
,
lib
mruby_static
]
do
|
t
|
FileUtils
.
mkdir_p
File
.
dirname
t
.
name
open
(
t
.
name
,
'w'
)
do
|
f
|
f
.
puts
"MRUBY_CFLAGS =
#{
cc
.
all_flags
}
"
...
...
@@ -18,7 +18,7 @@ MRuby.each_target do
gem_libraries
=
gems
.
map
{
|
g
|
g
.
linker
.
libraries
}
f
.
puts
"MRUBY_LIBS =
#{
linker
.
option_library
%
'mruby'
}
#{
linker
.
library_flags
(
gem_libraries
)
}
"
f
.
puts
"MRUBY_LIBMRUBY_PATH =
#{
lib
file
(
"
#{
build_dir
}
/lib/libmruby"
)
}
"
f
.
puts
"MRUBY_LIBMRUBY_PATH =
#{
lib
mruby_static
}
"
end
end
task
:all
=>
"
#{
build_dir
}
/lib/libmruby.flags.mak"
...
...
tasks/mrbgems.rake
View file @
ae5463c9
...
...
@@ -5,7 +5,7 @@ MRuby.each_target do
gems
.
check
self
# loader all gems
self
.
libmruby
<<
objfile
(
"
#{
build_dir
}
/mrbgems/gem_init"
)
self
.
libmruby
_objs
<<
objfile
(
"
#{
build_dir
}
/mrbgems/gem_init"
)
file
objfile
(
"
#{
build_dir
}
/mrbgems/gem_init"
)
=>
[
"
#{
build_dir
}
/mrbgems/gem_init.c"
,
"
#{
build_dir
}
/LEGAL"
]
file
"
#{
build_dir
}
/mrbgems/gem_init.c"
=>
[
MRUBY_CONFIG
,
__FILE__
]
do
|
t
|
FileUtils
.
mkdir_p
"
#{
build_dir
}
/mrbgems"
...
...
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