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
2a2e2068
Commit
2a2e2068
authored
Nov 22, 2012
by
Daniel Bovensiepen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deactivate / Activate GEMs Flag introduced into mrbtest
parent
35edbb06
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
test/Makefile
test/Makefile
+16
-5
test/init_mrbtest.c
test/init_mrbtest.c
+4
-0
No files found.
test/Makefile
View file @
2a2e2068
...
...
@@ -8,19 +8,28 @@ BASEDIR = .
TARGET
:=
mrbtest
LIBR
:=
../lib/libmruby.a
MAKEFILE_GEM_LIST
:=
$(MRUBY_ROOT)
/mrbgems/g/MakefileGemList
ifeq
($(wildcard $(MAKEFILE_GEM_LIST)),)
ifeq
($(strip $(ENABLE_GEMS)),)
# by default GEMs are deactivated
ENABLE_GEMS
=
false
endif
ifeq
($(ENABLE_GEMS),false)
GEM_ARCHIVE_FILES
=
else
include
$(MAKEFILE_GEM_LIST)
GEMDIR
:=
../mrbgems
GEMDLIB
:=
$(GEMDIR)
/g/mrbgemtest.ctmp
MAKEFILE_GEM_LIST
:=
$(MRUBY_ROOT)
/mrbgems/g/MakefileGemList
ifeq
($(wildcard $(MAKEFILE_GEM_LIST)),)
GEM_ARCHIVE_FILES
=
else
include
$(MAKEFILE_GEM_LIST)
endif
endif
MLIB
:=
$(TARGET)
.o
CLIB
:=
$(TARGET)
.c
INIT
:=
init_
$(TARGET)
.c
DLIB
:=
$(TARGET)
.ctmp
GEMDIR
:=
../mrbgems
GEMDLIB
:=
$(GEMDIR)
/g/mrbgemtest.ctmp
RLIB
:=
$(TARGET)
.rbtmp
DEPLIB
:=
$(TARGET)
.d driver.d
ASSLIB
:=
$(BASEDIR)
/assert.rb
...
...
@@ -96,7 +105,9 @@ $(OBJS) : %.o : %.c
# Compile C source from merged mruby source
$(CLIB)
:
$(DLIB) $(INIT)
ifeq
($(ENABLE_GEMS),true)
@
$(MAKE)
prepare-test
-C
$(GEMDIR)
endif
$(CAT)
$(INIT)
$(DLIB)
$(GEMDLIB)
>
$@
$(DLIB)
:
$(RLIB) $(MRBC)
...
...
test/init_mrbtest.c
View file @
2a2e2068
...
...
@@ -11,10 +11,14 @@ void
mrb_init_mrbtest
(
mrb_state
*
mrb
)
{
int
n
=
mrb_read_irep
(
mrb
,
mrbtest_irep
);
#ifdef ENABLE_GEMS
int
m
=
mrb_read_irep
(
mrb
,
mrbgemtest_irep
);
#endif
mrb_run
(
mrb
,
mrb_proc_new
(
mrb
,
mrb
->
irep
[
n
]),
mrb_top_self
(
mrb
));
#ifdef ENABLE_GEMS
mrb_run
(
mrb
,
mrb_proc_new
(
mrb
,
mrb
->
irep
[
m
]),
mrb_top_self
(
mrb
));
#endif
if
(
mrb
->
exc
)
{
mrb_p
(
mrb
,
mrb_obj_value
(
mrb
->
exc
));
exit
(
0
);
...
...
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