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