2012-03-27 23:13:14 +00:00
|
|
|
## Process this file with automake to produce Makefile.in.
|
|
|
|
|
2019-06-02 15:48:37 +00:00
|
|
|
AUTOMAKE_OPTIONS = foreign
|
2012-03-27 23:13:14 +00:00
|
|
|
|
|
|
|
# May be used by various substitution variables.
|
2017-10-07 00:16:47 +00:00
|
|
|
gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
|
2012-03-27 23:13:14 +00:00
|
|
|
|
|
|
|
EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \
|
|
|
|
echo $(top_builddir)/../expect/expect; else echo expect; fi)
|
|
|
|
|
|
|
|
_RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
|
|
|
|
echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
|
2019-06-02 15:48:37 +00:00
|
|
|
RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
|
2015-08-28 15:33:40 +00:00
|
|
|
|
|
|
|
# Instead of directly in ../testsuite/libgomp-test-support.exp.in, the
|
|
|
|
# following variables have to be "routed through" this Makefile, for expansion
|
|
|
|
# of the several (Makefile) variables used therein.
|
|
|
|
libgomp-test-support.exp: libgomp-test-support.pt.exp Makefile
|
|
|
|
cp $< $@.tmp
|
|
|
|
echo >> $@.tmp \
|
|
|
|
'set offload_additional_options "$(offload_additional_options)"'
|
|
|
|
echo >> $@.tmp \
|
|
|
|
'set offload_additional_lib_paths "$(offload_additional_lib_paths)"'
|
|
|
|
mv $@.tmp $@
|
|
|
|
|
2019-06-02 15:48:37 +00:00
|
|
|
check-DEJAGNU: site.exp
|
|
|
|
srcdir='$(srcdir)'; export srcdir; \
|
|
|
|
EXPECT=$(EXPECT); export EXPECT; \
|
|
|
|
if $(SHELL) -c "$(_RUNTEST) --version" > /dev/null 2>&1; then \
|
|
|
|
exit_status=0; l='$(PACKAGE)'; for tool in $$l; do \
|
|
|
|
if $(_RUNTEST) $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
|
|
|
|
then :; else exit_status=1; fi; \
|
|
|
|
done; \
|
|
|
|
else echo "WARNING: could not find '$(_RUNTEST)'" 1>&2; :;\
|
|
|
|
fi; \
|
|
|
|
exit $$exit_status
|
|
|
|
site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
|
|
|
|
@echo 'Making a new site.exp file ...'
|
|
|
|
@echo '## these variables are automatically generated by make ##' >site.tmp
|
|
|
|
@echo '# Do not edit here. If you wish to override these values' >>site.tmp
|
|
|
|
@echo '# edit the last section' >>site.tmp
|
|
|
|
@echo 'set srcdir "$(srcdir)"' >>site.tmp
|
|
|
|
@echo "set objdir `pwd`" >>site.tmp
|
|
|
|
@echo 'set build_alias "$(build_alias)"' >>site.tmp
|
|
|
|
@echo 'set build_triplet $(build_triplet)' >>site.tmp
|
|
|
|
@echo 'set host_alias "$(host_alias)"' >>site.tmp
|
|
|
|
@echo 'set host_triplet $(host_triplet)' >>site.tmp
|
|
|
|
@echo 'set target_alias "$(target_alias)"' >>site.tmp
|
|
|
|
@echo 'set target_triplet $(target_triplet)' >>site.tmp
|
|
|
|
@list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \
|
|
|
|
echo "## Begin content included from file $$f. Do not modify. ##" \
|
|
|
|
&& cat `test -f "$$f" || echo '$(srcdir)/'`$$f \
|
|
|
|
&& echo "## End content included from file $$f. ##" \
|
|
|
|
|| exit 1; \
|
|
|
|
done >> site.tmp
|
|
|
|
@echo "## End of auto-generated content; you can edit from here. ##" >> site.tmp
|
|
|
|
@if test -f site.exp; then \
|
|
|
|
sed -e '1,/^## End of auto-generated content.*##/d' site.exp >> site.tmp; \
|
|
|
|
fi
|
|
|
|
@-rm -f site.bak
|
|
|
|
@test ! -f site.exp || mv site.exp site.bak
|
|
|
|
@mv site.tmp site.exp
|
|
|
|
|
|
|
|
distclean-DEJAGNU:
|
|
|
|
-rm -f site.exp site.bak
|
|
|
|
-l='$(PACKAGE)'; for tool in $$l; do \
|
|
|
|
rm -f $$tool.sum $$tool.log; \
|
|
|
|
done
|
|
|
|
distclean-am: distclean-DEJAGNU
|
|
|
|
check-am:
|
|
|
|
@if test -n "$(filter -j%, $(MFLAGS))"; then \
|
|
|
|
num_cpus=1; \
|
|
|
|
if type -p getconf 2>/dev/null >/dev/null; then \
|
|
|
|
num_cpus=`getconf _NPROCESSORS_ONLN 2>/dev/null`; \
|
|
|
|
case "$$num_cpus" in \
|
|
|
|
'' | 0* | *[!0-9]*) num_cpus=1;; \
|
|
|
|
esac; \
|
|
|
|
fi; \
|
|
|
|
if test $$num_cpus -gt 8 && test -z "$$OMP_NUM_THREADS"; then \
|
|
|
|
OMP_NUM_THREADS=8; export OMP_NUM_THREADS; \
|
|
|
|
echo @@@ libgomp OMP_NUM_THREADS adjusted to 8 because of parallel make check and too many CPUs; \
|
|
|
|
fi; \
|
|
|
|
fi; \
|
|
|
|
$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
|
2015-08-28 15:33:40 +00:00
|
|
|
all-local: libgomp-test-support.exp
|
2019-06-02 15:48:37 +00:00
|
|
|
|
|
|
|
.PHONY: check-DEJAGNU distclean-DEJAGNU
|