Commit | Line | Data |
---|---|---|
099c286e BC |
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 | ||
f70a4714 KR |
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 | ||
099c286e BC |
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` | |
03372cf4 | 63 | RUNTESTFLAGS = |
f70a4714 KR |
64 | |
65 | # The ugliness in the program_transform_name version seems necessary | |
66 | # to work around some strange behavior of /bin/sh on 386bsd (0.1). | |
67 | AS_FOR_TARGET = ` \ | |
68 | if [ -f ../Makefile ] ; then \ | |
69 | echo ../as.new ; \ | |
70 | else \ | |
71 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
72 | echo $(AS); \ | |
73 | else \ | |
74 | (set -e ; t='$(program_transform_name)'; echo as | sed -e '' $$t); \ | |
75 | fi; \ | |
76 | fi` | |
0b63552c KR |
77 | OBJDUMP_FOR_TARGET = ` \ |
78 | if [ -f ../../binutils/Makefile ] ; then \ | |
79 | echo ../../binutils/objdump ; \ | |
80 | else \ | |
81 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
82 | echo $(OBJDUMP); \ | |
83 | else \ | |
84 | (set -e ; t='$(program_transform_name)'; echo objdump | sed -e '' $$t); \ | |
85 | fi; \ | |
86 | fi` | |
f70a4714 KR |
87 | |
88 | #### host, target, and site specific Makefile frags come in here. | |
89 | ||
90 | all: | |
91 | ||
92 | .NOEXPORT: | |
93 | ||
94 | install: | |
95 | ||
96 | uninstall: force | |
97 | ||
98 | site.exp: ./Makefile | |
99 | @echo "Making a new config file..." | |
100 | -@rm -f ./tmp? | |
101 | @touch site.exp | |
102 | -@mv site.exp site.bak | |
103 | @echo "## these variables are automatically generated by make ##" > ./tmp0 | |
0b63552c KR |
104 | @echo "# Do not edit here. If you wish to override these values," >> ./tmp0 |
105 | @echo "# do so in the last section." >> ./tmp0 | |
106 | @echo set host_os ${host_os} >> ./tmp0 | |
107 | @echo set host_alias ${host_alias} >> ./tmp0 | |
108 | @echo set host_cpu ${host_cpu} >> ./tmp0 | |
109 | @echo set host_vendor ${host_vendor} >> ./tmp0 | |
110 | @echo set target_os ${target_os} >> ./tmp0 | |
111 | @echo set target_alias ${target_alias} >> ./tmp0 | |
112 | @echo set target_cpu ${target_cpu} >> ./tmp0 | |
113 | @echo set target_vendor ${target_vendor} >> ./tmp0 | |
114 | @echo set host_triplet ${host_canonical} >> ./tmp0 | |
115 | @echo set target_triplet ${target_canonical} >> ./tmp0 | |
116 | @echo set target_canonical ${target_canonical} >> ./tmp0 | |
117 | @echo set srcdir ${srcdir} >> ./tmp0 | |
118 | @echo set exec_prefix ${exec_prefix} >> ./tmp0 | |
119 | @echo set objdir `pwd` >> ./tmp0 | |
0b63552c | 120 | @echo set OBJDUMP ${OBJDUMP_FOR_TARGET} >> ./tmp0 |
29f5c3cb | 121 | @echo set OBJDUMPFLAGS \"${OBJDUMPFLAGS}\" >> ./tmp0 |
f70a4714 | 122 | @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0 |
29f5c3cb KR |
123 | @sed -e '1,/^## All variables above are.*##/ d' < site.bak >> ./tmp0 |
124 | @mv -f ./tmp0 site.exp | |
f70a4714 KR |
125 | |
126 | check: site.exp | |
099c286e BC |
127 | rootme=`pwd`; export rootme; \ |
128 | srcdir=${srcdir} ; export srcdir ; \ | |
129 | EXPECT=${EXPECT} ; export EXPECT ; \ | |
130 | if [ -f $${rootme}/../../expect/expect ] ; then \ | |
131 | TCL_LIBRARY=$${srcdir}/../../tcl/library ; \ | |
132 | export TCL_LIBRARY ; fi ; \ | |
a7175ea9 | 133 | $(RUNTEST) $(RUNTESTFLAGS) --tool gas |
f70a4714 KR |
134 | |
135 | force: | |
136 | ||
daa7e184 | 137 | clean mostlyclean: |
f70a4714 KR |
138 | -rm -f *~ core *.o a.out xgdb *.x a.out b.out |
139 | ||
daa7e184 | 140 | distclean realclean: clean |
f70a4714 KR |
141 | -rm -f *~ core |
142 | -rm -f Makefile config.status | |
143 | -rm -fr *.log summary detail | |
b166d614 | 144 | -rm -f site.exp site.bak gas.sum |
f70a4714 KR |
145 | |
146 | Makefile : $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) | |
147 | $(SHELL) ./config.status | |
148 |