annotate test/automated/Makefile.in @ 112381:75fec4affb13

aclocal.m4: omit auto-generated file from repository
author Paul Eggert <eggert@cs.ucla.edu>
date Wed, 19 Jan 2011 21:00:40 -0800
parents c5917804ecad
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
112201
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
1 # Maintenance productions for the automated test directory
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
2 # Copyright (C) 2010, 2011 Free Software Foundation, Inc.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
3
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
4 # This file is part of GNU Emacs.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
5
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
6 # GNU Emacs is free software: you can redistribute it and/or modify
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
7 # it under the terms of the GNU General Public License as published by
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
8 # the Free Software Foundation, either version 3 of the License, or
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
9 # (at your option) any later version.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
10
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
11 # GNU Emacs is distributed in the hope that it will be useful,
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
14 # GNU General Public License for more details.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
15
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
16 # You should have received a copy of the GNU General Public License
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
17 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
18
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
19 SHELL = /bin/sh
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
20
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
21 srcdir = @srcdir@
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
22 top_srcdir = @top_srcdir@
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
23 abs_top_builddir = @abs_top_builddir@
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
24 test = $(srcdir)
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
25 VPATH = $(srcdir)
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
26 lispsrc = $(top_srcdir)/lisp
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
27 lisp = ${abs_top_builddir}/lisp
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
28
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
29 # You can specify a different executable on the make command line,
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
30 # e.g. "make EMACS=../src/emacs ...".
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
31
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
32 # We sometimes change directory before running Emacs (typically when
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
33 # building out-of-tree, we chdir to the source directory), so we need
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
34 # to use an absolute file name.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
35 EMACS = ${abs_top_builddir}/src/emacs
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
36
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
37 # Command line flags for Emacs.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
38
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
39 EMACSOPT = -batch --no-site-file --no-site-lisp
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
40
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
41 # Extra flags to pass to the byte compiler
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
42 BYTE_COMPILE_EXTRA_FLAGS =
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
43 # For example to not display the undefined function warnings you can use this:
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
44 # BYTE_COMPILE_EXTRA_FLAGS = --eval '(setq byte-compile-warnings (quote (not unresolved)))'
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
45 # The example above is just for developers, it should not be used by default.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
46
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
47 # The actual Emacs command run in the targets below.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
48 emacs = EMACSLOADPATH=$(lispsrc):$(test) LC_ALL=C $(EMACS) $(EMACSOPT)
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
49
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
50 # Common command to find subdirectories
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
51 setwins=subdirs=`(find . -type d -print)`; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
52 for file in $$subdirs; do \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
53 case $$file in */.* | */.*/* | */=* ) ;; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
54 *) wins="$$wins $$file" ;; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
55 esac; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
56 done
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
57
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
58 all: test
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
59
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
60 doit:
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
61
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
62
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
63 # Files MUST be compiled one by one. If we compile several files in a
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
64 # row (i.e., in the same instance of Emacs) we can't make sure that
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
65 # the compilation environment is clean. We also set the load-path of
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
66 # the Emacs used for compilation to the current directory and its
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
67 # subdirectories, to make sure require's and load's in the files being
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
68 # compiled find the right files.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
69
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
70 .SUFFIXES: .elc .el
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
71
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
72 # An old-fashioned suffix rule, which, according to the GNU Make manual,
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
73 # cannot have prerequisites.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
74 .el.elc:
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
75 @echo Compiling $<
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
76 @$(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $<
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
77
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
78 .PHONY: lisp-compile compile-main compile compile-always
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
79
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
80 lisp-compile:
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
81 cd $(lisp); $(MAKE) $(MFLAGS) compile EMACS=$(EMACS)
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
82
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
83 # In `compile-main' we could directly do
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
84 # ... | xargs $(MAKE) $(MFLAGS) EMACS="$(EMACS)"
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
85 # and it works, but it generates a lot of messages like
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
86 # make[2]: « gnus/gnus-mlspl.elc » is up to date.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
87 # so instead, we use "xargs echo" to split the list of file into manageable
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
88 # chunks and then use an intermediate `compile-targets' target so the
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
89 # actual targets (the .elc files) are not mentioned as targets on the
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
90 # make command line.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
91
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
92
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
93 .PHONY: compile-targets
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
94 # TARGETS is set dynamically in the recursive call from `compile-main'.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
95 compile-targets: $(TARGETS)
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
96
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
97 # Compile all the Elisp files that need it. Beware: it approximates
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
98 # `no-byte-compile', so watch out for false-positives!
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
99 compile-main: compile-clean lisp-compile
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
100 @(cd $(test); $(setwins); \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
101 els=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
102 for el in $$els; do \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
103 test -f $$el || continue; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
104 test ! -f $${el}c && GREP_OPTIONS= grep '^;.*no-byte-compile: t' $$el > /dev/null && continue; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
105 echo "$${el}c"; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
106 done | xargs echo) | \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
107 while read chunk; do \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
108 $(MAKE) $(MFLAGS) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
109 done
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
110
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
111 .PHONY: compile-clean
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
112 # Erase left-over .elc files that do not have a corresponding .el file.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
113 compile-clean:
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
114 @cd $(test); $(setwins); \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
115 elcs=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.elc |g'`; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
116 for el in $$(echo $$elcs | sed -e 's/\.elc/\.el/g'); do \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
117 if test -f "$$el" -o \! -f "$${el}c"; then :; else \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
118 echo rm "$${el}c"; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
119 rm "$${el}c"; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
120 fi \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
121 done
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
122
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
123 # Compile all Lisp files, but don't recompile those that are up to
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
124 # date. Some .el files don't get compiled because they set the
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
125 # local variable no-byte-compile.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
126 # Calling make recursively because suffix rule cannot have prerequisites.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
127 # Explicitly pass EMACS (sometimes ../src/bootstrap-emacs) to those
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
128 # sub-makes that run rules that use it, for the sake of some non-GNU makes.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
129 compile: $(LOADDEFS) autoloads compile-first
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
130 $(MAKE) $(MFLAGS) compile-main EMACS=$(EMACS)
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
131
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
132 # Compile all Lisp files. This is like `compile' but compiles files
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
133 # unconditionally. Some files don't actually get compiled because they
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
134 # set the local variable no-byte-compile.
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
135 compile-always: doit
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
136 cd $(test); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
137 $(MAKE) $(MFLAGS) compile EMACS=$(EMACS)
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
138
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
139 bootstrap-clean:
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
140 cd $(test); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
141
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
142 distclean:
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
143 -rm -f ./Makefile
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
144
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
145 maintainer-clean: distclean bootstrap-clean
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
146
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
147 check: compile-main
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
148 @(cd $(test); $(setwins); \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
149 pattern=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
150 for el in $$pattern; do \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
151 test -f $$el || continue; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
152 args="$$args -l $$el"; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
153 els="$$els $$el"; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
154 done; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
155 echo Testing $$els; \
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
156 $(emacs) $$args -f ert-run-tests-batch-and-exit)
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
157
c5917804ecad Add ERT, a tool for automated testing in Emacs Lisp.
Christian Ohler <ohler@gnu.org>
parents:
diff changeset
158 # Makefile ends here.