mirror of
https://github.com/janet-lang/janet
synced 2024-11-24 17:27:18 +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:
parent
9b7d642c38
commit
c3f1b54171
23
auxbin/jpm
23
auxbin/jpm
@ -93,16 +93,23 @@
|
|||||||
# Configuration
|
# 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)))
|
(def JANET_MODPATH (or (os/getenv "JANET_MODPATH") (dyn :syspath)))
|
||||||
|
|
||||||
|
# Default based on janet binary location
|
||||||
(def JANET_HEADERPATH (or (os/getenv "JANET_HEADERPATH")
|
(def JANET_HEADERPATH (or (os/getenv "JANET_HEADERPATH")
|
||||||
(if-let [j (dyn :syspath)]
|
(string exe-dir "/../include/janet")))
|
||||||
(string j "/../../include/janet"))))
|
|
||||||
(def JANET_BINPATH (or (os/getenv "JANET_BINPATH")
|
|
||||||
(if-let [j (dyn :syspath)]
|
|
||||||
(string j "/../../bin"))))
|
|
||||||
(def JANET_LIBPATH (or (os/getenv "JANET_LIBPATH")
|
(def JANET_LIBPATH (or (os/getenv "JANET_LIBPATH")
|
||||||
(if-let [j (dyn :syspath)]
|
(string exe-dir "/../lib")))
|
||||||
(string j "/.."))))
|
|
||||||
|
(def JANET_BINPATH (or (os/getenv "JANET_BINPATH")
|
||||||
|
(string (dyn :syspath) "/bin")))
|
||||||
|
|
||||||
#
|
#
|
||||||
# Compilation Defaults
|
# Compilation Defaults
|
||||||
@ -116,8 +123,6 @@
|
|||||||
(def env (fiber/getenv (fiber/current)))
|
(def env (fiber/getenv (fiber/current)))
|
||||||
(def threads? (not (not (env 'thread/new))))
|
(def threads? (not (not (env 'thread/new))))
|
||||||
|
|
||||||
(print "threads " threads?)
|
|
||||||
|
|
||||||
# Default flags for natives, but not required
|
# Default flags for natives, but not required
|
||||||
(def default-lflags (if is-win ["/nologo"] []))
|
(def default-lflags (if is-win ["/nologo"] []))
|
||||||
(def default-cflags
|
(def default-cflags
|
||||||
|
11
jpm.1
11
jpm.1
@ -36,7 +36,7 @@ If passed to jpm install, runs tests before installing. Will run tests recursive
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BR \-\-modpath=/some/path
|
.BR \-\-modpath=/some/path
|
||||||
Set the path to install modules to. Defaults to $JANET_MODPATH, $JANET_PATH, or (dyn :syspath) in that order.
|
Set the path to install modules to. Defaults to $JANET_MODPATH, $JANET_PATH, or (dyn :syspath) in that order. You most likely don't need this.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BR \-\-headerpath=/some/path
|
.BR \-\-headerpath=/some/path
|
||||||
@ -172,7 +172,8 @@ This variable is overwritten by the --modpath=/some/path if it is provided.
|
|||||||
The location that jpm will look for janet header files (janet.h and janetconf.h) that are used
|
The location that jpm will look for janet header files (janet.h and janetconf.h) that are used
|
||||||
to build native modules and standalone executables. If janet.h and janetconf.h are available as
|
to build native modules and standalone executables. If janet.h and janetconf.h are available as
|
||||||
default includes on your system, this value is not required. If not provided, will default to
|
default includes on your system, this value is not required. If not provided, will default to
|
||||||
(dyn :syspath)/../../include/janet. The --headerpath=/some/path will override this variable.
|
<jpm script location>/../include/janet. The --headerpath=/some/path option will override this
|
||||||
|
variable.
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.B JANET_LIBPATH
|
.B JANET_LIBPATH
|
||||||
@ -180,15 +181,15 @@ default includes on your system, this value is not required. If not provided, wi
|
|||||||
Similar to JANET_HEADERPATH, this path is where jpm will look for
|
Similar to JANET_HEADERPATH, this path is where jpm will look for
|
||||||
libjanet.a for creating standalong executables. This does not need to be
|
libjanet.a for creating standalong executables. This does not need to be
|
||||||
set on a normal install.
|
set on a normal install.
|
||||||
If not provided, this will default to (dyn :syspath)/../../lib.
|
If not provided, this will default to <jpm script location>/../lib.
|
||||||
The --libpath=/some/path will override this variable.
|
The --libpath=/some/path option will override this variable.
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.B JANET_BINPATH
|
.B JANET_BINPATH
|
||||||
.RS
|
.RS
|
||||||
The directory where jpm will install binary scripts and executables to.
|
The directory where jpm will install binary scripts and executables to.
|
||||||
Defaults to
|
Defaults to
|
||||||
(dyn :syspath)/../../lib.
|
(dyn :syspath)/bin
|
||||||
The --binpath=/some/path will override this variable.
|
The --binpath=/some/path will override this variable.
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
|
@ -472,7 +472,7 @@ error:
|
|||||||
|
|
||||||
#ifdef JANET_WINDOWS
|
#ifdef JANET_WINDOWS
|
||||||
|
|
||||||
static DWORD janet_create_thread_wrapper(void *param) {
|
static DWORD WINAPI janet_create_thread_wrapper(LPVOID param) {
|
||||||
thread_worker((JanetMailbox *)param);
|
thread_worker((JanetMailbox *)param);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user