]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/Makefile.in
ICU-551.41.tar.gz
[apple/icu.git] / icuSources / test / Makefile.in
CommitLineData
b75a7d8f 1## Makefile.in for ICU tests
57a6839d 2## Copyright (c) 1999-2014, International Business Machines Corporation and
b75a7d8f
A
3## others. All Rights Reserved.
4
5## Source directory information
6srcdir = @srcdir@
7top_srcdir = @top_srcdir@
8
9top_builddir = ..
10
11include $(top_builddir)/icudefs.mk
12
b75a7d8f
A
13## Build directory information
14subdir = test
15
374ca955 16@ICUIO_TRUE@IOTEST = iotest
b331163b
A
17
18# the letest directory depends on layoutex.
19# If you have layoutex but not layout, you will be using
20# harfbuzz.
21@LAYOUTEX_TRUE@LETEST = letest
57a6839d
A
22
23# status dir
24STATUS_TMP = tmp
25STATUS_FULL = $(shell pwd)/$(STATUS_TMP)
374ca955 26
b75a7d8f 27## Files to remove for 'make clean'
57a6839d 28CLEANFILES = *~ $(STATUS_TMP)
b75a7d8f 29
57a6839d 30SUBDIRS = testdata intltest $(IOTEST) cintltst $(LETEST)
b75a7d8f
A
31
32## List of phony targets
33.PHONY : everything all all-local all-recursive install install-local \
34install-recursive clean clean-local clean-recursive distclean \
35distclean-local distclean-recursive dist dist-recursive dist-local \
4388f060
A
36check check-recursive check-local xcheck xcheck-recursive xcheck-local \
37check-exhaustive check-exhaustive-recursive
b75a7d8f
A
38
39## Clear suffix list
40.SUFFIXES :
41
42## List of standard targets
43everything: all-recursive all-local
44all:
45ifneq ($(RECURSIVE),YES)
46 @echo simply use \`make\' \(or \`make everything\'\) to do all
47endif
48
49install: install-recursive install-local
50clean: clean-recursive clean-local
51distclean : distclean-recursive distclean-local
374ca955 52 $(RMV) hdrtst/Makefile
46f4442e 53 $(RMV) perf/convperf/Makefile
57a6839d 54 $(RMV) $(STATUS_TMP)
374ca955 55
b75a7d8f
A
56dist: dist-recursive dist-local
57check: everything check-recursive check-local
374ca955 58check-recursive: all-recursive
729e4ab9
A
59# the xcheck targets create a ../test-*.xml file in JUnit format.
60xcheck: everything xcheck-recursive xcheck-local
61xcheck-recursive: all-recursive
4388f060 62check-exhaustive: everything check-exhaustive-recursive check-local
b75a7d8f
A
63
64## Recursive targets
46f4442e 65all-recursive install-recursive clean-recursive distclean-recursive dist-recursive:
b75a7d8f
A
66 @dot_seen=no; \
67 target=`echo $@ | sed s/-recursive//`; \
68 list='$(SUBDIRS)'; for subdir in $$list; do \
69 echo "$(MAKE)[$(MAKELEVEL)]: Making \`$$target' in \`$$subdir'"; \
70 if test "$$subdir" = "."; then \
71 dot_seen=yes; \
72 local_target="$$target-local"; \
73 else \
74 local_target="$$target"; \
75 fi; \
76 (cd $$subdir && $(MAKE) $$local_target) || exit; \
77 done; \
78 if test "$$dot_seen" = "no"; then \
79 $(MAKE) "$$target-local" || exit; \
80 fi
81
4388f060 82xcheck-recursive check-recursive check-exhaustive-recursive:
57a6839d
A
83 @$(MKINSTALLDIRS) $(STATUS_TMP)
84 @mystatus=$(STATUS_FULL)/status.$$$$.deleteme ; \
85 $(RMV) "$$mystatus".* ; \
46f4442e
A
86 @goods=; \
87 bads=; \
88 target=`echo $@ | sed s/-recursive//`; \
89 list='$(SUBDIRS)'; for subdir in $$list; do \
90 echo "$(MAKE)[$(MAKELEVEL)]: Making \`$$target' in \`$$subdir'"; \
91 local_target="$$target"; \
57a6839d 92 if (cd $$subdir && $(MAKE) $$local_target TEST_STATUS_FILE="$$mystatus.$$subdir" ); then \
46f4442e
A
93 goods="$$goods $$subdir"; \
94 else \
95 bads="$$bads $$subdir"; \
96 fi; \
97 done; \
57a6839d
A
98 for subdir in $$list; do \
99 if [ -f "$$mystatus.$$subdir" ]; then \
100 echo "-------------" ; \
101 echo "| *** FAILING TEST SUMMARY FOR: $$subdir " ; \
102 cat "$$mystatus.$$subdir" ; \
103 echo "| *** END FAILING TEST SUMMARY FOR: $$subdir" ; \
104 $(RMV) "$$mystatus.$$subdir" ; \
105 fi; \
106 done; \
46f4442e
A
107 echo "---------------"; \
108 echo "ALL TESTS SUMMARY:"; \
109 if test ! "x$$bads" = "x"; then \
110 echo "ok: $$goods"; \
111 echo "===== ERRS: $$bads"; exit 1; \
112 else \
113 echo "All tests OK: $$goods"; \
114 fi
115
57a6839d
A
116# pcheck = parallel check. We don't care about the output interleaving,
117# just run it as fast as possible.
118# todo would be to merge this code into the above non-parallel check.
119STATUS_NUM:=$(shell echo $$$$)
120MYSTATUS_R=$(STATUS_FULL)/status.$(STATUS_NUM).deleteme
121STATUS_FILES=$(SUBDIRS:%=$(MYSTATUS_R).%)
122
123pcheck_setup: testdata
124 @$(MKINSTALLDIRS) $(STATUS_TMP)
125 $(RMV) "$(MYSTATUS_R)".*
126 @echo Beginning parallel make. Output may be interleaved!
127
128$(STATUS_FULL)/status.$(STATUS_NUM).deleteme.%: pcheck_setup
129 -@$(MAKE) -C $* TEST_STATUS_FILE=$@ check || ( echo "FAILED: $* (other tests may still be running..)" ; touch $@ ; cp $@ $@.FAIL ; false )
130 -@[ ! -f $@.FAIL ] && touch $@.PASS && echo "PASSED: $* (other tests may still be running..)"
131 -@touch $@
132
133# print out status
134pcheck: $(STATUS_FILES)
135 @goods= ; \
136 bads= ; \
137 echo "----------------------------------------"; \
138 for subdir in $(SUBDIRS); do \
139 if [ -s "$(MYSTATUS_R).$$subdir" ]; then \
140 echo "-------------" ; \
141 echo "| *** FAILING TEST SUMMARY FOR: $$subdir " ; \
142 cat "$(MYSTATUS_R).$$subdir" ; \
143 echo "| *** END FAILING TEST SUMMARY FOR: $$subdir" ; \
144 $(RMV) "$(MYSTATUS_R).$$subdir" ; \
145 fi; \
146 done; \
147 for subdir in $(SUBDIRS); do \
148 if [ -f "$(MYSTATUS_R).$$subdir.FAIL" ]; \
149 then \
150 bads="$$bads $$subdir" ; \
151 elif [ -f "$(MYSTATUS_R).$$subdir.PASS" ]; \
152 then \
153 goods="$$goods $$subdir" ; \
154 else \
155 echo "*** subtest did not complete - $$subdir" ; \
156 bads="$$bads $$subdir" ; \
157 fi ; \
158 done ; \
159 echo "ALL TESTS SUMMARY:"; \
160 if test ! "x$$bads" = "x"; then \
161 echo "(to get non-interleaved err output, use \"$(MAKE) check\" instead.)" ; \
162 echo "ok: $$goods"; \
163 echo "===== ERRS: $$bads"; exit 1; \
164 else \
165 echo "All tests OK: $$goods"; \
166 fi
167 -@$(RMV) "$(MYSTATUS_R)".*
168
b75a7d8f
A
169all-local:
170
171install-local:
172
173dist-local:
174
175clean-local:
176 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
177
178distclean-local: clean-local
179 $(RMV) Makefile
180
729e4ab9 181xcheck-local check-local: all-local
b75a7d8f
A
182
183Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
184 cd $(top_builddir) \
185 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
186