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
7367bf6f
Commit
7367bf6f
authored
Feb 06, 2015
by
MATSUMOTO Ryosuke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mruby-config supports MRUBY_LDFLAGS_BEFORE_LIBS in libmruby.flags.mak
parent
4957c852
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
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
+5
-3
mrbgems/mruby-bin-mruby-config/mruby-config.bat
mrbgems/mruby-bin-mruby-config/mruby-config.bat
+9
-3
No files found.
mrbgems/mruby-bin-mruby-config/mrbgem.rake
View file @
7367bf6f
...
...
@@ -23,7 +23,7 @@ MRuby.each_target do
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
(
'\\"'
,
'"'
)
]}]
IO
.
write
(
t
.
name
,
File
.
open
(
t
.
name
)
{
|
f
|
f
.
read
.
gsub
(
/echo (MRUBY_CFLAGS|MRUBY_L
DFLAGS|MRUBY_LIB
S)/
)
{
|
x
|
config
[
$1
].
empty?
?
''
:
"echo
#{
config
[
$1
]
}
"
}
f
.
read
.
gsub
(
/echo (MRUBY_CFLAGS|MRUBY_L
IBS|MRUBY_LDFLAGS_BEFORE_LIBS|MRUBY_LDFLAG
S)/
)
{
|
x
|
config
[
$1
].
empty?
?
''
:
"echo
#{
config
[
$1
]
}
"
}
})
FileUtils
.
chmod
(
0755
,
t
.
name
)
end
...
...
mrbgems/mruby-bin-mruby-config/mruby-config
View file @
7367bf6f
...
...
@@ -4,12 +4,14 @@ while [ $# -gt 0 ]; do
case
$1
in
--cflags
)
echo
MRUBY_CFLAGS
;;
--ldflags
)
echo
MRUBY_LDFLAGS
;;
--ldflags-before-libs
)
echo
MRUBY_LDFLAGS_BEFORE_LIBS
;;
--libs
)
echo
MRUBY_LIBS
;;
--help
)
echo
"Usage: mruby-config [switches]"
echo
" switches:"
echo
" --cflags print flags passed to compiler"
echo
" --ldflags print flags passed to linker"
echo
" --libs print linked libraries"
echo
" --cflags print flags passed to compiler"
echo
" --ldflags print flags passed to linker"
echo
" --ldflags-before-libs print flags passwd to linker before linked libraries"
echo
" --libs print linked libraries"
exit
0
;;
esac
shift
...
...
mrbgems/mruby-bin-mruby-config/mruby-config.bat
View file @
7367bf6f
...
...
@@ -5,6 +5,7 @@ shift
if
"
%
0"
equ
""
goto
:eof
if
"
%
0"
equ
"--cflags"
goto
cflags
if
"
%
0"
equ
"--ldflags"
goto
ldflags
if
"
%
0"
equ
"--ldflags-before-libs"
goto
ldflagsbeforelibs
if
"
%
0"
equ
"--libs"
goto
libs
if
"
%
0"
equ
"--help"
goto
showhelp
echo
Invalid
Option
...
...
@@ -22,9 +23,14 @@ goto top
echo
MRUBY_LDFLAGS
goto
top
:ldflagsbeforelibs
echo
MRUBY_LDFLAGS_BEFORE_LIBS
goto
top
:showhelp
echo
Usage
:
mruby
-config
[
switches
]
echo
switches
:
echo
-
-cflags
print
flags
passed
to
compiler
echo
-
-ldflags
print
flags
passed
to
linker
echo
-
-libs
print
linked
libraries
echo
-
-cflags
print
flags
passed
to
compiler
echo
-
-ldflags
print
flags
passed
to
linker
echo
-
-ldflags-before-libs
print
flags
passwd
to
linker
before
linked
libraries
echo
-
-libs
print
linked
libraries
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