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