Skip to content

Improved rake install#5928

Merged
matz merged 7 commits into
mruby:masterfrom
dearblue:task/install
Mar 12, 2023
Merged

Improved rake install#5928
matz merged 7 commits into
mruby:masterfrom
dearblue:task/install

Conversation

@dearblue

Copy link
Copy Markdown
Contributor

Summary:

  • I have done very little checking in the Windows environment. Someone may need to modify it.
  • The tasks/install.rake file will be added.
  • Copy all header files to the build directory so that bin/mruby-config and lib/libmruby.mak files do not reference the original header files.
  • rake install:full will also install build targets other than "host".
  • MRuby::Build#install_prefix = dir will change the installation directory.
    The default is <PREFIX>/ directory for "host" and <PREFIX>/mruby/<build-name>/ directory for anything other than "host".
  • If the environment variable DESTDIR is set, it is referenced as the prefix of the actual write destination.
  • Text added to doc/guides/compile.md has been translated from Japanese to English by DeepL.

This is so that the build directory can be regarded as a temporary installation directory to work in.

Directories set in `MRuby::Gem::Specification#export_include_paths` are used as they are if they are subdirectories placed under `gem.dir`.
Files are placed under `<build-dir>/include/mruby/gems/<gem-name>/<gem-include_paths>` to separate each GEM.

When GEM is compiled by building `libmruby.a`, the same `include_paths` will be set as before, so it is expected that no unintended references will be made.
Build targets other than "host" will be installed under `<PREFIX>/mruby/<build-name>`.
This can be changed with `build.install_prefix = dir`.
If the environment variable `DESTDIR` is set, the writing destination is `<DESTDIR>/<PREFIX>/...`.
It is assumed to be used for package work.
@dearblue dearblue requested a review from matz as a code owner February 12, 2023 13:19
Since `bin/mruby-config` now points to a directory relative to itself, it is no longer possible to reach `include/` or `lib/`.
Therefore, avoid placing entities in them.
@dearblue

Copy link
Copy Markdown
Contributor Author

Fixed https://github.com/mruby/mruby/actions/runs/4156525680/jobs/7190371416

The variable MRUBY_PACKAGE_DIR is now added to bin/mruby-config by the mruby-bin-config/mrbgem.rake file.

@matz matz merged commit a8d840d into mruby:master Mar 12, 2023
@dearblue dearblue deleted the task/install branch March 14, 2023 14:13
dearblue added a commit to dearblue/mruby that referenced this pull request May 6, 2023
This is a complement to mruby#5928.
The previous PR had the following problem:

  - The `<INSTALL_DIR>/bin/*` file could not be replaced if the destination of the symbolic link was lost.
  - The wrong link destination was written if `MRuby::Build.install_dir` was a relative path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants