From cd72971adc76143c7b652ecdafe0c4acaf50904b Mon Sep 17 00:00:00 2001 From: Daniel Bovensiepen Date: Thu, 13 Sep 2012 22:23:51 +0900 Subject: make mrbc aware of the gem init --- tools/mrbc/mrbc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools') diff --git a/tools/mrbc/mrbc.c b/tools/mrbc/mrbc.c index 5382b90a8..62bc34700 100644 --- a/tools/mrbc/mrbc.c +++ b/tools/mrbc/mrbc.c @@ -212,3 +212,8 @@ void mrb_init_mrblib(mrb_state *mrb) { } + +void +mrb_init_mrbgems(mrb_state *mrb) +{ +} -- cgit v1.2.3 From 1e4d20a766a3483fb9be1518253864d5082dbf9d Mon Sep 17 00:00:00 2001 From: Daniel Bovensiepen Date: Wed, 21 Nov 2012 15:57:41 +0800 Subject: Include dynamically GEMs into mirb --- tools/mirb/Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/mirb/Makefile b/tools/mirb/Makefile index 8dbbc52b3..2729c4829 100644 --- a/tools/mirb/Makefile +++ b/tools/mirb/Makefile @@ -3,9 +3,18 @@ # project-specific macros # extension of the executable-file is modifiable(.exe .out ...) +MRUBY_ROOT := ../.. BASEDIR = ../../src TARGET := ../../bin/mirb LIBR := ../../lib/libmruby.a + +MAKEFILE_GEM_LIST := $(MRUBY_ROOT)/mrbgems/g/MakefileGemList +ifeq ($(wildcard $(MAKEFILE_GEM_LIST)),) + GEM_ARCHIVE_FILES = +else + include $(MAKEFILE_GEM_LIST) +endif + ifeq ($(OS),Windows_NT) EXE := $(TARGET).exe else @@ -49,7 +58,7 @@ all : $(LIBR) $(EXE) # executable constructed using linker from object files $(EXE) : $(LIBR) $(OBJS) $(EXTS) - $(LL) -o $@ $(CFLAGS) $(OBJS) $(LIBR) $(EXTS) $(LIBS) + $(LL) -o $@ $(CFLAGS) $(OBJS) $(LIBR) $(GEM_ARCHIVE_FILES) $(EXTS) $(LIBS) -include $(OBJS:.o=.d) -- cgit v1.2.3 From ed92a86212c2428e64d385b2b89f1dcfcec265e6 Mon Sep 17 00:00:00 2001 From: Daniel Bovensiepen Date: Wed, 21 Nov 2012 15:57:49 +0800 Subject: Include dynamically GEMs into mruby --- tools/mruby/Makefile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/mruby/Makefile b/tools/mruby/Makefile index e94c1b2b4..53383a70b 100644 --- a/tools/mruby/Makefile +++ b/tools/mruby/Makefile @@ -3,9 +3,18 @@ # project-specific macros # extension of the executable-file is modifiable(.exe .out ...) -BASEDIR = ../../src -TARGET := ../../bin/mruby -LIBR := ../../lib/libmruby.a +MRUBY_ROOT := ../.. +BASEDIR = $(MRUBY_ROOT)/src +TARGET := $(MRUBY_ROOT)/bin/mruby +LIBR := $(MRUBY_ROOT)/lib/libmruby.a + +MAKEFILE_GEM_LIST := $(MRUBY_ROOT)/mrbgems/g/MakefileGemList +ifeq ($(wildcard $(MAKEFILE_GEM_LIST)),) + GEM_ARCHIVE_FILES = +else + include $(MAKEFILE_GEM_LIST) +endif + ifeq ($(OS),Windows_NT) EXE := $(TARGET).exe else @@ -54,7 +63,7 @@ all : $(LIBR) $(EXE) # executable constructed using linker from object files $(EXE) : $(LIBR) $(OBJS) $(EXTS) - $(LL) -o $@ $(CFLAGS) $(OBJS) $(LIBR) $(EXTS) $(LIBS) + $(LL) -o $@ $(CFLAGS) $(OBJS) $(LIBR) $(GEM_ARCHIVE_FILES) $(EXTS) $(LIBS) -include $(OBJS:.o=.d) -- cgit v1.2.3 From a26e5c05c76c2ebba298c2cee8df44541784f801 Mon Sep 17 00:00:00 2001 From: Daniel Bovensiepen Date: Thu, 22 Nov 2012 19:00:52 +0800 Subject: Deactivate / Activate GEMs Flag introduced into mirb --- tools/mirb/Makefile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/mirb/Makefile b/tools/mirb/Makefile index 2729c4829..c44af4c6b 100644 --- a/tools/mirb/Makefile +++ b/tools/mirb/Makefile @@ -8,11 +8,20 @@ BASEDIR = ../../src TARGET := ../../bin/mirb 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) + MAKEFILE_GEM_LIST := $(MRUBY_ROOT)/mrbgems/g/MakefileGemList + ifeq ($(wildcard $(MAKEFILE_GEM_LIST)),) + GEM_ARCHIVE_FILES = + else + include $(MAKEFILE_GEM_LIST) + endif endif ifeq ($(OS),Windows_NT) -- cgit v1.2.3 From 4f55a3e0b477509a9bd3b44f9eccc4613d29fc1b Mon Sep 17 00:00:00 2001 From: Daniel Bovensiepen Date: Thu, 22 Nov 2012 19:01:02 +0800 Subject: Deactivate / Activate GEMs Flag introduced into mruby --- tools/mruby/Makefile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/mruby/Makefile b/tools/mruby/Makefile index 53383a70b..b31ed4941 100644 --- a/tools/mruby/Makefile +++ b/tools/mruby/Makefile @@ -8,11 +8,20 @@ BASEDIR = $(MRUBY_ROOT)/src TARGET := $(MRUBY_ROOT)/bin/mruby LIBR := $(MRUBY_ROOT)/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) + MAKEFILE_GEM_LIST := $(MRUBY_ROOT)/mrbgems/g/MakefileGemList + ifeq ($(wildcard $(MAKEFILE_GEM_LIST)),) + GEM_ARCHIVE_FILES = + else + include $(MAKEFILE_GEM_LIST) + endif endif ifeq ($(OS),Windows_NT) -- cgit v1.2.3 From 4e2161c7eefa05bdabab18cbfcd018f815b5a2b6 Mon Sep 17 00:00:00 2001 From: Daniel Bovensiepen Date: Thu, 22 Nov 2012 19:18:01 +0800 Subject: Deactivate / Activate GEMs Flag introduced into mrbc --- tools/mrbc/mrbc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools') diff --git a/tools/mrbc/mrbc.c b/tools/mrbc/mrbc.c index 6d9c85fa9..5a92cd479 100644 --- a/tools/mrbc/mrbc.c +++ b/tools/mrbc/mrbc.c @@ -226,7 +226,9 @@ mrb_init_mrblib(mrb_state *mrb) { } +#ifdef ENABLE_GEMS void mrb_init_mrbgems(mrb_state *mrb) { } +#endif -- cgit v1.2.3