Makefile 787 B

1234567891011121314151617181920212223242526272829303132333435
  1. # This is not a full-featured Makefile and it is not intended to be used
  2. # to install MWIM package to your system. Its purposes are:
  3. #
  4. # - to byte-compile "mwim.el" (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 = mwim.el
  13. ELCS = $(ELS:.el=.elc)
  14. all: $(ELCS)
  15. %.elc: %.el
  16. @printf "Compiling $<\n"
  17. @$(EMACS_BATCH) --eval "\
  18. (when (file-exists-p \"$@\")\
  19. (delete-file \"$@\"))" \
  20. -f batch-byte-compile $<
  21. check:
  22. @$(EMACS_BATCH) --eval "(progn\
  23. (load-file \"tests/mwim-tests.el\")\
  24. (ert-run-tests-batch-and-exit))"
  25. clean:
  26. @printf "Removing *.elc...\n"
  27. @$(RM) $(ELCS)