mirror of
https://github.com/janet-lang/janet
synced 2025-01-13 17:10:27 +00:00
Add :deps opiton to declare-executable.
This allows the addition of custom dependencies.
This commit is contained in:
parent
1aeb317863
commit
72696600d8
@ -799,13 +799,15 @@ int main(int argc, const char **argv) {
|
|||||||
is marshalled into bytecode which is then embedded in a final executable for distribution.\n\n
|
is marshalled into bytecode which is then embedded in a final executable for distribution.\n\n
|
||||||
This executable can be installed as well to the --binpath given."
|
This executable can be installed as well to the --binpath given."
|
||||||
[&keys {:install install :name name :entry entry :headers headers
|
[&keys {:install install :name name :entry entry :headers headers
|
||||||
:cflags cflags :lflags lflags}]
|
:cflags cflags :lflags lflags :deps deps}]
|
||||||
(def name (if is-win (string name ".exe") name))
|
(def name (if is-win (string name ".exe") name))
|
||||||
(def dest (string "build" sep name))
|
(def dest (string "build" sep name))
|
||||||
(create-executable @{:cflags cflags :lflags lflags} entry dest)
|
(create-executable @{:cflags cflags :lflags lflags} entry dest)
|
||||||
(add-dep "build" dest)
|
(add-dep "build" dest)
|
||||||
(when headers
|
(when headers
|
||||||
(each h headers (add-dep dest h)))
|
(each h headers (add-dep dest h)))
|
||||||
|
(when deps
|
||||||
|
(each d deps (add-dep dest d)))
|
||||||
(when install
|
(when install
|
||||||
(install-rule dest (dyn :binpath JANET_BINPATH))))
|
(install-rule dest (dyn :binpath JANET_BINPATH))))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user