Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / libio / testsuite / Makefile.in
1 # Copyright (C) 1997 Free Software Foundation
2
3 # This file is part of the GNU IO Library.  This library is free
4 # software; you can redistribute it and/or modify it under the
5 # terms of the GNU General Public License as published by the
6 # Free Software Foundation; either version 2, or (at your option)
7 # any later version.
8
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with GNU CC; see the file COPYING.  If not, write to
16 # the Free Software Foundation, 59 Temple Place - Suite 330,
17 # Boston, MA 02111-1307, USA.  */
18
19 srcdir = libio.tests
20
21 CFLAGS = -g
22 C_FLAGS = $(CFLAGS) -I. -I.. -I$(srcdir) -I$(srcdir)/..
23 CXXFLAGS = -g
24 CC = gcc
25 CXX = gcc
26
27 EXPECT = `if [ -f $${rootme}/../../../expect/expect ] ; then \
28           echo $${rootme}/../../../expect/expect ; \
29           else echo expect ; fi`
30
31 RUNTEST = $(RUNTEST_FOR_TARGET)
32
33 RUNTESTFLAGS =
34
35 RUNTEST_FOR_TARGET = `\
36   if [ -f $${srcdir}/../../dejagnu/runtest ]; then \
37     echo $${srcdir}/../../dejagnu/runtest; \
38   else \
39     if [ "$(host_canonical)" = "$(target_canonical)" ]; then \
40       echo runtest; \
41     else \
42       t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
43     fi; \
44   fi`
45
46 #### package, host, target, and site dependent Makefile fragments come in here.
47 ##
48
49 # See ${MOSTLYCLEAN} in configure.in
50 JUNK_TO_CLEAN = tFile tiomisc hounddog putbackdog tiomanip \
51    t?format *.out streamfile ftmp* tstdiomisc foo.dat
52
53 .PHONY: info
54 info:
55 .PHONY: clean-info
56 clean-info:
57 .PHONY: install-info
58 install-info:
59
60 check: all just-check
61
62 site.exp: ./config.status Makefile
63         @echo "Making a new config file..."
64         -@rm -f ./tmp?
65         @touch site.exp
66         -@mv site.exp site.bak
67         @echo "## these variables are automatically generated by make ##" > ./tmp0
68         @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
69         @echo "# add them to the last section" >> ./tmp0
70         @echo "set host_alias $(host_alias)" >> ./tmp0
71         @echo "set host_triplet ${host_canonical}" >> ./tmp0
72         @echo "set target_alias $(target_alias)" >> ./tmp0
73         @echo "set target_triplet ${target_canonical}" >> ./tmp0
74         @echo "set build_triplet ${build_canonical}" >> ./tmp0
75         @echo "set srcdir ${srcdir}" >> ./tmp0
76         @echo "set tool libio" >> ./tmp0
77         @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
78                 @cat ./tmp0 > site.exp
79         @cat site.bak | sed \
80                         -e '1,/^## All variables above are.*##/ d' >> site.exp
81         -@rm -f ./tmp?
82
83 just-check: site.exp
84         -rootme=`pwd`; export rootme; \
85         srcdir=${srcdir} ; export srcdir ; \
86         EXPECT=${EXPECT} ; export EXPECT ; \
87         if [ -f $${rootme}/../../../expect/expect ] ; then  \
88           TCL_LIBRARY=$${srcdir}/../../tcl/library ; \
89           export TCL_LIBRARY ; fi ; \
90         $(RUNTEST) $(RUNTESTFLAGS)