blob: 84c1ec5238769c83ec4a08f5c1a9c858c5b78060 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
ELS = with-editor.el
DEPS = dash
INFOPAGES = with-editor.info
ELCS = $(ELS:.el=.elc)
DFLAGS = $(addprefix -L ../,$(DEPS))
EFLAGS ?= $(DFLAGS)
EMACS ?= emacs
BATCH = $(EMACS) -batch -Q -L . $(EFLAGS)
MAKEINFO ?= makeinfo
INSTALL_INFO ?= $(shell command -v ginstall-info || printf install-info)
.PHONY: help clean AUTHORS.md
help:
$(info make all - compile elisp and manual)
$(info make lisp - compile elisp)
$(info make info - generate info manual)
$(info make authors - generate AUTHORS.md)
$(info make clean - remove generated files)
@printf "\n"
all: lisp info
lisp: $(ELCS)
%.elc: %.el
@printf "Compiling %s\n" $<
@$(BATCH)\
--eval '(setq with-editor-emacsclient-executable nil)'\
-f batch-byte-compile $<
info: $(INFOPAGES) dir
%.info: %.texi
@printf "Generating $@\n"
@$(MAKEINFO) --no-split $< -o $@
dir: $(INFOPAGES)
@printf "Generating dir\n"
@echo $^ | xargs -n 1 $(INSTALL_INFO) --dir=$@
authors: AUTHORS.md
AUTHORS.md:
@ printf "Authors\n=======\n\n" > $@
@ ( printf "%s\n" "- Barak A. Pearlmutter <barak+git@pearlmutter.net>" && \
printf "%s\n" "- Lele Gaifax <lele@metapensiero.it>" && \
printf "%s\n" "- Rémi Vanicat <vanicat@debian.org>" && \
git log --pretty=format:'- %aN <%aE>' \
) | sort -u >> $@
clean:
@printf "Cleaning...\n"
@rm -f $(ELCS)
|