aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 19 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 0845f14..7f72a5f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
EMACS ?= emacs
+VERSION ?= latest
# The order is important for compilation.
for_compile := *.el
@@ -6,10 +7,10 @@ for_checkdoc := *.el
for_longlines := $(wildcard *.el *.md *.yml) Makefile
.PHONY: all
-all: compile checkdoc longlines
+all: compile checkdoc longlines ## Build project and run all linters
.PHONY: compile
-compile:
+compile: ## Check for byte-compiler errors
@for file in $(for_compile); do \
echo "[compile] $$file" ;\
$(EMACS) -Q --batch -L . -f batch-byte-compile $$file 2>&1 \
@@ -18,7 +19,7 @@ compile:
done
.PHONY: checkdoc
-checkdoc:
+checkdoc: ## Check for missing or poorly formatted docstrings
@for file in $(for_checkdoc); do \
echo "[checkdoc] $$file" ;\
$(EMACS) -Q --batch \
@@ -29,7 +30,7 @@ checkdoc:
done
.PHONY: longlines
-longlines:
+longlines: ## Check for lines longer than 79 characters
@echo "[longlines] $(for_longlines)"
@for file in $(for_longlines); do \
cat "$$file" \
@@ -41,6 +42,19 @@ longlines:
done
.PHONY: clean
-clean:
+clean: ## Remove build artifacts
@echo "[clean]" *.elc
@rm -f *.elc
+
+.PHONY: docker
+docker: ## Start a Docker shell with source code and given Emacs VERSION
+ @scripts/docker.bash $(VERSION)
+
+.PHONY: help
+help: ## Show this message
+ @echo "usage:" >&2
+ @grep -h "[#]# " $(MAKEFILE_LIST) | \
+ sed 's/^/ make /' | \
+ sed 's/:[^#]*[#]# /|/' | \
+ sed 's/%/LANG/' | \
+ column -t -s'|' >&2