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