mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Takes the environment variable DESTDIR in rake install
If the environment variable `DESTDIR` is set, the writing destination is `<DESTDIR>/<PREFIX>/...`. It is assumed to be used for package work.
This commit is contained in:
@@ -595,6 +595,9 @@ The `PREFIX` environment variable affects all build targets and changes the `/us
|
||||
The `MRuby::Build#install_prefix` can be set for each individual build target.
|
||||
In this case, the environment variable `PREFIX` is ignored.
|
||||
|
||||
Also, if the environment variable `DESTDIR` is set, it will prepend to the path obtained by `install_prefix` to determine the final write directory.
|
||||
This is intended for temporary file expansion by the user's package work.
|
||||
|
||||
---
|
||||
|
||||
To summarize:
|
||||
@@ -602,6 +605,7 @@ To summarize:
|
||||
- The default value of the environment variable `PREFIX` is `/usr/local`.
|
||||
- For the "host" build target, the default value of `MRuby::Build#install_prefix` is `<PREFIX>`.
|
||||
- For a build target other than "host", the default value of `MRuby::Build#install_prefix` is `<PREFIX>/mruby/<build-name>`.
|
||||
- If the environment variable `DESTDIR` is set, the actual write directory is `<DESTDIR>/<MRuby::Build#install_prefix>`.
|
||||
|
||||
## Tips
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ module MRuby
|
||||
autoload :Presym, "mruby/presym"
|
||||
|
||||
INSTALL_PREFIX = ENV['PREFIX'] || ENV['INSTALL_PREFIX'] || '/usr/local'
|
||||
INSTALL_DESTDIR = ENV['DESTDIR'] || ''
|
||||
|
||||
class << self
|
||||
def targets
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ task "install:bin"
|
||||
MRuby.each_target do |build|
|
||||
next if build.internal?
|
||||
|
||||
prefix = build.install_prefix
|
||||
prefix = File.join(MRuby::INSTALL_DESTDIR, build.install_prefix)
|
||||
|
||||
task "install:full" => "install:full:#{build.name}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user