Makefile 996 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # This is not a full-featured Makefile and it is not intended to be used
  2. # to install "alect-themes" package to your system. Its purposes are:
  3. #
  4. # - to byte-compile *.el files (using 'make'): to make sure that there
  5. # are no compilation warnings;
  6. #
  7. # - to run the tests (using 'make check').
  8. EMACS = emacs
  9. TOP := $(dir $(lastword $(MAKEFILE_LIST)))
  10. LOAD_PATH = -L $(TOP)
  11. EMACS_BATCH = $(EMACS) -batch -Q $(LOAD_PATH)
  12. ELS = \
  13. alect-themes.el \
  14. alect-light-theme.el \
  15. alect-light-alt-theme.el \
  16. alect-dark-theme.el \
  17. alect-dark-alt-theme.el \
  18. alect-black-theme.el \
  19. alect-black-alt-theme.el \
  20. ELCS = $(ELS:.el=.elc)
  21. all: $(ELCS)
  22. %.elc: %.el
  23. @printf "Compiling $<\n"
  24. @$(EMACS_BATCH) --eval "\
  25. (when (file-exists-p \"$@\")\
  26. (delete-file \"$@\"))" \
  27. -f batch-byte-compile $<
  28. check:
  29. @$(EMACS_BATCH) --eval "(progn\
  30. (load-file \"tests/alect-tests.el\")\
  31. (ert-run-tests-batch-and-exit))"
  32. clean:
  33. @printf "Removing *.elc...\n"
  34. @$(RM) $(ELCS)