xref: /openbmc/openbmc/poky/meta/recipes-support/libpcre/libpcre/Makefile (revision c124f4f2e04dca16a428a76c89677328bc7bf908)
1TESTS = pcre_stringpiece_unittest RunTest RunGrepTest
2subdir = .
3am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
4am__vpath_adj = case $$p in \
5    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
6    *) f=$$p;; \
7  esac;
8am__tty_colors_dummy = \
9  mgn= red= grn= lgn= blu= brg= std=; \
10  am__color_tests=no
11am__tty_colors = { \
12  $(am__tty_colors_dummy); \
13  if test "X$(AM_COLOR_TESTS)" = Xno; then \
14    am__color_tests=no; \
15  elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
16    am__color_tests=yes; \
17  elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
18    am__color_tests=yes; \
19  fi; \
20  if test $$am__color_tests = yes; then \
21    red=''; \
22    grn=''; \
23    lgn=''; \
24    blu=''; \
25    mgn=''; \
26    brg=''; \
27    std=''; \
28  fi; \
29}
30am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
31am__sh_e_setup = case $$- in *e*) set +e;; esac
32am__common_driver_flags = \
33  --color-tests "$$am__color_tests" \
34  --enable-hard-errors "$$am__enable_hard_errors" \
35  --expect-failure "$$am__expect_failure"
36am__check_pre = \
37$(am__sh_e_setup); \
38$(am__vpath_adj_setup) $(am__vpath_adj) \
39$(am__tty_colors); \
40srcdir=$(srcdir); export srcdir; \
41case "$@" in \
42  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
43    *) am__odir=.;; \
44esac; \
45test "x$$am__odir" = x"." || test -d "$$am__odir" \
46  || $(MKDIR_P) "$$am__odir" || exit $$?; \
47if test -f "./$$f"; then dir=./; \
48elif test -f "$$f"; then dir=; \
49else dir="$(srcdir)/"; fi; \
50tst=$$dir$$f; log='$@'; \
51if test -n '$(DISABLE_HARD_ERRORS)'; then \
52  am__enable_hard_errors=no; \
53else \
54  am__enable_hard_errors=yes; \
55fi;
56am__set_TESTS_bases = \
57  bases='$(TEST_LOGS)'; \
58  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
59  bases=`echo $$bases`
60RECHECK_LOGS = $(TEST_LOGS)
61TEST_SUITE_LOG = test-suite.log
62TEST_EXTENSIONS =  .test
63LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
64am__test_logs1 = $(TESTS:=.log)
65am__test_logs2 = $(am__test_logs1:.log=.log)
66TEST_LOGS = $(am__test_logs2:.test.log=.log)
67MKDIR_P = /bin/mkdir -p
68PACKAGE_STRING = PCRE 8.36
69SHELL = /bin/sh
70srcdir = .
71top_srcdir = .
72$(TEST_SUITE_LOG): $(TEST_LOGS)
73	@$(am__set_TESTS_bases); \
74	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
75	redo_bases=`for i in $$bases; do \
76	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
77	            done`; \
78	st=0;  \
79	errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
80	for i in $$redo_bases; do \
81	  test -f $$i.trs && test -r $$i.trs \
82	    || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
83	  test -f $$i.log && test -r $$i.log \
84	    || { echo "$$errmsg $$i.log" >&2; st=1; }; \
85	done; \
86	test $$st -eq 0 || exit 1;
87	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
88	ws='[ 	]'; \
89	results=`for b in $$bases; do echo $$b.trs; done`; \
90	test -n "$$results" || results=/dev/null; \
91	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
92	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
93	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
94	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
95	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
96	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
97	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
98	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
99	  success=true; \
100	else \
101	  success=false; \
102	fi; \
103	br='==================='; br=$$br$$br$$br$$br; \
104	result_count () \
105	{ \
106	    if test x"$$1" = x"--maybe-color"; then \
107	      maybe_colorize=yes; \
108	    elif test x"$$1" = x"--no-color"; then \
109	      maybe_colorize=no; \
110	    else \
111	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
112	    fi; \
113	    shift; \
114	    desc=$$1 count=$$2; \
115	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
116	      color_start=$$3 color_end=$$std; \
117	    else \
118	      color_start= color_end=; \
119	    fi; \
120	    echo "$${color_start}# $$desc $$count$${color_end}"; \
121	}; \
122	create_testsuite_report () \
123	{ \
124	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
125	  result_count $$1 "PASS: " $$pass  "$$grn"; \
126	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
127	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
128	  result_count $$1 "FAIL: " $$fail  "$$red"; \
129	  result_count $$1 "XPASS:" $$xpass "$$red"; \
130	  result_count $$1 "ERROR:" $$error "$$mgn"; \
131	}; \
132	{								\
133	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
134	    $(am__rst_title);						\
135	  create_testsuite_report --no-color;				\
136	  echo;								\
137	  echo ".. contents:: :depth: 2";				\
138	  echo;								\
139	  for b in $$bases; do echo $$b; done;				\
140	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
141	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
142	if $$success; then						\
143	  col="$$grn";							\
144	 else								\
145	  col="$$red";							\
146	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
147	fi;								\
148	echo "$${col}$$br$${std}"; 					\
149	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
150	echo "$${col}$$br$${std}"; 					\
151	create_testsuite_report --maybe-color;				\
152	echo "$$col$$br$$std";						\
153	if $$success; then :; else					\
154	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
155	  echo "$$col$$br$$std";					\
156	fi;								\
157	$$success || exit 1
158check-TESTS:
159	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
160	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
161	@set +e; $(am__set_TESTS_bases); \
162	log_list=`for i in $$bases; do echo $$i.log; done`; \
163	log_list=`echo $$log_list`; \
164	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
165	exit $$?;
166pcre_stringpiece_unittest.log: pcre_stringpiece_unittest$(EXEEXT)
167	@p='pcre_stringpiece_unittest$(EXEEXT)'; \
168	b='pcre_stringpiece_unittest'; \
169	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
170	--log-file $$b.log --trs-file $$b.trs \
171	$(am__common_driver_flags) -- "$$tst"
172RunTest.log: RunTest
173	@p='RunTest'; \
174	b='RunTest'; \
175	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
176	--log-file $$b.log --trs-file $$b.trs \
177	$(am__common_driver_flags) -- "$$tst"
178RunGrepTest.log: RunGrepTest
179	@p='RunGrepTest'; \
180	b='RunGrepTest'; \
181	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
182	--log-file $$b.log --trs-file $$b.trs \
183	$(am__common_driver_flags) -- "$$tst"
184