]> code.delx.au - gnu-emacs-elpa/blob - packages/test-simple/Makefile.am
Merge commit '0cda39255827f283e7578cd469ae42daad9556a2' from js2-mode
[gnu-emacs-elpa] / packages / test-simple / Makefile.am
1 # Note: This makefile include remake-style target comments.
2 # These comments before the targets start with #:
3 # remake --tasks to shows the targets and the comments
4
5 GIT2CL ?= git2cl
6 RUBY ?= ruby
7
8 lisp_files := $(wildcard *.el)
9 lisp_LISP = $(lisp_files)
10 test_files := $(wildcard test/*.el)
11
12 EXTRA_DIST = $(lisp_files) $(test_files) README THANKS README.md
13
14 CHECK_FILES = $(notdir $(test_files:.el=.run))
15
16
17 check: $(test-files)
18 $(MAKE) -C test check
19
20 README: README.textile
21 ln -s README.md README
22
23 PHONY=check check_copyrights clean dist distclean test check-short check-terse install-short
24
25 if MAINTAINER_MODE
26
27 ChangeLog:
28 git log --pretty --numstat --summary | $(GIT2CL) > $@
29
30 ACLOCAL_AMFLAGS=-I .
31
32 endif
33
34 #: Run all tests
35 test: check
36
37 check-short:
38 $(MAKE) -C test check 2>&1 | ruby make-check-filter.rb
39
40 #: Run all tests without and show just the failure lines
41 check-terse:
42 $(MAKE) check 2>&1 | $(RUBY) make-check-filter.rb | grep failure
43
44 #: Run "make install"
45 install-short:
46 $(MAKE) install 2>&1 | $(RUBY) make-check-filter.rb
47
48 CR_EXCEPTIONS=copyright_exceptions
49 #: Check for GNU Copyrights.
50 check_copyrights:
51 @echo "Compute exceptions >$(CR_EXCEPTIONS)~"
52 @export LANG=C; \
53 find . -name '.git' -prune -o -name '*.el' -print0 | \
54 xargs -0 grep -L 'Free Software Foundation, Inc' | \
55 grep -v '\(\.dir-locals\|.-\(pkg\|autoloads\)\)\.el$$'; \
56 find . -name '.git' -prune -o -name '*.el' -print | \
57 while read f; do \
58 fquoted="$$(echo $$f|tr '|' '_')"; \
59 sed -n -e '/[Cc]opyright.*, *[1-9][-0-9]*,\?$$/N' \
60 -e '/Free Software Foundation/d' \
61 -e "s|^\\(.*[Cc]opyright\\)|$$fquoted:\\1|p" \
62 "$$f"; \
63 done | sort >$(CR_EXCEPTIONS)~
64 diff -u "$(CR_EXCEPTIONS)" "$(CR_EXCEPTIONS)~"