diff --git a/CHANGELOG.md b/CHANGELOG.md index 00b80a93..2b154fd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ All notable changes to this project will be documented in this file. - Remove Emscripten build. Instead, use the amalgamated source code with a custom toolchain. - Update documentation. - Add `module/add-paths` +- Add `file/temp` +- Small bug fixes +- Allow signaling from C functions (yielding) via janet\_signalv. This + makes it easy to write C functions that work with event loops, such as + in libuv or embedded in a game. - Fix segfault regression when macros are called with bad arity. ### 1.6.0 - 2019-12-22 diff --git a/auxbin/jpm b/auxbin/jpm index 5d6e5c67..cd3d4f76 100755 --- a/auxbin/jpm +++ b/auxbin/jpm @@ -29,7 +29,7 @@ (defn- rule-impl [target deps thunk &opt phony] - (put (getrules) target @[(array/slice deps) thunk phony])) + (put (getrules) target @[(array/slice deps) @[thunk] phony])) (defmacro rule "Add a rule to the rule graph." @@ -53,8 +53,9 @@ (defn- add-thunk [target more] (def item (gettarget target)) - (def [_ thunk] item) - (put item 1 (fn [] (more) (thunk)))) + (def [_ thunks] item) + (array/push thunks more) + item) (defmacro add-body "Add recipe code to an existing rule. This makes existing rules do more but @@ -83,10 +84,10 @@ (if (os/stat target :mode) (break target) (error (string "No rule for file " target " found.")))) - (def [deps thunk phony] item) + (def [deps thunks phony] item) (def realdeps (seq [dep :in deps :let [x (do-rule dep)] :when x] x)) (when (or phony (needs-build-some target realdeps)) - (thunk)) + (each thunk thunks (thunk))) (unless phony target)) #