-
Notifications
You must be signed in to change notification settings - Fork 7
/
cl-tree-sitter.asd
27 lines (24 loc) · 1.06 KB
/
cl-tree-sitter.asd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
;;;; +----------------------------------------------------------------+
;;;; | cl-tree-sitter |
;;;; +----------------------------------------------------------------+
(in-package :asdf-user)
(asdf:defsystem #:cl-tree-sitter
:description "Tree-Sitter bindings for Common Lisp"
:author "death <github.com/death>"
:license "MIT"
:defsystem-depends-on ("asdf-package-system")
:components ((:file "low-level")
(:file "high-level")
(:file "all"))
:depends-on ("cffi-libffi"))
(defmethod perform :before ((op prepare-op)
(system (eql (find-system :cl-tree-sitter))))
;; Compile the tree-sitter wrapper functions and add it to the relevant path.
(let ((cwd (uiop:getcwd)))
(unwind-protect
(progn
(uiop:chdir (asdf:system-relative-pathname :cl-tree-sitter ""))
(uiop:run-program "make"
:output *standard-output*
:error-output *standard-output*))
(uiop:chdir cwd))))