Skip to content

Commit c3f3ac1

Browse files
authored
Merge pull request #397 from zonuexe/refactor/makefile
Refactor Makefile
2 parents c5ac3f2 + 83cc77c commit c3f3ac1

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Makefile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@ ELCS = $(ELS:.el=.elc)
55
%.elc: %.el
66
$(EMACS) -Q -batch -L . -f batch-byte-compile $<
77

8-
all: $(ELCS)
8+
all: autoloads $(ELCS)
9+
10+
autoloads: php-mode-autoloads.el
11+
12+
php-mode-autoloads.el:
13+
$(EMACS) -Q -batch -L . --eval \
14+
"(progn \
15+
(require 'package) \
16+
(package-generate-autoloads \"php-mode\" default-directory))"
917

1018
clean:
11-
rm -f $(ELCS)
19+
rm -f $(ELCS) php-mode-autoloads.el
1220

1321
# Runs all unit tests from php-mode-test.el and shows the results. The
1422
# script will exit with the status code zero if all tests pass. If any
@@ -21,9 +29,7 @@ clean:
2129
#
2230
# for an example of using a script like this with the 'git bisect run'
2331
# command.
24-
test:
25-
make clean
26-
make all
32+
test: clean all
2733
$(EMACS) -Q -batch -L . -l php-mode-test.el -f ert-run-tests-batch-and-exit
2834

29-
.PHONY: all clean test
35+
.PHONY: all autoloads clean test

0 commit comments

Comments
 (0)