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

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

[nongnu] elpa/emacsql b0f0d3085d 258/427: Get OS tuple from Emacs.


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql b0f0d3085d 258/427: Get OS tuple from Emacs.
Date: Tue, 13 Dec 2022 02:59:49 -0500 (EST)

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

    Get OS tuple from Emacs.
---
 emacsql-system.el |  5 +++++
 sqlite/Makefile   | 12 ++++++------
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/emacsql-system.el b/emacsql-system.el
index 01d77210ef..8bca22b24a 100644
--- a/emacsql-system.el
+++ b/emacsql-system.el
@@ -39,6 +39,11 @@
   "Determine an executable name for PREFIX."
   (concat prefix "-" (mapconcat #'symbol-name (emacsql-system-tuple) "-")))
 
+(defun emacsql-system-print-tuple ()
+  "This is for calling from a Makefile."
+  (princ (mapconcat #'symbol-name (emacsql-system-tuple) "-"))
+  (princ "\n"))
+
 (provide 'emacsql-system)
 
 ;;; emacsql-system.el ends here
diff --git a/sqlite/Makefile b/sqlite/Makefile
index 4b30786e33..1c54862a0f 100644
--- a/sqlite/Makefile
+++ b/sqlite/Makefile
@@ -1,11 +1,11 @@
+EMACS    ?= emacs
+GETTUPLE  = -l ../emacsql-system.el -f emacsql-system-print-tuple
+OSTUPLE   = $(shell $(EMACS) -Q -batch $(GETTUPLE))
+BINARY    = emacsql-sqlite-$(OSTUPLE)
+
 ifeq ($(OS),Windows_NT)
-    OSTUPLE ?= x86-windows
-    BINARY   = emacsql-sqlite-$(OSTUPLE).exe
+    OSTUPLE += .exe
 else
-    PART_ARCH  = $(shell uname -m)
-    PART_OS    = $(shell uname -s | tr '[A-Z]' '[a-z]')
-    OSTUPLE   ?= $(PART_ARCH)-$(PART_OS)
-    BINARY     = emacsql-sqlite-$(OSTUPLE)
     LDLIBS     = -ldl
 endif
 



reply via email to

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