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

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

[nongnu] elpa/drupal-mode 8947650b95 119/308: Rewritten Makefile to use


From: ELPA Syncer
Subject: [nongnu] elpa/drupal-mode 8947650b95 119/308: Rewritten Makefile to use Carton.
Date: Tue, 25 Jan 2022 10:59:37 -0500 (EST)

branch: elpa/drupal-mode
commit 8947650b9587e9fed74be2c69436f51a16fc9312
Author: Arne Jørgensen <arne@arnested.dk>
Commit: Arne Jørgensen <arne@arnested.dk>

    Rewritten Makefile to use Carton.
---
 Carton   |  3 +++
 Makefile | 37 +++++++++++++++++--------------------
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/Carton b/Carton
new file mode 100644
index 0000000000..d4838337c6
--- /dev/null
+++ b/Carton
@@ -0,0 +1,3 @@
+(package-file "drupal-mode.el")
+
+(source "marmalade" "http://marmalade-repo.org/packages/";)
diff --git a/Makefile b/Makefile
index bf4c94c194..8266815737 100644
--- a/Makefile
+++ b/Makefile
@@ -19,41 +19,38 @@
 
 .PHONY: all test clean install
 
-ARCHIVE_NAME:=drupal-mode
-VERSION:=$(shell emacs --batch -l package --eval "(with-temp-buffer \
-               (insert-file \"$(ARCHIVE_NAME).el\")\
-               (princ (aref (package-buffer-info) 3)))")
-PACKAGE_NAME:=$(ARCHIVE_NAME)-$(VERSION)
+CARTON?=carton
+EMACS?=emacs
+TAR?=bsdtar
+PANDOC?=pandoc --atx-headers
+
+VERSION?=$(shell $(CARTON) version)
+
+ARCHIVE_NAME=drupal-mode
+PACKAGE_NAME=$(ARCHIVE_NAME)-$(VERSION)
 
 all: $(PACKAGE_NAME).tar
 
 test:
-       emacs --batch --user `whoami` -L `pwd` -l drupal-tests -f 
ert-run-tests-batch-and-exit
+       $(CARTON) install
+       $(CARTON) exec $(EMACS) --no-site-file --no-site-lisp --batch -L $(PWD) 
-l drupal-tests -f ert-run-tests-batch-and-exit
 
 $(ARCHIVE_NAME).info: README.md
-       pandoc -t texinfo $^ | makeinfo -o $@
+       $(PANDOC) -t texinfo $^ | makeinfo -o $@
 
 README: README.md
-       pandoc --atx-headers -t plain -o $@ $^
+       $(PANDOC) -t plain -o $@ $^
 
-# requires package-build.el from https://github.com/milkypostman/melpa
-# to be available in your emacs load-path
 $(ARCHIVE_NAME)-pkg.el: $(ARCHIVE_NAME).el
-       emacs --batch --user `whoami` -l package-build --eval "(progn \
-               (pb/write-pkg-file \
-                       \"$(ARCHIVE_NAME)-pkg.el\" \
-                       (with-temp-buffer \
-                               (insert-file \"$(ARCHIVE_NAME).el\") \
-                               (package-buffer-info))))"
+       $(CARTON) package
 
 # create a tar ball in package.el format for uploading to 
http://marmalade-repo.org
 $(PACKAGE_NAME).tar: README $(ARCHIVE_NAME).el $(ARCHIVE_NAME)-pkg.el 
$(ARCHIVE_NAME).info dir drupal/*.el drupal-tests.el drush-make-mode.el
-       tar -c -s "@^@$(PACKAGE_NAME)/@" -f $(PACKAGE_NAME).tar $^
+       $(TAR) -c -s "@^@$(PACKAGE_NAME)/@" -f $(PACKAGE_NAME).tar $^
 
 install: $(PACKAGE_NAME).tar
-       emacs --batch --user `whoami` -l package --eval "(progn \
-               (package-initialize)\
-               (package-install-file \"`pwd`/$(PACKAGE_NAME).tar\"))"
+       $(EMACS) --batch -l package -f package-initialize --eval 
"(package-install-file \"$(PWD)/$(PACKAGE_NAME).tar\")"
 
 clean:
        $(RM) $(ARCHIVE_NAME).info $(ARCHIVE_NAME)-*.tar $(ARCHIVE_NAME)-pkg.el 
README
+       $(RM) -r elpa



reply via email to

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