diff options
| -rw-r--r-- | core/prefix.mak | 3 | ||||
| -rw-r--r-- | makefile | 3 | ||||
| -rw-r--r-- | xmake/core/base/os.lua | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/core/prefix.mak b/core/prefix.mak index ce68486b9..ddfc4944a 100644 --- a/core/prefix.mak +++ b/core/prefix.mak @@ -4,7 +4,8 @@ include $(PRO_DIR)/project.mak # the temporary directory -TMP_DIR :=$(if $(TMP_DIR),$(TMP_DIR),/tmp) +TMP_DIR :=$(if $(TMP_DIR),$(TMP_DIR),$(TMPDIR)) +TMP_DIR :=$(if $(TMP_DIR),$(TMP_DIR),/tmp) # the source directory SRC_DIR = $(PRO_DIR)/src @@ -6,10 +6,11 @@ verbose:= #verbose:=-v # prefix +prefix:=$(if $(prefix),$(prefix),$(PREFIX)) # for termux prefix:=$(if $(prefix),$(prefix),$(if $(findstring /usr/local/bin,$(PATH)),/usr/local,/usr)) - # the temporary directory +TMP_DIR :=$(if $(TMP_DIR),$(TMP_DIR),$(TMPDIR)) # for termux TMP_DIR :=$(if $(TMP_DIR),$(TMP_DIR),/tmp) # platform diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index 57353d4d8..59f36b062 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -493,7 +493,7 @@ function os.tmpdir() -- get root tmpdir if os._ROOT_TMPDIR == nil then - os._ROOT_TMPDIR = os.getenv("XMAKE_TMPDIR") or os._tmpdir() + os._ROOT_TMPDIR = os.getenv("XMAKE_TMPDIR") or os.getenv("TMPDIR") or os._tmpdir() end local tmpdir_root = os._ROOT_TMPDIR |
