-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
78 lines (55 loc) · 2.21 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
66
67
68
69
70
71
72
73
74
75
76
77
78
# Copyright (C) 2024-2025 Free Software Foundation, Inc.
# Author: Morgan Smith <Morgan.J.Smith@outlook.com>
# Package: debbugs
# Keywords: comm, hypermedia, maint
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
### Commentary:
## Some test targets:
##
## check: re-run all tests.
## filename-tests: re-run tests from test/filename-tests.el(c).
## SELECTOR discrimination (see ERT manual for more possibilities):
##
## SELECTOR='"regexp"': Run all tests which name match "regexp"
## SELECTOR='test-name': Run test with name test-name
### Code:
EMACS ?= emacs
MAKEINFO ?= makeinfo
INSTALL_INFO ?= install-info --quiet
SOURCE = $(wildcard *.el)
TESTSOURCE = $(wildcard test/*.el)
TARGET = $(filter-out debbugs-pkg.elc,$(patsubst %.el,%.elc,$(SOURCE)))
TESTTARGET = $(patsubst %.el,%.elc,$(TESTSOURCE))
TESTS = $(patsubst test/%.el,%,$(wildcard test/*-tests.el))
SELECTOR ?= (not (tag :unstable))
INFOMANUALS = debbugs.info debbugs-ug.info
.PHONY: all build check checkdoc clean doc
.PRECIOUS: %.elc
%.elc: %.el
@$(EMACS) -Q -batch -L . -f batch-byte-compile $<
test/%.elc: test/%.el
@$(EMACS) -Q -batch -L . -L ./test -f batch-byte-compile $<
%.info: %.texi
@$(MAKEINFO) --error-limit=0 --no-split $< -o $@
@$(INSTALL_INFO) --dir-file=dir $@
all: build doc
doc: $(INFOMANUALS)
build: $(TARGET)
checkdoc: $(SOURCE) $(TESTSOURCE)
@$(EMACS) -Q --batch -l resources/debbugs-checkdoc-config.el \
$(foreach file,$^,"--eval=(checkdoc-file \"$(file)\")")
check: $(TESTS)
%-tests: build $(TESTTARGET)
@$(EMACS) -Q --batch -L . -L ./test -l $@ \
--eval '(ert-run-tests-batch-and-exit (quote ${SELECTOR}))'
clean:
-rm -f $(TARGET) $(TESTTARGET) $(INFOMANUALS) dir