branch: elpa/emacsql
commit 4a570e3016d60baee84df75aa126864ee117d3df
Author: Christopher Wellons <[email protected]>
Commit: Christopher Wellons <[email protected]>
Predict new location when compiling binary.
---
emacsql-sqlite.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/emacsql-sqlite.el b/emacsql-sqlite.el
index 008b2a064f..a62f35fcab 100644
--- a/emacsql-sqlite.el
+++ b/emacsql-sqlite.el
@@ -200,8 +200,12 @@ This works like `url-copy-file' but actually checks for
errors."
(error "No EmacSQL SQLite binary available, aborting")))))
(cl-eval-when (compile)
- (unless (file-exists-p emacsql-sqlite-executable)
- (ignore-errors (emacsql-sqlite-compile 2))))
+ (let* ((bin-name (file-name-nondirectory emacsql-sqlite-executable))
+ (new-root (file-name-directory byte-compile-current-file))
+ (emacsql-sqlite-executable
+ (expand-file-name bin-name (concat new-root "bin/"))))
+ (unless (file-exists-p emacsql-sqlite-executable)
+ (ignore-errors (emacsql-sqlite-compile 2)))))
(provide 'emacsql-sqlite)