Merge remote-tracking branch 'origin/master' into for-steve
[sxemacs] / tests / Makefile.am
1 ## This file is part of SXEmacs.
2
3 ## Redistribution and use in source and binary forms, with or without
4 ## modification, are permitted provided that the following conditions
5 ## are met:
6 ##
7 ## 1. Redistributions of source code must retain the above copyright
8 ##    notice, this list of conditions and the following disclaimer.
9 ##
10 ## 2. Redistributions in binary form must reproduce the above copyright
11 ##    notice, this list of conditions and the following disclaimer in the
12 ##    documentation and/or other materials provided with the distribution.
13 ##
14 ## 3. Neither the name of the author nor the names of any contributors
15 ##    may be used to endorse or promote products derived from this
16 ##    software without specific prior written permission.
17 ##
18 ## THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
19 ## IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 ## WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 ## DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 ## FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 ## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 ## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
25 ## BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 ## WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
27 ## OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
28 ## IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
30 ## Process this file with automake to produce Makefile.in
31
32 # Help the Developers and yourself. Just use the C locale and settings
33 # for the compilation. They can still be overriden by make LANG=<whatever>
34 # but that is general a not very good idea
35 LANG=C
36 LC_ALL=C
37
38 sxesrcdir = $(top_srcdir)/src
39 bldsrcdir = $(top_builddir)/src
40 sxelwlibdir = $(top_srcdir)/src/ui/lwlib
41 bldlwlibdir = $(top_builddir)/src/ui/lwlib
42
43 misc_tests = frame.el glyph-test.el gutter-test.el                      \
44         redisplay-tests.el reproduce-bugs.el
45 mule_tests = mule/match.el
46 DLL_tests = DLL/dltest.c
47 automated_tests = automated/ase-cartesian-tests.el                      \
48         automated/ase-digraph-tests.el automated/ase-heap-tests.el      \
49         automated/ase-interval-tests.el automated/ase-metric-tests.el   \
50         automated/ase-neighbourhood-tests.el                            \
51         automated/ase-permutation-tests.el                              \
52         automated/ase-reclass-tests.el automated/base64-tests.el        \
53         automated/bloom-tests.el automated/byte-compiler-tests.el       \
54         automated/case-tests.el automated/ccl-tests.el                  \
55         automated/cl-loop-tests.el automated/c-tests.el                 \
56         automated/database-tests.el automated/ent-tests.el              \
57         automated/extent-tests.el automated/hash-table-tests.el         \
58         automated/inplace-tests.el automated/lisp-reader-tests.el       \
59         automated/lisp-tests.el automated/md5-tests.el                  \
60         automated/mule-tests.el automated/openssl-tests.el              \
61         automated/os-tests.el automated/regexp-tests.el                 \
62         automated/region-tests.el automated/skiplist-tests.el           \
63         automated/symbol-tests.el automated/syntax-tests.el             \
64         automated/tag-tests.el automated/test-harness.el                \
65         automated/weak-tests.el automated/README
66
67 EXTRA_DIST = $(misc_tests) $(mule_tests)                \
68         $(DLL_tests) $(automated_tests)
69
70 CLEANFILES = stage1 stage2
71
72
73 SXE_DYLD_PATH = $(bldsrcdir):$(bldsrcdir)/$(LT_OBJDIR):$(bldlwlibdir):$(bldlwlibdir)/$(LT_OBJDIR):$(DESTDIR)$(libdir)
74 BATCHENV = DYLD_LIBRARY_PATH=$(SXE_DYLD_PATH):$$DYLD_LIBRARY_PATH:$(DYLD_LIBRARY_PATH) \
75         LD_LIBRARY_PATH=$(SXE_DYLD_PATH):$$LD_LIBRARY_PATH:$(LD_LIBRARY_PATH) \
76         SHLIB_PATH=$(SXE_DYLD_PATH):$$SHLIB_PATH:$(SHLIB_PATH)
77 ### Produces strange banner
78 SXEMACS = $(bldsrcdir)/sxemacs
79 SXEDMP = $(SXEMACS).dmp
80 testdir = $(srcdir)
81 testautomdir = $(testdir)/automated
82 tests_environment = $(BATCHENV) \
83         $(SXEMACS) -batch -l ${testautomdir}/test-harness.el \
84                 -f batch-test-emacs $(testautomdir)
85
86 ## Use our former check target
87 check-am: $(SXEMACS) $(SXEDMP)
88         $(tests_environment)
89
90 check-formats: $(SXEMACS) $(SXEDMP)
91         $(BATCHENV) $(SXEMACS) -l ${testautomdir}/test-harness.el \
92         -f batch-test-emacs $(testautomdir)/format-tests.el
93
94 check-map: $(SXEMACS) $(SXEDMP)
95         $(BATCHENV) $(SXEMACS) -l ${testautomdir}/test-harness.el \
96         -f batch-test-emacs $(testautomdir)/map-tests.el
97
98 check-skiplists: $(SXEMACS) $(SXEDMP)
99         $(BATCHENV) $(SXEMACS) -l ${testautomdir}/test-harness.el \
100         -f batch-test-emacs $(testautomdir)/skiplist-tests.el
101
102 check-%: $(SXEMACS) $(SXEDMP)
103         $(BATCHENV) $(SXEMACS) -l ${testautomdir}/test-harness.el \
104         -f batch-test-emacs $(testautomdir)/$*-tests.el
105
106
107 .PHONY: stage1 stage2
108 stage1:
109         @echo
110         @echo "$@ in progress ..."
111         @$(RECURSE)
112         @echo "$@ finished"
113
114 stage2: stage1
115         @echo
116         @echo "$@ in progress ..."
117         @$(RECURSE)
118         @echo "$@ finished"
119
120 ### dont use staged build
121 ##all: stage1 stage2