mirror of
https://github.com/janet-lang/janet
synced 2025-01-11 08:00:27 +00:00
Add :headers option to build recipes
This lets recipes do better change detection.
This commit is contained in:
parent
9f48c3e2db
commit
0e7144f2dc
@ -696,11 +696,13 @@ int main(int argc, const char **argv) {
|
|||||||
file is evaluated and a main function is looked for in the entry file. This function
|
file is evaluated and a main function is looked for in the entry file. This function
|
||||||
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}]
|
[&keys {:install install :name name :entry entry :headers headers}]
|
||||||
(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 @{} entry dest)
|
(create-executable @{} entry dest)
|
||||||
(add-dep "build" dest)
|
(add-dep "build" dest)
|
||||||
|
(when headers
|
||||||
|
(each h headers (add-dep dest h)))
|
||||||
(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