forked from emacs-php/php-mode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (54 loc) · 2.06 KB
/
Makefile
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
56
57
58
59
60
61
62
63
64
65
EMACS ?= emacs
CASK ?= cask
ELS = lisp/php.el lisp/php-align.el lisp/php-face.el lisp/php-project.el lisp/php-local-manual.el lisp/php-mode.el lisp/php-mode-debug.el
AUTOLOADS = php-mode-autoloads.el
ELCS = $(ELS:.el=.elc)
%.elc: %.el
$(EMACS) -Q -batch -L lisp/ -f batch-byte-compile $<
all: autoloads $(ELCS) authors
authors: AUTHORS.md
.PHONY: AUTHORS.md
AUTHORS.md: etc/git/AUTHORS.md.in .mailmap
@printf "Generating AUTHORS.md file..."
@test -d .git \
&& (cat $< > $@ \
&& git log --pretty=format:'- %aN' | \
cat etc/git/former-contributors - | LANG=C sort -u >> $@ \
&& cat etc/git/AUTHORS2.md.in >> $@ \
&& printf "FINISHED\n" ; ) \
|| printf "FAILED (non-fatal)\n"
autoloads: $(AUTOLOADS)
$(AUTOLOADS): lisp/php.el lisp/php-align.el lisp/php-face.el lisp/php-project.el lisp/php-local-manual.el lisp/php-mode-debug.el lisp/php-mode.el
$(EMACS) -Q -batch -L lisp/ --eval \
"(progn \
(require 'package) \
(package-generate-autoloads \"php-mode\" (expand-file-name \"lisp\")))"
.cask: Cask
$(CASK) install
clean:
rm -f $(ELCS) $(AUTOLOADS)
# Perform any operations that will be useful for developers
# who contribute to PHP Mode.
dev:
cp etc/git/prepare-commit-msg .git/hooks/prepare-commit-msg
chmod u+x .git/hooks/prepare-commit-msg
# Runs all unit tests from php-mode-test.el and shows the results. The
# script will exit with the status code zero if all tests pass. If any
# test fails the script exits with a non-zero status and shows
# diagnostics on standard output.
#
# You can use this script with git-bisect. See the documentation at
#
# http://git-scm.com/book/en/Git-Tools-Debugging-with-Git
#
# for an example of using a script like this with the 'git bisect run'
# command.
test: clean all
touch tests/project/1/.git
$(EMACS) -Q -batch -L lisp/ --eval \
"(let ((default-directory (expand-file-name \".cask\" default-directory))) \
(require 'package) \
(normal-top-level-add-subdirs-to-load-path))" \
-f package-initialize \
-l tests/php-mode-test.el -f ert-run-tests-batch-and-exit
.PHONY: all authors autoloads clean test