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

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

[nongnu] elpa/emacsql e9fbc4a913 061/427: Fill out a Makefile.


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql e9fbc4a913 061/427: Fill out a Makefile.
Date: Tue, 13 Dec 2022 02:59:28 -0500 (EST)

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

    Fill out a Makefile.
---
 Makefile         | 25 +++++++++++++++++++++++++
 emacsql-tests.el |  9 +++++++++
 2 files changed, 34 insertions(+)

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000..8f4579f75b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,25 @@
+PACKAGE  = emacsql
+
+EMACS   ?= emacs
+BATCH   := $(EMACS) -batch -Q -L .
+COMPILE := $(BATCH) -f batch-byte-compile
+TEST    := $(BATCH) -l $(PACKAGE)-tests.elc -f ert-run-tests-batch
+
+EL = $(PACKAGE).el $(PACKAGE)-tests.el
+
+ELC = $(EL:.el=.elc)
+
+.PHONY : all compile test clean
+
+all : test
+
+compile: $(ELC)
+
+test: compile
+       $(TEST)
+
+clean:
+       $(RM) *.elc
+
+%.elc: %.el
+       @$(COMPILE) $<
diff --git a/emacsql-tests.el b/emacsql-tests.el
index 63ba565522..38fc5e0300 100644
--- a/emacsql-tests.el
+++ b/emacsql-tests.el
@@ -1,4 +1,9 @@
+;;; emacsql-tests.el --- tests for emacsql
+
+;;; Code:
+
 (require 'ert)
+(require 'emacsql)
 
 (ert-deftest emacsql-escape ()
   (should (string= (emacsql-escape "foo") "foo"))
@@ -53,3 +58,7 @@
                        "CREATE TABLE foo (a, b, c);")
   (emacsql-tests-query [:drop-table $1] '(foo)
                        "DROP TABLE foo;"))
+
+(provide 'emacsql-tests)
+
+;;; emacsql-tests.el ends here



reply via email to

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