e8e692256819f0d0d2e2a029d488b74dc7e27045
[platform/upstream/binutils.git] / gas / testsuite / Makefile.in
1 # Makefile for regression testing the GNU assemblers.
2 #   Copyright (C) 1987, 88, 90, 91, 92, 93, 1994 Free Software Foundation, Inc.
3
4 #This file is part of the GNU Assembler (gas).
5
6 #gas is free software; you can redistribute it and/or modify
7 #it under the terms of the GNU General Public License as published by
8 #the Free Software Foundation; either version 2, or (at your option)
9 #any later version.
10
11 #gas is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 #GNU General Public License for more details.
15
16 #You should have received a copy of the GNU General Public License
17 #along with GNU CC; see the file COPYING.  If not, write to
18 #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19
20 srcdir = .
21 prefix = /usr/local
22
23 exec_prefix = $(prefix)
24 bindir = $(exec_prefix)/bin
25 libdir = $(exec_prefix)/lib
26 tooldir = $(libdir)/$(target_alias)
27
28 datadir = $(exec_prefix)/lib/deja-gnu
29 mandir = $(prefix)/man
30 man1dir = $(mandir)/man1
31 man2dir = $(mandir)/man2
32 man3dir = $(mandir)/man3
33 man4dir = $(mandir)/man4
34 man5dir = $(mandir)/man5
35 man6dir = $(mandir)/man6
36 man7dir = $(mandir)/man7
37 man8dir = $(mandir)/man8
38 man9dir = $(mandir)/man9
39 infodir = $(prefix)/info
40 includedir = $(prefix)/include
41 gxx_includedir = $(tooldir)/g++-include
42 docdir = $(datadir)/doc
43 targetdir = $(datadir)/$(target_alias)
44
45 SHELL = /bin/sh
46
47 INSTALL = install -c
48 INSTALL_PROGRAM = $(INSTALL)
49 INSTALL_DATA = $(INSTALL)
50
51 GCC = gcc
52 GCCFLAGS = -g -O
53
54 LINK=   ln -s
55
56 EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
57           echo $${rootme}/../../expect/expect ; \
58           else echo expect ; fi`
59
60 RUNTEST = `if [ -f $${srcdir}/../../dejagnu/runtest ] ; then \
61            echo $${srcdir}/../../dejagnu/runtest ; \
62            else echo runtest ;  fi`
63 RUNTESTFLAGS =
64
65 #### host, target, and site specific Makefile frags come in here.
66
67 all:
68
69 .NOEXPORT:
70
71 install:
72
73 uninstall: force
74
75 site.exp: ./Makefile
76         @echo "Making a new config file..."
77         -@rm -f ./tmp?
78         @touch site.exp
79         -@mv site.exp site.bak
80         @echo "## these variables are automatically generated by make ##" > ./tmp0
81         @echo "# Do not edit here. If you wish to override these values," >> ./tmp0
82         @echo "# do so in the last section."                    >> ./tmp0
83         @echo set host_os ${host_os}                            >> ./tmp0
84         @echo set host_alias ${host_alias}                      >> ./tmp0
85         @echo set host_cpu ${host_cpu}                          >> ./tmp0
86         @echo set host_vendor ${host_vendor}                    >> ./tmp0
87         @echo set target_os ${target_os}                        >> ./tmp0
88         @echo set target_alias ${target_alias}                  >> ./tmp0
89         @echo set target_cpu ${target_cpu}                      >> ./tmp0
90         @echo set target_vendor ${target_vendor}                >> ./tmp0
91         @echo set host_triplet ${host_canonical}                >> ./tmp0
92         @echo set target_triplet ${target_canonical}            >> ./tmp0
93         @echo set target_canonical ${target_canonical}          >> ./tmp0
94         @echo set srcdir ${srcdir}                              >> ./tmp0
95         @echo set exec_prefix ${exec_prefix}                    >> ./tmp0
96         @echo set objdir `pwd`                                  >> ./tmp0
97         @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
98         @sed -e '1,/^## All variables above are.*##/ d' < site.bak >> ./tmp0
99         @mv -f ./tmp0 site.exp
100
101 check:  site.exp
102         rootme=`pwd`; export rootme; \
103         srcdir=${srcdir} ; export srcdir ; \
104         EXPECT=${EXPECT} ; export EXPECT ; \
105         if [ -f $${rootme}/../../expect/expect ] ; then  \
106            TCL_LIBRARY=$${srcdir}/../../tcl/library ; \
107            export TCL_LIBRARY ; fi ; \
108         $(RUNTEST) $(RUNTESTFLAGS) --tool gas 
109
110 force:
111
112 clean mostlyclean:
113         -rm -f *~ core *.o a.out xgdb *.x a.out b.out
114
115 distclean realclean: clean
116         -rm -f *~ core
117         -rm -f Makefile config.status
118         -rm -fr *.log summary detail
119         -rm -f site.exp site.bak gas.sum
120
121 Makefile : $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
122         $(SHELL) ./config.status
123