|
| 1 | +## |
| 2 | +# Eask generated template Makefile |
| 3 | +# |
| 4 | +# File located in https://github.com/emacs-eask/template-elisp/blob/master/Makefile |
| 5 | +## |
| 6 | + |
| 7 | +EMACS ?= emacs |
| 8 | +EASK ?= eask |
| 9 | + |
| 10 | +.PHONY: clean package install compile test checkdoc lint |
| 11 | + |
| 12 | +# CI entry point |
| 13 | +# |
| 14 | +# You can add or remove any commands here |
| 15 | +# |
| 16 | +# (Option 1): Basic for beginner, only tests for package's installation |
| 17 | +ci: clean package install compile |
| 18 | +# (Option 2): Advanced for a high-quality package |
| 19 | +#ci: clean package install compile checkdoc lint test |
| 20 | + |
| 21 | +# Build an package artefact, default to `dist` folder |
| 22 | +# |
| 23 | +# This is used to test if your package can be built correctly before the |
| 24 | +# package installation. |
| 25 | +package: |
| 26 | + @echo "Packaging..." |
| 27 | + $(EASK) package |
| 28 | + |
| 29 | +# Install package |
| 30 | +# |
| 31 | +# If your package is a single file package, you generally wouldn't need to |
| 32 | +install: |
| 33 | + @echo "Installing..." |
| 34 | + $(EASK) install |
| 35 | + |
| 36 | +# Byte-compile package |
| 37 | +# |
| 38 | +# Compile all your package .el files to .elc |
| 39 | +compile: |
| 40 | + @echo "Compiling..." |
| 41 | + $(EASK) compile |
| 42 | + |
| 43 | +# Run regression tests |
| 44 | +# |
| 45 | +# The default test is `ert`; but Eask also support other regression test! |
| 46 | +# See https://emacs-eask.github.io/Getting-Started/Commands-and-options/#-linter |
| 47 | +test: |
| 48 | + @echo "Testing..." |
| 49 | + $(EASK) install-deps --dev |
| 50 | + $(EASK) test ert ./test/*.el |
| 51 | + |
| 52 | +# Run checkdoc |
| 53 | +# |
| 54 | +# See https://www.emacswiki.org/emacs/CheckDoc |
| 55 | +checkdoc: |
| 56 | + @echo "Checking documentation..." |
| 57 | + $(EASK) lint checkdoc --strict |
| 58 | + |
| 59 | +# Lint package metadata |
| 60 | +# |
| 61 | +# See https://github.com/purcell/package-lint |
| 62 | +lint: |
| 63 | + @echo "Linting..." |
| 64 | + $(EASK) lint package |
| 65 | + |
| 66 | +# Generate autoloads file |
| 67 | +# |
| 68 | +# NOTE: This is generally unnecessary |
| 69 | +autoloads: |
| 70 | + @echo "Generating autoloads..." |
| 71 | + $(EASK) autoloads |
| 72 | + |
| 73 | +# Generate -pkg file |
| 74 | +# |
| 75 | +# NOTE: This is generally unnecessary |
| 76 | +pkg-file: |
| 77 | + @echo "Generating -pkg file..." |
| 78 | + $(EASK) pkg-file |
| 79 | + |
| 80 | +# Clean up |
| 81 | +# |
| 82 | +# This will clean all the entire workspace including the following folders |
| 83 | +# and files |
| 84 | +# |
| 85 | +# - .eask folder (sandbox) |
| 86 | +# - all .elc files |
| 87 | +clean: |
| 88 | + $(EASK) clean all |
0 commit comments