* Makefile.in, configure.in: Remove; the testsuite is now run
[deliverable/binutils-gdb.git] / gas / Makefile.in
1 # Makefile for GNU Assembler
2 # Copyright (C) 1987-1992, 1993 Free Software Foundation, Inc.
3
4 # This file is part of GNU GAS.
5
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.
10
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.
15
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
18 # the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 # The targets for external use include:
21 # all, doc, proto, install, uninstall, includes, TAGS,
22 # clean, mostlyclean, distclean, realclean, stage1, stage2, stage3, stage4.
23
24 # Variables that exist for you to override.
25 # See below for how to change them for certain systems.
26
27 VPATH = @srcdir@
28 srcdir = @srcdir@
29 srcroot = $(srcdir)/..
30
31 target_alias = @target_alias@
32 prefix = @prefix@
33
34 program_transform_name = @program_transform_name@
35 exec_prefix = @exec_prefix@
36 bindir = $(exec_prefix)/bin
37 libdir = $(exec_prefix)/lib
38 tooldir = $(exec_prefix)/$(target_alias)
39
40 datadir = $(prefix)/lib
41 mandir = $(prefix)/man
42 man1dir = $(mandir)/man1
43 man2dir = $(mandir)/man2
44 man3dir = $(mandir)/man3
45 man4dir = $(mandir)/man4
46 man5dir = $(mandir)/man5
47 man6dir = $(mandir)/man6
48 man7dir = $(mandir)/man7
49 man8dir = $(mandir)/man8
50 man9dir = $(mandir)/man9
51 infodir = $(prefix)/info
52 includedir = $(prefix)/include
53 docdir = $(datadir)/doc
54
55 VERSION=cygnus-2.5.3
56
57 SHELL = /bin/sh
58
59 INSTALL = $${srcroot}/install.sh -c
60 INSTALL_PROGRAM = $(INSTALL)
61 INSTALL_DATA = $(INSTALL)
62 INSTALL_XFORM = $(INSTALL) -t='-e $(program_transform_name)'
63 INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
64
65 DISTSTUFF= make-gas.com m68k-parse.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 CFLAGS = -g
76
77 MAKEOVERRIDES=
78
79 EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
80 echo $${rootme}/../expect/expect ; \
81 else echo expect ; fi`
82
83 FLAGS_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)"
100
101 RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then \
102 echo ${srcdir}/../dejagnu/runtest ; else echo runtest; \
103 fi`
104 RUNTESTFLAGS=
105
106 # Lists of files for various purposes.
107
108 REAL_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 \
115 $(srcdir)/flonum-konst.c \
116 $(srcdir)/flonum-copy.c \
117 $(srcdir)/flonum-mult.c \
118 $(srcdir)/frags.c \
119 $(srcdir)/hash.c \
120 $(srcdir)/input-file.c \
121 $(srcdir)/input-scrub.c \
122 $(srcdir)/literal.c \
123 $(srcdir)/messages.c \
124 $(srcdir)/output-file.c \
125 $(srcdir)/read.c \
126 $(srcdir)/subsegs.c \
127 $(srcdir)/symbols.c \
128 $(srcdir)/write.c \
129 $(srcdir)/listing.c \
130 $(srcdir)/ecoff.c \
131 $(srcdir)/stabs.c
132
133 # in an expedient order
134 LINKED_SOURCES = \
135 targ-cpu.c \
136 obj-format.c \
137 atof-targ.c
138
139 SOURCES = $(LINKED_SOURCES) $(REAL_SOURCES)
140
141 REAL_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 \
149 $(srcdir)/listing.h \
150 $(srcdir)/tc.h \
151 $(srcdir)/obj.h \
152 $(srcdir)/read.h \
153 $(srcdir)/struc-symbol.h \
154 $(srcdir)/subsegs.h \
155 $(srcdir)/symbols.h \
156 $(srcdir)/write.h \
157 $(srcdir)/ecoff.h
158
159 LINKED_HEADERS = \
160 targ-env.h \
161 targ-cpu.h \
162 obj-format.h \
163 atof-targ.h
164
165 HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS)
166
167 TE_OBJS=
168
169 # @target_frag@
170
171 OBJS = \
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 \
181 flonum-konst.o \
182 flonum-copy.o \
183 flonum-mult.o \
184 frags.o \
185 hash.o \
186 input-file.o \
187 input-scrub.o \
188 literal.o \
189 messages.o \
190 output-file.o \
191 read.o \
192 subsegs.o \
193 symbols.o \
194 write.o \
195 listing.o \
196 ecoff.o \
197 stabs.o \
198 sb.o \
199 macro.o \
200 @extra_objects@ \
201 $(TE_OBJS)
202
203 GASPOBJS = \
204 gasp.o \
205 macro.o \
206 sb.o \
207 hash.o
208
209 all: .gdbinit as.new gasp.new
210 @srcroot=`cd $(srcroot); pwd`; export srcroot; \
211 (cd doc ; $(MAKE) $(FLAGS_TO_PASS) all)
212
213 dvi info install-info clean-info:
214 @srcroot=`cd $(srcroot); pwd`; export srcroot; \
215 (cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@)
216
217 make-gas.com: stamp-mk.com
218 stamp-mk.com: vmsconf.sh Makefile
219 sh $(srcdir)/vmsconf.sh $(OBJS) > new-make.com
220 $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com
221 touch stamp-mk.com
222
223 # Now figure out from those variables how to compile and link.
224
225 # This is the variable actually used when we compile.
226 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES)
227
228 # How to link with both our special library facilities
229 # and the system's installed libraries.
230
231 LIBS = @OPCODES_LIB@ @BFDLIB@ $(LOCAL_LOADLIBES) ../libiberty/libiberty.a
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.
237 INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(srcdir)/../include -I$(srcdir)/.. -I$(srcdir)/../bfd
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:
246
247 # Files to be copied away after each stage in building.
248 STAGESTUFF = *.o as.new gasp.new
249
250 $(OBJS): @ALL_OBJ_DEPS@
251
252 as.new: $(OBJS) $(LIBS)
253 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES)
254
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
258
259 gasp.new: $(GASPOBJS) ../libiberty/libiberty.a
260 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gasp.new $(GASPOBJS) ../libiberty/libiberty.a $(LOADLIBES)
261
262 installcheck:
263 @echo No installcheck target is available yet for the GNU assembler.
264
265 site.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
291 check: 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)
307
308 config.status: configure
309 if [ -r config.status ]; then \
310 sh ./config.status --recheck ; \
311 else \
312 echo You must configure gas. Look at the INSTALL file for details. ; \
313 exit 1 ; \
314 fi
315
316 config.h: config-stamp ; @true
317 config-stamp: Makefile conf
318 -rm -f config.new config-stamp
319 echo '/* config.h. Generated automatically by make. */' > config.new
320 echo '#ifndef GAS_VERSION' >> config.new
321 echo '#define GAS_VERSION "$(VERSION)"' >> config.new
322 echo '' >> config.new
323 cat conf >> config.new
324 echo '#endif /* GAS_VERSION */' >> config.new
325 $(srcdir)/../move-if-change config.new config.h
326 touch config-stamp
327
328 # Compiling object files from source files.
329
330 TARG_CPU_DEP_a29k =
331 TARG_CPU_DEP_alpha =
332 # start-sanitize-arc
333 TARG_CPU_DEP_arc = $(srcdir)/../include/opcode/arc.h
334 # end-sanitize-arc
335 TARG_CPU_DEP_arm =
336 TARG_CPU_DEP_generic =
337 TARG_CPU_DEP_h8300 = $(srcdir)/../include/opcode/h8300.h
338 TARG_CPU_DEP_h8500 = $(srcdir)/../opcodes/h8500-opc.h
339 TARG_CPU_DEP_hppa =
340 TARG_CPU_DEP_i386 = $(srcdir)/../include/opcode/i386.h
341 TARG_CPU_DEP_i860 =
342 TARG_CPU_DEP_i960 =
343 TARG_CPU_DEP_m68k = $(srcdir)/../include/opcode/m68k.h \
344 $(srcdir)/config/m68k-parse.h subsegs.h
345 TARG_CPU_DEP_m88k = $(srcdir)/config/m88k-opcode.h
346 TARG_CPU_DEP_mips = $(srcdir)/../include/opcode/mips.h
347 TARG_CPU_DEP_ns32k =
348 TARG_CPU_DEP_ppc =
349 # start-sanitize-rce
350 TARG_CPU_DEP_rce = $(srcdir)/../opcodes/rce-opc.h
351 # end-sanitize-rce
352 TARG_CPU_DEP_sh = $(srcdir)/../opcodes/sh-opc.h
353 TARG_CPU_DEP_sparc =
354 TARG_CPU_DEP_tahoe =
355 TARG_CPU_DEP_vax =
356 TARG_CPU_DEP_w65 = $(srcdir)/../opcodes/w65-opc.h
357 TARG_CPU_DEP_z8k = $(srcdir)/../opcodes/z8k-opc.h
358
359 gasp.o : gasp.c sb.h macro.h config.h
360 sb.o : sb.c sb.h config.h
361 macro.o : macro.c macro.h sb.h hash.h config.h
362 app.o : app.c write.h
363 as.o : as.c output-file.h write.h subsegs.h sb.h macro.h
364 atof-generic.o : atof-generic.c
365 bignum-copy.o : bignum-copy.c
366 cond.o : cond.c
367 debug.o : debug.c subsegs.h
368 expr.o : expr.c
369 flonum-konst.o : flonum-konst.c
370 flonum-copy.o : flonum-copy.c
371 flonum-mult.o : flonum-mult.c
372 frags.o : frags.c subsegs.h
373 hash.o : hash.c
374 input-file.o : input-file.c input-file.h
375 input-scrub.o : input-scrub.c input-file.h sb.h
376 listing.o : listing.c input-file.h subsegs.h
377 literal.o : literal.c subsegs.h
378 messages.o : messages.c
379 output-file.o : output-file.c output-file.h
380 read.o : read.c sb.h macro.h
381 subsegs.o : subsegs.c subsegs.h
382 symbols.o : symbols.c subsegs.h
383 write.o : write.c subsegs.h output-file.h
384 ecoff.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
389 stabs.o : stabs.c subsegs.h $(srcdir)/../include/aout/stab_gnu.h
390 atof-targ.o : atof-targ.c
391 obj-format.o : obj-format.c
392 targ-cpu.o : targ-cpu.c $(TARG_CPU_DEP_@target_cpu_type@)
393
394 obj-elf.o : $(srcdir)/config/obj-elf.c
395 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-elf.c
396 obj-ecoff.o : $(srcdir)/config/obj-ecoff.c
397 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-ecoff.c
398
399 e-mipself.o : $(srcdir)/config/e-mipself.c
400 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-mipself.c
401 e-mipsecoff.o : $(srcdir)/config/e-mipsecoff.c
402 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-mipsecoff.c
403
404 # The m68k operand parser.
405
406 m68k-parse.c: $(srcdir)/config/m68k-parse.y
407 $(BISON) $(BISONFLAGS) $(srcdir)/config/m68k-parse.y
408 mv -f y.tab.c m68k-parse.c
409 m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
410
411 # Remake the info files.
412
413 doc: $(srcdir)/as.info
414
415 $(srcdir)/as.info: $(srcdir)/doc/as.texinfo
416 @(cd doc; $(MAKE) $(FLAGS_TO_PASS) as.info; mv as.info $srcdir)
417
418 diststuff: $(DISTSTUFF)
419
420 clean-here:
421 -rm -f $(STAGESTUFF) core stamp-mk.com
422 -rm -rf testsuite
423
424 clean mostlyclean: clean-here
425 @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
426
427 # Like clean but also delete the links made to configure gas.
428 distclean: clean-here
429 @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
430 -rm -f config.status Makefile targ-env.h targ-cpu.h \
431 targ-cpu.c obj-format.h obj-format.c atof-targ.c TAGS \
432 config-stamp config.h conf config.log config.cache .gdbinit
433 realclean: clean distclean
434 -rm -rf $(DISTSTUFF)
435
436 # Entry points `install', `includes' and `uninstall'.
437
438 # Copy the files into directories where they will be run.
439 install:
440 srcroot=`cd $(srcroot); pwd`; export srcroot; \
441 $(INSTALL_XFORM) as.new $(bindir)/as; \
442 $(INSTALL_XFORM1) $(srcdir)/doc/as.1 $(man1dir)/as.1; \
443 n=`echo as | sed '$(program_transform_name)'`; \
444 if [ -d $(tooldir) ]; then \
445 if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
446 rm -f $(tooldir)/bin/as; \
447 ln $(bindir)/$$n $(tooldir)/bin/as >/dev/null 2>/dev/null \
448 || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as; \
449 else true; fi
450 srcroot=`cd $(srcroot); pwd`; export srcroot; \
451 $(INSTALL_XFORM) gasp.new $(bindir)/gasp
452
453 # Cancel installation by deleting the installed files.
454 uninstall:
455 -n=`t='$(program_transform_name)'; echo as | sed $$t`; \
456 rm -f $(bindir)/$$n; \
457 rm -f $(mandir)/$$n.1
458 -n=`t='$(program_transform_name)'; echo gasp | sed $$t`; \
459 rm -f $(bindir)/$$n; \
460
461 # These exist for maintenance purposes.
462
463 tags TAGS: force
464 etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in
465
466 bootstrap: as.new force
467 $(MAKE) stage1
468 rm -f stage && ln -s stage1 stage
469 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
470 $(MAKE) stage2
471 rm -f stage && ln -s stage2 stage
472 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
473 $(MAKE) comparison against=stage2
474
475 bootstrap2: force
476 rm -f stage && ln -s stage1 stage
477 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
478 $(MAKE) stage2
479 rm -f stage && ln -s stage2 stage
480 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
481 $(MAKE) comparison against=stage2
482
483 bootstrap3: force
484 rm -f stage && ln -s stage2 stage
485 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
486 $(MAKE) comparison against=stage2
487
488 # Copy the object files from a particular stage into a subdirectory.
489 stage1: force
490 -mkdir stage1
491 -mv $(STAGESTUFF) stage1
492 if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi
493
494 stage2: force
495 -mkdir stage2
496 -mv $(STAGESTUFF) stage2
497 if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi
498
499 stage3: force
500 -mkdir stage3
501 -mv $(STAGESTUFF) stage3
502 if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi
503
504 against=stage2
505
506 # This rule is derived from corresponding code in the Makefile.in for gcc.
507 # The "tail +16c" is to bypass headers which may include timestamps or
508 # temporary assembly file names.
509 comparison: force
510 x=0 ; \
511 for file in $(STAGESTUFF) ; do \
512 tail +16c ./$$file > tmp-foo1; \
513 if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
514 if cmp tmp-foo1 tmp-foo2 ; then \
515 true ; \
516 else \
517 echo $$file differs ; \
518 x=1 ; \
519 fi ; \
520 else true; fi ; \
521 done ; \
522 exit $$x
523 -rm -f tmp-foo*
524
525 de-stage1: force
526 - (cd stage1 ; rm -f as ; mv -f * ..)
527 - rmdir stage1
528
529 de-stage2: force
530 - (cd stage2 ; rm -f as ; mv -f * ..)
531 - rmdir stage2
532
533 de-stage3: force
534 - (cd stage3 ; rm -f as ; mv -f * ..)
535 - rmdir stage3
536
537 #In GNU Make, ignore whether `stage*' exists.
538 .PHONY: stage1 stage2 stage3 stage4 clean mostlyclean realclean distclean
539 .PHONY: TAGS bootstrap
540
541 force:
542
543 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \
544 $(srcdir)/configure.in config.status conf.in
545 $(SHELL) ./config.status
546 .gdbinit: $(srcdir)/gdbinit.in config.status
547 $(SHELL) ./config.status
This page took 0.04033 seconds and 4 git commands to generate.