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
fb621ef4
Commit
fb621ef4
authored
Mar 05, 2014
by
mattn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add mruby-bin-mruby-config
parent
ba608fb3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
0 deletions
+63
-0
mrbgems/mruby-bin-mruby-config/mrbgem.rake
mrbgems/mruby-bin-mruby-config/mrbgem.rake
+31
-0
mrbgems/mruby-bin-mruby-config/mruby-config
mrbgems/mruby-bin-mruby-config/mruby-config
+10
-0
mrbgems/mruby-bin-mruby-config/mruby-config.bat
mrbgems/mruby-bin-mruby-config/mruby-config.bat
+22
-0
No files found.
mrbgems/mruby-bin-mruby-config/mrbgem.rake
0 → 100644
View file @
fb621ef4
require
'FileUtils'
module
MRuby
class
Build
def
exefile
(
name
)
if
name
.
is_a?
(
Array
)
name
.
flatten
.
map
{
|
n
|
exefile
(
n
)
}
elsif
name
!~
/\./
"
#{
name
}#{
exts
.
executable
}
"
else
name
end
end
end
end
MRuby
.
each_target
do
next
if
kind_of?
MRuby
::
CrossBuild
mruby_config
=
'mruby-config'
+
(
ENV
[
'OS'
]
==
'Windows_NT'
?
'.bat'
:
''
)
mruby_config_path
=
"
#{
build_dir
}
/bin/
#{
mruby_config
}
"
@bins
<<
mruby_config
file
mruby_config_path
=>
libfile
(
"
#{
build_dir
}
/lib/libmruby"
)
do
|
t
|
FileUtils
.
copy
"
#{
File
.
dirname
(
__FILE__
)
}
/
#{
mruby_config
}
"
,
t
.
name
config
=
Hash
[
open
(
"
#{
build_dir
}
/lib/libmruby.flags.mak"
).
read
.
split
(
"
\n
"
).
map
{
|
x
|
x
.
split
(
/\s*=\s*/
,
2
)}]
IO
.
write
(
t
.
name
,
File
.
open
(
t
.
name
)
{
|
f
|
f
.
read
.
gsub
(
/echo (MRUBY_CFLAGS|MRUBY_LDFLAGS|MRUBY_LIBS)/
)
{
|
x
|
config
[
$1
].
empty?
?
'echo/'
:
"echo
#{
config
[
$1
]
}
"
}
})
end
end
mrbgems/mruby-bin-mruby-config/mruby-config
0 → 100644
View file @
fb621ef4
#!/bin/sh
while
[
$#
-gt
0
]
;
do
case
$1
in
--cflags
)
echo
MRUBY_CFLAGS
;;
--ldflags
)
echo
MRUBY_LDFLAGS
;;
--libs
)
echo
MRUBY_LIBS
;;
esac
shift
done
mrbgems/mruby-bin-mruby-config/mruby-config.bat
0 → 100644
View file @
fb621ef4
@echo
off
:top
shift
if
"
%
0"
equ
""
goto
:eof
if
"
%
0"
equ
"--cflags"
goto
cflags
if
"
%
0"
equ
"--ldflags"
goto
ldflags
if
"
%
0"
equ
"--libs"
goto
libs
echo
Invalid
Option
goto
:eof
:cflags
echo
MRUBY_CFLAGS
goto
top
:libs
echo
MRUBY_LIBS
goto
top
:ldflags
echo
MRUBY_LDFLAGS
goto
top
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