emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/emacsql 4a570e3016 301/427: Predict new location when comp


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql 4a570e3016 301/427: Predict new location when compiling binary.
Date: Tue, 13 Dec 2022 02:59:53 -0500 (EST)

branch: elpa/emacsql
commit 4a570e3016d60baee84df75aa126864ee117d3df
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>

    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)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]