Fix SWAP_8 and optimize it; print out the failing address if a signal is issued for...
[deliverable/binutils-gdb.git] / gas / Makefile.in
CommitLineData
fecd2382 1# Makefile for GNU Assembler
7420b02b 2# Copyright (C) 1987-1992, 1993 Free Software Foundation, Inc.
fecd2382 3
7420b02b 4# This file is part of GNU GAS.
fecd2382 5
7420b02b
JL
6# GNU 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.
fecd2382 10
7420b02b
JL
11# GNU 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.
fecd2382 15
7420b02b
JL
16# You should have received a copy of the GNU General Public License
17# along with GNU GAS; see the file COPYING. If not, write to
a2a5a4fa 18# the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
fecd2382 19
fecd2382
RP
20# The targets for external use include:
21# all, doc, proto, install, uninstall, includes, TAGS,
daa7e184 22# clean, mostlyclean, distclean, realclean, stage1, stage2, stage3, stage4.
fecd2382
RP
23
24# Variables that exist for you to override.
25# See below for how to change them for certain systems.
26
b11fb939
KR
27VPATH = @srcdir@
28srcdir = @srcdir@
7420b02b 29srcroot = $(srcdir)/..
1058238c 30
fa156ffe 31target_alias = @target_alias@
1bc37618 32prefix = @prefix@
1058238c 33
fa156ffe 34program_transform_name = @program_transform_name@
1bc37618 35exec_prefix = @exec_prefix@
787c6bfe
RP
36bindir = $(exec_prefix)/bin
37libdir = $(exec_prefix)/lib
b63defaa 38tooldir = $(exec_prefix)/$(target_alias)
787c6bfe 39
1058238c 40datadir = $(prefix)/lib
787c6bfe 41mandir = $(prefix)/man
1058238c
RP
42man1dir = $(mandir)/man1
43man2dir = $(mandir)/man2
44man3dir = $(mandir)/man3
45man4dir = $(mandir)/man4
46man5dir = $(mandir)/man5
47man6dir = $(mandir)/man6
48man7dir = $(mandir)/man7
49man8dir = $(mandir)/man8
50man9dir = $(mandir)/man9
787c6bfe 51infodir = $(prefix)/info
1058238c
RP
52includedir = $(prefix)/include
53docdir = $(datadir)/doc
54
aa30c7ee 55VERSION=cygnus-2.5.3
c97b9003 56
fecd2382 57SHELL = /bin/sh
1058238c 58
7420b02b 59INSTALL = $${srcroot}/install.sh -c
fecd2382 60INSTALL_PROGRAM = $(INSTALL)
1058238c 61INSTALL_DATA = $(INSTALL)
aa30c7ee 62INSTALL_XFORM = $(INSTALL) -t='-e $(program_transform_name)'
c97b9003 63INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
fecd2382 64
a1c7c0f3 65DISTSTUFF= make-gas.com m68k-parse.c
6d60424f 66
1058238c
RP
67AR = ar
68AR_FLAGS = qv
a1c7c0f3
ILT
69BISON = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
70BISONFLAGS =
1058238c 71MAKEINFO = makeinfo
c97b9003 72TEXI2DVI = texi2dvi
fecd2382 73RANLIB = ranlib
b11fb939 74CC = @CC@
4b857710
ILT
75CFLAGS = -g
76
7420b02b
JL
77MAKEOVERRIDES=
78
5f757edc
ILT
79EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
80 echo $${rootme}/../expect/expect ; \
81 else echo expect ; fi`
82
4b857710
ILT
83FLAGS_TO_PASS = \
84 "prefix=$(prefix)" \
85 "exec_prefix=$(exec_prefix)" \
86 "tooldir=$(tooldir)" \
87 "AR=$(AR)" \
88 "AR_FLAGS=$(AR_FLAGS)" \
89 "CC=$(CC)" \
90 "CFLAGS=$(CFLAGS)" \
91 "RANLIB=$(RANLIB)" \
92 "LOADLIBES=$(LOADLIBES)" \
93 "LDFLAGS=$(LDFLAGS)" \
94 "BISON=$(BISON)" \
95 "LEX=$(LEX)" \
96 "MAKEINFO=$(MAKEINFO)" \
97 "INSTALL=$(INSTALL)" \
98 "INSTALL_DATA=$(INSTALL_DATA)" \
99 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
fecd2382 100
833c46e1
KR
101RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then \
102 echo ${srcdir}/../dejagnu/runtest ; else echo runtest; \
103 fi`
104RUNTESTFLAGS=
c97b9003 105
fecd2382
RP
106# Lists of files for various purposes.
107
108REAL_SOURCES = \
109 $(srcdir)/app.c \
110 $(srcdir)/as.c \
111 $(srcdir)/atof-generic.c \
112 $(srcdir)/bignum-copy.c \
113 $(srcdir)/cond.c \
114 $(srcdir)/expr.c \
5d53038b 115 $(srcdir)/flonum-konst.c \
fecd2382
RP
116 $(srcdir)/flonum-copy.c \
117 $(srcdir)/flonum-mult.c \
118 $(srcdir)/frags.c \
119 $(srcdir)/hash.c \
fecd2382
RP
120 $(srcdir)/input-file.c \
121 $(srcdir)/input-scrub.c \
dffc8b9e 122 $(srcdir)/literal.c \
fecd2382
RP
123 $(srcdir)/messages.c \
124 $(srcdir)/output-file.c \
125 $(srcdir)/read.c \
fecd2382
RP
126 $(srcdir)/subsegs.c \
127 $(srcdir)/symbols.c \
fecd2382 128 $(srcdir)/write.c \
3340f7e5 129 $(srcdir)/listing.c \
9cc8106c 130 $(srcdir)/ecoff.c \
b63defaa 131 $(srcdir)/stabs.c
fecd2382
RP
132
133# in an expedient order
134LINKED_SOURCES = \
135 targ-cpu.c \
136 obj-format.c \
137 atof-targ.c
138
139SOURCES = $(LINKED_SOURCES) $(REAL_SOURCES)
140
141REAL_HEADERS = \
142 $(srcdir)/as.h \
143 $(srcdir)/bignum.h \
144 $(srcdir)/expr.h \
145 $(srcdir)/flonum.h \
146 $(srcdir)/frags.h \
147 $(srcdir)/hash.h \
148 $(srcdir)/input-file.h \
542e1629 149 $(srcdir)/listing.h \
fecd2382
RP
150 $(srcdir)/tc.h \
151 $(srcdir)/obj.h \
152 $(srcdir)/read.h \
fecd2382
RP
153 $(srcdir)/struc-symbol.h \
154 $(srcdir)/subsegs.h \
155 $(srcdir)/symbols.h \
9cc8106c
ILT
156 $(srcdir)/write.h \
157 $(srcdir)/ecoff.h
fecd2382
RP
158
159LINKED_HEADERS = \
fecd2382
RP
160 targ-env.h \
161 targ-cpu.h \
162 obj-format.h \
163 atof-targ.h
164
165HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS)
166
7e047ac2
ILT
167TE_OBJS=
168
b11fb939 169# @target_frag@
b3cd8555 170
fecd2382
RP
171OBJS = \
172 targ-cpu.o \
173 obj-format.o \
174 atof-targ.o \
175 app.o \
176 as.o \
177 atof-generic.o \
178 bignum-copy.o \
179 cond.o \
180 expr.o \
5d53038b 181 flonum-konst.o \
fecd2382
RP
182 flonum-copy.o \
183 flonum-mult.o \
184 frags.o \
185 hash.o \
fecd2382
RP
186 input-file.o \
187 input-scrub.o \
dffc8b9e 188 literal.o \
fecd2382
RP
189 messages.o \
190 output-file.o \
191 read.o \
fecd2382
RP
192 subsegs.o \
193 symbols.o \
fecd2382 194 write.o \
3340f7e5 195 listing.o \
9cc8106c 196 ecoff.o \
c751ad19 197 stabs.o \
7e047ac2
ILT
198 sb.o \
199 macro.o \
816a827b 200 @extra_objects@ \
b3cd8555 201 $(TE_OBJS)
f6b67e4c 202
7e047ac2
ILT
203GASPOBJS = \
204 gasp.o \
205 macro.o \
206 sb.o \
207 hash.o
208
1df6e266 209all: .gdbinit as.new gasp.new
7420b02b
JL
210 @srcroot=`cd $(srcroot); pwd`; export srcroot; \
211 (cd doc ; $(MAKE) $(FLAGS_TO_PASS) all)
79a54a5b 212
7420b02b
JL
213dvi info install-info clean-info:
214 @srcroot=`cd $(srcroot); pwd`; export srcroot; \
215 (cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@)
fecd2382 216
c20c7506
JL
217make-gas.com: stamp-mk.com
218stamp-mk.com: vmsconf.sh Makefile
816a827b 219 sh $(srcdir)/vmsconf.sh $(OBJS) > new-make.com
c20c7506
JL
220 $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com
221 touch stamp-mk.com
222
fecd2382
RP
223# Now figure out from those variables how to compile and link.
224
225# This is the variable actually used when we compile.
420065a5 226ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES)
fecd2382 227
fecd2382
RP
228# How to link with both our special library facilities
229# and the system's installed libraries.
f6b67e4c 230
b11fb939 231LIBS = @OPCODES_LIB@ @BFDLIB@ $(LOCAL_LOADLIBES) ../libiberty/libiberty.a
fecd2382
RP
232
233# Specify the directories to be searched for header files.
234# Both . and srcdir are used, in that order,
235# so that tm.h and config.h will be found in the compilation
236# subdirectory rather than in the source directory.
816a827b 237INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(srcdir)/../include -I$(srcdir)/.. -I$(srcdir)/../bfd
fecd2382
RP
238
239# Always use -I$(srcdir)/config when compiling.
240.c.o:
241 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
242
243# This tells GNU make version 3 not to export all the variables
244# defined in this file into the environment.
245.NOEXPORT:
542e1629 246
fecd2382 247# Files to be copied away after each stage in building.
c20c7506 248STAGESTUFF = *.o as.new gasp.new
fecd2382 249
b11fb939 250$(OBJS): @ALL_OBJ_DEPS@
c92d9ee9 251
7f2cb270 252as.new: $(OBJS) $(LIBS)
da0b2bff 253 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES)
fecd2382 254
84951544
KR
255$(OBJS): config.h as.h targ-env.h obj-format.h targ-cpu.h flonum.h expr.h \
256 struc-symbol.h write.h frags.h hash.h read.h symbols.h tc.h obj.h \
257 listing.h bignum.h
b11fb939 258
138b11d8
ILT
259gasp.new: $(GASPOBJS) ../libiberty/libiberty.a
260 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gasp.new $(GASPOBJS) ../libiberty/libiberty.a $(LOADLIBES)
a5a4b5ac 261
c97b9003
DZ
262installcheck:
263 @echo No installcheck target is available yet for the GNU assembler.
264
5f757edc
ILT
265site.exp: ./Makefile
266 @echo "Making a new config file..."
267 -@rm -f ./tmp?
268 @touch site.exp
269 -@mv site.exp site.bak
270 @echo "## these variables are automatically generated by make ##" > ./tmp0
271 @echo "# Do not edit here. If you wish to override these values," >> ./tmp0
272 @echo "# do so in the last section." >> ./tmp0
273 @echo set host_os @host_os@ >> ./tmp0
274 @echo set host_alias @host_alias@ >> ./tmp0
275 @echo set host_cpu @host_cpu@ >> ./tmp0
276 @echo set host_vendor @host_vendor@ >> ./tmp0
277 @echo set target_os @target_os@ >> ./tmp0
278 @echo set target_alias @target_alias@ >> ./tmp0
279 @echo set target_cpu @target_cpu@ >> ./tmp0
280 @echo set target_vendor @target_vendor@ >> ./tmp0
281 @echo set host_triplet @host@ >> ./tmp0
282 @echo set target_triplet @target@ >> ./tmp0
283 @echo set target_canonical @target@ >> ./tmp0
284 @echo set srcdir ${srcdir} >> ./tmp0
285 @echo set exec_prefix ${exec_prefix} >> ./tmp0
286 @echo set objdir `pwd` >> ./tmp0
287 @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
288 @sed -e '1,/^## All variables above are.*##/ d' < site.bak >> ./tmp0
289 @mv -f ./tmp0 site.exp
290
291check: site.exp
292 if [ -d testsuite ]; then \
293 true; \
294 else \
295 mkdir testsuite; \
296 fi
297 rm -f testsuite/site.exp
298 cp site.exp testsuite/site.exp
299 rootme=`pwd`; export rootme; \
300 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
301 cd testsuite; \
302 EXPECT=${EXPECT} ; export EXPECT ; \
303 if [ -f $${rootme}/../expect/expect ] ; then \
304 TCL_LIBRARY=$${srcdir}/../tcl/library ; \
305 export TCL_LIBRARY ; fi ; \
306 $(RUNTEST) --tool gas --srcdir $${srcdir}/testsuite $(RUNTESTFLAGS)
787c6bfe 307
b11fb939
KR
308config.status: configure
309 if [ -r config.status ]; then \
1be01033 310 sh ./config.status --recheck ; \
b11fb939
KR
311 else \
312 echo You must configure gas. Look at the INSTALL file for details. ; \
313 exit 1 ; \
314 fi
315
fc00f451 316config.h: config-stamp ; @true
b11fb939 317config-stamp: Makefile conf
fc00f451 318 -rm -f config.new config-stamp
1e84ff7e
KR
319 echo '/* config.h. Generated automatically by make. */' > config.new
320 echo '#ifndef GAS_VERSION' >> config.new
b11fb939
KR
321 echo '#define GAS_VERSION "$(VERSION)"' >> config.new
322 echo '' >> config.new
323 cat conf >> config.new
324 echo '#endif /* GAS_VERSION */' >> config.new
fc00f451
KR
325 $(srcdir)/../move-if-change config.new config.h
326 touch config-stamp
327
fecd2382
RP
328# Compiling object files from source files.
329
833c46e1
KR
330TARG_CPU_DEP_a29k =
331TARG_CPU_DEP_alpha =
332# start-sanitize-arc
333TARG_CPU_DEP_arc = $(srcdir)/../include/opcode/arc.h
334# end-sanitize-arc
335TARG_CPU_DEP_arm =
336TARG_CPU_DEP_generic =
337TARG_CPU_DEP_h8300 = $(srcdir)/../include/opcode/h8300.h
338TARG_CPU_DEP_h8500 = $(srcdir)/../opcodes/h8500-opc.h
339TARG_CPU_DEP_hppa =
340TARG_CPU_DEP_i386 = $(srcdir)/../include/opcode/i386.h
341TARG_CPU_DEP_i860 =
342TARG_CPU_DEP_i960 =
a1c7c0f3 343TARG_CPU_DEP_m68k = $(srcdir)/../include/opcode/m68k.h \
7e047ac2 344 $(srcdir)/config/m68k-parse.h subsegs.h
833c46e1
KR
345TARG_CPU_DEP_m88k = $(srcdir)/config/m88k-opcode.h
346TARG_CPU_DEP_mips = $(srcdir)/../include/opcode/mips.h
347TARG_CPU_DEP_ns32k =
348TARG_CPU_DEP_ppc =
349# start-sanitize-rce
350TARG_CPU_DEP_rce = $(srcdir)/../opcodes/rce-opc.h
351# end-sanitize-rce
352TARG_CPU_DEP_sh = $(srcdir)/../opcodes/sh-opc.h
353TARG_CPU_DEP_sparc =
354TARG_CPU_DEP_tahoe =
355TARG_CPU_DEP_vax =
356TARG_CPU_DEP_w65 = $(srcdir)/../opcodes/w65-opc.h
357TARG_CPU_DEP_z8k = $(srcdir)/../opcodes/z8k-opc.h
358
7e047ac2
ILT
359gasp.o : gasp.c sb.h macro.h config.h
360sb.o : sb.c sb.h config.h
361macro.o : macro.c macro.h sb.h hash.h config.h
84951544 362app.o : app.c write.h
7e047ac2 363as.o : as.c output-file.h write.h subsegs.h sb.h macro.h
84951544
KR
364atof-generic.o : atof-generic.c
365bignum-copy.o : bignum-copy.c
366cond.o : cond.c
367debug.o : debug.c subsegs.h
368expr.o : expr.c
369flonum-konst.o : flonum-konst.c
370flonum-copy.o : flonum-copy.c
371flonum-mult.o : flonum-mult.c
372frags.o : frags.c subsegs.h
373hash.o : hash.c
84951544 374input-file.o : input-file.c input-file.h
7e047ac2 375input-scrub.o : input-scrub.c input-file.h sb.h
84951544
KR
376listing.o : listing.c input-file.h subsegs.h
377literal.o : literal.c subsegs.h
378messages.o : messages.c
379output-file.o : output-file.c output-file.h
7e047ac2 380read.o : read.c sb.h macro.h
84951544
KR
381subsegs.o : subsegs.c subsegs.h
382symbols.o : symbols.c subsegs.h
383write.o : write.c subsegs.h output-file.h
384ecoff.o : ecoff.c ecoff.h \
385 $(srcdir)/../include/coff/internal.h $(srcdir)/../include/coff/sym.h \
386 $(srcdir)/../include/coff/ecoff.h \
387 $(srcdir)/../include/coff/symconst.h \
388 $(srcdir)/../include/aout/stab_gnu.h
389stabs.o : stabs.c subsegs.h $(srcdir)/../include/aout/stab_gnu.h
390atof-targ.o : atof-targ.c
391obj-format.o : obj-format.c
bf4bd1fc 392targ-cpu.o : targ-cpu.c $(TARG_CPU_DEP_@target_cpu_type@)
d1a9e594 393
816a827b
ILT
394obj-elf.o : $(srcdir)/config/obj-elf.c
395 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-elf.c
396obj-ecoff.o : $(srcdir)/config/obj-ecoff.c
397 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-ecoff.c
398
399e-mipself.o : $(srcdir)/config/e-mipself.c
400 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-mipself.c
401e-mipsecoff.o : $(srcdir)/config/e-mipsecoff.c
402 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-mipsecoff.c
403
a1c7c0f3
ILT
404# The m68k operand parser.
405
406m68k-parse.c: $(srcdir)/config/m68k-parse.y
407 $(BISON) $(BISONFLAGS) $(srcdir)/config/m68k-parse.y
408 mv -f y.tab.c m68k-parse.c
336435bc 409m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
a1c7c0f3 410
fecd2382
RP
411# Remake the info files.
412
921faa52 413doc: $(srcdir)/as.info
fecd2382 414
921faa52 415$(srcdir)/as.info: $(srcdir)/doc/as.texinfo
c97b9003 416 @(cd doc; $(MAKE) $(FLAGS_TO_PASS) as.info; mv as.info $srcdir)
fecd2382 417
6d60424f 418diststuff: $(DISTSTUFF)
367d6244 419
7420b02b 420clean-here:
f2889110 421 -rm -f $(STAGESTUFF) core stamp-mk.com
5f757edc 422 -rm -rf testsuite
fecd2382 423
daa7e184
ILT
424clean mostlyclean: clean-here
425 @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
7420b02b 426
fecd2382 427# Like clean but also delete the links made to configure gas.
367d6244 428distclean: clean-here
daa7e184 429 @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
b11fb939 430 -rm -f config.status Makefile targ-env.h targ-cpu.h \
7420b02b 431 targ-cpu.c obj-format.h obj-format.c atof-targ.c TAGS \
f2889110 432 config-stamp config.h conf config.log config.cache .gdbinit
6b0a6eaa
KR
433maintainer-clean realclean: clean distclean
434 @echo "This command is intended for maintainers to use;"
435 @echo "it deletes files that may require special tools to rebuild."
6d60424f 436 -rm -rf $(DISTSTUFF)
542e1629 437
fecd2382
RP
438# Entry points `install', `includes' and `uninstall'.
439
440# Copy the files into directories where they will be run.
542e1629 441install:
7420b02b 442 srcroot=`cd $(srcroot); pwd`; export srcroot; \
c97b9003 443 $(INSTALL_XFORM) as.new $(bindir)/as; \
7420b02b 444 $(INSTALL_XFORM1) $(srcdir)/doc/as.1 $(man1dir)/as.1; \
28d3e4a3 445 n=`echo as | sed '$(program_transform_name)'`; \
efbfb612
ILT
446 if [ -d $(tooldir) ]; then \
447 if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
448 rm -f $(tooldir)/bin/as; \
ac7f7dfe 449 ln $(bindir)/$$n $(tooldir)/bin/as >/dev/null 2>/dev/null \
efbfb612
ILT
450 || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as; \
451 else true; fi
a5a4b5ac 452 srcroot=`cd $(srcroot); pwd`; export srcroot; \
138b11d8 453 $(INSTALL_XFORM) gasp.new $(bindir)/gasp
fecd2382 454
fecd2382
RP
455# Cancel installation by deleting the installed files.
456uninstall:
fa156ffe 457 -n=`t='$(program_transform_name)'; echo as | sed $$t`; \
7e10f53c
ILT
458 rm -f $(bindir)/$$n; \
459 rm -f $(mandir)/$$n.1
fa156ffe 460 -n=`t='$(program_transform_name)'; echo gasp | sed $$t`; \
a5a4b5ac 461 rm -f $(bindir)/$$n; \
542e1629 462
fecd2382
RP
463# These exist for maintenance purposes.
464
465tags TAGS: force
787c6bfe 466 etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in
ac7f7dfe 467
542e1629 468bootstrap: as.new force
fecd2382 469 $(MAKE) stage1
3256c4b5
KR
470 rm -f stage && ln -s stage1 stage
471 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
fecd2382 472 $(MAKE) stage2
3256c4b5
KR
473 rm -f stage && ln -s stage2 stage
474 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
a01bf1fb 475 $(MAKE) comparison against=stage2
fecd2382
RP
476
477bootstrap2: force
3256c4b5
KR
478 rm -f stage && ln -s stage1 stage
479 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
fecd2382 480 $(MAKE) stage2
3256c4b5
KR
481 rm -f stage && ln -s stage2 stage
482 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
da0b2bff 483 $(MAKE) comparison against=stage2
fecd2382
RP
484
485bootstrap3: force
3256c4b5
KR
486 rm -f stage && ln -s stage2 stage
487 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
a01bf1fb 488 $(MAKE) comparison against=stage2
fecd2382
RP
489
490# Copy the object files from a particular stage into a subdirectory.
491stage1: force
492 -mkdir stage1
493 -mv $(STAGESTUFF) stage1
81f73963 494 if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi
fecd2382
RP
495
496stage2: force
497 -mkdir stage2
498 -mv $(STAGESTUFF) stage2
81f73963 499 if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi
fecd2382
RP
500
501stage3: force
502 -mkdir stage3
6a3958b2 503 -mv $(STAGESTUFF) stage3
81f73963 504 if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi
fecd2382 505
a01bf1fb
RP
506against=stage2
507
f2889110
KR
508# This rule is derived from corresponding code in the Makefile.in for gcc.
509# The "tail +16c" is to bypass headers which may include timestamps or
510# temporary assembly file names.
a01bf1fb 511comparison: force
f2889110 512 x=0 ; \
6b0a6eaa 513 for file in *.o ; do \
f2889110
KR
514 tail +16c ./$$file > tmp-foo1; \
515 if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
516 if cmp tmp-foo1 tmp-foo2 ; then \
517 true ; \
518 else \
519 echo $$file differs ; \
520 x=1 ; \
521 fi ; \
522 else true; fi ; \
523 done ; \
524 exit $$x
525 -rm -f tmp-foo*
a01bf1fb 526
6a3958b2 527de-stage1: force
b3cd8555 528 - (cd stage1 ; rm -f as ; mv -f * ..)
6a3958b2
RP
529 - rmdir stage1
530
531de-stage2: force
b3cd8555 532 - (cd stage2 ; rm -f as ; mv -f * ..)
6a3958b2
RP
533 - rmdir stage2
534
535de-stage3: force
b3cd8555 536 - (cd stage3 ; rm -f as ; mv -f * ..)
6a3958b2 537 - rmdir stage3
fecd2382 538
fecd2382 539#In GNU Make, ignore whether `stage*' exists.
daa7e184
ILT
540.PHONY: stage1 stage2 stage3 stage4 clean mostlyclean realclean distclean
541.PHONY: TAGS bootstrap
fecd2382
RP
542
543force:
544
fc00f451 545Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \
a1c7c0f3 546 $(srcdir)/configure.in config.status conf.in
a26878d1 547 $(SHELL) ./config.status
1df6e266
KR
548.gdbinit: $(srcdir)/gdbinit.in config.status
549 $(SHELL) ./config.status
This page took 0.186228 seconds and 4 git commands to generate.