]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gas/Makefile.am
gas: generate .sframe from CFI directives
[thirdparty/binutils-gdb.git] / gas / Makefile.am
1 ## Process this file with automake to generate Makefile.in
2 #
3 # Copyright (C) 2012-2022 Free Software Foundation, Inc.
4 #
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; see the file COPYING3. If not see
17 # <http://www.gnu.org/licenses/>.
18 #
19
20 AUTOMAKE_OPTIONS = dejagnu foreign no-dist subdir-objects info-in-builddir no-texinfo.tex
21 ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
22
23 MAINTAINERCLEANFILES =
24
25 SUBDIRS = po
26
27 tooldir = $(exec_prefix)/$(target_alias)
28
29 # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
30 # -I../zlib, unless we were configured with --with-system-zlib, in which
31 # case both are empty.
32 ZLIB = @zlibdir@ -lz
33 ZLIBINC = @zlibinc@
34
35 YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo @YACC@ ; fi`
36 LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi`
37
38 # Automake 1.10+ disables lex and yacc output file regeneration if
39 # maintainer mode is disabled. Avoid this.
40 am__skiplex =
41 am__skipyacc =
42
43 WARN_CFLAGS = @WARN_CFLAGS@ @WARN_WRITE_STRINGS@
44 NO_WERROR = @NO_WERROR@
45 AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) $(ZSTD_CFLAGS)
46
47 TARG_CPU = @target_cpu_type@
48 TARG_CPU_C = $(srcdir)/config/tc-@target_cpu_type@.c
49 TARG_CPU_O = config/tc-@target_cpu_type@.@OBJEXT@
50 TARG_CPU_H = $(srcdir)/config/tc-@target_cpu_type@.h
51 OBJ_FORMAT_C = $(srcdir)/config/obj-@obj_format@.c
52 OBJ_FORMAT_O = config/obj-@obj_format@.@OBJEXT@
53 OBJ_FORMAT_H = $(srcdir)/config/obj-@obj_format@.h
54 TARG_ENV_H = $(srcdir)/config/te-@te_file@.h
55 ATOF_TARG_C = $(srcdir)/config/atof-@atof@.c
56 ATOF_TARG_O = config/atof-@atof@.@OBJEXT@
57
58 # use @target_cpu_type@ for refering to configured target name
59 IT_HDRS=itbl-parse.h $(srcdir)/itbl-ops.h
60 IT_SRCS=itbl-parse.c itbl-lex-wrapper.c $(srcdir)/itbl-ops.c
61 IT_DEPS=$(srcdir)/itbl-parse.y $(srcdir)/itbl-lex.l $(srcdir)/config/itbl-@target_cpu_type@.h
62 IT_OBJS=itbl-parse.@OBJEXT@ itbl-lex.@OBJEXT@ itbl-ops.@OBJEXT@
63
64
65 # Regular source files.
66
67 GAS_CFILES = \
68 app.c \
69 as.c \
70 atof-generic.c \
71 compress-debug.c \
72 cond.c \
73 depend.c \
74 dwarf2dbg.c \
75 dw2gencfi.c \
76 ecoff.c \
77 ehopt.c \
78 expr.c \
79 flonum-copy.c \
80 flonum-konst.c \
81 flonum-mult.c \
82 frags.c \
83 gen-sframe.c \
84 hash.c \
85 input-file.c \
86 input-scrub.c \
87 listing.c \
88 literal.c \
89 macro.c \
90 messages.c \
91 output-file.c \
92 read.c \
93 remap.c \
94 sb.c \
95 sframe-opt.c \
96 stabs.c \
97 subsegs.c \
98 symbols.c \
99 write.c
100
101 CFILES = $(GAS_CFILES) itbl-ops.c cgen.c
102
103 HFILES = \
104 as.h \
105 asintl.h \
106 bignum.h \
107 bit_fix.h \
108 cgen.h \
109 compress-debug.h \
110 dwarf2dbg.h \
111 dw2gencfi.h \
112 ecoff.h \
113 emul-target.h \
114 emul.h \
115 expr.h \
116 flonum.h \
117 frags.h \
118 gen-sframe.h \
119 hash.h \
120 input-file.h \
121 itbl-lex.h \
122 itbl-ops.h \
123 listing.h \
124 macro.h \
125 obj.h \
126 output-file.h \
127 read.h \
128 sb.h \
129 subsegs.h \
130 symbols.h \
131 tc.h \
132 write.h
133
134 # CPU files in config.
135
136 TARGET_CPU_CFILES = \
137 config/tc-aarch64.c \
138 config/tc-alpha.c \
139 config/tc-arc.c \
140 config/tc-arm.c \
141 config/tc-avr.c \
142 config/tc-bfin.c \
143 config/tc-bpf.c \
144 config/tc-cr16.c \
145 config/tc-cris.c \
146 config/tc-crx.c \
147 config/tc-csky.c \
148 config/tc-d10v.c \
149 config/tc-d30v.c \
150 config/tc-dlx.c \
151 config/tc-epiphany.c \
152 config/tc-fr30.c \
153 config/tc-frv.c \
154 config/tc-ft32.c \
155 config/tc-h8300.c \
156 config/tc-hppa.c \
157 config/tc-ia64.c \
158 config/tc-i386.c \
159 config/tc-ip2k.c \
160 config/tc-iq2000.c \
161 config/tc-lm32.c \
162 config/tc-loongarch.c \
163 config/tc-m32c.c \
164 config/tc-m32r.c \
165 config/tc-m68hc11.c \
166 config/tc-m68k.c \
167 config/tc-s12z.c \
168 config/tc-mcore.c \
169 config/tc-mep.c \
170 config/tc-metag.c \
171 config/tc-microblaze.c \
172 config/tc-mips.c \
173 config/tc-mmix.c \
174 config/tc-mn10200.c \
175 config/tc-mn10300.c \
176 config/tc-moxie.c \
177 config/tc-msp430.c \
178 config/tc-mt.c \
179 config/tc-nds32.c \
180 config/tc-nios2.c \
181 config/tc-ns32k.c \
182 config/tc-or1k.c \
183 config/tc-pdp11.c \
184 config/tc-pj.c \
185 config/tc-ppc.c \
186 config/tc-pru.c \
187 config/tc-riscv.c \
188 config/tc-rl78.c \
189 config/tc-rx.c \
190 config/tc-s390.c \
191 config/tc-score.c \
192 config/tc-sh.c \
193 config/tc-sparc.c \
194 config/tc-spu.c \
195 config/tc-tic30.c \
196 config/tc-tic4x.c \
197 config/tc-tic54x.c \
198 config/tc-tic6x.c \
199 config/tc-tilegx.c \
200 config/tc-tilepro.c \
201 config/tc-v850.c \
202 config/tc-vax.c \
203 config/tc-visium.c \
204 config/tc-wasm32.c \
205 config/tc-xstormy16.c \
206 config/tc-xgate.c \
207 config/tc-xtensa.c \
208 config/tc-z80.c \
209 config/tc-z8k.c
210
211 TARGET_CPU_HFILES = \
212 config/tc-aarch64.h \
213 config/tc-alpha.h \
214 config/tc-arc.h \
215 config/tc-arm.h \
216 config/tc-avr.h \
217 config/tc-bfin.h \
218 config/tc-bpf.h \
219 config/tc-cr16.h \
220 config/tc-cris.h \
221 config/tc-crx.h \
222 config/tc-csky.h \
223 config/tc-d10v.h \
224 config/tc-d30v.h \
225 config/tc-dlx.h \
226 config/tc-epiphany.h \
227 config/tc-fr30.h \
228 config/tc-frv.h \
229 config/tc-ft32.h \
230 config/tc-h8300.h \
231 config/tc-hppa.h \
232 config/tc-ia64.h \
233 config/tc-i386.h \
234 config/tc-ip2k.h \
235 config/tc-iq2000.h \
236 config/tc-lm32.h \
237 config/tc-m32c.h \
238 config/tc-m32r.h \
239 config/tc-m68hc11.h \
240 config/tc-m68k.h \
241 config/tc-s12z.h \
242 config/tc-mcore.h \
243 config/tc-mep.h \
244 config/tc-metag.h \
245 config/tc-microblaze.h \
246 config/tc-mips.h \
247 config/tc-mmix.h \
248 config/tc-mn10200.h \
249 config/tc-mn10300.h \
250 config/tc-msp430.h \
251 config/tc-mt.h \
252 config/tc-nds32.h \
253 config/tc-nios2.h \
254 config/tc-ns32k.h \
255 config/tc-or1k.h \
256 config/tc-pdp11.h \
257 config/tc-pj.h \
258 config/tc-ppc.h \
259 config/tc-pru.h \
260 config/tc-riscv.h \
261 config/tc-rl78.h \
262 config/tc-rx.h \
263 config/tc-s390.h \
264 config/tc-score.h \
265 config/tc-sh.h \
266 config/tc-sparc.h \
267 config/tc-spu.h \
268 config/tc-tic30.h \
269 config/tc-tic4x.h \
270 config/tc-tic54x.h \
271 config/tc-tic6x.h \
272 config/tc-tilegx.h \
273 config/tc-tilepro.h \
274 config/tc-v850.h \
275 config/tc-vax.h \
276 config/tc-visium.h \
277 config/tc-wasm32.h \
278 config/tc-xstormy16.h \
279 config/tc-xgate.h \
280 config/tc-xtensa.h \
281 config/tc-z80.h \
282 config/tc-z8k.h
283
284 TARGET_EXTRA_FILES = \
285 config/bfin-lex-wrapper.c \
286 config/xtensa-relax.c \
287 config/xtensa-relax.h
288
289 # OBJ files in config
290
291 OBJ_FORMAT_CFILES = \
292 config/obj-aout.c \
293 config/obj-coff.c \
294 config/obj-ecoff.c \
295 config/obj-elf.c \
296 config/obj-evax.c \
297 config/obj-fdpicelf.c \
298 config/obj-macho.c \
299 config/obj-multi.c \
300 config/obj-som.c
301
302 OBJ_FORMAT_HFILES = \
303 config/obj-aout.h \
304 config/obj-coff.h \
305 config/obj-ecoff.h \
306 config/obj-elf.h \
307 config/obj-evax.h \
308 config/obj-fdpicelf.h \
309 config/obj-macho.h \
310 config/obj-multi.h \
311 config/obj-som.h
312
313 # Emulation header files in config
314
315 TARG_ENV_HFILES = \
316 config/te-386bsd.h \
317 config/te-aix5.h \
318 config/te-armeabi.h \
319 config/te-armfbsdeabi.h \
320 config/te-armfbsdvfp.h \
321 config/te-armlinuxeabi.h \
322 config/te-csky_abiv1.h \
323 config/te-csky_abiv1_linux.h \
324 config/te-csky_abiv2.h \
325 config/te-csky_abiv2_linux.h \
326 config/te-freebsd.h \
327 config/te-generic.h \
328 config/te-gnu.h \
329 config/te-go32.h \
330 config/te-hppa.h \
331 config/te-hppa64.h \
332 config/te-hppalinux64.h \
333 config/te-ia64aix.h \
334 config/te-interix.h \
335 config/te-lynx.h \
336 config/te-macos.h \
337 config/te-nbsd.h \
338 config/te-nbsd532.h \
339 config/te-pc532mach.h \
340 config/te-pe.h \
341 config/te-solaris.h \
342 config/te-svr4.h \
343 config/te-tmips.h \
344 config/te-vxworks.h \
345 config/te-wince-pe.h
346
347 TARG_ENV_CFILES = \
348 config/te-vms.c
349
350 # Multi files in config
351
352 MULTI_CFILES = \
353 config/e-crisaout.c \
354 config/e-criself.c \
355 config/e-i386aout.c \
356 config/e-i386coff.c \
357 config/e-i386elf.c \
358 config/e-mipself.c
359
360 CONFIG_ATOF_CFILES = \
361 config/atof-ieee.c \
362 config/atof-vax.c
363
364 POTFILES = $(MULTI_CFILES) $(CONFIG_ATOF_CFILES) \
365 $(TARG_ENV_HFILES) $(TARG_ENV_CFILES) $(OBJ_FORMAT_HFILES) \
366 $(OBJ_FORMAT_CFILES) $(TARGET_CPU_HFILES) $(TARGET_CPU_CFILES) \
367 $(TARGET_EXTRA_FILES) $(HFILES) $(CFILES)
368 po/POTFILES.in: @MAINT@ Makefile
369 for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \
370 && mv tmp $(srcdir)/po/POTFILES.in
371
372 # Note: GASP is now deprecated and has been removed. It is still
373 # available in the CVS archive or older binutils releases if it is needed.
374 noinst_PROGRAMS = as-new
375 noinst_SCRIPTS = $(GDBINIT)
376 EXTRA_SCRIPTS = .gdbinit
377
378 EXTRA_DIST = config/m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c \
379 config/bfin-parse.c config/bfin-parse.h config/bfin-lex.c \
380 config/rl78-parse.c config/rl78-parse.h \
381 config/rx-parse.c config/rx-parse.h \
382 config/loongarch-parse.c config/loongarch-parse.h config/loongarch-lex.c
383
384 diststuff: $(EXTRA_DIST) info
385
386 DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-desc.h
387
388 # Now figure out from those variables how to compile and link.
389
390 BASEDIR = $(srcdir)/..
391 BFDDIR = $(BASEDIR)/bfd
392 INCDIR = $(BASEDIR)/include
393
394 # This is the variable actually used when we compile.
395 # Specify the directories to be searched for header files.
396 # Both . and srcdir are used, in that order,
397 # so that tm.h and config.h will be found in the compilation
398 # subdirectory rather than in the source directory.
399 AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config \
400 -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR) @INCINTL@ @LARGEFILE_CPPFLAGS@ \
401 -DLOCALEDIR="\"$(datadir)/locale\""
402
403 # How to link with both our special library facilities
404 # and the system's installed libraries.
405
406 GASLIBS = @OPCODES_LIB@ ../bfd/libbfd.la ../libiberty/libiberty.a
407
408 # Files to be copied away after each stage in building.
409 STAGESTUFF = *.@OBJEXT@ $(noinst_PROGRAMS)
410
411 as_new_SOURCES = $(GAS_CFILES)
412 as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
413 $(extra_objects) $(GASLIBS) $(LIBINTL) $(LIBM) $(ZLIB) $(ZSTD_LIBS)
414 as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
415 $(extra_objects) $(GASLIBS) $(LIBINTL_DEP)
416 EXTRA_as_new_SOURCES = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
417 $(TARGET_CPU_HFILES) $(TARGET_EXTRA_FILES) $(TARG_ENV_CFILES) \
418 $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES) \
419 $(CONFIG_ATOF_CFILES) $(MULTI_CFILES)
420
421 EXPECT = expect
422 RUNTEST = runtest
423 RUNTESTFLAGS=
424
425 check-DEJAGNU: site.exp
426 if [ -d testsuite ]; then \
427 true; \
428 else \
429 mkdir testsuite; \
430 fi
431 rm -f testsuite/site.exp
432 cp site.exp testsuite/site.exp
433 rootme=`pwd`; export rootme; \
434 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
435 LC_ALL=C; export LC_ALL; \
436 EXPECT=${EXPECT} ; export EXPECT ; \
437 runtest=$(RUNTEST); \
438 cd testsuite; \
439 if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
440 $$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \
441 $(RUNTESTFLAGS); \
442 else echo "WARNING: could not find \`runtest'" 1>&2; :;\
443 fi
444
445 development.exp: $(BFDDIR)/development.sh
446 $(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh \
447 | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@
448
449 EXTRA_as_new_SOURCES += config/m68k-parse.y
450 config/m68k-parse.c: $(srcdir)/config/m68k-parse.y
451 $(SHELL) $(YLWRAP) $(srcdir)/config/m68k-parse.y y.tab.c $@ -- $(YACCCOMPILE)
452 config/m68k-parse.h: config/m68k-parse.c
453 @true
454
455 EXTRA_as_new_SOURCES += config/bfin-parse.y
456 config/bfin-parse.c: $(srcdir)/config/bfin-parse.y
457 $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c $@ y.tab.h config/bfin-parse.h -- $(YACCCOMPILE) -d ;
458 config/bfin-parse.h: config/bfin-parse.c
459 @true
460
461 EXTRA_as_new_SOURCES += config/bfin-lex.l
462 config/bfin-lex.c: $(srcdir)/config/bfin-lex.l
463 $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c $@ -- $(LEXCOMPILE)
464
465 config/bfin-lex-wrapper.@OBJEXT@: config/bfin-lex.c config/bfin-parse.h
466
467 EXTRA_as_new_SOURCES += config/rl78-parse.y
468 config/rl78-parse.c: $(srcdir)/config/rl78-parse.y
469 $(SHELL) $(YLWRAP) $(srcdir)/config/rl78-parse.y y.tab.c $@ y.tab.h config/rl78-parse.h -- $(YACCCOMPILE) -d ;
470 config/rl78-parse.h: config/rl78-parse.c
471 @true
472
473 EXTRA_as_new_SOURCES += config/rx-parse.y
474 config/rx-parse.c: $(srcdir)/config/rx-parse.y
475 $(SHELL) $(YLWRAP) $(srcdir)/config/rx-parse.y y.tab.c $@ y.tab.h config/rx-parse.h -- $(YACCCOMPILE) -d ;
476 config/rx-parse.h: config/rx-parse.c
477 @true
478
479 # The LoongArch lexical analyzer and parser.
480 EXTRA_as_new_SOURCES += config/loongarch-parse.y
481 config/loongarch-parse.c: $(srcdir)/config/loongarch-parse.y
482 $(SHELL) $(YLWRAP) $(srcdir)/config/loongarch-parse.y y.tab.c $@ y.tab.h config/loongarch-parse.h -- $(YACCCOMPILE) -d ;
483 config/loongarch-parse.h: config/loongarch-parse.c
484 @true
485
486 EXTRA_as_new_SOURCES += config/loongarch-lex.l
487 config/loongarch-lex.c: $(srcdir)/config/loongarch-lex.l
488 $(SHELL) $(YLWRAP) $(srcdir)/config/loongarch-lex.l lex.yy.c $@ -- $(LEXCOMPILE)
489
490 config/loongarch-lex-wrapper.@OBJEXT@: config/loongarch-lex.c config/loongarch-parse.h
491
492 # The mips instruction table specification lexical analyzer and parser.
493
494 itbl-lex-wrapper.@OBJEXT@: itbl-lex.c itbl-parse.h
495
496 itbl-parse.c: $(srcdir)/itbl-parse.y
497 $(SHELL) $(YLWRAP) $(srcdir)/itbl-parse.y y.tab.c $@ y.tab.h itbl-parse.h -- $(YACCCOMPILE) -d
498
499 itbl-parse.h: itbl-parse.c
500 @true
501
502 itbl-ops.@OBJEXT@: itbl-parse.h
503
504 # stand-alone itbl assembler & disassembler
505
506 EXTRA_PROGRAMS = itbl-test
507 itbl_test_SOURCES = itbl-parse.y itbl-lex.l
508 itbl_test_LDADD = itbl-tops.@OBJEXT@ itbl-test.@OBJEXT@ $(GASLIBS) @LEXLIB@
509
510 itbl-tops.@OBJEXT@: itbl-ops.c itbl-parse.h
511 if am__fastdepCC
512 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -o $@ -c -DSTAND_ALONE $(srcdir)/itbl-ops.c
513 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
514 else
515 if AMDEP
516 source='itbl-ops.c' object='$@' libtool=no @AMDEPBACKSLASH@
517 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
518 endif
519 $(COMPILE) -o $@ -DSTAND_ALONE -c $(srcdir)/itbl-ops.c
520 endif
521
522 itbl-test.@OBJEXT@: $(srcdir)/testsuite/gas/all/itbl-test.c
523 if am__fastdepCC
524 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ -DSTAND_ALONE $(srcdir)/testsuite/gas/all/itbl-test.c
525 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
526 else
527 if AMDEP
528 source='itbl-test.c' object='$@' libtool=no @AMDEPBACKSLASH@
529 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
530 endif
531 $(COMPILE) -c -DSTAND_ALONE $(srcdir)/testsuite/gas/all/itbl-test.c
532 endif
533
534 # CGEN interface.
535
536 CGEN_CPU_PREFIX = @cgen_cpu_prefix@
537
538 cgen.@OBJEXT@: cgen.c cgen.h cgen-desc.h subsegs.h \
539 $(INCDIR)/obstack.h $(INCDIR)/opcode/cgen.h \
540 $(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-desc.h \
541 $(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-opc.h
542
543 # Remake the info files.
544
545 MOSTLYCLEANFILES = $(STAGESTUFF) core \
546 testsuite/*.@OBJEXT@ testsuite/*.out testsuite/gas.log testsuite/gas.sum \
547 testsuite/site.exp site.bak site.exp development.exp stage stage1 stage2
548
549 .PHONY: install-exec-local install-data-local
550 .PHONY: install-exec-bindir install-exec-tooldir
551
552 install-exec-local: install-exec-bindir @install_tooldir@
553
554 install-exec-bindir: $(noinst_PROGRAMS)
555 $(mkinstalldirs) $(DESTDIR)$(bindir)
556 @list='$(noinst_PROGRAMS)'; for p in $$list; do \
557 if test -f $$p; then \
558 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
559 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
560 else :; fi; \
561 done
562
563 install-exec-tooldir: install-exec-bindir $(noinst_PROGRAMS)
564 $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin
565 n=`echo as | sed '$(transform)'`; \
566 if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \
567 rm -f $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \
568 ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \
569 || $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \
570 else \
571 true ; \
572 fi
573
574 # These exist for maintenance purposes.
575
576 .PHONY: bootstrap bootstrap2 bootstrap3 stage1 stage2 stage3 comparison
577
578 bootstrap: as-new$(EXEEXT)
579 $(MAKE) stage1
580 rm -f stage && ln -s stage1 stage
581 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
582 $(MAKE) stage2
583 rm -f stage && ln -s stage2 stage
584 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
585 $(MAKE) comparison against=stage2
586
587 bootstrap2:
588 rm -f stage && ln -s stage1 stage
589 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
590 $(MAKE) stage2
591 rm -f stage && ln -s stage2 stage
592 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
593 $(MAKE) comparison against=stage2
594
595 bootstrap3:
596 rm -f stage && ln -s stage2 stage
597 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
598 $(MAKE) comparison against=stage2
599
600 # Copy the object files from a particular stage into a subdirectory.
601 stage1:
602 -mkdir stage1
603 -mv $(STAGESTUFF) stage1
604 if [ -f stage1/as-new$(EXEEXT) -a ! -f stage1/as$(EXEEXT) ] ; then (cd stage1 ; ln -s as-new$(EXEEXT) as$(EXEEXT)) ; fi
605
606 stage2:
607 -mkdir stage2
608 -mv $(STAGESTUFF) stage2
609 if [ -f stage2/as-new$(EXEEXT) -a ! -f stage2/as$(EXEEXT) ] ; then (cd stage2 ; ln -s as-new$(EXEEXT) as$(EXEEXT)) ; fi
610
611 stage3:
612 -mkdir stage3
613 -mv $(STAGESTUFF) stage3
614 if [ -f stage3/as-new$(EXEEXT) -a ! -f stage3/as$(EXEEXT) ] ; then (cd stage3 ; ln -s as-new as$(EXEEXT)) ; fi
615
616 against=stage2
617
618 comparison:
619 x=0 ; \
620 for file in *.@OBJEXT@ ; do \
621 f1=./$$file; f2=${against}/$$file; \
622 $(do_compare) > /dev/null 2>&1; \
623 if test $$? -ne 0; then \
624 echo $$file differs ; \
625 x=1 ; \
626 fi ; \
627 done ; \
628 exit $$x
629 -rm -f tmp-foo*
630
631 .PHONY: de-stage1 de-stage2 de-stage3
632
633 de-stage1:
634 - (cd stage1 ; rm -f as$(EXEEXT) ; mv -f * ..)
635 - rmdir stage1
636
637 de-stage2:
638 - (cd stage2 ; rm -f as$(EXEEXT) ; mv -f * ..)
639 - rmdir stage2
640
641 de-stage3:
642 - (cd stage3 ; rm -f as$(EXEEXT) ; mv -f * ..)
643 - rmdir stage3
644
645 # Reconfigure if configure.tgt changes.
646 # development.sh is used to determine -Werror default.
647 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.tgt $(BFDDIR)/development.sh
648
649 EXTRA_DEJAGNU_SITE_CONFIG = development.exp
650
651 include doc/local.mk