A major mode for password-store
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.1 KiB

CASK ?= cask
EMACS ?= emacs
DIST ?= dist
EMACSFLAGS = --batch -Q
VERSION := $(shell EMACS=$(EMACS) $(CASK) version)
PKG_DIR := $(shell EMACS=$(EMACS) $(CASK) package-directory)
PROJ_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
EMACS_D = ~/.emacs.d
SRCS = $(filter-out %-pkg.el, $(wildcard *.el))
TESTS = $(wildcard test/*.el)
TAR = $(DIST)/pass-$(VERSION).tar
.PHONY: all deps check install uninstall reinstall clean-all clean
all : deps $(TAR)
deps :
$(CASK) install
check : deps
$(CASK) exec $(EMACSBATCH) \
$(patsubst %,-l % , $(SRCS))\
$(patsubst %,-l % , $(TESTS))\
-f ert-run-tests-batch-and-exit
install : $(TAR)
$(EMACSBATCH) -l package -f package-initialize \
--eval '(package-install-file "$(PROJ_ROOT)/$(TAR)")'
uninstall :
rm -rf $(USER_ELPA_D)/pass-*
reinstall : clean uninstall install
clean-all : clean
rm -rf $(PKG_DIR)
clean :
rm -f *.elc
rm -rf $(DIST)
rm -f *-pkg.el
$(TAR) : $(DIST) $(SRCS)
$(CASK) package $(DIST)
$(DIST) :
mkdir $(DIST)