1 ## Makefile for the testsuite subdirectory of the GNU C++ Standard library.
3 ## Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
5 ## This file is part of the libstdc++ version 3 distribution.
6 ## Process this file with automake to produce Makefile.in.
8 ## This file is part of the GNU ISO C++ Library. This library is free
9 ## software; you can redistribute it and/or modify it under the
10 ## terms of the GNU General Public License as published by the
11 ## Free Software Foundation; either version 2, or (at your option)
14 ## This library is distributed in the hope that it will be useful,
15 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ## GNU General Public License for more details.
19 ## You should have received a copy of the GNU General Public License along
20 ## with this library; see the file COPYING. If not, write to the Free
21 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
24 AUTOMAKE_OPTIONS = dejagnu
26 include $(top_srcdir)/fragment.am
31 ## CXX is actually a "C" compiler. These are real C++ programs.
32 testsuite_flags_script=${glibcxx_builddir}/scripts/testsuite_flags
33 CXX=`${testsuite_flags_script} --build-cxx`
36 LD_RUN_PATH=$${LD_RUN_PATH:+$$LD_RUN_PATH:}${glibcxx_builddir}/src/.libs\
37 $(LIBTOOL) --tag=CXX --mode=link $(CXX) \
38 $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
40 # Generated lists of files to run. All of these names are valid make
41 # targets, if you wish to generate a list manually.
44 testsuite_files_interactive \
45 testsuite_files_performance
47 ## Build support library.
48 noinst_LIBRARIES = libv3test.a
49 libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc
51 ## Build support utilities.
53 noinst_PROGRAMS = abi_check
57 abi_check_SOURCES = abi_check.cc
59 all-local: stamp_wchar testsuite_files
61 # Enable wchar_t tests if capable.
62 if GLIBCXX_TEST_WCHAR_T
64 touch testsuite_wchar_t
69 # This is automatically run after the generated check-DEJAGNU rule.
70 check-local: check-abi
72 baseline_file = ${baseline_dir}/baseline_symbols.txt
73 extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers
75 current_symbols.txt: ${extract_symvers} ../src/.libs/libstdc++.so
76 -@(${extract_symvers} ../src/.libs/libstdc++.so current_symbols.txt)
79 -@(output=${baseline_file}; \
80 if test ! -f $${output}; then \
81 echo "Baseline file doesn't exist."; \
82 echo "Try 'make new-abi-baseline' to create it."; \
87 -@$(mkinstalldirs) ${baseline_dir}
88 -@(output=${baseline_file}; \
89 if test -f $${output}; then \
90 output=$${output}.new; \
91 t=`echo $${output} | sed 's=.*config/abi/=='`; \
92 echo "Baseline file already exists, writing to $${t} instead."; \
94 ${extract_symvers} ../src/.libs/libstdc++.so $${output})
97 # Use 'new-abi-baseline' to create an initial symbol file. Then run
98 # 'check-abi' to test for changes against that file.
99 check-abi: abi_check baseline_symbols current_symbols.txt
100 -@(./abi_check --check ./current_symbols.txt ${baseline_file} \
101 2>&1 | tee libstdc++-abi.sum)
103 check-abi-verbose: abi_check baseline_symbols current_symbols.txt
104 -@(./abi_check --check-verbose ./current_symbols.txt ${baseline_file} \
105 2>&1 | tee libstdc++-abi.sum)
113 # These two special 'check-script' rules use the bash script
114 # 'check_survey' to do testing. This script is not as portable as the
115 # dejagnu test harness, and is thus off by default. It does produce
116 # interesting output however, including various performance analysis
117 # items like compile time, execution time, and binary size.
118 survey_script = ${glibcxx_builddir}/scripts/check_survey
119 check-script: ${survey_script}
120 -@(chmod + ${survey_script}; \
123 check-script-install: ${survey_script}
124 -@(chmod + ${survey_script}; \
128 # Runs the testsuite/performance tests.
129 # Some of these tests create large (~75MB) files, allocate huge
130 # ammounts of memory, or otherwise tie up machine resources. Thus,
131 # running this is off by default.
132 performance_script=${glibcxx_srcdir}/scripts/check_performance
133 check-performance: testsuite_files_performance ${performance_script}
134 -@(chmod + ${performance_script}; \
135 ${performance_script} ${glibcxx_srcdir} ${glibcxx_builddir})
138 # This rule generates all of the testsuite_files* lists at once.
140 ${glibcxx_srcdir}/scripts/create_testsuite_files \
141 ${glibcxx_srcdir}/testsuite `${PWD_COMMAND}`
144 .PHONY: baseline_symbols new-abi-baseline check-abi check-abi-verbose \
145 check-script check-script-install check-performance
147 # By adding these files here, automake will remove them for 'make clean'
148 CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \
149 testsuite_* site.exp abi_check baseline_symbols