@@ -6,11 +6,11 @@ binaries.
66## Prerequisites
77
88To compile mruby out of the source code you need the following tools:
9- * C Compiler (e.g. ``` gcc `` ` )
10- * Linker (e.g. ``` gcc `` ` )
11- * Archive utility (e.g. ``` ar `` ` )
12- * Parser generator (e.g. ``` bison `` ` )
13- * Ruby 2.0 or later (e.g. ``` ruby ``` or ``` jruby `` ` )
9+ * C Compiler (e.g. ` gcc ` )
10+ * Linker (e.g. ` gcc ` )
11+ * Archive utility (e.g. ` ar ` )
12+ * Parser generator (e.g. ` bison ` )
13+ * Ruby 2.0 or later (e.g. ` ruby ` or ` jruby ` )
1414
1515Optional:
1616* GIT (to update mruby source and integrate mrbgems easier)
@@ -32,10 +32,10 @@ All tools necessary to compile mruby can be set or modified here. In case
3232you want to maintain an additional * build_config.rb* you can define a
3333customized path using the * $MRUBY_CONFIG* environment variable.
3434
35- To compile just call ``` ./minirake `` ` inside of the mruby source root. To
36- generate and execute the test tools call ``` ./minirake test `` ` . To clean
37- all build files call ``` ./minirake clean `` ` . To see full command line on
38- build, call ``` ./minirake -v `` ` .
35+ To compile just call ` ./minirake ` inside of the mruby source root. To
36+ generate and execute the test tools call ` ./minirake test ` . To clean
37+ all build files call ` ./minirake clean ` . To see full command line on
38+ build, call ` ./minirake -v ` .
3939
4040## Build Configuration
4141
@@ -79,7 +79,7 @@ toolchain :android
7979```
8080
8181Requires the custom standalone Android NDK and the toolchain path
82- in ``` ANDROID_STANDALONE_TOOLCHAIN `` ` .
82+ in ` ANDROID_STANDALONE_TOOLCHAIN ` .
8383
8484### Binaries
8585
@@ -97,7 +97,7 @@ conf.gem "#{root}/mrbgems/mruby-bin-mirb"
9797### File Separator
9898
9999Some environments require a different file separator character. It is possible to
100- set the character via ``` conf.file_separator `` ` .
100+ set the character via ` conf.file_separator ` .
101101``` ruby
102102conf.file_separator = ' /'
103103```
@@ -119,15 +119,15 @@ end
119119
120120C Compiler has header searcher to detect installed library.
121121
122- If you need a include path of header file use ``` search_header_path `` ` :
122+ If you need a include path of header file use ` search_header_path ` :
123123``` ruby
124124# Searches ```iconv.h```.
125125# If found it will return include path of the header file.
126126# Otherwise it will return nil .
127127fail ' iconv.h not found' unless conf.cc.search_header_path ' iconv.h'
128128```
129129
130- If you need a full file name of header file use ``` search_header `` ` :
130+ If you need a full file name of header file use ` search_header ` :
131131``` ruby
132132# Searches ```iconv.h```.
133133# If found it will return full path of the header file.
@@ -136,11 +136,11 @@ iconv_h = conf.cc.search_header 'iconv.h'
136136print " iconv.h found: #{ iconv_h } \n "
137137```
138138
139- Header searcher uses compiler's ``` include_paths `` ` by default.
139+ Header searcher uses compiler's ` include_paths ` by default.
140140When you are using GCC toolchain (including clang toolchain since its base is gcc toolchain)
141- it will use compiler specific include paths too. (For example ``` /usr/local/include ``` , ``` /usr/include `` ` )
141+ it will use compiler specific include paths too. (For example ` /usr/local/include ` , ` /usr/include ` )
142142
143- If you need a special header search paths define a singleton method ``` header_search_paths `` ` to C compiler:
143+ If you need a special header search paths define a singleton method ` header_search_paths ` to C compiler:
144144``` ruby
145145def conf.cc.header_search_paths
146146 [' /opt/local/include' ] + include_paths
@@ -222,17 +222,17 @@ See doc/mrbgems/README.md for more option about mrbgems.
222222
223223Configuration Mrbtest build process.
224224
225- If you want mrbtest.a only, You should set ``` conf.build_mrbtest_lib_only `` `
225+ If you want mrbtest.a only, You should set ` conf.build_mrbtest_lib_only `
226226``` ruby
227227conf.build_mrbtest_lib_only
228228```
229229
230230### Bintest
231231
232232Tests for mrbgem tools using CRuby.
233- To have bintests place \* .rb scripts to ``` bintest/ `` ` directory of mrbgems.
234- See ``` mruby-bin-*/bintest/*.rb `` ` if you need examples.
235- If you want a temporary files use ` tempfile ` module of CRuby instead of ``` /tmp/ `` ` .
233+ To have bintests place \* .rb scripts to ` bintest/ ` directory of mrbgems.
234+ See ` mruby-bin-*/bintest/*.rb ` if you need examples.
235+ If you want a temporary files use ` tempfile ` module of CRuby instead of ` /tmp/ ` .
236236
237237You can enable it with following:
238238``` ruby
@@ -247,8 +247,8 @@ correctly. To support mrbgems written in C++, mruby can be
247247configured to use C++ exception.
248248
249249There are two levels of C++ exception handling. The one is
250- ``` enable_cxx_exception `` ` that enables C++ exception, but
251- uses C ABI. The other is ``` enable_cxx_abi `` ` where all
250+ ` enable_cxx_exception ` that enables C++ exception, but
251+ uses C ABI. The other is ` enable_cxx_abi ` where all
252252files are compiled by C++ compiler.
253253
254254When you mix C++ code, C++ exception would be enabled automatically.
@@ -266,7 +266,7 @@ C++ exception, add following:
266266conf.disable_cxx_exception
267267```
268268and you will get an error when you try to use C++ gem.
269- Note that it must be called before ``` enable_cxx_exception ``` or ``` gem `` ` method.
269+ Note that it must be called before ` enable_cxx_exception ` or ` gem ` method.
270270
271271### Debugging mode
272272
@@ -276,17 +276,17 @@ conf.enable_debug
276276```
277277
278278When debugging mode is enabled
279- * Macro ``` MRB_DEBUG `` ` would be defined.
280- * Which means ``` mrb_assert()`` ` macro is enabled.
281- * Debug information of irep would be generated by ``` mrbc `` ` .
282- * Because ``` -g``` flag would be added to ``` mrbc`` ` runner.
279+ * Macro ` MRB_DEBUG ` would be defined.
280+ * Which means `mrb_assert()` macro is enabled.
281+ * Debug information of irep would be generated by ` mrbc ` .
282+ * Because `-g` flag would be added to `mrbc` runner.
283283 * You can have better backtrace of mruby scripts with this.
284284
285285## Cross-Compilation
286286
287287mruby can also be cross-compiled from one platform to another. To
288288achieve this the * build_config.rb* needs to contain an instance of
289- ``` MRuby::CrossBuild `` ` . This instance defines the compilation
289+ ` MRuby::CrossBuild ` . This instance defines the compilation
290290tools and flags for the target platform. An example could look
291291like this:
292292``` ruby
@@ -298,12 +298,12 @@ MRuby::CrossBuild.new('32bit') do |conf|
298298end
299299```
300300
301- All configuration options of ``` MRuby::Build `` ` can also be used
302- in ``` MRuby::CrossBuild `` ` .
301+ All configuration options of ` MRuby::Build ` can also be used
302+ in ` MRuby::CrossBuild ` .
303303
304304### Mrbtest in Cross-Compilation
305305
306- In cross compilation, you can run ``` mrbtest `` ` on emulator if
306+ In cross compilation, you can run ` mrbtest ` on emulator if
307307you have it by changing configuration of test runner.
308308``` ruby
309309conf.test_runner do |t |
@@ -350,15 +350,15 @@ in *build/host/src*)
350350result will be stored in *build/host/src/y.tab.c*)
351351* compile *build/host/src/y.tab.c* to *build/host/src/y.tab.o*
352352* create *build/host/lib/libmruby_core.a* out of all object files (C only)
353- * create ` ` ` build/ host/ bin/ mrbc` ` ` by compiling *tools/mrbc/mrbc.c* and
353+ * create ` build/ host/ bin/ mrbc` by compiling *tools/mrbc/mrbc.c* and
354354linking with *build/host/lib/libmruby_core.a*
355355* create *build/host/mrblib/mrblib.c* by compiling all \* .rb files
356- under *mrblib* with ` ` ` build/ host/ bin/ mrbc` ` `
356+ under *mrblib* with ` build/ host/ bin/ mrbc`
357357* compile *build/host/mrblib/mrblib.c* to *build/host/mrblib/mrblib.o*
358358* create *build/host/lib/libmruby.a* out of all object files (C and Ruby)
359- * create ` ` ` build/ host/ bin/ mruby` ` ` by compiling *mrbgems/mruby-bin-mruby/tools/mruby/mruby.c* and
359+ * create ` build/ host/ bin/ mruby` by compiling *mrbgems/mruby-bin-mruby/tools/mruby/mruby.c* and
360360linking with *build/host/lib/libmruby.a*
361- * create ` ` ` build/ host/ bin/ mirb` ` ` by compiling *mrbgems/mruby-bin-mirb/tools/mirb/mirb.c* and
361+ * create ` build/ host/ bin/ mirb` by compiling *mrbgems/mruby-bin-mirb/tools/mirb/mirb.c* and
362362linking with *build/host/lib/libmruby.a*
363363
364364` ` `
@@ -427,15 +427,15 @@ in *build/i386/src*)
427427result will be stored in *build/i386/src/y.tab.c*)
428428* cross-compile *build/i386/src/y.tab.c* to *build/i386/src/y.tab.o*
429429* create *build/i386/mrblib/mrblib.c* by compiling all \* .rb files
430- under *mrblib* with the native ` ` ` build/ host/ bin/ mrbc` ` `
430+ under *mrblib* with the native ` build/ host/ bin/ mrbc`
431431* cross-compile *build/host/mrblib/mrblib.c* to *build/host/mrblib/mrblib.o*
432432* create *build/i386/lib/libmruby.a* out of all object files (C and Ruby)
433- * create ` ` ` build/ i386/ bin/ mruby` ` ` by cross-compiling *mrbgems/mruby-bin-mruby/tools/mruby/mruby.c* and
433+ * create ` build/ i386/ bin/ mruby` by cross-compiling *mrbgems/mruby-bin-mruby/tools/mruby/mruby.c* and
434434linking with *build/i386/lib/libmruby.a*
435- * create ` ` ` build/ i386/ bin/ mirb` ` ` by cross-compiling *mrbgems/mruby-bin-mirb/tools/mirb/mirb.c* and
435+ * create ` build/ i386/ bin/ mirb` by cross-compiling *mrbgems/mruby-bin-mirb/tools/mirb/mirb.c* and
436436linking with *build/i386/lib/libmruby.a*
437437* create *build/i386/lib/libmruby_core.a* out of all object files (C only)
438- * create ` ` ` build/ i386/ bin/ mrbc` ` ` by cross-compiling *tools/mrbc/mrbc.c* and
438+ * create ` build/ i386/ bin/ mrbc` by cross-compiling *tools/mrbc/mrbc.c* and
439439linking with *build/i386/lib/libmruby_core.a*
440440
441441` ` `
@@ -482,7 +482,7 @@ all usages of stdio and doesn't compile any binaries (e.g. mrbc).
482482## Test Environment
483483
484484mruby's build process includes a test environment. In case you start the testing
485- of mruby, a native binary called ``` mrbtest`` ` will be generated and executed.
485+ of mruby, a native binary called `mrbtest` will be generated and executed.
486486This binary contains all test cases which are defined under *test/t*. In case
487487of a cross-compilation an additional cross-compiled *mrbtest* binary is
488488generated. You can copy this binary and run on your target system.
0 commit comments