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
ab8a5aa5
Commit
ab8a5aa5
authored
Mar 10, 2013
by
Yuichiro MASUI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change default gem path.
parent
b783311e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
12 deletions
+15
-12
Rakefile
Rakefile
+2
-4
build_config.rb
build_config.rb
+6
-6
tasks/mrbgems.rake
tasks/mrbgems.rake
+1
-1
tasks/mruby_build_gem.rake
tasks/mruby_build_gem.rake
+6
-1
No files found.
Rakefile
View file @
ab8a5aa5
...
@@ -9,10 +9,8 @@ load "#{MRUBY_ROOT}/tasks/mruby_build.rake"
...
@@ -9,10 +9,8 @@ load "#{MRUBY_ROOT}/tasks/mruby_build.rake"
load
"
#{
MRUBY_ROOT
}
/tasks/mrbgem_spec.rake"
load
"
#{
MRUBY_ROOT
}
/tasks/mrbgem_spec.rake"
# load configuration file
# load configuration file
MRUBY_CONFIGS
=
[
"
#{
MRUBY_ROOT
}
/build_config.rb"
,
ENV
[
'MRUBY_CONFIG'
]].
compact
MRUBY_CONFIG
=
(
ENV
[
'MRUBY_CONFIG'
]
&&
ENV
[
'MRUBY_CONFIG'
]
!=
''
)
?
ENV
[
'MRUBY_CONFIG'
]
:
"
#{
MRUBY_ROOT
}
/build_config.rb"
MRUBY_CONFIGS
.
each
do
|
config
|
load
MRUBY_CONFIG
load
config
unless
config
.
empty?
end
# load basic rules
# load basic rules
MRuby
.
each_target
do
|
build
|
MRuby
.
each_target
do
|
build
|
...
...
build_config.rb
View file @
ab8a5aa5
...
@@ -12,22 +12,22 @@ MRuby::Build.new do |conf|
...
@@ -12,22 +12,22 @@ MRuby::Build.new do |conf|
# conf.gem :git => 'git@github.com:masuidrive/mrbgems-example.git', :branch => 'master', :options => '-v'
# conf.gem :git => 'git@github.com:masuidrive/mrbgems-example.git', :branch => 'master', :options => '-v'
# Use standard Math module
# Use standard Math module
conf
.
gem
'mrbgems/mruby-math'
conf
.
gem
"
#{
root
}
/mrbgems/mruby-math"
# Use standard Time class
# Use standard Time class
conf
.
gem
'mrbgems/mruby-time'
conf
.
gem
"
#{
root
}
/mrbgems/mruby-time"
# Use standard Struct class
# Use standard Struct class
conf
.
gem
'mrbgems/mruby-struct'
conf
.
gem
"
#{
root
}
/mrbgems/mruby-struct"
# Use standard Kernel#sprintf method
# Use standard Kernel#sprintf method
conf
.
gem
'mrbgems/mruby-sprintf'
conf
.
gem
"
#{
root
}
/mrbgems/mruby-sprintf"
# Use extensional String class
# Use extensional String class
conf
.
gem
'mrbgems/mruby-string-ext'
conf
.
gem
"
#{
root
}
/mrbgems/mruby-string-ext"
# Use extensional Numeric class
# Use extensional Numeric class
conf
.
gem
'mrbgems/mruby-numeric-ext'
conf
.
gem
"
#{
root
}
/mrbgems/mruby-numeric-ext"
# Generate binaries
# Generate binaries
# conf.bins = %w(mrbc mruby mirb)
# conf.bins = %w(mrbc mruby mirb)
...
...
tasks/mrbgems.rake
View file @
ab8a5aa5
...
@@ -9,7 +9,7 @@ MRuby.each_target do
...
@@ -9,7 +9,7 @@ MRuby.each_target do
# loader all gems
# loader all gems
self
.
libmruby
<<
objfile
(
"
#{
build_dir
}
/mrbgems/gem_init"
)
self
.
libmruby
<<
objfile
(
"
#{
build_dir
}
/mrbgems/gem_init"
)
file
objfile
(
"
#{
build_dir
}
/mrbgems/gem_init"
)
=>
"
#{
build_dir
}
/mrbgems/gem_init.c"
file
objfile
(
"
#{
build_dir
}
/mrbgems/gem_init"
)
=>
"
#{
build_dir
}
/mrbgems/gem_init.c"
file
"
#{
build_dir
}
/mrbgems/gem_init.c"
=>
MRUBY_CONFIGS
.
flatten
do
|
t
|
file
"
#{
build_dir
}
/mrbgems/gem_init.c"
=>
[
MRUBY_CONFIG
]
do
|
t
|
FileUtils
.
mkdir_p
"
#{
build_dir
}
/mrbgems"
FileUtils
.
mkdir_p
"
#{
build_dir
}
/mrbgems"
open
(
t
.
name
,
'w'
)
do
|
f
|
open
(
t
.
name
,
'w'
)
do
|
f
|
f
.
puts
%Q[/*]
f
.
puts
%Q[/*]
...
...
tasks/mruby_build_gem.rake
View file @
ab8a5aa5
module
MRuby
module
MRuby
module
LoadGems
module
LoadGems
def
gem
(
gemdir
,
&
block
)
def
gem
(
gemdir
,
&
block
)
gemdir
=
load_external_gem
(
gemdir
)
if
gemdir
.
is_a?
(
Hash
)
caller_dir
=
File
.
expand_path
(
File
.
dirname
(
/^(.*?):\d/
.
match
(
caller
.
first
).
to_a
[
1
]))
if
gemdir
.
is_a?
(
Hash
)
gemdir
=
load_external_gem
(
gemdir
)
else
gemdir
=
File
.
expand_path
(
gemdir
,
caller_dir
)
end
gemrake
=
File
.
join
(
gemdir
,
"mrbgem.rake"
)
gemrake
=
File
.
join
(
gemdir
,
"mrbgem.rake"
)
fail
"Can't find
#{
gemrake
}
"
unless
File
.
exists?
(
gemrake
)
fail
"Can't find
#{
gemrake
}
"
unless
File
.
exists?
(
gemrake
)
...
...
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