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
d5b263f7
Commit
d5b263f7
authored
Jan 22, 2013
by
Jon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine pretty printing
parent
3a95e3fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
mrblib/mrblib.rake
mrblib/mrblib.rake
+1
-1
tasks/mruby_build_commands.rake
tasks/mruby_build_commands.rake
+7
-7
tasks/ruby_ext.rake
tasks/ruby_ext.rake
+2
-2
No files found.
mrblib/mrblib.rake
View file @
d5b263f7
...
@@ -7,7 +7,7 @@ MRuby.each_target do
...
@@ -7,7 +7,7 @@ MRuby.each_target do
mrbc_
,
*
rbfiles
=
t
.
prerequisites
mrbc_
,
*
rbfiles
=
t
.
prerequisites
FileUtils
.
mkdir_p
File
.
dirname
(
t
.
name
)
FileUtils
.
mkdir_p
File
.
dirname
(
t
.
name
)
open
(
t
.
name
,
'w'
)
do
|
f
|
open
(
t
.
name
,
'w'
)
do
|
f
|
_pp
"GEN
*.rb >
#{
t
.
name
}
"
_pp
"GEN
"
,
"*.rb"
,
"
#{
t
.
name
}
"
f
.
puts
File
.
read
(
"
#{
dir
}
/init_mrblib.c"
)
f
.
puts
File
.
read
(
"
#{
dir
}
/init_mrblib.c"
)
mrbc
.
run
f
,
rbfiles
,
'mrblib_irep'
mrbc
.
run
f
,
rbfiles
,
'mrblib_irep'
end
end
...
...
tasks/mruby_build_commands.rake
View file @
d5b263f7
...
@@ -58,7 +58,7 @@ module MRuby
...
@@ -58,7 +58,7 @@ module MRuby
include_path_flags
=
[
include_paths
,
_include_paths
,
File
.
dirname
(
infile
)].
flatten
.
map
do
|
f
|
include_path_flags
=
[
include_paths
,
_include_paths
,
File
.
dirname
(
infile
)].
flatten
.
map
do
|
f
|
option_include_path
%
filename
(
f
)
option_include_path
%
filename
(
f
)
end
end
_pp
"CC
#{
filename
(
infile
)
}
>
#{
filename
(
outfile
)
}
"
_pp
"CC
"
,
"
#{
filename
(
infile
)
}
"
,
"
#{
filename
(
outfile
)
}
"
_run
compile_options
,
{
:flags
=>
(
flags
+
define_flags
+
include_path_flags
+
_flags
).
join
(
' '
),
_run
compile_options
,
{
:flags
=>
(
flags
+
define_flags
+
include_path_flags
+
_flags
).
join
(
' '
),
:infile
=>
filename
(
infile
),
:outfile
=>
filename
(
outfile
)
}
:infile
=>
filename
(
infile
),
:outfile
=>
filename
(
outfile
)
}
end
end
...
@@ -131,7 +131,7 @@ module MRuby
...
@@ -131,7 +131,7 @@ module MRuby
FileUtils
.
mkdir_p
File
.
dirname
(
outfile
)
FileUtils
.
mkdir_p
File
.
dirname
(
outfile
)
library_flags
=
[
libraries
,
_libraries
].
flatten
.
reverse
.
map
{
|
d
|
option_library
%
d
}
library_flags
=
[
libraries
,
_libraries
].
flatten
.
reverse
.
map
{
|
d
|
option_library
%
d
}
library_path_flags
=
[
library_paths
,
_library_paths
].
flatten
.
map
{
|
f
|
option_library_path
%
filename
(
f
)
}
library_path_flags
=
[
library_paths
,
_library_paths
].
flatten
.
map
{
|
f
|
option_library_path
%
filename
(
f
)
}
_pp
"LD
#{
filename
(
outfile
)
}
"
_pp
"LD
"
,
"
#{
filename
(
outfile
)
}
"
_run
link_options
,
{
:flags
=>
(
flags
+
library_path_flags
+
_flags
).
join
(
' '
),
_run
link_options
,
{
:flags
=>
(
flags
+
library_path_flags
+
_flags
).
join
(
' '
),
:outfile
=>
filename
(
outfile
)
,
:objs
=>
filename
(
objfiles
).
join
(
' '
),
:outfile
=>
filename
(
outfile
)
,
:objs
=>
filename
(
objfiles
).
join
(
' '
),
:libs
=>
library_flags
.
join
(
' '
)
}
:libs
=>
library_flags
.
join
(
' '
)
}
...
@@ -149,7 +149,7 @@ module MRuby
...
@@ -149,7 +149,7 @@ module MRuby
def
run
(
outfile
,
objfiles
)
def
run
(
outfile
,
objfiles
)
FileUtils
.
mkdir_p
File
.
dirname
(
outfile
)
FileUtils
.
mkdir_p
File
.
dirname
(
outfile
)
_pp
"AR
#{
filename
(
outfile
)
}
"
_pp
"AR
"
,
"
#{
filename
(
outfile
)
}
"
_run
archive_options
,
{
:outfile
=>
filename
(
outfile
),
:objs
=>
filename
(
objfiles
).
join
(
' '
)
}
_run
archive_options
,
{
:outfile
=>
filename
(
outfile
),
:objs
=>
filename
(
objfiles
).
join
(
' '
)
}
end
end
end
end
...
@@ -165,7 +165,7 @@ module MRuby
...
@@ -165,7 +165,7 @@ module MRuby
def
run
(
outfile
,
infile
)
def
run
(
outfile
,
infile
)
FileUtils
.
mkdir_p
File
.
dirname
(
outfile
)
FileUtils
.
mkdir_p
File
.
dirname
(
outfile
)
_pp
"YACC
#{
filename
(
infile
)
}
>
#{
filename
(
outfile
)
}
"
_pp
"YACC
"
,
"
#{
filename
(
infile
)
}
"
,
"
#{
filename
(
outfile
)
}
"
_run
compile_options
,
{
:outfile
=>
filename
(
outfile
)
,
:infile
=>
filename
(
infile
)
}
_run
compile_options
,
{
:outfile
=>
filename
(
outfile
)
,
:infile
=>
filename
(
infile
)
}
end
end
end
end
...
@@ -181,7 +181,7 @@ module MRuby
...
@@ -181,7 +181,7 @@ module MRuby
def
run
(
outfile
,
infile
)
def
run
(
outfile
,
infile
)
FileUtils
.
mkdir_p
File
.
dirname
(
outfile
)
FileUtils
.
mkdir_p
File
.
dirname
(
outfile
)
_pp
"GPERF
#{
filename
(
infile
)
}
>
#{
filename
(
outfile
)
}
"
_pp
"GPERF
"
,
"
#{
filename
(
infile
)
}
"
,
"
#{
filename
(
outfile
)
}
"
_run
compile_options
,
{
:outfile
=>
filename
(
outfile
)
,
:infile
=>
filename
(
infile
)
}
_run
compile_options
,
{
:outfile
=>
filename
(
outfile
)
,
:infile
=>
filename
(
infile
)
}
end
end
end
end
...
@@ -198,7 +198,7 @@ module MRuby
...
@@ -198,7 +198,7 @@ module MRuby
end
end
def
run_clone
(
dir
,
url
,
_flags
=
[])
def
run_clone
(
dir
,
url
,
_flags
=
[])
_pp
"GIT
#{
url
}
>
#{
filename
(
dir
)
}
"
_pp
"GIT
"
,
"
#{
url
}
"
,
"
#{
filename
(
dir
)
}
"
_run
clone_options
,
{
:flags
=>
[
flags
,
_flags
].
flatten
.
join
(
' '
),
:url
=>
url
,
:dir
=>
filename
(
dir
)
}
_run
clone_options
,
{
:flags
=>
[
flags
,
_flags
].
flatten
.
join
(
' '
),
:url
=>
url
,
:dir
=>
filename
(
dir
)
}
end
end
end
end
...
@@ -214,7 +214,7 @@ module MRuby
...
@@ -214,7 +214,7 @@ module MRuby
@command
||=
@build
.
mrbcfile
@command
||=
@build
.
mrbcfile
IO
.
popen
(
"
#{
filename
@command
}
#{
@compile_options
%
{
:funcname
=>
funcname
}
}"
,
'r+'
)
do
|
io
|
IO
.
popen
(
"
#{
filename
@command
}
#{
@compile_options
%
{
:funcname
=>
funcname
}
}"
,
'r+'
)
do
|
io
|
[
infiles
].
flatten
.
each
do
|
f
|
[
infiles
].
flatten
.
each
do
|
f
|
_pp
" MRBC
#{
f
}
"
_pp
" MRBC
"
,
"
#{
f
}
"
io
.
write
IO
.
read
(
f
)
io
.
write
IO
.
read
(
f
)
end
end
io
.
close_write
io
.
close_write
...
...
tasks/ruby_ext.rake
View file @
d5b263f7
...
@@ -57,6 +57,6 @@ else
...
@@ -57,6 +57,6 @@ else
$pp_show
=
false
if
$verbose
$pp_show
=
false
if
$verbose
end
end
def
_pp
(
msg
)
def
_pp
(
cmd
,
src
,
tgt
=
nil
)
puts
msg
if
$pp_show
puts
'%-5s %s %s'
%
[
cmd
,
src
,
tgt
?
"->
#{
tgt
}
"
:
nil
]
if
$pp_show
end
end
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