diff options
| author | ruki <[email protected]> | 2019-07-29 23:17:41 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-07-29 13:46:06 +0800 |
| commit | 67063ff1ae2edea2b6e13c300dd0af5778e6c7dd (patch) | |
| tree | f5f95b74d32ee3132dfe09d1288d0fd96c4a3158 | |
| parent | dbec77190bffb5a65511c1fe3ca5e327d172f599 (diff) | |
improve install dir for target
| -rw-r--r-- | xmake/actions/install/xmake.lua | 4 | ||||
| -rw-r--r-- | xmake/core/project/target.lua | 8 |
2 files changed, 2 insertions, 10 deletions
diff --git a/xmake/actions/install/xmake.lua b/xmake/actions/install/xmake.lua index d8f0d6ebf..1ebe3300b 100644 --- a/xmake/actions/install/xmake.lua +++ b/xmake/actions/install/xmake.lua @@ -46,10 +46,6 @@ task("install") " $ xmake install -o /usr/local", "or $ DESTDIR=/usr/local xmake install", "or $ INSTALLDIR=/usr/local xmake install" } - , {'p', "prefix", "kv", nil, "Set the prefix directory.", - "e.g.", - " $ xmake install --prefix=local", - "or $ PREFIX=local xmake install" } , {'a', "all", "k", nil, "Install all targets." } , { } diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 484d97639..7c336944c 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -832,13 +832,9 @@ function _instance:installdir() if not installdir then -- DESTDIR: be compatible with https://www.gnu.org/prep/standards/html_node/DESTDIR.html - installdir = baseoption.get("installdir") or os.getenv("INSTALLDIR") or os.getenv("DESTDIR") or platform.get("installdir") + installdir = baseoption.get("installdir") or os.getenv("INSTALLDIR") or os.getenv("PREFIX") or os.getenv("DESTDIR") or platform.get("installdir") if installdir then - -- append prefix - local prefix = baseoption.get("prefix") or os.getenv("PREFIX") - if prefix then - installdir = path.join(installdir, prefix) - end + installdir = installdir:trim() end end self._INSTALLDIR = installdir or false |
