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
cb2ad2c4
Commit
cb2ad2c4
authored
Mar 07, 2013
by
Masaki Muranaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Support to build loadable modules defined in mrbgems.
parent
83c5274a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
2 deletions
+32
-2
Rakefile
Rakefile
+24
-0
tasks/mrbgem_spec.rake
tasks/mrbgem_spec.rake
+5
-0
tasks/mruby_build.rake
tasks/mruby_build.rake
+3
-2
No files found.
Rakefile
View file @
cb2ad2c4
...
...
@@ -48,6 +48,30 @@ depfiles = MRuby.targets['host'].bins.map do |bin|
install_path
end
MRuby
.
each_target
do
gems
.
map
do
|
gem
|
current_dir
=
gem
.
dir
.
relative_path_from
(
Dir
.
pwd
)
relative_from_root
=
gem
.
dir
.
relative_path_from
(
MRUBY_ROOT
)
current_build_dir
=
"
#{
build_dir
}
/
#{
relative_from_root
}
"
gem
.
bins
.
each
do
|
bin
|
exec
=
exefile
(
"
#{
build_dir
}
/bin/
#{
bin
}
"
)
objs
=
Dir
.
glob
(
"
#{
current_dir
}
/tool/
#{
bin
}
/*.c"
).
map
{
|
f
|
objfile
(
f
.
pathmap
(
"
#{
current_build_dir
}
/tool/
#{
bin
}
/%n"
))
}
file
exec
=>
objs
+
[
libfile
(
"
#{
build_dir
}
/lib/libmruby"
)]
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
}
gem_libraries
=
gems
.
map
{
|
g
|
g
.
linker
.
libraries
}
gem_library_paths
=
gems
.
map
{
|
g
|
g
.
linker
.
library_paths
}
linker
.
run
t
.
name
,
t
.
prerequisites
,
gem_libraries
,
gem_library_paths
,
gem_flags
,
gem_flags_before_libraries
end
depfiles
+=
[
exec
]
end
end
end
depfiles
+=
MRuby
.
targets
.
reject
{
|
n
,
t
|
n
==
'host'
}.
map
{
|
n
,
t
|
[
t
.
libfile
(
"
#{
t
.
build_dir
}
/lib/libmruby"
)]
+
t
.
bins
.
map
{
|
bin
|
t
.
exefile
(
"
#{
t
.
build_dir
}
/bin/
#{
bin
}
"
)
}
}.
flatten
...
...
tasks/mrbgem_spec.rake
View file @
cb2ad2c4
...
...
@@ -28,6 +28,9 @@ module MRuby
attr_accessor
:test_objs
,
:test_rbfiles
,
:test_args
attr_accessor
:test_preload
attr_accessor
:bins
alias
:bin
=
:bins
=
attr_block
MRuby
::
Build
::
COMMANDS
def
initialize
(
name
,
&
block
)
...
...
@@ -59,6 +62,8 @@ module MRuby
@test_preload
=
'test/assert.rb'
@test_args
=
{}
@bins
=
[]
instance_eval
(
&
@initializer
)
if
!
name
||
!
licenses
||
!
authors
...
...
tasks/mruby_build.rake
View file @
cb2ad2c4
...
...
@@ -174,8 +174,9 @@ module MRuby
puts
" Binaries:
#{
@bins
.
join
(
', '
)
}
"
unless
@bins
.
empty?
unless
@gems
.
empty?
puts
" Included Gems:"
@gems
.
map
(
&
:name
).
each
do
|
name
|
puts
"
#{
name
}
"
@gems
.
map
do
|
gem
|
puts
"
#{
gem
.
name
}
"
puts
" - Binaries:
#{
gem
.
bins
.
join
(
', '
)
}
"
unless
gem
.
bins
.
empty?
end
end
puts
"================================================"
...
...
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