Skip to content

Commit 32026d6

Browse files
committed
Add Makefile for compiling
1 parent 102bcb4 commit 32026d6

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
*.elc
2+
/*-autoloads.el
13
/.cask
24
/composer.lock
35
/vendor

Makefile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
EMACS ?= emacs
2+
CASK ?= cask
3+
ELS = phpstan.el flycheck-phpstan.el
4+
AUTOLOADS = phpstan-autoloads.el
5+
ELCS = $(ELS:.el=.elc)
6+
7+
%.elc: .cask %.el
8+
$(EMACS) -Q -batch -L . -f package-initialize -f batch-byte-compile $<
9+
10+
.cask: Cask
11+
CASK
12+
13+
all: clean autoloads $(ELCS)
14+
15+
autoloads: $(AUTOLOADS)
16+
17+
$(AUTOLOADS): $(ELCS)
18+
$(EMACS) -Q -batch -L . --eval \
19+
"(progn \
20+
(require 'package) \
21+
(normal-top-level-add-subdirs-to-load-path) \
22+
(package-generate-autoloads \"phpstan\" default-directory))"
23+
24+
clean:
25+
-rm -f $(ELCS) $(AUTOLOADS)
26+
27+
clobber: clean
28+
-rm -f .cask
29+
30+
.PHONY: all autoloads clean clobber

0 commit comments

Comments
 (0)