AUTOMAKE_OPTIONS = dejagnu nostdinc
include $(top_srcdir)/fragment.am
AM_MAKEFLAGS = -j1
AM_RUNTESTFLAGS =
testsuite_flags_script=${glibcxx_builddir}/scripts/testsuite_flags
CXX = $(shell ${testsuite_flags_script} --build-cxx)
GLIBCXX_INCLUDES = $(shell ${testsuite_flags_script} --build-includes)
AM_CXXFLAGS = $(shell ${testsuite_flags_script} --cxxflags)
GLIBGCC_DIR=`$(CC) -print-libgcc-file-name | sed 's,/[^/]*$$,,'`
GLIBCXX_DIR=${glibcxx_builddir}/src/.libs
CXXLINK = \
$(LIBTOOL) --tag=CXX --mode=link $(CXX) \
-R $(GLIBGCC_DIR) -R $(GLIBCXX_DIR) \
$(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -lv3test -L. -o $@
noinst_LIBRARIES = libv3test.a
libv3test_a_SOURCES = \
testsuite_abi.cc \
testsuite_allocator.cc \
testsuite_character.cc \
testsuite_hooks.cc
all-local: stamp_wchar stamp_thread testsuite_files
if GLIBCXX_TEST_WCHAR_T
stamp_wchar:
touch testsuite_wchar_t
else
stamp_wchar:
endif
if GLIBCXX_TEST_THREAD
stamp_thread:
touch testsuite_thread
else
stamp_thread:
endif
lists_of_files = \
testsuite_files \
testsuite_files_interactive \
testsuite_files_performance
${lists_of_files}:
${glibcxx_srcdir}/scripts/create_testsuite_files \
${glibcxx_srcdir}/testsuite `${PWD_COMMAND}`
site.exp: Makefile
@echo 'Making a new site.exp file...'
@echo ' @echo ' @echo ' @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
@echo 'set target_triplet $(target_triplet)' >>site.tmp
@echo 'set libiconv "$(LIBICONV)"' >>site.tmp
@echo 'set baseline_file "$(baseline_file)"' >> site.tmp
@echo ' @test ! -f site.exp || \
sed '1,/^ @-rm -f site.bak
@test ! -f site.exp || mv site.exp site.bak
@mv site.tmp site.exp
baseline_file = ${baseline_dir}/baseline_symbols.txt
extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers
baseline_symbols:
-@(output=${baseline_file}; \
if test ! -f $${output}; then \
echo "Baseline file doesn't exist."; \
echo "Try 'make new-abi-baseline' to create it."; \
exit 1; \
fi; true)
new-abi-baseline:
-@$(mkinstalldirs) ${baseline_dir}
-@(output=${baseline_file}; \
if test -f $${output}; then \
output=$${output}.new; \
t=`echo $${output} | sed 's=.*config/abi/=='`; \
echo "Baseline file already exists, writing to $${t} instead."; \
fi; \
${extract_symvers} ../src/.libs/libstdc++.so $${output})
check-abi: baseline_symbols current_symbols.txt site.exp
-@runtest --tool libstdc++ abi.exp
compile_script=${glibcxx_srcdir}/scripts/check_compile
check-compile: testsuite_files ${compile_script}
-@(chmod + ${compile_script}; \
${compile_script} ${glibcxx_srcdir} ${glibcxx_builddir})
performance_script=${glibcxx_srcdir}/scripts/check_performance
check-performance: testsuite_files_performance ${performance_script}
-@(chmod + ${performance_script}; \
${performance_script} ${glibcxx_srcdir} ${glibcxx_builddir})
.PHONY: baseline_symbols new-abi-baseline \
check-abi check-compile check-performance
CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \
testsuite_* site.exp abi_check baseline_symbols *TEST*