]>
Commit | Line | Data |
---|---|---|
7f98c6bc GDR |
1 | ## Makefile for the testsuite subdirectory of the GNU C++ Standard library. |
2 | ## | |
6b543e86 | 3 | ## Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. |
7f98c6bc GDR |
4 | ## |
5 | ## This file is part of the libstdc++ version 3 distribution. | |
6 | ## Process this file with automake to produce Makefile.in. | |
7 | ||
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) | |
12 | ## any later version. | |
13 | ||
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. | |
18 | ||
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, | |
22 | ## USA. | |
23 | ||
caf21254 | 24 | AUTOMAKE_OPTIONS = dejagnu |
7f98c6bc | 25 | |
0df3f383 | 26 | include $(top_srcdir)/fragment.am |
a1af4623 | 27 | |
f9f4d1e1 | 28 | AM_MAKEFLAGS = -j1 |
2c839a4e | 29 | AM_RUNTESTFLAGS = |
755f30f4 | 30 | |
747d0967 | 31 | ## CXX is actually a "C" compiler. These are real C++ programs. |
3d7c150e | 32 | testsuite_flags_script=${glibcxx_builddir}/scripts/testsuite_flags |
0676e930 BK |
33 | CXX=`${testsuite_flags_script} --build-cxx` |
34 | ||
747d0967 | 35 | CXXLINK = \ |
3d7c150e | 36 | LD_RUN_PATH=$${LD_RUN_PATH:+$$LD_RUN_PATH:}${glibcxx_builddir}/src/.libs\ |
747d0967 BK |
37 | $(LIBTOOL) --tag=CXX --mode=link $(CXX) \ |
38 | $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ | |
39 | ||
ac3d7b44 PE |
40 | # Generated lists of files to run. All of these names are valid make |
41 | # targets, if you wish to generate a list manually. | |
42 | lists_of_files = \ | |
43 | testsuite_files \ | |
44 | testsuite_files_interactive \ | |
45 | testsuite_files_performance | |
46 | ||
747d0967 | 47 | ## Build support library. |
8ea08b7d | 48 | noinst_LIBRARIES = libv3test.a |
162c7cd9 | 49 | libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc |
8ea08b7d | 50 | |
747d0967 | 51 | ## Build support utilities. |
3d7c150e | 52 | if GLIBCXX_TEST_ABI |
747d0967 | 53 | noinst_PROGRAMS = abi_check |
e21c2e1c BK |
54 | else |
55 | noinst_PROGRAMS = | |
56 | endif | |
747d0967 | 57 | abi_check_SOURCES = abi_check.cc |
6b543e86 | 58 | |
ac3d7b44 | 59 | all-local: stamp_wchar testsuite_files |
c4c064e7 | 60 | |
6b543e86 | 61 | # Enable wchar_t tests if capable. |
3d7c150e | 62 | if GLIBCXX_TEST_WCHAR_T |
c4c064e7 BK |
63 | stamp_wchar: |
64 | touch testsuite_wchar_t | |
6b543e86 | 65 | else |
c4c064e7 BK |
66 | stamp_wchar: |
67 | endif | |
68 | ||
7685a26d | 69 | # This is automatically run after the generated check-DEJAGNU rule. |
c4c064e7 BK |
70 | check-local: check-abi |
71 | ||
a1af4623 AJ |
72 | baseline_dir = @baseline_dir@ |
73 | baseline_file = ${baseline_dir}/baseline_symbols.txt | |
3d7c150e | 74 | extract_symvers = @glibcxx_srcdir@/scripts/extract_symvers |
c4c064e7 BK |
75 | |
76 | current_symbols.txt: ${extract_symvers} ../src/.libs/libstdc++.so | |
77 | -@(${extract_symvers} ../src/.libs/libstdc++.so current_symbols.txt) | |
78 | ||
79 | baseline_symbols: | |
80 | -@(output=${baseline_file}; \ | |
81 | if test ! -f $${output}; then \ | |
82 | echo "Baseline file doesn't exist."; \ | |
83 | echo "Try 'make new-abi-baseline' to create it."; \ | |
84 | exit 1; \ | |
7685a26d | 85 | fi; true) |
c4c064e7 BK |
86 | |
87 | new-abi-baseline: | |
a1af4623 | 88 | -@$(mkinstalldirs) ${baseline_dir} |
c4c064e7 BK |
89 | -@(output=${baseline_file}; \ |
90 | if test -f $${output}; then \ | |
91 | output=$${output}.new; \ | |
92 | t=`echo $${output} | sed 's=.*config/abi/=='`; \ | |
93 | echo "Baseline file already exists, writing to $${t} instead."; \ | |
94 | fi; \ | |
95 | ${extract_symvers} ../src/.libs/libstdc++.so $${output}) | |
96 | ||
3d7c150e | 97 | if GLIBCXX_TEST_ABI |
c4c064e7 BK |
98 | # Use 'new-abi-baseline' to create an initial symbol file. Then run |
99 | # 'check-abi' to test for changes against that file. | |
100 | check-abi: abi_check baseline_symbols current_symbols.txt | |
f1a22109 | 101 | -@(./abi_check --check ./current_symbols.txt ${baseline_file} \ |
258e7dbc | 102 | 2>&1 | tee libstdc++-abi.sum) |
c4c064e7 BK |
103 | |
104 | check-abi-verbose: abi_check baseline_symbols current_symbols.txt | |
f1a22109 | 105 | -@(./abi_check --check-verbose ./current_symbols.txt ${baseline_file} \ |
258e7dbc | 106 | 2>&1 | tee libstdc++-abi.sum) |
f1a22109 | 107 | |
c4c064e7 BK |
108 | else |
109 | check-abi: | |
110 | check-abi-verbose: | |
6b543e86 BK |
111 | endif |
112 | ||
6b543e86 | 113 | |
ce4f8c6b BK |
114 | # These two special 'check-script' rules use the bash script |
115 | # 'check_survey' to do testing. This script is not as portable as the | |
116 | # dejagnu test harness, and is thus off by default. It does produce | |
117 | # interesting output however, including various performance analysis | |
118 | # items like compile time, execution time, and binary size. | |
3d7c150e | 119 | survey_script = ${glibcxx_builddir}/scripts/check_survey |
ce4f8c6b BK |
120 | check-script: ${survey_script} |
121 | -@(chmod + ${survey_script}; \ | |
122 | ${survey_script} 0) | |
0676e930 | 123 | |
ce4f8c6b BK |
124 | check-script-install: ${survey_script} |
125 | -@(chmod + ${survey_script}; \ | |
126 | ${survey_script} 0) | |
0676e930 BK |
127 | |
128 | ||
129 | # Runs the testsuite/performance tests. | |
130 | # Some of these tests create large (~75MB) files, allocate huge | |
131 | # ammounts of memory, or otherwise tie up machine resources. Thus, | |
132 | # running this is off by default. | |
3d7c150e | 133 | performance_script=${glibcxx_srcdir}/scripts/check_performance |
ac3d7b44 | 134 | check-performance: testsuite_files_performance ${performance_script} |
ce4f8c6b | 135 | -@(chmod + ${performance_script}; \ |
3d7c150e | 136 | ${performance_script} ${glibcxx_srcdir} ${glibcxx_builddir}) |
0676e930 | 137 | |
ac3d7b44 PE |
138 | |
139 | # This rule generates all of the testsuite_files* lists at once. | |
140 | ${lists_of_files}: | |
141 | ${glibcxx_srcdir}/scripts/create_testsuite_files \ | |
142 | ${glibcxx_srcdir}/testsuite `${PWD_COMMAND}` | |
143 | ||
144 | ||
7685a26d PE |
145 | .PHONY: baseline_symbols new-abi-baseline check-abi check-abi-verbose \ |
146 | check-script check-script-install check-performance | |
0676e930 | 147 | |
6b543e86 | 148 | # By adding these files here, automake will remove them for 'make clean' |
0c45b8e0 | 149 | CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \ |
f1a22109 | 150 | testsuite_* site.exp abi_check baseline_symbols |