diff options
| author | KOBAYASHI Shuji <[email protected]> | 2020-10-19 15:03:22 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2020-10-19 15:03:22 +0900 |
| commit | 81c21088196fd92d08c253efc2feb8dbead88acf (patch) | |
| tree | 8429a165026b2335dd1d994fca790906e1721ce4 /doc/guides | |
| parent | 27492e53a0440aee7c411d5e72b6f092cf85d6a1 (diff) | |
| download | mruby-81c21088196fd92d08c253efc2feb8dbead88acf.tar.gz mruby-81c21088196fd92d08c253efc2feb8dbead88acf.zip | |
Revert `MRUBY_TARGET` mechanism; ref #5096
* In explanation of mruby, the expression `build_config.rb` is frequently
used including official documents, so I think that it will not make sense
if the file is no longer used.
* The `MRUBY_TARGET` mechanism seems to have little improvement, so I don't
think it should be changed to avoid unnecessary confusion.
* `MRUBY_TARGET` and `MRuby.targets` represent somewhat different things,
so using the same term "target" is a bit confusing.
The mechanism that can be written short when using a file under
`build_config` (renamed from `target`) directory remains
(`build_config/${MRUBY_CONFIG}.rb` is used if the path specified
in `MRUBY_CONFIG` doesn't exist).
Diffstat (limited to 'doc/guides')
| -rw-r--r-- | doc/guides/compile.md | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/doc/guides/compile.md b/doc/guides/compile.md index 233c3e594..ad57970e3 100644 --- a/doc/guides/compile.md +++ b/doc/guides/compile.md @@ -24,40 +24,29 @@ Optional: ## Build -To compile `mruby`, just call `rake` inside of the mruby source -root. To generate and execute the test tools call `rake test`. To -clean all build files call `rake clean`. To see full command line on -build, call `rake -v`. - -If you want to compile for the specific configuration, specify -`MRUBY_TARGET` or `TARGET` environment variable, e.g - -```sh -rake TAGRET=host -``` - -The default target is `host`. The compilation target desciption files -(with `.rb` suffix) are contained in the `target` directory. - -A build description file contains the build configuration of mruby and -looks like the following for example: - +Inside of the root directory of the mruby source a file exists +called *build_config.rb*. This file contains the build configuration +of mruby and looks like this for example: ```ruby MRuby::Build.new do |conf| toolchain :gcc end ``` -All tools necessary to compile mruby can be set or modified here. In -case you want to try different configuration, you can create a new -configuration file under `target` and specify the configuration using -the `MRUBY_TARGET` environment variable. +All tools necessary to compile mruby can be set or modified here. In case +you want to maintain an additional *build_config.rb* you can define a +customized path using the *$MRUBY_CONFIG* environment variable. If the +path doesn't exist, *build_config/${MRUBY_CONFIG}.rb* is used. + +To compile just call `rake` inside of the mruby source root. To +generate and execute the test tools call `rake test`. To clean +all build files call `rake clean`. To see full command line on +build, call `rake -v`. ## Build Configuration -To create a new configuration, copy the existing configuration in the -`target` directory, and modify it. We wish you submit a pull-request, -once you created a new configuration for a new platform. +We wish you submit a pull-request to *build_config/**PLATFORM**.rb*, once you +created a new configuration for a new platform. Inside of the configuration file, the following options can be configured based on your environment. |
