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.

53 lines
1.1KB

  1. CASK ?= cask
  2. EMACS ?= emacs
  3. DIST ?= dist
  4. EMACSFLAGS = --batch -Q
  5. EMACSBATCH = $(EMACS) $(EMACSFLAGS)
  6. VERSION := $(shell EMACS=$(EMACS) $(CASK) version)
  7. PKG_DIR := $(shell EMACS=$(EMACS) $(CASK) package-directory)
  8. PROJ_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
  9. EMACS_D = ~/.emacs.d
  10. USER_ELPA_D = $(EMACS_D)/elpa
  11. SRCS = $(filter-out %-pkg.el, $(wildcard *.el))
  12. TESTS = $(wildcard test/*.el)
  13. TAR = $(DIST)/pass-$(VERSION).tar
  14. .PHONY: all deps check install uninstall reinstall clean-all clean
  15. all : deps $(TAR)
  16. deps :
  17. $(CASK) install
  18. check : deps
  19. $(CASK) exec $(EMACSBATCH) \
  20. $(patsubst %,-l % , $(SRCS))\
  21. $(patsubst %,-l % , $(TESTS))\
  22. -f ert-run-tests-batch-and-exit
  23. install : $(TAR)
  24. $(EMACSBATCH) -l package -f package-initialize \
  25. --eval '(package-install-file "$(PROJ_ROOT)/$(TAR)")'
  26. uninstall :
  27. rm -rf $(USER_ELPA_D)/pass-*
  28. reinstall : clean uninstall install
  29. clean-all : clean
  30. rm -rf $(PKG_DIR)
  31. clean :
  32. rm -f *.elc
  33. rm -rf $(DIST)
  34. rm -f *-pkg.el
  35. $(TAR) : $(DIST) $(SRCS)
  36. $(CASK) package $(DIST)
  37. $(DIST) :
  38. mkdir $(DIST)