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