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

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

[nongnu] elpa/emacsql ef976b8649 189/427: Add package target for Makefil


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql ef976b8649 189/427: Add package target for Makefile.
Date: Tue, 13 Dec 2022 02:59:40 -0500 (EST)

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

    Add package target for Makefile.
---
 .gitignore |  1 +
 Makefile   | 15 ++++++++++-----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/.gitignore b/.gitignore
index c531d9867f..ef8cdbb022 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 *.elc
+*.tar
diff --git a/Makefile b/Makefile
index dc9bb14523..7057a2cb80 100644
--- a/Makefile
+++ b/Makefile
@@ -1,26 +1,31 @@
 PACKAGE  = emacsql
+VERSION := $(word 1,$(subst -, ,$(shell git describe)))
 
 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 = emacsql-reap.el emacsql-compiler.el emacsql.el emacsql-sqlite.el \
      emacsql-psql.el emacsql-tests.el
-
 ELC = $(EL:.el=.elc)
+EXTRA_DIST = README.md UNLICENSE
 
-.PHONY : all compile test clean
+.PHONY : all compile package test clean
 
 all : test
 
 compile: $(ELC)
 
+package : $(PACKAGE)-$(VERSION).tar
+
+$(PACKAGE)-$(VERSION).tar : $(EL) $(PACKAGE)-pkg.el $(EXTRA_DIST)
+       tar -cf $@ --transform "s,^,$(PACKAGE)-$(VERSION)/," $^
+
 test: compile
-       $(TEST)
+       $(BATCH) -l $(PACKAGE)-tests.elc -f ert-run-tests-batch
 
 clean:
-       $(RM) *.elc
+       $(RM) *.tar $(ELC)
 
 %.elc: %.el
        $(COMPILE) $<



reply via email to

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