]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/testsuite/Makefile.am
call.c: Fix comment typos.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / Makefile.am
CommitLineData
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
8b5fd469 24AUTOMAKE_OPTIONS = cygnus dejagnu
7f98c6bc 25
a1af4623
AJ
26mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
27
c6192d88 28DEJATOOL = libstdc++-v3
46840bcd 29
c6192d88
BK
30EXPECT = `if [ -f @glibcpp_builddir@/../../expect/expect ] ; then \
31 echo @glibcpp_builddir@/../../expect/expect ; \
32 else echo expect ; fi`
46840bcd 33
c6192d88
BK
34RUNTEST = `if [ -f @glibcpp_srcdir@/../dejagnu/runtest ] ; then \
35 echo @glibcpp_srcdir@/../dejagnu/runtest ; \
36 else echo runtest; fi`
46840bcd 37
f9f4d1e1 38AM_MAKEFLAGS = -j1
2c839a4e 39AM_RUNTESTFLAGS =
c6192d88 40RUNTESTFLAGS =
755f30f4 41
747d0967 42## CXX is actually a "C" compiler. These are real C++ programs.
0676e930
BK
43glibcpp_srcdir=@glibcpp_srcdir@
44glibcpp_builddir=@glibcpp_builddir@
45testsuite_flags_script=${glibcpp_builddir}/scripts/testsuite_flags
46CXX=`${testsuite_flags_script} --build-cxx`
47
747d0967 48CXXLINK = \
d7d89a58 49 LD_RUN_PATH=$${LD_RUN_PATH:+$$LD_RUN_PATH:}${glibcpp_builddir}/src/.libs\
747d0967
BK
50 $(LIBTOOL) --tag=CXX --mode=link $(CXX) \
51 $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
52
0676e930
BK
53GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
54LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
55TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
49bc23b7
BK
56INCLUDES = \
57 -nostdinc++ \
58 @GLIBCPP_INCLUDES@ @LIBSUPCXX_INCLUDES@ @TOPLEVEL_INCLUDES@
8ea08b7d 59
747d0967 60## Build support library.
8ea08b7d 61noinst_LIBRARIES = libv3test.a
162c7cd9 62libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc
8ea08b7d 63
747d0967 64## Build support utilities.
c4c064e7 65if GLIBCPP_TEST_ABI
747d0967 66noinst_PROGRAMS = abi_check
e21c2e1c
BK
67else
68noinst_PROGRAMS =
69endif
747d0967 70abi_check_SOURCES = abi_check.cc
6b543e86 71
c4c064e7
BK
72all-local: stamp_wchar
73
6b543e86
BK
74# Enable wchar_t tests if capable.
75if GLIBCPP_TEST_WCHAR_T
c4c064e7
BK
76stamp_wchar:
77 touch testsuite_wchar_t
6b543e86 78else
c4c064e7
BK
79stamp_wchar:
80endif
81
7685a26d 82# This is automatically run after the generated check-DEJAGNU rule.
c4c064e7
BK
83check-local: check-abi
84
a1af4623
AJ
85baseline_dir = @baseline_dir@
86baseline_file = ${baseline_dir}/baseline_symbols.txt
97460e9a 87extract_symvers = @glibcpp_srcdir@/scripts/extract_symvers
c4c064e7
BK
88
89current_symbols.txt: ${extract_symvers} ../src/.libs/libstdc++.so
90 -@(${extract_symvers} ../src/.libs/libstdc++.so current_symbols.txt)
91
92baseline_symbols:
93 -@(output=${baseline_file}; \
94 if test ! -f $${output}; then \
95 echo "Baseline file doesn't exist."; \
96 echo "Try 'make new-abi-baseline' to create it."; \
97 exit 1; \
7685a26d 98 fi; true)
c4c064e7
BK
99
100new-abi-baseline:
a1af4623 101 -@$(mkinstalldirs) ${baseline_dir}
c4c064e7
BK
102 -@(output=${baseline_file}; \
103 if test -f $${output}; then \
104 output=$${output}.new; \
105 t=`echo $${output} | sed 's=.*config/abi/=='`; \
106 echo "Baseline file already exists, writing to $${t} instead."; \
107 fi; \
108 ${extract_symvers} ../src/.libs/libstdc++.so $${output})
109
110if GLIBCPP_TEST_ABI
111# Use 'new-abi-baseline' to create an initial symbol file. Then run
112# 'check-abi' to test for changes against that file.
113check-abi: abi_check baseline_symbols current_symbols.txt
f1a22109
BK
114 -@(./abi_check --check ./current_symbols.txt ${baseline_file} \
115 2>&1 | tee libstdc++-v3-abi.sum)
c4c064e7
BK
116
117check-abi-verbose: abi_check baseline_symbols current_symbols.txt
f1a22109
BK
118 -@(./abi_check --check-verbose ./current_symbols.txt ${baseline_file} \
119 2>&1 | tee libstdc++-v3-abi.sum)
120
c4c064e7
BK
121else
122check-abi:
123check-abi-verbose:
6b543e86
BK
124endif
125
6b543e86 126
ce4f8c6b
BK
127# These two special 'check-script' rules use the bash script
128# 'check_survey' to do testing. This script is not as portable as the
129# dejagnu test harness, and is thus off by default. It does produce
130# interesting output however, including various performance analysis
131# items like compile time, execution time, and binary size.
132survey_script = ${glibcpp_builddir}/scripts/check_survey
133check-script: ${survey_script}
134 -@(chmod + ${survey_script}; \
135 ${survey_script} 0)
0676e930 136
ce4f8c6b
BK
137check-script-install: ${survey_script}
138 -@(chmod + ${survey_script}; \
139 ${survey_script} 0)
0676e930
BK
140
141
142# Runs the testsuite/performance tests.
143# Some of these tests create large (~75MB) files, allocate huge
144# ammounts of memory, or otherwise tie up machine resources. Thus,
145# running this is off by default.
ce4f8c6b
BK
146performance_script=${glibcpp_srcdir}/scripts/check_performance
147check-performance: ${performance_script}
148 -@(chmod + ${performance_script}; \
149 ${performance_script} ${glibcpp_srcdir} ${glibcpp_builddir})
0676e930 150
7685a26d
PE
151.PHONY: baseline_symbols new-abi-baseline check-abi check-abi-verbose \
152check-script check-script-install check-performance
0676e930 153
6b543e86 154# By adding these files here, automake will remove them for 'make clean'
0c45b8e0 155CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \
f1a22109 156 testsuite_* site.exp abi_check baseline_symbols