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
52a03800
Commit
52a03800
authored
7 years ago
by
Yuji Yamano
Committed by
Yuji Yamano
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add --libmruby-path support to mruby-bin-mruby-config.
parent
c900fff9
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
1 deletion
+11
-1
mrbgems/mruby-bin-mruby-config/mrbgem.rake
mrbgems/mruby-bin-mruby-config/mrbgem.rake
+1
-1
mrbgems/mruby-bin-mruby-config/mruby-config
mrbgems/mruby-bin-mruby-config/mruby-config
+2
-0
mrbgems/mruby-bin-mruby-config/mruby-config.bat
mrbgems/mruby-bin-mruby-config/mruby-config.bat
+6
-0
tasks/libmruby.rake
tasks/libmruby.rake
+2
-0
No files found.
mrbgems/mruby-bin-mruby-config/mrbgem.rake
View file @
52a03800
...
@@ -23,7 +23,7 @@ MRuby.each_target do
...
@@ -23,7 +23,7 @@ MRuby.each_target do
FileUtils
.
copy
"
#{
File
.
dirname
(
__FILE__
)
}
/
#{
mruby_config
}
"
,
t
.
name
FileUtils
.
copy
"
#{
File
.
dirname
(
__FILE__
)
}
/
#{
mruby_config
}
"
,
t
.
name
config
=
Hash
[
open
(
"
#{
build_dir
}
/lib/libmruby.flags.mak"
).
read
.
split
(
"
\n
"
).
map
{
|
x
|
a
=
x
.
split
(
/\s*=\s*/
,
2
);
[
a
[
0
],
a
[
1
].
gsub
(
'\\"'
,
'"'
)
]}]
config
=
Hash
[
open
(
"
#{
build_dir
}
/lib/libmruby.flags.mak"
).
read
.
split
(
"
\n
"
).
map
{
|
x
|
a
=
x
.
split
(
/\s*=\s*/
,
2
);
[
a
[
0
],
a
[
1
].
gsub
(
'\\"'
,
'"'
)
]}]
IO
.
write
(
t
.
name
,
File
.
open
(
t
.
name
)
{
|
f
|
IO
.
write
(
t
.
name
,
File
.
open
(
t
.
name
)
{
|
f
|
f
.
read
.
gsub
(
/echo (MRUBY_CFLAGS|MRUBY_LIBS|MRUBY_LDFLAGS_BEFORE_LIBS|MRUBY_LDFLAGS)/
)
{
|
x
|
config
[
$1
].
empty?
?
''
:
"echo
#{
config
[
$1
]
}
"
}
f
.
read
.
gsub
(
/echo (MRUBY_CFLAGS|MRUBY_LIBS|MRUBY_LDFLAGS_BEFORE_LIBS|MRUBY_LDFLAGS
|MRUBY_LIBMRUBY_PATH
)/
)
{
|
x
|
config
[
$1
].
empty?
?
''
:
"echo
#{
config
[
$1
]
}
"
}
})
})
FileUtils
.
chmod
(
0755
,
t
.
name
)
FileUtils
.
chmod
(
0755
,
t
.
name
)
end
end
...
...
This diff is collapsed.
Click to expand it.
mrbgems/mruby-bin-mruby-config/mruby-config
View file @
52a03800
...
@@ -6,12 +6,14 @@ while [ $# -gt 0 ]; do
...
@@ -6,12 +6,14 @@ while [ $# -gt 0 ]; do
--ldflags
)
echo
MRUBY_LDFLAGS
;;
--ldflags
)
echo
MRUBY_LDFLAGS
;;
--ldflags-before-libs
)
echo
MRUBY_LDFLAGS_BEFORE_LIBS
;;
--ldflags-before-libs
)
echo
MRUBY_LDFLAGS_BEFORE_LIBS
;;
--libs
)
echo
MRUBY_LIBS
;;
--libs
)
echo
MRUBY_LIBS
;;
--libmruby-path
)
echo
MRUBY_LIBMRUBY_PATH
;;
--help
)
echo
"Usage: mruby-config [switches]"
--help
)
echo
"Usage: mruby-config [switches]"
echo
" switches:"
echo
" switches:"
echo
" --cflags print flags passed to compiler"
echo
" --cflags print flags passed to compiler"
echo
" --ldflags print flags passed to linker"
echo
" --ldflags print flags passed to linker"
echo
" --ldflags-before-libs print flags passed to linker before linked libraries"
echo
" --ldflags-before-libs print flags passed to linker before linked libraries"
echo
" --libs print linked libraries"
echo
" --libs print linked libraries"
echo
" --libmruby-path print libmruby path"
exit
0
;;
exit
0
;;
esac
esac
shift
shift
...
...
This diff is collapsed.
Click to expand it.
mrbgems/mruby-bin-mruby-config/mruby-config.bat
View file @
52a03800
...
@@ -7,6 +7,7 @@ if "%0" equ "--cflags" goto cflags
...
@@ -7,6 +7,7 @@ if "%0" equ "--cflags" goto cflags
if
"
%
0"
equ
"--ldflags"
goto
ldflags
if
"
%
0"
equ
"--ldflags"
goto
ldflags
if
"
%
0"
equ
"--ldflags-before-libs"
goto
ldflagsbeforelibs
if
"
%
0"
equ
"--ldflags-before-libs"
goto
ldflagsbeforelibs
if
"
%
0"
equ
"--libs"
goto
libs
if
"
%
0"
equ
"--libs"
goto
libs
if
"
%
0"
equ
"--libmruby-path"
goto
libmrubypath
if
"
%
0"
equ
"--help"
goto
showhelp
if
"
%
0"
equ
"--help"
goto
showhelp
echo
Invalid
Option
echo
Invalid
Option
goto
:eof
goto
:eof
...
@@ -27,6 +28,10 @@ goto top
...
@@ -27,6 +28,10 @@ goto top
echo
MRUBY_LDFLAGS_BEFORE_LIBS
echo
MRUBY_LDFLAGS_BEFORE_LIBS
goto
top
goto
top
:libmrubypath
echo
MRUBY_LIBMRUBY_PATH
goto
top
:showhelp
:showhelp
echo
Usage
:
mruby
-config
[
switches
]
echo
Usage
:
mruby
-config
[
switches
]
echo
switches
:
echo
switches
:
...
@@ -34,3 +39,4 @@ echo --cflags print flags passed to compiler
...
@@ -34,3 +39,4 @@ echo --cflags print flags passed to compiler
echo
-
-ldflags
print
flags
passed
to
linker
echo
-
-ldflags
print
flags
passed
to
linker
echo
-
-ldflags-before-libs
print
flags
passed
to
linker
before
linked
libraries
echo
-
-ldflags-before-libs
print
flags
passed
to
linker
before
linked
libraries
echo
-
-libs
print
linked
libraries
echo
-
-libs
print
linked
libraries
echo
-
-libmruby-path
print
libmruby
path
This diff is collapsed.
Click to expand it.
tasks/libmruby.rake
View file @
52a03800
...
@@ -16,6 +16,8 @@ MRuby.each_target do
...
@@ -16,6 +16,8 @@ MRuby.each_target do
gem_libraries
=
gems
.
map
{
|
g
|
g
.
linker
.
libraries
}
gem_libraries
=
gems
.
map
{
|
g
|
g
.
linker
.
libraries
}
f
.
puts
"MRUBY_LIBS =
#{
linker
.
option_library
%
'mruby'
}
#{
linker
.
library_flags
(
gem_libraries
)
}
"
f
.
puts
"MRUBY_LIBS =
#{
linker
.
option_library
%
'mruby'
}
#{
linker
.
library_flags
(
gem_libraries
)
}
"
f
.
puts
"MRUBY_LIBMRUBY_PATH =
#{
libfile
(
"
#{
build_dir
}
/lib/libmruby"
)
}
"
end
end
end
end
task
:all
=>
"
#{
build_dir
}
/lib/libmruby.flags.mak"
task
:all
=>
"
#{
build_dir
}
/lib/libmruby.flags.mak"
...
...
This diff is collapsed.
Click to expand it.
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