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