michael@0: ## Makefile.in for ICU tests michael@0: ## Copyright (c) 1999-2013, International Business Machines Corporation and michael@0: ## others. All Rights Reserved. michael@0: michael@0: ## Source directory information michael@0: srcdir = @srcdir@ michael@0: top_srcdir = @top_srcdir@ michael@0: michael@0: top_builddir = .. michael@0: michael@0: include $(top_builddir)/icudefs.mk michael@0: michael@0: ## Build directory information michael@0: subdir = test michael@0: michael@0: @ICUIO_TRUE@IOTEST = iotest michael@0: michael@0: # status dir michael@0: STATUS_TMP = tmp michael@0: STATUS_FULL = $(shell pwd)/$(STATUS_TMP) michael@0: michael@0: ## Files to remove for 'make clean' michael@0: CLEANFILES = *~ $(STATUS_TMP) michael@0: michael@0: SUBDIRS = testdata intltest $(IOTEST) cintltst michael@0: michael@0: ## List of phony targets michael@0: .PHONY : everything all all-local all-recursive install install-local \ michael@0: install-recursive clean clean-local clean-recursive distclean \ michael@0: distclean-local distclean-recursive dist dist-recursive dist-local \ michael@0: check check-recursive check-local xcheck xcheck-recursive xcheck-local \ michael@0: check-exhaustive check-exhaustive-recursive michael@0: michael@0: ## Clear suffix list michael@0: .SUFFIXES : michael@0: michael@0: ## List of standard targets michael@0: everything: all-recursive all-local michael@0: all: michael@0: ifneq ($(RECURSIVE),YES) michael@0: @echo simply use \`make\' \(or \`make everything\'\) to do all michael@0: endif michael@0: michael@0: install: install-recursive install-local michael@0: clean: clean-recursive clean-local michael@0: distclean : distclean-recursive distclean-local michael@0: $(RMV) hdrtst/Makefile michael@0: $(RMV) perf/convperf/Makefile michael@0: $(RMV) $(STATUS_TMP) michael@0: michael@0: dist: dist-recursive dist-local michael@0: check: everything check-recursive check-local michael@0: check-recursive: all-recursive michael@0: # the xcheck targets create a ../test-*.xml file in JUnit format. michael@0: xcheck: everything xcheck-recursive xcheck-local michael@0: xcheck-recursive: all-recursive michael@0: check-exhaustive: everything check-exhaustive-recursive check-local michael@0: michael@0: ## Recursive targets michael@0: all-recursive install-recursive clean-recursive distclean-recursive dist-recursive: michael@0: @dot_seen=no; \ michael@0: target=`echo $@ | sed s/-recursive//`; \ michael@0: list='$(SUBDIRS)'; for subdir in $$list; do \ michael@0: echo "$(MAKE)[$(MAKELEVEL)]: Making \`$$target' in \`$$subdir'"; \ michael@0: if test "$$subdir" = "."; then \ michael@0: dot_seen=yes; \ michael@0: local_target="$$target-local"; \ michael@0: else \ michael@0: local_target="$$target"; \ michael@0: fi; \ michael@0: (cd $$subdir && $(MAKE) $$local_target) || exit; \ michael@0: done; \ michael@0: if test "$$dot_seen" = "no"; then \ michael@0: $(MAKE) "$$target-local" || exit; \ michael@0: fi michael@0: michael@0: xcheck-recursive check-recursive check-exhaustive-recursive: michael@0: @$(MKINSTALLDIRS) $(STATUS_TMP) michael@0: @mystatus=$(STATUS_FULL)/status.$$$$.deleteme ; \ michael@0: $(RMV) "$$mystatus".* ; \ michael@0: @goods=; \ michael@0: bads=; \ michael@0: target=`echo $@ | sed s/-recursive//`; \ michael@0: list='$(SUBDIRS)'; for subdir in $$list; do \ michael@0: echo "$(MAKE)[$(MAKELEVEL)]: Making \`$$target' in \`$$subdir'"; \ michael@0: local_target="$$target"; \ michael@0: if (cd $$subdir && $(MAKE) $$local_target TEST_STATUS_FILE="$$mystatus.$$subdir" ); then \ michael@0: goods="$$goods $$subdir"; \ michael@0: else \ michael@0: bads="$$bads $$subdir"; \ michael@0: fi; \ michael@0: done; \ michael@0: for subdir in $$list; do \ michael@0: if [ -f "$$mystatus.$$subdir" ]; then \ michael@0: echo "-------------" ; \ michael@0: echo "| *** FAILING TEST SUMMARY FOR: $$subdir " ; \ michael@0: cat "$$mystatus.$$subdir" ; \ michael@0: echo "| *** END FAILING TEST SUMMARY FOR: $$subdir" ; \ michael@0: $(RMV) "$$mystatus.$$subdir" ; \ michael@0: fi; \ michael@0: done; \ michael@0: echo "---------------"; \ michael@0: echo "ALL TESTS SUMMARY:"; \ michael@0: if test ! "x$$bads" = "x"; then \ michael@0: echo "ok: $$goods"; \ michael@0: echo "===== ERRS: $$bads"; exit 1; \ michael@0: else \ michael@0: echo "All tests OK: $$goods"; \ michael@0: fi michael@0: michael@0: # pcheck = parallel check. We don't care about the output interleaving, michael@0: # just run it as fast as possible. michael@0: # todo would be to merge this code into the above non-parallel check. michael@0: STATUS_NUM:=$(shell echo $$$$) michael@0: MYSTATUS_R=$(STATUS_FULL)/status.$(STATUS_NUM).deleteme michael@0: STATUS_FILES=$(SUBDIRS:%=$(MYSTATUS_R).%) michael@0: michael@0: pcheck_setup: testdata michael@0: @$(MKINSTALLDIRS) $(STATUS_TMP) michael@0: $(RMV) "$(MYSTATUS_R)".* michael@0: @echo Beginning parallel make. Output may be interleaved! michael@0: michael@0: $(STATUS_FULL)/status.$(STATUS_NUM).deleteme.%: pcheck_setup michael@0: @$(MAKE) -C $* TEST_STATUS_FILE=$@ check || ( echo "FAILED: $* (other tests may still be running..)" ; touch $@.FAIL ; false ) michael@0: -@touch $@.PASS michael@0: -@echo "PASSED: $* (other tests may still be running..)" michael@0: michael@0: # print out status michael@0: pcheck: $(STATUS_FILES) michael@0: @goods= ; \ michael@0: bads= ; \ michael@0: echo "---------------"; \ michael@0: for subdir in $(SUBDIRS); do \ michael@0: if [ -f "$(MYSTATUS_R).$$subdir.FAIL" ]; \ michael@0: then \ michael@0: bads="$$bads $$subdir" ; \ michael@0: elif [ -f "$(MYSTATUS_R).$$subdir.PASS" ]; \ michael@0: then \ michael@0: goods="$$goods $$subdir" ; \ michael@0: else \ michael@0: echo "*** subtest did not complete - $$subdir" ; \ michael@0: bads="$$bads $$subdir" ; \ michael@0: fi ; \ michael@0: done ; \ michael@0: echo "ALL TESTS SUMMARY:"; \ michael@0: if test ! "x$$bads" = "x"; then \ michael@0: echo "(to get non-interleaved err output, use \"$(MAKE) check\" instead.)" ; \ michael@0: echo "ok: $$goods"; \ michael@0: echo "===== ERRS: $$bads"; exit 1; \ michael@0: else \ michael@0: echo "All tests OK: $$goods"; \ michael@0: fi michael@0: -@$(RMV) "$(MYSTATUS_R)".* michael@0: michael@0: all-local: michael@0: michael@0: install-local: michael@0: michael@0: dist-local: michael@0: michael@0: clean-local: michael@0: test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) michael@0: michael@0: distclean-local: clean-local michael@0: $(RMV) Makefile michael@0: michael@0: xcheck-local check-local: all-local michael@0: michael@0: Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status michael@0: cd $(top_builddir) \ michael@0: && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status michael@0: