0
|
1 ## Process this file with automake to produce Makefile.in.
|
|
2
|
145
|
3 AUTOMAKE_OPTIONS = foreign
|
0
|
4
|
|
5 # May be used by various substitution variables.
|
111
|
6 gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
|
0
|
7
|
|
8 EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \
|
|
9 echo $(top_builddir)/../expect/expect; else echo expect; fi)
|
|
10
|
|
11 _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
|
|
12 echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
|
145
|
13 RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
|
111
|
14
|
|
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
|
|
19 cp $< $@.tmp
|
|
20 echo >> $@.tmp \
|
|
21 'set offload_additional_options "$(offload_additional_options)"'
|
|
22 echo >> $@.tmp \
|
|
23 'set offload_additional_lib_paths "$(offload_additional_lib_paths)"'
|
|
24 mv $@.tmp $@
|
|
25
|
145
|
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; \
|
|
33 done; \
|
|
34 else echo "WARNING: could not find '$(_RUNTEST)'" 1>&2; :;\
|
|
35 fi; \
|
|
36 exit $$exit_status
|
|
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. ##" \
|
|
54 || exit 1; \
|
|
55 done >> site.tmp
|
|
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; \
|
|
59 fi
|
|
60 @-rm -f site.bak
|
|
61 @test ! -f site.exp || mv site.exp site.bak
|
|
62 @mv site.tmp site.exp
|
|
63
|
|
64 distclean-DEJAGNU:
|
|
65 -rm -f site.exp site.bak
|
|
66 -l='$(PACKAGE)'; for tool in $$l; do \
|
|
67 rm -f $$tool.sum $$tool.log; \
|
|
68 done
|
|
69 distclean-am: distclean-DEJAGNU
|
|
70 check-am:
|
|
71 @if test -n "$(filter -j%, $(MFLAGS))"; then \
|
|
72 num_cpus=@CPU_COUNT@; \
|
|
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=@CPU_COUNT@;; \
|
|
77 esac; \
|
|
78 fi; \
|
|
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; \
|
|
82 fi; \
|
|
83 fi; \
|
|
84 $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
|
111
|
85 all-local: libgomp-test-support.exp
|
145
|
86
|
|
87 .PHONY: check-DEJAGNU distclean-DEJAGNU
|