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
fb3c2f6b
Commit
fb3c2f6b
authored
Jun 04, 2014
by
take_cheeze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add generator script to dependency so that it will regenerate C codes when it's modified.
parent
bd0e9db1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
13 deletions
+17
-13
mrblib/mrblib.rake
mrblib/mrblib.rake
+2
-2
src/mruby_core.rake
src/mruby_core.rake
+2
-2
tasks/libmruby.rake
tasks/libmruby.rake
+5
-1
tasks/mrbgem_spec.rake
tasks/mrbgem_spec.rake
+1
-1
tasks/mrbgems.rake
tasks/mrbgems.rake
+2
-2
tasks/mrbgems_test.rake
tasks/mrbgems_test.rake
+2
-2
test/mrbtest.rake
test/mrbtest.rake
+3
-3
No files found.
mrblib/mrblib.rake
View file @
fb3c2f6b
...
...
@@ -6,8 +6,8 @@ MRuby.each_target do
self
.
libmruby
<<
objfile
(
"
#{
current_build_dir
}
/mrblib"
)
file
objfile
(
"
#{
current_build_dir
}
/mrblib"
)
=>
"
#{
current_build_dir
}
/mrblib.c"
file
"
#{
current_build_dir
}
/mrblib.c"
=>
[
mrbcfile
]
+
Dir
.
glob
(
"
#{
current_dir
}
/*.rb"
).
sort
do
|
t
|
mrbc
_
,
*
rbfiles
=
t
.
prerequisites
file
"
#{
current_build_dir
}
/mrblib.c"
=>
[
mrbcfile
,
__FILE__
]
+
Dir
.
glob
(
"
#{
current_dir
}
/*.rb"
).
sort
do
|
t
|
_
,
_
,
*
rbfiles
=
t
.
prerequisites
FileUtils
.
mkdir_p
File
.
dirname
(
t
.
name
)
open
(
t
.
name
,
'w'
)
do
|
f
|
_pp
"GEN"
,
"*.rb"
,
"
#{
t
.
name
.
relative_path
}
"
...
...
src/mruby_core.rake
View file @
fb3c2f6b
...
...
@@ -13,7 +13,7 @@ MRuby.each_target do
cxx_abi_dependency
=
%w(codegen error vm)
cxx_abi_objs
=
cxx_abi_dependency
.
map
{
|
v
|
src
=
"
#{
current_build_dir
}
/
#{
v
}
.cxx"
file
src
=>
"
#{
current_dir
}
/
#{
v
}
.c"
do
|
t
|
file
src
=>
[
"
#{
current_dir
}
/
#{
v
}
.c"
,
__FILE__
]
do
|
t
|
File
.
open
(
t
.
name
,
'w'
)
do
|
f
|
f
.
write
<<
EOS
#define __STDC_CONSTANT_MACROS
...
...
@@ -37,7 +37,7 @@ EOS
}
cxx_abi_objs
<<
objfile
(
"
#{
current_build_dir
}
/y.tab"
)
file
"
#{
current_build_dir
}
/y.tab.cxx"
=>
"
#{
current_build_dir
}
/y.tab.c"
do
|
t
|
file
"
#{
current_build_dir
}
/y.tab.cxx"
=>
[
"
#{
current_build_dir
}
/y.tab.c"
,
__FILE__
]
do
|
t
|
File
.
open
(
t
.
name
,
'w'
)
do
|
f
|
f
.
write
<<
EOS
#define __STDC_CONSTANT_MACROS
...
...
tasks/libmruby.rake
View file @
fb3c2f6b
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
|
end
file
"
#{
build_dir
}
/lib/libmruby.flags.mak"
=>
[
__FILE__
,
libfile
(
"
#{
build_dir
}
/lib/libmruby"
)]
do
|
t
|
open
(
t
.
name
,
'w'
)
do
|
f
|
f
.
puts
"MRUBY_CFLAGS =
#{
cc
.
all_flags
.
gsub
(
'"'
,
'\\"'
)
}
"
gem_flags
=
gems
.
map
{
|
g
|
g
.
linker
.
flags
}
...
...
@@ -15,4 +18,5 @@ MRuby.each_target do
f
.
puts
"MRUBY_LIBS =
#{
linker
.
option_library
%
'mruby'
}
#{
linker
.
library_flags
(
gem_libraries
).
gsub
(
'"'
,
'\\"'
)
}
"
end
end
task
:all
=>
"
#{
build_dir
}
/lib/libmruby.flags.mak"
end
tasks/mrbgem_spec.rake
View file @
fb3c2f6b
...
...
@@ -124,7 +124,7 @@ module MRuby
def
define_gem_init_builder
file
objfile
(
"
#{
build_dir
}
/gem_init"
)
=>
"
#{
build_dir
}
/gem_init.c"
file
"
#{
build_dir
}
/gem_init.c"
=>
[
build
.
mrbcfile
]
+
[
rbfiles
].
flatten
do
|
t
|
file
"
#{
build_dir
}
/gem_init.c"
=>
[
build
.
mrbcfile
,
__FILE__
]
+
[
rbfiles
].
flatten
do
|
t
|
FileUtils
.
mkdir_p
build_dir
generate_gem_init
(
"
#{
build_dir
}
/gem_init.c"
)
end
...
...
tasks/mrbgems.rake
View file @
fb3c2f6b
...
...
@@ -7,7 +7,7 @@ MRuby.each_target do
# loader all gems
self
.
libmruby
<<
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
]
do
|
t
|
file
"
#{
build_dir
}
/mrbgems/gem_init.c"
=>
[
MRUBY_CONFIG
,
__FILE__
]
do
|
t
|
FileUtils
.
mkdir_p
"
#{
build_dir
}
/mrbgems"
open
(
t
.
name
,
'w'
)
do
|
f
|
f
.
puts
%Q[/*]
...
...
@@ -40,7 +40,7 @@ MRuby.each_target do
end
# legal documents
file
"
#{
build_dir
}
/LEGAL"
=>
[
MRUBY_CONFIG
]
do
|
t
|
file
"
#{
build_dir
}
/LEGAL"
=>
[
MRUBY_CONFIG
,
__FILE__
]
do
|
t
|
open
(
t
.
name
,
'w+'
)
do
|
f
|
f
.
puts
<<
LEGAL
Copyright (c)
#{
Time
.
now
.
year
}
mruby developers
...
...
tasks/mrbgems_test.rake
View file @
fb3c2f6b
...
...
@@ -10,7 +10,7 @@ MRuby.each_target do
test_rbobj
=
g
.
test_rbireps
.
ext
(
exts
.
object
)
file
test_rbobj
=>
g
.
test_rbireps
file
g
.
test_rbireps
=>
[
g
.
test_rbfiles
].
flatten
+
[
g
.
build
.
mrbcfile
]
do
|
t
|
file
g
.
test_rbireps
=>
[
g
.
test_rbfiles
].
flatten
+
[
g
.
build
.
mrbcfile
,
__FILE__
]
do
|
t
|
open
(
t
.
name
,
'w'
)
do
|
f
|
g
.
print_gem_test_header
(
f
)
test_preload
=
g
.
test_preload
and
[
g
.
dir
,
MRUBY_ROOT
].
map
{
|
dir
|
...
...
@@ -117,7 +117,7 @@ MRuby.each_target do
no_mrb_open_test_lib
=
no_mrb_open_test
.
ext
(
exts
.
object
)
file
no_mrb_open_test_lib
=>
"
#{
no_mrb_open_test
}
.c"
file
"
#{
no_mrb_open_test
}
.c"
=>
no_mrb_open_test_rbfiles
+
[
MRUBY_CONFIG
]
do
|
t
|
file
"
#{
no_mrb_open_test
}
.c"
=>
no_mrb_open_test_rbfiles
+
[
MRUBY_CONFIG
,
__FILE__
]
do
|
t
|
open
(
t
.
name
,
'w'
)
do
|
f
|
f
.
puts
%Q[/*]
f
.
puts
%Q[ * This file contains a test code for following gems:]
...
...
test/mrbtest.rake
View file @
fb3c2f6b
...
...
@@ -31,15 +31,15 @@ MRuby.each_target do
end
file
ass_lib
=>
ass_c
file
ass_c
=>
"
#{
current_dir
}
/assert.rb"
do
|
t
|
file
ass_c
=>
[
"
#{
current_dir
}
/assert.rb"
,
__FILE__
]
do
|
t
|
FileUtils
.
mkdir_p
File
.
dirname
t
.
name
open
(
t
.
name
,
'w'
)
do
|
f
|
mrbc
.
run
f
,
[
t
.
prerequisites
],
'mrbtest_assert_irep'
mrbc
.
run
f
,
[
t
.
prerequisites
.
first
],
'mrbtest_assert_irep'
end
end
file
mlib
=>
clib
file
clib
=>
[
mrbcfile
,
init
]
+
mrbs
do
|
t
|
file
clib
=>
[
mrbcfile
,
init
,
__FILE__
]
+
mrbs
do
|
t
|
_pp
"GEN"
,
"*.rb"
,
"
#{
clib
.
relative_path
}
"
FileUtils
.
mkdir_p
File
.
dirname
(
clib
)
open
(
clib
,
'w'
)
do
|
f
|
...
...
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