diff options
| author | Yuichiro MASUI <[email protected]> | 2012-12-29 05:37:55 +0900 |
|---|---|---|
| committer | Yuichiro MASUI <[email protected]> | 2013-01-03 02:24:15 +0900 |
| commit | 7c469c0b9dadd1de09fed18c3e5cc551012c38c1 (patch) | |
| tree | b79aa703ef7c528896c4f1be8280d0691314008b /doc | |
| parent | a48fc0d7952ad1f10ae777637269fe6a3f9ad0a2 (diff) | |
| download | mruby-7c469c0b9dadd1de09fed18c3e5cc551012c38c1.tar.gz mruby-7c469c0b9dadd1de09fed18c3e5cc551012c38c1.zip | |
Rebuild CRuby based building script without Makefile
Tested CRuby 1.8.6 and 1.9.3
You can see building configuration in build_config.rb
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/mrbgems/c_and_ruby_extension_example/.gitignore | 9 | ||||
| -rw-r--r-- | doc/mrbgems/c_and_ruby_extension_example/Makefile | 18 | ||||
| -rw-r--r-- | doc/mrbgems/c_and_ruby_extension_example/mrbgem.rake | 17 | ||||
| -rw-r--r-- | doc/mrbgems/c_and_ruby_extension_example/mrblib/example.rb | 2 | ||||
| -rw-r--r-- | doc/mrbgems/c_extension_example/.gitignore | 9 | ||||
| -rw-r--r-- | doc/mrbgems/c_extension_example/Makefile | 16 | ||||
| -rw-r--r-- | doc/mrbgems/c_extension_example/mrbgem.rake | 17 | ||||
| -rw-r--r-- | doc/mrbgems/c_extension_example/test/example.c | 6 | ||||
| -rw-r--r-- | doc/mrbgems/ruby_extension_example/.gitignore | 10 | ||||
| -rw-r--r-- | doc/mrbgems/ruby_extension_example/Makefile | 15 | ||||
| -rw-r--r-- | doc/mrbgems/ruby_extension_example/mrbgem.rake | 17 |
11 files changed, 63 insertions, 73 deletions
diff --git a/doc/mrbgems/c_and_ruby_extension_example/.gitignore b/doc/mrbgems/c_and_ruby_extension_example/.gitignore index 186584eb0..4c2f4480b 100644 --- a/doc/mrbgems/c_and_ruby_extension_example/.gitignore +++ b/doc/mrbgems/c_and_ruby_extension_example/.gitignore @@ -1,8 +1,5 @@ # mrbgems -*.tmp -*.ctmp -*.rbtmp -gem_mixlib.c -gem_mrblib.c -gem_srclib.c +*.d +gem_init.c +gem_test.c diff --git a/doc/mrbgems/c_and_ruby_extension_example/Makefile b/doc/mrbgems/c_and_ruby_extension_example/Makefile deleted file mode 100644 index 1af5e95c1..000000000 --- a/doc/mrbgems/c_and_ruby_extension_example/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -GEM := c_and_ruby_extension_example - -include $(MAKEFILE_4_GEM) - -GEM_C_FILES := $(wildcard $(SRC_DIR)/*.c) -GEM_OBJECTS := $(patsubst %.c, %.o, $(GEM_C_FILES)) - -GEM_RB_FILES := $(wildcard $(MRB_DIR)/*.rb) - -MRUBY_CFLAGS := -MRUBY_LDFLAGS := -MRUBY_LIBS := - -gem-all : $(GEM_OBJECTS) gem-c-and-rb-files - -gem-clean : gem-clean-c-and-rb-files - -gem-test : gem-test-c-and-rb-files diff --git a/doc/mrbgems/c_and_ruby_extension_example/mrbgem.rake b/doc/mrbgems/c_and_ruby_extension_example/mrbgem.rake new file mode 100644 index 000000000..9309436aa --- /dev/null +++ b/doc/mrbgems/c_and_ruby_extension_example/mrbgem.rake @@ -0,0 +1,17 @@ +MRuby::Gem::Specification.new('c_and_ruby_extension_example') do |spec| + spec.license = 'MIT' + spec.authors = 'mruby developers' + + # spec.cflags = '' + + # spec.mruby_cflags = '' + # spec.mruby_ldflags = '' + # spec.mruby_libs = '' + # spec.mruby_includes = ["#{spec.dir}/include"] + + # spec.rbfiles = Dir.glob("#{dir}/mrblib/*.rb") + # spec.objs = Dir.glob("#{dir}/src/*.{c,cpp,m,asm,S}").map { |f| f.relative_path_from(dir).pathmap("#{build_dir}/%X.o") } + # spec.test_rbfiles = Dir.glob("#{dir}/test/*.rb") + # spec.test_objs = Dir.glob("#{dir}/test/*.{c,cpp,m,asm,S}").map { |f| f.relative_path_from(dir).pathmap("#{build_dir}/%X.o") } + # spec.test_preload = 'test/assert.rb' +end diff --git a/doc/mrbgems/c_and_ruby_extension_example/mrblib/example.rb b/doc/mrbgems/c_and_ruby_extension_example/mrblib/example.rb index 0c2d3c7d1..d3899c301 100644 --- a/doc/mrbgems/c_and_ruby_extension_example/mrblib/example.rb +++ b/doc/mrbgems/c_and_ruby_extension_example/mrblib/example.rb @@ -1,4 +1,4 @@ -class RubyExtension +module CRubyExtension def CRubyExtension.ruby_method puts "A Ruby Extension" end diff --git a/doc/mrbgems/c_extension_example/.gitignore b/doc/mrbgems/c_extension_example/.gitignore index 186584eb0..4c2f4480b 100644 --- a/doc/mrbgems/c_extension_example/.gitignore +++ b/doc/mrbgems/c_extension_example/.gitignore @@ -1,8 +1,5 @@ # mrbgems -*.tmp -*.ctmp -*.rbtmp -gem_mixlib.c -gem_mrblib.c -gem_srclib.c +*.d +gem_init.c +gem_test.c diff --git a/doc/mrbgems/c_extension_example/Makefile b/doc/mrbgems/c_extension_example/Makefile deleted file mode 100644 index b0afa420c..000000000 --- a/doc/mrbgems/c_extension_example/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -GEM := c_extension_example - -include $(MAKEFILE_4_GEM) - -GEM_C_FILES := $(wildcard $(SRC_DIR)/*.c) -GEM_OBJECTS := $(patsubst %.c, %.o, $(GEM_C_FILES)) - -MRUBY_CFLAGS := -MRUBY_LDFLAGS := -MRUBY_LIBS := - -gem-all : $(GEM_OBJECTS) gem-c-files - -gem-clean : gem-clean-c-files - -gem-test : gem-test-c-files diff --git a/doc/mrbgems/c_extension_example/mrbgem.rake b/doc/mrbgems/c_extension_example/mrbgem.rake new file mode 100644 index 000000000..289f87d7f --- /dev/null +++ b/doc/mrbgems/c_extension_example/mrbgem.rake @@ -0,0 +1,17 @@ +MRuby::Gem::Specification.new('c_extension_example') do |spec| + spec.license = 'MIT' + spec.authors = 'mruby developers' + + # spec.cflags = '' + + # spec.mruby_cflags = '' + # spec.mruby_ldflags = '' + # spec.mruby_libs = '' + # spec.mruby_includes = ["#{spec.dir}/include"] + + # spec.rbfiles = Dir.glob("#{dir}/mrblib/*.rb") + # spec.objs = Dir.glob("#{dir}/src/*.{c,cpp,m,asm,S}").map { |f| f.relative_path_from(dir).pathmap("#{build_dir}/%X.o") } + # spec.test_rbfiles = Dir.glob("#{dir}/test/*.rb") + # spec.test_objs = Dir.glob("#{dir}/test/*.{c,cpp,m,asm,S}").map { |f| f.relative_path_from(dir).pathmap("#{build_dir}/%X.o") } + # spec.test_preload = 'test/assert.rb' +end diff --git a/doc/mrbgems/c_extension_example/test/example.c b/doc/mrbgems/c_extension_example/test/example.c index 430e87f19..ab410333d 100644 --- a/doc/mrbgems/c_extension_example/test/example.c +++ b/doc/mrbgems/c_extension_example/test/example.c @@ -1,9 +1,7 @@ -/* - if *.c exists in test directory, auto generate this file -*/ +#include <mruby.h> void -mrb_c_extension_example_gem_test_init(mrb_state *mrb) +mrb_c_extension_example_gem_test(mrb_state *mrb) { /* test initializer in C */ } diff --git a/doc/mrbgems/ruby_extension_example/.gitignore b/doc/mrbgems/ruby_extension_example/.gitignore index 186584eb0..af1362229 100644 --- a/doc/mrbgems/ruby_extension_example/.gitignore +++ b/doc/mrbgems/ruby_extension_example/.gitignore @@ -1,8 +1,4 @@ # mrbgems -*.tmp -*.ctmp -*.rbtmp -gem_mixlib.c -gem_mrblib.c -gem_srclib.c - +*.d +gem_init.c +gem_test.c diff --git a/doc/mrbgems/ruby_extension_example/Makefile b/doc/mrbgems/ruby_extension_example/Makefile deleted file mode 100644 index cdcbce024..000000000 --- a/doc/mrbgems/ruby_extension_example/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -GEM := ruby_extension_example - -include $(MAKEFILE_4_GEM) - -GEM_RB_FILES := $(wildcard $(MRB_DIR)/*.rb) - -MRUBY_CFLAGS := -MRUBY_LDFLAGS := -MRUBY_LIBS := - -gem-all : gem-rb-files - -gem-clean : gem-clean-rb-files - -gem-test : gem-test-rb-files diff --git a/doc/mrbgems/ruby_extension_example/mrbgem.rake b/doc/mrbgems/ruby_extension_example/mrbgem.rake new file mode 100644 index 000000000..80a299187 --- /dev/null +++ b/doc/mrbgems/ruby_extension_example/mrbgem.rake @@ -0,0 +1,17 @@ +MRuby::Gem::Specification.new('ruby_extension_example') do |spec| + spec.license = 'MIT' + spec.authors = 'mruby developers' + + # spec.cflags = '' + + # spec.mruby_cflags = '' + # spec.mruby_ldflags = '' + # spec.mruby_libs = '' + # spec.mruby_includes = ["#{spec.dir}/include"] + + # spec.rbfiles = Dir.glob("#{dir}/mrblib/*.rb") + # spec.objs = Dir.glob("#{dir}/src/*.{c,cpp,m,asm,S}").map { |f| f.relative_path_from(dir).pathmap("#{build_dir}/%X.o") } + # spec.test_rbfiles = Dir.glob("#{dir}/test/*.rb") + # spec.test_objs = Dir.glob("#{dir}/test/*.{c,cpp,m,asm,S}").map { |f| f.relative_path_from(dir).pathmap("#{build_dir}/%X.o") } + # spec.test_preload = 'test/assert.rb' +end |
