1 ## Process this file with automake to produce Makefile.in.
3 AUTOMAKE_OPTIONS = foreign
5 # May be used by various substitution variables.
6 gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
8 EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \
9 echo $(top_builddir)/../expect/expect; else echo expect; fi)
11 _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
12 echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
13 RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
15 # Instead of directly in ../testsuite/libgomp-test-support.exp.in, the
16 # following variables have to be "routed through" this Makefile, for expansion
17 # of the several (Makefile) variables used therein.
18 libgomp-test-support.exp: libgomp-test-support.pt.exp Makefile
21 'set offload_additional_options "$(offload_additional_options)"'
23 'set offload_additional_lib_paths "$(offload_additional_lib_paths)"'
26 check-DEJAGNU: site.exp
27 srcdir='$(srcdir)'; export srcdir; \
28 EXPECT=$(EXPECT); export EXPECT; \
29 if $(SHELL) -c "$(_RUNTEST) --version" > /dev/null 2>&1; then \
30 exit_status=0; l='$(PACKAGE)'; for tool in $$l; do \
31 if $(_RUNTEST) $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
32 then :; else exit_status=1; fi; \
34 else echo "WARNING: could not find '$(_RUNTEST)'" 1>&2; :;\
37 site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
38 @echo 'Making a new site.exp file ...'
39 @echo '## these variables are automatically generated by make ##' >site.tmp
40 @echo '# Do not edit here. If you wish to override these values' >>site.tmp
41 @echo '# edit the last section' >>site.tmp
42 @echo 'set srcdir "$(srcdir)"' >>site.tmp
43 @echo "set objdir `pwd`" >>site.tmp
44 @echo 'set build_alias "$(build_alias)"' >>site.tmp
45 @echo 'set build_triplet $(build_triplet)' >>site.tmp
46 @echo 'set host_alias "$(host_alias)"' >>site.tmp
47 @echo 'set host_triplet $(host_triplet)' >>site.tmp
48 @echo 'set target_alias "$(target_alias)"' >>site.tmp
49 @echo 'set target_triplet $(target_triplet)' >>site.tmp
50 @list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \
51 echo "## Begin content included from file $$f. Do not modify. ##" \
52 && cat `test -f "$$f" || echo '$(srcdir)/'`$$f \
53 && echo "## End content included from file $$f. ##" \
56 @echo "## End of auto-generated content; you can edit from here. ##" >> site.tmp
57 @if test -f site.exp; then \
58 sed -e '1,/^## End of auto-generated content.*##/d' site.exp >> site.tmp; \
61 @test ! -f site.exp || mv site.exp site.bak
65 -rm -f site.exp site.bak
66 -l='$(PACKAGE)'; for tool in $$l; do \
67 rm -f $$tool.sum $$tool.log; \
69 distclean-am: distclean-DEJAGNU
71 @if test -n "$(filter -j%, $(MFLAGS))"; then \
73 if type -p getconf 2>/dev/null >/dev/null; then \
74 num_cpus=`getconf _NPROCESSORS_ONLN 2>/dev/null`; \
75 case "$$num_cpus" in \
76 '' | 0* | *[!0-9]*) num_cpus=1;; \
79 if test $$num_cpus -gt 8 && test -z "$$OMP_NUM_THREADS"; then \
80 OMP_NUM_THREADS=8; export OMP_NUM_THREADS; \
81 echo @@@ libgomp OMP_NUM_THREADS adjusted to 8 because of parallel make check and too many CPUs; \
84 $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
85 all-local: libgomp-test-support.exp
87 .PHONY: check-DEJAGNU distclean-DEJAGNU