| 1 | ## Makefile for the testsuite subdirectory of the GNU C++ Standard library.
|
|---|
| 2 | ##
|
|---|
| 3 | ## Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
|
|---|
| 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 |
|
|---|
| 24 | AUTOMAKE_OPTIONS = cygnus dejagnu
|
|---|
| 25 |
|
|---|
| 26 | mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
|
|---|
| 27 |
|
|---|
| 28 | DEJATOOL = libstdc++-v3
|
|---|
| 29 |
|
|---|
| 30 | EXPECT = `if [ -f @glibcpp_builddir@/../../expect/expect ] ; then \
|
|---|
| 31 | echo @glibcpp_builddir@/../../expect/expect ; \
|
|---|
| 32 | else echo expect ; fi`
|
|---|
| 33 |
|
|---|
| 34 | RUNTEST = `if [ -f @glibcpp_srcdir@/../dejagnu/runtest ] ; then \
|
|---|
| 35 | echo @glibcpp_srcdir@/../dejagnu/runtest ; \
|
|---|
| 36 | else echo runtest; fi`
|
|---|
| 37 |
|
|---|
| 38 | AM_RUNTESTFLAGS =
|
|---|
| 39 | RUNTESTFLAGS =
|
|---|
| 40 |
|
|---|
| 41 | ## CXX is actually a "C" compiler. These are real C++ programs.
|
|---|
| 42 | ## Do the same thing as `testsuite_flags --build-cxx`
|
|---|
| 43 | testsuite_flags_script=${glibcpp_builddir}/testsuite_flags
|
|---|
| 44 | CXX=`${testsuite_flags_script} --build-cxx`
|
|---|
| 45 |
|
|---|
| 46 | GLIBGCC_DIR=`$(CC) -print-libgcc-file-name | sed 's,/[^/]*$$,,'`
|
|---|
| 47 | GLIBCXX_DIR=${glibcpp_builddir}/src/.libs
|
|---|
| 48 |
|
|---|
| 49 | CXXLINK = \
|
|---|
| 50 | $(LIBTOOL) --tag=CXX --mode=link $(CXX) \
|
|---|
| 51 | -R $(GLIBGCC_DIR) -R $(GLIBCXX_DIR) \
|
|---|
| 52 | $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
|
|---|
| 53 |
|
|---|
| 54 | INCLUDES = \
|
|---|
| 55 | -nostdinc++ \
|
|---|
| 56 | @GLIBCPP_INCLUDES@ @LIBSUPCXX_INCLUDES@ @TOPLEVEL_INCLUDES@
|
|---|
| 57 |
|
|---|
| 58 | ## Build support library.
|
|---|
| 59 | noinst_LIBRARIES = libv3test.a
|
|---|
| 60 | libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc
|
|---|
| 61 |
|
|---|
| 62 | ## Build support utilities.
|
|---|
| 63 | ## Only build this as native, as need to find startup files and libc to link.
|
|---|
| 64 | if GLIBCPP_TEST_ABI
|
|---|
| 65 | noinst_PROGRAMS = abi_check
|
|---|
| 66 | else
|
|---|
| 67 | noinst_PROGRAMS =
|
|---|
| 68 | endif
|
|---|
| 69 | abi_check_SOURCES = abi_check.cc
|
|---|
| 70 |
|
|---|
| 71 | # Enable wchar_t tests if capable.
|
|---|
| 72 | if GLIBCPP_TEST_WCHAR_T
|
|---|
| 73 | all-local: stamp_wchar
|
|---|
| 74 | else
|
|---|
| 75 | all-local:
|
|---|
| 76 | endif
|
|---|
| 77 |
|
|---|
| 78 | # Override this so local rules are possible.
|
|---|
| 79 | check-am:
|
|---|
| 80 | $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU; \
|
|---|
| 81 | $(MAKE) $(AM_MAKEFLAGS) check-local
|
|---|
| 82 |
|
|---|
| 83 | check-local: check-abi
|
|---|
| 84 |
|
|---|
| 85 | stamp_wchar:
|
|---|
| 86 | touch testsuite_wchar_t
|
|---|
| 87 |
|
|---|
| 88 | baseline_dir = @baseline_dir@
|
|---|
| 89 | baseline_file = ${baseline_dir}/baseline_symbols.txt
|
|---|
| 90 | extract_symvers = @glibcpp_srcdir@/config/abi/extract_symvers
|
|---|
| 91 |
|
|---|
| 92 | current_symbols.txt: ${extract_symvers} ../src/.libs/libstdc++.so
|
|---|
| 93 | -@(${extract_symvers} ../src/.libs/libstdc++.so current_symbols.txt)
|
|---|
| 94 |
|
|---|
| 95 | baseline_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 |
|
|---|
| 104 | new-abi-baseline:
|
|---|
| 105 | -@$(mkinstalldirs) ${baseline_dir}
|
|---|
| 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 |
|
|---|
| 114 | if 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.
|
|---|
| 117 | check-abi: abi_check baseline_symbols current_symbols.txt
|
|---|
| 118 | -@(./abi_check --check ./current_symbols.txt ${baseline_file} \
|
|---|
| 119 | 2>&1 | tee libstdc++-v3-abi.sum)
|
|---|
| 120 |
|
|---|
| 121 | check-abi-verbose: abi_check baseline_symbols current_symbols.txt
|
|---|
| 122 | -@(./abi_check --check-verbose ./current_symbols.txt ${baseline_file} \
|
|---|
| 123 | 2>&1 | tee libstdc++-v3-abi.sum)
|
|---|
| 124 | else
|
|---|
| 125 | check-abi:
|
|---|
| 126 | check-abi-verbose:
|
|---|
| 127 | endif
|
|---|
| 128 |
|
|---|
| 129 | # By adding these files here, automake will remove them for 'make clean'
|
|---|
| 130 | CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \
|
|---|
| 131 | testsuite_files testsuite_wchar_t site.exp abi_check
|
|---|