1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-19 01:37:40 +00:00

Update jpm path settings.

This will make it easier to use jpm as a per-project
management tool, as well as easier to set up individual
module trees.
This commit is contained in:
Calvin Rose
2019-12-12 19:35:40 -06:00
parent 9b7d642c38
commit c3f1b54171
3 changed files with 21 additions and 15 deletions

View File

@@ -93,16 +93,23 @@
# Configuration
#
(def- exe-dir
"Directory containing jpm script"
(do
(def exe (dyn :current-file))
(def i (last (string/find-all sep exe)))
(slice exe 0 i)))
(def JANET_MODPATH (or (os/getenv "JANET_MODPATH") (dyn :syspath)))
# Default based on janet binary location
(def JANET_HEADERPATH (or (os/getenv "JANET_HEADERPATH")
(if-let [j (dyn :syspath)]
(string j "/../../include/janet"))))
(def JANET_BINPATH (or (os/getenv "JANET_BINPATH")
(if-let [j (dyn :syspath)]
(string j "/../../bin"))))
(string exe-dir "/../include/janet")))
(def JANET_LIBPATH (or (os/getenv "JANET_LIBPATH")
(if-let [j (dyn :syspath)]
(string j "/.."))))
(string exe-dir "/../lib")))
(def JANET_BINPATH (or (os/getenv "JANET_BINPATH")
(string (dyn :syspath) "/bin")))
#
# Compilation Defaults
@@ -116,8 +123,6 @@
(def env (fiber/getenv (fiber/current)))
(def threads? (not (not (env 'thread/new))))
(print "threads " threads?)
# Default flags for natives, but not required
(def default-lflags (if is-win ["/nologo"] []))
(def default-cflags