OSDN Git Service

* rs6000.c (struct machine_function): Add pic_offset_table_rtx.
[pf3gnuchains/gcc-fork.git] / gcc / Makefile.in
1 # Makefile for GNU C compiler.
2 #   Copyright (C) 1987, 88, 90-96, 1997 Free Software Foundation, Inc.
3
4 #This file is part of GNU CC.
5
6 #GNU CC 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 CC 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 CC; see the file COPYING.  If not, write to
18 #the Free Software Foundation, 59 Temple Place - Suite 330,
19 #Boston MA 02111-1307, USA.
20
21 # The targets for external use include:
22 # all, doc, proto, install, install-cross, install-cross-rest,
23 # uninstall, TAGS, mostlyclean, clean, distclean, maintainer-clean,
24 # stage1, stage2, stage3, stage4.
25
26 # Suppress smart makes who think they know how to automake Yacc files
27 .y.c:
28
29 # Directory where sources are, from where we are.
30 srcdir = @srcdir@
31 VPATH = @srcdir@
32
33 # Variables that exist for you to override.
34 # See below for how to change them for certain systems.
35
36 # List of language subdirectories.
37 # This is overridden by configure.
38 SUBDIRS =@subdirs@
39
40 # Selection of languages to be made.
41 # This is overridden by configure.
42 LANGUAGES = c proto gcov @all_languages@
43
44 # Selection of languages to be made during stage1 build.
45 # This is overridden by configure.
46 BOOT_LANGUAGES = c @all_boot_languages@
47
48 ALLOCA =
49 ALLOCA_FLAGS =
50 ALLOCA_FINISH = true
51
52 # Various ways of specifying flags for compilations:  
53 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
54 # BOOT_CFLAGS is the value of CFLAGS to pass
55 # to the stage2 and stage3 compilations
56 # XCFLAGS is used for most compilations but not when using the GCC just built.
57 # TCFLAGS is used for compilations with the GCC just built.
58 XCFLAGS =
59 TCFLAGS =
60 CFLAGS = -g
61 BOOT_CFLAGS = -O2 $(CFLAGS)
62 # These exists to be overridden by the x-* and t-* files, respectively.
63 X_CFLAGS =
64 T_CFLAGS =
65
66 X_CPPFLAGS =
67 T_CPPFLAGS =
68
69 CC = @CC@
70 BISON = bison
71 BISONFLAGS =
72 LEX = flex
73 LEXFLAGS =
74 AR = ar
75 AR_FLAGS = rc
76 DLLTOOL = dlltool
77 SHELL = /bin/sh
78 # on sysV, define this as cp.
79 INSTALL = @INSTALL@
80 # Some systems may be missing symbolic links, regular links, or both.
81 # Allow configure to check this and use "ln -s", "ln", or "cp" as appropriate.
82 LN=@LN@
83 LN_S=@LN_S@
84 # These permit overriding just for certain files.
85 INSTALL_PROGRAM = @INSTALL_PROGRAM@
86 INSTALL_DATA = @INSTALL_DATA@
87 MAKEINFO = makeinfo
88 MAKEINFOFLAGS =
89 TEXI2DVI = texi2dvi
90 # For GNUmake: let us decide what gets passed to recursive makes.
91 MAKEOVERRIDES =
92 @SET_MAKE@
93
94 # Define this as & to perform parallel make on a Sequent.
95 # Note that this has some bugs, and it seems currently necessary 
96 # to compile all the gen* files first by hand to avoid erroneous results.
97 P =
98
99 # How to invoke ranlib.
100 RANLIB = ranlib
101 # Test to use to see whether ranlib exists on the system.
102 RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
103
104 # Compiler to use for compiling libgcc1.a.
105 # OLDCC should not be the GNU C compiler,
106 # since that would compile typical libgcc1.a functions such as mulsi3
107 # into infinite recursions.
108 OLDCC = cc
109
110 # CFLAGS for use with OLDCC, for compiling libgcc1.a.
111 # NOTE: -O does not work on some Unix systems!
112 CCLIBFLAGS = -O
113
114 # Version of ar to use when compiling libgcc1.a.
115 OLDAR = ar
116 OLDAR_FLAGS = qc
117
118 # Target to use when installing include directory.  Either
119 # install-headers-tar or install-headers-cpio.
120 INSTALL_HEADERS_DIR = @build_install_headers_dir@
121
122 # Header files that are made available under the same name
123 # to programs compiled with GCC.
124 USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
125     $(srcdir)/ginclude/varargs.h $(srcdir)/ginclude/va-alpha.h \
126     $(srcdir)/ginclude/va-h8300.h $(srcdir)/ginclude/va-i860.h \
127     $(srcdir)/ginclude/va-i960.h $(srcdir)/ginclude/va-mips.h \
128     $(srcdir)/ginclude/va-m88k.h $(srcdir)/ginclude/va-mn10200.h \
129     $(srcdir)/ginclude/va-mn10300.h $(srcdir)/ginclude/va-pa.h \
130     $(srcdir)/ginclude/va-pyr.h $(srcdir)/ginclude/va-sparc.h \
131     $(srcdir)/ginclude/va-clipper.h $(srcdir)/ginclude/va-spur.h \
132     $(srcdir)/ginclude/va-m32r.h $(srcdir)/ginclude/va-sh.h \
133     $(srcdir)/ginclude/va-v850.h $(srcdir)/ginclude/va-arc.h \
134     $(srcdir)/ginclude/iso646.h $(srcdir)/ginclude/va-ppc.h \
135     $(srcdir)/ginclude/proto.h $(EXTRA_HEADERS) \
136     $(LANG_EXTRA_HEADERS)
137
138 # Target to use whe installing assert.h.  Some systems may
139 # want to set this empty.
140 INSTALL_ASSERT_H = install-assert-h
141
142 # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
143 # Usually the one we just built.
144 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
145 GCC_FOR_TARGET = ./xgcc -B./
146
147 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
148 # It omits XCFLAGS, and specifies -B./.
149 # It also specifies -I./include to find, e.g., stddef.h.
150 GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -I./include $(TCFLAGS)
151
152 # Special flags for compiling enquire.
153 # We disable optimization to make floating point more reliable.
154 ENQUIRE_CFLAGS = -DNO_MEM -DNO_LONG_DOUBLE_IO -O0
155 ENQUIRE_LDFLAGS = $(LDFLAGS)
156
157 # Sed command to transform gcc to installed name.  Overwritten by configure.
158 program_transform_name = @program_transform_name@
159 program_transform_cross_name = -e s,^,$(target_alias)-,
160
161 # Tools to use when building a cross-compiler.
162 # These are used because `configure' appends `cross-make'
163 # to the makefile when making a cross-compiler.
164
165 TARGET_TOOLPREFIX = $(tooldir)/bin/
166 AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
167 AR_FOR_TARGET_FLAGS = rc
168 RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
169 RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
170
171 # Dir to search for system headers.  Overridden by cross-make.
172 SYSTEM_HEADER_DIR = /usr/include
173
174 # Control whether to run fixproto.
175 STMP_FIXPROTO = stmp-fixproto
176
177 # Test to see whether <limits.h> exists in the system header files.
178 LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
179
180 # There may be a premade insn-attrtab.c for this machine.
181 # (You could rebuild it with genattrtab as usual, but it takes a long time.)
182 # PREMADE_ATTRTAB is the file name of the file to use.
183 # PREMADE_ATTRTAB_MD is the md file it corresponds to.
184 PREMADE_ATTRTAB_MD = Makefile  # Guaranteed not to cmp equal to md.
185 PREMADE_ATTRTAB = 
186
187 target=@target@
188 target_alias=@target_alias@
189 xmake_file=@dep_host_xmake_file@
190 tmake_file=@dep_tmake_file@
191 out_file=$(srcdir)/config/@out_file@
192 out_object_file=@out_object_file@
193 md_file=$(srcdir)/config/@md_file@
194 tm_file=@tm_file_list@
195 build_xm_file=@build_xm_file_list@
196 host_xm_file=@host_xm_file_list@
197 lang_specs_files=@lang_specs_files@
198 lang_options_files=@lang_options_files@
199 GCC_THREAD_FILE=@thread_file@
200 version=@version@
201 mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
202
203 # Common prefix for installation directories.
204 # NOTE: This directory must exist when you start installation.
205 prefix = @prefix@
206 # Directory in which to put localized header files. On the systems with
207 # gcc as the native cc, `local_prefix' may not be `prefix' which is
208 # `/usr'.
209 # NOTE: local_prefix *should not* default from prefix.
210 local_prefix = @local_prefix@
211 # Directory in which to put host dependent programs and libraries
212 exec_prefix = @exec_prefix@
213 # Directory in which to put the executable for the command `gcc'
214 bindir = @bindir@
215 # Directory in which to put the directories used by the compiler.
216 libdir = @libdir@
217 # Directory in which the compiler finds executables, libraries, etc.
218 libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
219 # Directory in which the compiler finds g++ includes.
220 gxx_include_dir= @gxx_include_dir@
221 # Directory in which the old g++ header files may be found.
222 old_gxx_include_dir= $(libdir)/g++-include
223 # Directory to search for site-specific includes.
224 includedir = $(local_prefix)/include
225 # assertdir is overridden in cross-make.
226 # (But this currently agrees with what is in cross-make.)
227 assertdir = $(tooldir)/include
228 # where the info files go
229 infodir = @infodir@
230 # Extension (if any) to put in installed man-page filename.
231 manext = .1
232 objext = .o
233 exeext = @build_exeext@
234
235 # Directory in which to put man pages.
236 mandir = @mandir@/man1
237 # Directory in which to find other cross-compilation tools and headers.
238 # Used in install-cross.
239 tooldir = $(exec_prefix)/$(target_alias)
240 # Dir for temp files.
241 tmpdir = /tmp
242
243 # Additional system libraries to link with.
244 CLIB=
245
246 # Change this to a null string if obstacks are installed in the
247 # system library.
248 OBSTACK=obstack.o
249
250 # Specify the rule for actually making libgcc.a,
251 LIBGCC = libgcc.a
252 # and the rule for installing it.
253 INSTALL_LIBGCC = install-libgcc
254
255 # Specify the rule for actually making libgcc1.a.
256 # The value may be empty; that means to do absolutely nothing
257 # with or for libgcc1.a.
258 LIBGCC1 = libgcc1.a
259
260 # Specify the rule for making libgcc1.a for a cross-compiler.
261 # The default rule assumes that libgcc1.a is supplied by the user.
262 CROSS_LIBGCC1 = libgcc1.cross
263
264 # Specify the rule for actually making libgcc2.a.
265 LIBGCC2 = libgcc2.a
266
267 # Options to use when compiling libgcc2.a.
268 # -g1 causes output of debug info only for file-scope entities.
269 # we use this here because that should be enough, and also
270 # so that -g1 will be tested.
271 LIBGCC2_DEBUG_CFLAGS = -g1
272 LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED @inhibit_libc@
273
274 # Additional options to use when compiling libgcc2.a.
275 # Some targets override this to -Iinclude
276 LIBGCC2_INCLUDES =
277
278 # Additional target-dependent options for compiling libgcc2.a.
279 TARGET_LIBGCC2_CFLAGS = 
280
281 # Things which must be built before building libgcc2.a.
282 # Some targets override this to stmp-int-hdrs
283 LIBGCC2_DEPS =
284
285 # Enquire target (This is a variable so that a target can choose not to
286 # build it.)
287 ENQUIRE = enquire
288
289 # libgcc1-test target (must also be overridable for a target)
290 LIBGCC1_TEST = libgcc1-test
291
292 # List of extra executables that should be compiled for this target machine
293 # that are used for compiling from source code to object code.
294 # The rules for compiling them should be in the t-* file for the machine.
295 EXTRA_PASSES =@extra_passes@
296
297 # Like EXTRA_PASSES, but these are used when linking.
298 EXTRA_PROGRAMS = @extra_programs@
299
300 # List of extra object files that should be compiled for this target machine.
301 # The rules for compiling them should be in the t-* file for the machine.
302 EXTRA_PARTS = @extra_parts@
303
304 # List of extra object files that should be compiled and linked with
305 # compiler proper (cc1, cc1obj, cc1plus).
306 EXTRA_OBJS = @extra_objs@
307
308 # List of extra object files that should be compiled and linked with
309 # the gcc driver.
310 EXTRA_GCC_OBJS =@host_extra_gcc_objs@
311
312 # List of additional header files to install.
313 # Often this is edited directly by `configure'.
314 EXTRA_HEADERS =@extra_headers_list@
315
316 # Set this to `ld' to enable use of collect2.
317 USE_COLLECT2 = @will_use_collect2@
318 MAYBE_USE_COLLECT2 = @maybe_use_collect2@
319 # It is convenient for configure to add the assignment at the beginning,
320 # so don't override it here.
321 USE_COLLECT2 = ld
322
323 # List of extra C and assembler files to add to libgcc1.a.
324 # Assembler files should have names ending in `.asm'.
325 LIB1FUNCS_EXTRA = 
326
327 # List of extra C and assembler files to add to libgcc2.a.
328 # Assembler files should have names ending in `.asm'.
329 LIB2FUNCS_EXTRA = 
330
331 # Default float.h source to use for cross-compiler.
332 # This is overidden by configure.
333 CROSS_FLOAT_H=$(srcdir)/config/float-@float_format@.h
334
335 # Program to convert libraries.
336 LIBCONVERT = 
337
338 # Control whether header files are installed.
339 INSTALL_HEADERS=install-headers
340
341 # Options for tar when copying trees.  So HPUX can override it.
342 TAROUTOPTS = xpBf
343
344 # Select which version of fixincludes to use (I.E. regular versus SVR4)
345 # This value is overridden directly by configure.
346 FIXINCLUDES = @fixincludes@
347
348 # Additional directories of header files to run fixincludes on.
349 # These should be directories searched automatically by default
350 # just as /usr/include is.
351 # *Do not* use this for directories that happen to contain 
352 # header files, but are not searched automatically by default.
353 # On most systems, this is empty.
354 OTHER_FIXINCLUDES_DIRS=
355
356 # A list of all the language-specific executables.
357 # This is overridden by configure.
358 COMPILERS = cc1$(exeext) @all_compilers@
359
360 # List of things which should already be built whenever we try to use xgcc
361 # to compile anything (without linking).
362 GCC_PASSES=xgcc cc1 cpp $(EXTRA_PASSES)
363
364 # List of things which should already be built whenever we try to use xgcc
365 # to link anything.
366 GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
367
368 # Directory to link to, when using the target `maketest'.
369 DIR = ../gcc
370
371 # Guaranteed to not exist when not passing md through cpp.
372 # This value is overridden directly by configure.
373 MD_FILE = md-cpp-not-used
374
375 # Flags to use when cross-building GCC.
376 # Prefix to apply to names of object files when using them
377 # to run on the machine we are compiling on.
378 HOST_PREFIX=
379 # Prefix to apply to names of object files when compiling them
380 # to run on the machine we are compiling on.
381 # The default for this variable is chosen to keep these rules 
382 # out of the way of the other rules for compiling the same source files.
383 HOST_PREFIX_1=loser-
384 HOST_CC=$(CC)
385 HOST_CFLAGS=$(ALL_CFLAGS)
386 HOST_CLIB=$(CLIB)
387 HOST_LDFLAGS=$(LDFLAGS)
388 HOST_CPPFLAGS=$(ALL_CPPFLAGS)
389 HOST_ALLOCA=$(ALLOCA)
390 HOST_MALLOC=$(MALLOC)
391 HOST_OBSTACK=$(OBSTACK)
392
393 # Actual name to use when installing a native compiler.
394 GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed $$t`
395
396 # Actual name to use when installing a cross-compiler.
397 GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed $$t`
398
399 # Choose the real default target.
400 ALL=all.internal
401
402 # Choose the real install target.
403 INSTALL_TARGET=install-normal
404
405 # Source for float.h.  Overridden by cross-make.
406 FLOAT_H=float.h-nat
407
408 # Setup the testing framework, if you have one
409 EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
410             echo $${rootme}/../expect/expect ; \
411           else echo expect ; fi`
412
413 RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
414                echo $${srcdir}/../dejagnu/runtest ; \
415             else echo runtest; fi`
416 RUNTESTFLAGS =
417
418 # Extra symbols for fixproto to define when parsing headers.
419 FIXPROTO_DEFINES = 
420
421 # Extra flags to use when compiling crt{begin,end}.o.
422 CRTSTUFF_T_CFLAGS = 
423
424 # Extra flags to use when compiling [m]crt0.o.
425 CRT0STUFF_T_CFLAGS = 
426
427 # End of variables for you to override.
428
429 # Definition of `all' is here so that new rules inserted by sed
430 # do not specify the default target.
431 # The real definition is under `all.internal' (for native compilers)
432 # or `all.cross' (for cross compilers).
433 all: all.indirect
434
435 # This tells GNU Make version 3 not to put all variables in the environment.
436 .NOEXPORT:
437
438 # sed inserts variable overrides after the following line.
439 ####target overrides
440 @target_overrides@
441
442 ####host overrides
443 @host_overrides@
444
445 ####cross overrides
446 @cross_defines@
447 @cross_overrides@
448
449 ####build overrides
450 @build_overrides@
451 #\f
452 # Now figure out from those variables how to compile and link.
453
454 all.indirect: $(ALL)
455
456 # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
457 # ??? IN_GCC should be obsolete now.
458 INTERNAL_CFLAGS = $(CROSS) -DIN_GCC @extra_c_flags@
459
460 # This is the variable actually used when we compile.
461 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) \
462         @DEFS@ $(SCHED_CFLAGS)
463
464 # Likewise.
465 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
466
467 # Even if ALLOCA is set, don't use it if compiling with GCC.
468 USE_ALLOCA= ` case "${CC}" in "${OLDCC}") echo "${ALLOCA}" ;; esac `
469 USE_HOST_ALLOCA= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
470 USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
471 USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
472
473 # Dependency on obstack, alloca, malloc or whatever library facilities
474 # are not installed in the system libraries.
475 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
476 LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
477
478 # Likewise, for use in the tools that must run on this machine
479 # even if we are cross-building GCC.
480 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
481 HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC)
482
483 # How to link with both our special library facilities
484 # and the system's installed libraries.
485 LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(CLIB)
486
487 # Likewise, for use in the tools that must run on this machine
488 # even if we are cross-building GCC.
489 HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC)  \
490             $(HOST_CLIB)
491
492 HOST_RTL = $(HOST_PREFIX)rtl.o
493 HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
494 HOST_PRINT = $(HOST_PREFIX)print-rtl.o
495
496 # Specify the directories to be searched for header files.
497 # Both . and srcdir are used, in that order,
498 # so that tm.h and config.h will be found in the compilation
499 # subdirectory rather than in the source directory.
500 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
501
502 # Always use -I$(srcdir)/config when compiling.
503 .c.o:
504         $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
505
506 # This tells GNU make version 3 not to export all the variables
507 # defined in this file into the environment.
508 .NOEXPORT:
509 #\f
510 # Support for additional languages (other than c and objc).
511 # ??? objc can be supported this way too (leave for later).
512
513 # These next lines are overridden by configure.
514 LANG_MAKEFILES = @all_lang_makefiles@
515 LANG_STAGESTUFF = @all_stagestuff@
516 LANG_DIFF_EXCLUDES = @all_diff_excludes@
517 LANG_LIB2FUNCS = @all_lib2funcs@
518 LANG_EXTRA_HEADERS = @all_headers@
519
520 # Flags to pass to recursive makes.
521 # CC is set by configure.  Hosts without symlinks need special handling
522 # because we need CC="stage1/xgcc -Bstage1/" to work in the language
523 # subdirectories.
524 # ??? The choices here will need some experimenting with.
525 FLAGS_TO_PASS = \
526         "AR_FLAGS=$(AR_FLAGS)" \
527         "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
528         "BISON=$(BISON)" \
529         "BISONFLAGS=$(BISONFLAGS)" \
530         "CC=@cc_set_by_configure@" \
531         "CFLAGS=$(CFLAGS)" \
532         "CLIB=$(CLIB)" \
533         "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
534         "LDFLAGS=$(LDFLAGS)" \
535         "LEX=$(LEX)" \
536         "LEXFLAGS=$(LEXFLAGS)" \
537         "LN=$(LN)" \
538         "LN_S=$(LN_S)" \
539         "MAKEINFO=$(MAKEINFO)" \
540         "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
541         "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
542         "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
543         "SHELL=$(SHELL)" \
544         "STAGE_PREFIX=@stage_prefix_set_by_configure@" \
545         "exeext=$(exeext)" \
546         "objext=$(objext)" \
547         "exec_prefix=$(exec_prefix)" \
548         "prefix=$(prefix)" \
549         "tooldir=$(tooldir)" \
550         "bindir=$(bindir)" \
551         "libsubdir=$(libsubdir)"
552 #\f
553 # Lists of files for various purposes.
554
555 # Language-specific object files for C and Objective C.
556 C_AND_OBJC_OBJS = c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o \
557   c-aux-info.o c-common.o c-iterate.o @extra_c_objs@
558
559 # Language-specific object files for C.
560 C_OBJS = c-parse.o c-lang.o $(C_AND_OBJC_OBJS)
561
562 # Files specific to the C interpreter bytecode compiler(s).
563 BC_OBJS = bc-emit.o bc-optab.o
564
565 # Bytecode header files constructed at build time; vmsconfig.com wants this.
566 BC_ALL = bc-arity.h bc-opcode.h bc-opname.h
567
568 SCHED_PREFIX = @sched_prefix@
569 SCHED_CFLAGS = @sched_cflags@
570
571 # Language-independent object files.
572 OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
573  function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o \
574  varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o regmove.o \
575  dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o \
576  integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
577  regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
578  insn-peep.o reorg.o $(SCHED_PREFIX)sched.o final.o recog.o reg-stack.o \
579  insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
580  profile.o insn-attrtab.o $(out_object_file) getpwd.o convert.o $(EXTRA_OBJS)
581
582 # GEN files are listed separately, so they can be built before doing parallel
583 #  makes for cc1 or cc1plus.  Otherwise sequent parallel make attempts to load
584 #  them before rtl.o is compiled.
585 GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
586
587 CCCP=cccp
588 # Uncomment this line if you want to use cppmain (w/cpplib) as cpp.
589 #CCCP=cppmain
590
591 # Files to be copied away after each stage in building.
592 STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
593  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
594  insn-attr.h insn-attrtab.c insn-opinit.c \
595  stamp-flags stamp-config stamp-codes stamp-mlib \
596  stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
597  stamp-attr stamp-attrtab stamp-opinit stamp-proto stamp-crt stamp-crtS stamp-crt0 \
598  genemit$(exeext) genoutput$(exeext) genrecog$(exeext) genextract$(exeext) \
599  genflags$(exeext) gencodes$(exeext) genconfig$(exeext) genpeep$(exeext) \
600  genattrtab$(exeext) genattr$(exeext) genopinit$(exeext) \
601  $(BC_ALL) \
602  stamp-bcarity stamp-bcopcode stamp-bcopname \
603  bi-arity$(exeext) bi-opcode$(exeext) bi-opname$(exeext) \
604  xgcc$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES) \
605  $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
606  $(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \
607  protoize$(exeext) unprotoize$(exeext) \
608  specs collect2$(exeext) $(USE_COLLECT2) underscore.c \
609  gcov$(exeext) *.bp \
610  *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \
611  *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack \
612  *.[si] \
613  $(LANG_STAGESTUFF)
614
615 # Members of libgcc1.a.
616 LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
617    _lshrsi3 _ashrsi3 _ashlsi3 \
618    _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
619    _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
620    _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
621    _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
622    _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
623
624 # Library members defined in libgcc2.c.
625 LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
626      _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
627     _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
628     _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
629     _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
630     _fixtfdi _fixunstfdi _floatditf \
631     __gcc_bcmp _varargs __dummy _eprintf _op_new _op_vnew _new_handler \
632     _op_delete _op_vdel _bb _shtab _clear_cache _trampoline __main _exit \
633     _ctors _eh  _pure
634
635 # The files that "belong" in CONFIG_H are deliberately omitted
636 # because having them there would not be useful in actual practice.
637 # All they would do is cause complete recompilation every time
638 # one of the machine description files is edited.
639 # That may or may not be what one wants to do.
640 # If it is, rm *.o is an easy way to do it.
641 # CONFIG_H = $(host_xm_file) $(tm_file)
642 CONFIG_H =
643 RTL_H = rtl.h rtl.def machmode.h machmode.def
644 TREE_H = tree.h real.h tree.def machmode.h machmode.def
645 BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
646 BASIC_BLOCK_H = basic-block.h bitmap.h
647
648 # "t" or nothing, for building multilibbed versions of, say, crtbegin.o.
649 T =
650 #\f
651 # Language makefile fragments.
652
653 # The following targets define the interface between us and the languages.
654 #
655 # all.build, all.cross, start.encap, rest.encap,
656 # info, dvi,
657 # install-normal, install-common, install-info, install-man,
658 # uninstall, distdir,
659 # mostlyclean, clean, distclean, extraclean, maintainer-clean,
660 # stage1, stage2, stage3, stage4
661 #
662 # Each language is linked in with a series of hooks (since we can't use `::'
663 # targets).  The name of each hooked is "lang.${target_name}" (eg: lang.info).
664 # Configure computes and adds these here.
665
666 ####language hooks
667 @language_hooks@
668
669 # sed inserts language fragments after the following line.
670 ####language fragments
671 @language_fragments@
672
673 # End of language makefile fragments.
674 #\f
675 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
676 .SUFFIXES: .in .def
677
678 Makefile: $(srcdir)/Makefile.in config.status $(srcdir)/version.c \
679    $(xmake_file) $(tmake_file) $(LANG_MAKEFILES)
680         $(SHELL) $(srcdir)/configure.frag $(srcdir) "$(SUBDIRS)" \
681                 "$(xmake_file)" "$(tmake_file)"
682         cp config.status config.run
683         $(SHELL) config.run
684         rm -f config.run
685
686 $(srcdir)/configure: $(srcdir)/configure.in
687         cd $(srcdir); autoconf
688
689 # cstamp-h.in controls rebuilding of config.in.
690 # It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't
691 # delete it.  A stamp file is needed as autoheader won't update the file if
692 # nothing has changed.
693 # It remains in the source directory and is part of the distribution.
694 # This follows what is done in shellutils, fileutils, etc.
695 # "echo timestamp" is used instead of touch to be consistent with other
696 # packages that use autoconf (??? perhaps also to avoid problems with patch?).
697 # ??? Newer versions have a maintainer mode that may be useful here.
698 $(srcdir)/config.in: $(srcdir)/cstamp-h.in
699 $(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h
700         cd $(srcdir) && autoheader
701         echo timestamp > $(srcdir)/cstamp-h.in
702 config.h: cstamp-h ; @true
703 cstamp-h: config.in config.status
704         CONFIG_HEADERS=config.h:config.in $(SHELL) config.status
705
706 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
707 # a target to build even if it is up-to-date.  So we must verify that
708 # config.status does not exist before failing.
709 config.status: configure version.c
710         @if [ ! -f config.status ] ; then \
711           echo You must configure gcc.  Look at the INSTALL file for details.; \
712           false; \
713         else \
714           $(SHELL) config.status --recheck; \
715         fi
716
717 all.internal: start.encap rest.encap
718 # This is what to compile if making a cross-compiler.
719 # Note that we can compile enquire using the cross-compiler just built,
720 # although we can't run it on this machine.
721 all.cross: native gcc-cross specs stmp-headers $(LIBGCC) $(STMP_FIXPROTO) \
722         $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross
723 # This is what to compile if making gcc with a cross-compiler.
724 all.build: native xgcc $(EXTRA_PARTS) lang.all.build
725 # This is what must be made before installing GCC and converting libraries.
726 start.encap: native xgcc specs $(LIBGCC1) xlimits.h lang.start.encap
727 # These can't be made until after GCC can run.
728 rest.encap: stmp-headers $(LIBGCC) $(STMP_FIXPROTO) $(EXTRA_PARTS) lang.rest.encap
729 # This is what is made with the host's compiler
730 # whether making a cross compiler or not.
731 native: config.status config.h cpp $(LANGUAGES) \
732         $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
733
734 # Define the names for selecting languages in LANGUAGES.
735 C c: cc1
736 PROTO: proto
737
738 # Tell GNU make these are phony targets.
739 .PHONY: C c PROTO proto
740
741 # On the target machine, finish building a cross compiler.
742 # This does the things that can't be done on the host machine.
743 rest.cross: $(LIBGCC) gfloat.h specs
744
745 # Verify that it works to compile and link libgcc1-test.
746 # If it does, then there are sufficient replacements for libgcc1.a.
747 libgcc1-test: libgcc1-test.o native $(GCC_PARTS)
748         @echo "Testing libgcc1.  Ignore linker warning messages."
749         $(GCC_FOR_TARGET) $(GCC_CFLAGS) libgcc1-test.o -o libgcc1-test \
750           -nostartfiles -nostdlib `$(GCC_FOR_TARGET) --print-libgcc-file-name`
751 libgcc1-test.o: libgcc1-test.c native xgcc
752         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/libgcc1-test.c
753
754 # Recompile all the language-independent object files.
755 # This is used only if the user explicitly asks for it.
756 compilations: ${OBJS}
757
758 # Create a list of the language-independent object files so the language
759 # subdirectories needn't mention their names explicitly.
760 stamp-objlist: $(OBJS) $(BC_OBJS)
761         echo " $(OBJS) $(BC_OBJS)" | sed -e 's, \([a-z0-9]\), ../\1,g' -e 's/\.o/$(objext)/g' >stamp-objlist
762
763 # We call this executable `xgcc' rather than `gcc'
764 # to avoid confusion if the current directory is in the path
765 # and CC is `gcc'.  It is renamed to `gcc' when it is installed.
766 xgcc: gcc.o version.o choose-temp.o pexecute.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
767         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o version.o \
768           choose-temp.o pexecute.o $(EXTRA_GCC_OBJS) $(LIBS)
769
770 # Dump a specs file to make -B./ read these specs over installed ones.
771 specs: xgcc
772         $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
773         mv tmp-specs specs
774
775 # We do want to create an executable named `xgcc', so we can use it to
776 # compile libgcc2.a.
777 # Also create gcc-cross, so that install-common will install properly.
778 gcc-cross: xgcc
779         cp xgcc$(exeext) gcc-cross$(exeext)
780
781 cc1: $(P) $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
782         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
783
784 # Copy float.h from its source.
785 gfloat.h: $(FLOAT_H)
786         -rm -f gfloat.h
787         cp $(FLOAT_H) gfloat.h
788
789 # Create float.h source for the native machine.
790 float.h-nat: enquire
791         -./enquire -f > tmp-float.h
792         mv tmp-float.h float.h-nat
793
794 # Create a dummy float.h source for a cross-compiler.
795 # ??? This isn't used anymore.  Should we create config/float-unkn.h
796 # and make that the default float_format in configure?
797 float.h-cross:
798         echo "#ifndef   __GCC_FLOAT_NOT_NEEDED" > t-float.h-cross
799         echo "#error float.h values not known for cross-compiler" >> t-float.h-cross
800         echo "#endif" >> t-float.h-cross
801         mv t-float.h-cross float.h-cross
802
803 # Used to compile enquire with standard cc, but have forgotten why.
804 # Let's try with GCC.
805 enquire: enquire.o $(GCC_PARTS)
806         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
807 enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs
808 # Breaking this line caused a problem with one version of GNU make.
809         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c $(srcdir)/enquire.c
810
811 # Build the version of limits.h that we will install.
812 xlimits.h: glimits.h limitx.h limity.h
813         if $(LIMITS_H_TEST) ; then \
814           cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \
815         else \
816           cat $(srcdir)/glimits.h > tmp-xlimits.h; \
817         fi
818         mv tmp-xlimits.h xlimits.h
819 #\f
820 # Build libgcc.a.
821 # This is done in two parts because some functions, in libgcc1.c,
822 # must be compiled with something other than GCC,
823 # while the rest, in libgcc2.c, must be compiled with xgcc.
824 # That means we can't do libgcc2.c until after xgcc, cc1, etc.
825
826 # Use this as value of LIBGCC1 to cause conversion to GNU library format.
827 # LIBCONVERT should put its output in libgcc1.conv.
828 libgcc1.conv: libgcc1.a
829         $(LIBCONVERT) libgcc1.a libgcc1.conv
830
831 # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
832 # Make an empty file instead.
833 libgcc1.null: $(GCC_PASSES)
834         echo "__foo () {}" > dummy.c
835         $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
836         $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy$(objext)
837         rm -f dummy$(objext) dummy.c
838
839 # This is $(LIBGCC1) for a cross-compiler.
840 # We have no automatic way of building libgcc1.a, 
841 # so it's up to the installer to find a way to do that.
842 # This rule deliberately does not depend on libgcc1.a
843 # so that it will fail if the installer hasn't provided it.
844 libgcc1.cross:
845         mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a; false)
846
847 # Compile the library of arithmetic subroutines with the native compiler.
848 # Don't compile it with GCC!
849 # (That would cause most arithmetic functions to call themselves.)
850 #
851 # NOTE: If you modify these rules substantially, please be sure to
852 # check at least config/i386/t-sco5 and possibly other makefile
853 # fragments.
854 libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
855         -rm -f tmplibgcc1.a
856 # Actually build it in tmplibgcc1.a, then rename at end,
857 # so that libgcc1.a itself remains nonexistent if compilation is aborted.
858 # -e causes any failing command to make this rule fail.
859 # -e doesn't work in certain shells, so we test $$? as well.
860 # lynx has a broken ar, it always complains when the initial library is
861 # empty, thus this command works only if we don't do -e
862 # There is a trailing backslash (\) deleted from the following line.
863 #       set -e;
864         for name in $(LIB1FUNCS); \
865         do \
866           echo $${name}; \
867           rm -f $${name}$(objext); \
868           $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
869           if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
870           mv libgcc1$(objext) $${name}$(objext); \
871           $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
872           rm -f $${name}$(objext); \
873         done
874 # Some shells crash when a loop has no items.
875 # So make sure there is always at least one--`..'.
876 # Then ignore it.
877 # We don't use -e here because there are if statements
878 # that should not make the command give up when the if condition is false.
879 # Instead, we test for failure after each command where it matters.
880         for file in .. $(LIB1FUNCS_EXTRA); \
881         do \
882           if [ x$${file} != x.. ]; then \
883             name=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \
884             echo $${name}; \
885             if [ $${name}.asm = $${file} ]; then \
886               cp $${file} $${name}.s || exit 1; file=$${name}.s; \
887             else true; fi; \
888             $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
889             if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
890             $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
891             if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
892             rm -f $${name}.s $${name}$(objext); \
893           else true; \
894           fi; \
895         done
896         -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc1.a; else true; fi
897         mv tmplibgcc1.a libgcc1.a
898
899 # Build libgcc1.a from assembler source.  LIB1ASMFUNCS is the list of
900 # functions.  LIB1ASMSRC is the name of the source file in the config
901 # subdirectory.
902 libgcc1-asm.a: libgcc2.ready config.status $(srcdir)/config/$(LIB1ASMSRC)
903         -rm -f tmplibgcc1.a libgcc1.S
904         cp $(srcdir)/config/$(LIB1ASMSRC) libgcc1.S
905 # Actually build it in tmplibgcc1.a, then rename at end,
906 # so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
907 # -e causes any failing command to make this rule fail.
908 # -e doesn't work in certain shells, so we test $$? as well.
909 # lynx has a broken ar, it always complains when the initial library is
910 # empty, thus this command works only if we don't do -e
911 # There is a trailing backslash (\) deleted from the following line.
912 #       set -e;
913         for name in $(LIB1ASMFUNCS); \
914         do \
915           echo $${name}; \
916           $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \
917           if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
918           mv libgcc1$(objext) $${name}$(objext); \
919           $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}$(objext); \
920           rm -f $${name}$(objext); \
921         done
922         -rm -f libgcc1.S
923         mv tmplibgcc1.a libgcc1-asm.a
924
925 # Generate assembly versions of the functions required for libgcc1.
926 # You'll still need to massage the code by hand (possibly hacking
927 # underscores and local labels) but this will get you started.
928 libgcc1.S: libgcc1.c $(CONFIG_H) config.status
929         -rm -f libgcc1.S
930         touch libgcc1.S
931         for name in $(LIB1FUNCS); \
932         do \
933           echo $${name}; \
934           $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -S -DL$${name} $(srcdir)/libgcc1.c; \
935           if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
936           echo '#ifdef ' L$${name} >> libgcc1.S; \
937           cat  libgcc1.s >> libgcc1.S; \
938           echo '#endif /*' L$${name} '*/' >> libgcc1.S; \
939           echo "" >> libgcc1.S; \
940         done
941
942 # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
943 # But recompiling cc1 should not force recompilation of libgcc2.a.
944 # If you want to force recompilation, delete libgcc2.a.
945 libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs
946         -if [ -f libgcc2.ready ] ; then \
947                 true; \
948         else \
949                 touch libgcc2.ready; \
950         fi
951
952 LIB2ADD = $(srcdir)/frame.c $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS)
953 libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2ADD) \
954    machmode.h longlong.h gbl-ctors.h config.status
955 # Actually build it in tmplibgcc2.a, then rename at end,
956 # so that libgcc2.a itself remains nonexistent if compilation is aborted.
957         -rm -f tmplibgcc2.a
958 # -e causes any failing command to make this rule fail.
959 # -e doesn't work in certain shells, so we test $$? as well.
960 # lynx has a broken ar, it always complains when the initial library is
961 # empty, thus this command works only if we don't do -e
962 # There is a trailing backslash (\) deleted from the following line.
963 #       set -e;
964         for name in $(LIB2FUNCS); \
965         do \
966           echo $${name}; \
967           $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
968               $(srcdir)/libgcc2.c -o $${name}$(objext); \
969           if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
970           $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
971           rm -f $${name}$(objext); \
972         done
973 # Some shells crash when a loop has no items.
974 # So make sure there is always at least one--`..'.
975 # Then ignore it.
976 # We don't use -e here because there are if statements
977 # that should not make the command give up when the if condition is false.
978 # Instead, we test for failure after each command where it matters.
979         for file in $(LIB2ADD); do \
980           name=`echo $${file} | sed -e 's/[.][cSo]$$//' -e 's/[.]asm$$//' -e 's/[.]txt$$//'`; \
981           oname=` echo $${name} | sed -e 's,.*/,,'`; \
982           if [ $${name}.txt = $${file} ]; then \
983             for f in .. `cat $${file}`; do if [ x$${f} != x.. ]; then \
984               $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
985                 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" \
986                 CFLAGS="$(CFLAGS)" HOST_PREFIX="$(HOST_PREFIX)" \
987                 HOST_PREFIX_1="$(HOST_PREFIX_1)" \
988                 LANGUAGES="$(LANGUAGES)" \
989                 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $${f}; \
990               if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
991               $(AR) $(AR_FLAGS) tmplibgcc2.a $${f}; \
992               rm -f $${f}; \
993             else true; \
994             fi; done; \
995           else \
996             echo $${name}; \
997             if [ $${name}.asm = $${file} ]; then \
998               cp $${file} $${name}.s || exit 1; file=$${name}.s; \
999             else true; fi; \
1000             $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
1001             if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1002             $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
1003             rm -f $${name}.s $${oname}$(objext); \
1004           fi; \
1005         done
1006         mv tmplibgcc2.a libgcc2.a
1007 # These lines were deleted from above the mv command
1008 # because ranlibing libgcc.a itself should suffice.
1009 #       -if [ x${HPUX_GAS} = x ] ; then \
1010 #         if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
1011 #       else true; fi
1012
1013 # Combine the various libraries into a single library, libgcc.a.
1014 libgcc.a: $(LIBGCC1) $(LIBGCC2)
1015         -rm -rf tmplibgcc.a libgcc.a tmpcopy
1016         mkdir tmpcopy
1017         -if [ x$(LIBGCC1) != x ];                       \
1018         then (cd tmpcopy; $(AR) x ../$(LIBGCC1));       \
1019         else true;                                      \
1020         fi
1021 # Some versions of ar (specifically the one in RISC/os 5.x), create an
1022 # unwritable table of contents file, and then print an error message when
1023 # the second ar command tries to overwrite this file.  To avoid the error
1024 # message from ar, we make sure all files are writable.
1025         -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
1026         (cd tmpcopy; $(AR) x ../$(LIBGCC2))
1027         (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
1028         rm -rf tmpcopy
1029         -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
1030 # Actually build it in tmplibgcc.a, then rename at end,
1031 # so that libgcc.a itself remains nonexistent if compilation is aborted.
1032         mv tmplibgcc.a libgcc.a
1033
1034 # Use the genmultilib shell script to generate the information the gcc
1035 # driver program needs to select the library directory based on the
1036 # switches.
1037 multilib.h: stamp-mlib; @true
1038 stamp-mlib: $(srcdir)/genmultilib Makefile
1039         $(SHELL) $(srcdir)/genmultilib \
1040           "$(MULTILIB_OPTIONS)" \
1041           "$(MULTILIB_DIRNAMES)" \
1042           "$(MULTILIB_MATCHES)" \
1043           "$(MULTILIB_EXCEPTIONS)" \
1044           "$(MULTILIB_EXTRA_OPTS)" > tmp-mlib.h
1045         $(srcdir)/move-if-change tmp-mlib.h multilib.h
1046         touch stamp-mlib
1047
1048 # Build multiple copies of libgcc.a, one for each target switch.
1049 stmp-multilib: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \
1050    $(LIB2ADD) machmode.h longlong.h gbl-ctors.h config.status
1051         for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
1052           dir=`echo $$i | sed -e 's/;.*$$//'`; \
1053           flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
1054           $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1055             AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1056             RANLIB="$(RANLIB)" RANLIB_TEST="$(RANLIB_TEST)" \
1057             LANGUAGES="$(LANGUAGES)" \
1058             HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1059             LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \
1060             MULTILIB_CFLAGS="$${flags}" \
1061             LIBGCC1="$(LIBGCC1)" LIBGCC2="$(LIBGCC2)" \
1062             dir="$${dir}" stmp-multilib-sub; \
1063           if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1064         done
1065         touch stmp-multilib
1066
1067 # Subroutine of stmp-multilib so make -n works.
1068 stmp-multilib-sub:
1069         rm -f $(LIBGCC2)
1070         if [ -d $(dir) ]; then \
1071           cd $(dir); \
1072           rm -f libgcc.a $(EXTRA_MULTILIB_PARTS); \
1073         else true; \
1074         fi
1075         $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1076           AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1077           HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1078           LANGUAGES="$(LANGUAGES)" \
1079           LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC2)
1080         if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
1081         then true; \
1082         else rm -f $(LIBGCC1); \
1083         fi
1084         if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
1085         then true; \
1086         else \
1087           $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1088             AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1089             HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1090             LANGUAGES="$(LANGUAGES)" \
1091             LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC1); \
1092         fi
1093         rm -rf tmplibgcc.a tmpcopy
1094         mkdir tmpcopy
1095         if [ x$(LIBGCC1) != x ]; \
1096         then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
1097         else true; \
1098         fi
1099         (cd tmpcopy; $(AR) x ../$(LIBGCC2))
1100         (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
1101         rm -rf libgcc2.a tmpcopy
1102         if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
1103         if [ -d $(dir) ]; then true; else mkdir $(dir); fi
1104         mv tmplibgcc.a $(dir)/libgcc.a
1105         for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
1106           $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1107             AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1108             HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1109             LANGUAGES="$(LANGUAGES)" \
1110             MULTILIB_CFLAGS="$(MULTILIB_CFLAGS)" T="t" t$${f}; \
1111           mv t$${f} $(dir)/$${f}; \
1112         else true; \
1113         fi; done
1114
1115 # Compile two additional files that are linked with every program
1116 # linked using GCC on systems using COFF or ELF, for the sake of C++
1117 # constructors.
1118 $(T)crtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
1119         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
1120           -finhibit-size-directive -fno-inline-functions -fno-exceptions $(CRTSTUFF_T_CFLAGS) \
1121           -c $(srcdir)/crtstuff.c -DCRT_BEGIN -o $(T)crtbegin$(objext)
1122
1123 $(T)crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
1124         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
1125           -finhibit-size-directive -fno-inline-functions -fno-exceptions $(CRTSTUFF_T_CFLAGS) \
1126           -c $(srcdir)/crtstuff.c -DCRT_END -o $(T)crtend$(objext)
1127
1128 # On some systems we also want to install versions of these files
1129 # compiled using PIC for use in shared libraries.
1130 crtbeginS.o crtendS.o: stamp-crtS ; @true
1131
1132 stamp-crtS:     crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
1133         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
1134           -DCRT_BEGIN -finhibit-size-directive -fno-inline-functions \
1135           -g0 -c $(srcdir)/crtstuff.c 
1136         mv crtstuff$(objext) crtbeginS$(objext)
1137         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
1138           -DCRT_END -finhibit-size-directive -fno-inline-functions \
1139           -g0 -c $(srcdir)/crtstuff.c -o crtendS$(objext)
1140         touch stamp-crtS
1141
1142 # Compile the start modules crt0.o and mcrt0.o that are linked with every program
1143 crt0.o: stamp-crt0 ; @true
1144 mcrt0.o: stamp-crt0; @true
1145
1146 stamp-crt0:     $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H)
1147         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
1148           -o crt0.o -c $(CRT0_S)
1149         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
1150           -o mcrt0.o -c $(MCRT0_S)
1151         touch stamp-crt0
1152 #\f
1153 # Compiling object files from source files.
1154
1155 # Note that dependencies on obstack.h are not written
1156 # because that file is not part of GCC.
1157
1158 # C language specific files.
1159
1160 c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
1161     $(srcdir)/c-parse.h c-tree.h input.h flags.h
1162         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c
1163 $(srcdir)/c-parse.h: $(srcdir)/c-parse.c
1164 $(srcdir)/c-parse.c: $(srcdir)/c-parse.y
1165         cd $(srcdir); $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
1166 $(srcdir)/c-parse.y: c-parse.in
1167         echo '/*WARNING: This file is automatically generated!*/' >tmp-c-parse.y
1168         sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
1169           -e "/^ifc$$/d" -e "/^end ifc$$/d" \
1170           $(srcdir)/c-parse.in >>tmp-c-parse.y
1171         $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y
1172
1173 $(srcdir)/c-gperf.h: c-parse.gperf
1174         gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$$ \
1175            $(srcdir)/c-parse.gperf >tmp-gperf.h
1176          $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h
1177
1178 c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h output.h
1179 c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h output.h
1180 c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
1181 c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h $(srcdir)/c-parse.h \
1182     input.h flags.h $(srcdir)/c-gperf.h c-pragma.h
1183 c-aux-info.o : c-aux-info.c  $(CONFIG_H) $(TREE_H) c-tree.h flags.h
1184 c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
1185 c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H) except.h function.h \
1186     defaults.h c-pragma.h
1187 c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
1188
1189 # To make a configuration always use collect2, set USE_COLLECT2 to ld.
1190 ld: collect2
1191         rm -f ld$(exeext)
1192         $(LN) collect2$(exeext) ld$(exeext)
1193
1194 collect2: collect2.o tlink.o hash.o cplus-dem.o underscore.o version.o \
1195         choose-temp.o $(LIBDEPS)
1196 # Don't try modifying collect2 (aka ld) in place--it might be linking this.
1197         -rm -f collect2$(exeext)
1198         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ collect2.o tlink.o hash.o \
1199           cplus-dem.o underscore.o version.o choose-temp.o $(LIBS)
1200
1201 collect2.o : collect2.c $(CONFIG_H) gstab.h obstack.h demangle.h
1202         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES)  \
1203         -DTARGET_MACHINE=\"$(target_alias)\" $(MAYBE_USE_COLLECT2) \
1204         -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
1205
1206 tlink.o: tlink.c demangle.h hash.h $(CONFIG_H)
1207 hash.o: hash.c hash.h
1208 cplus-dem.o: cplus-dem.c demangle.h
1209
1210 underscore.c: stamp-under ; @true
1211
1212 stamp-under: $(GCC_PASSES)
1213         echo "int xxy_us_dummy;" >tmp-dum.c
1214         $(GCC_FOR_TARGET) -S tmp-dum.c
1215         echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c
1216         if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \
1217           echo "int prepends_underscore = 1;" >>tmp-under.c; \
1218         else \
1219           echo "int prepends_underscore = 0;" >>tmp-under.c; \
1220         fi
1221         $(srcdir)/move-if-change tmp-under.c underscore.c
1222         -rm -f tmp-dum.c tmp-dum.s
1223         touch stamp-under
1224
1225 # A file used by all variants of C.
1226
1227 c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
1228
1229 # Language-independent files.
1230
1231 DRIVER_DEFINES = \
1232   -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
1233   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
1234   -DDEFAULT_TARGET_VERSION=\"$(version)\" \
1235   -DDEFAULT_TARGET_MACHINE=\"$(target_alias)\" \
1236   -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\"
1237 gcc.o: gcc.c $(CONFIG_H) multilib.h Makefile $(lang_specs_files)
1238         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1239   $(DRIVER_DEFINES) \
1240   -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
1241
1242 dumpvers: dumpvers.c
1243
1244 version.o: version.c
1245 obstack.o: obstack.c
1246 choose-temp.o: choose-temp.c
1247 pexecute.o: pexecute.c
1248
1249 convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h
1250
1251 tree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h function.h
1252 print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
1253 stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) flags.h function.h
1254 fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h 
1255 toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) bytecode.h bc-emit.h \
1256    flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
1257    $(lang_options_files)
1258         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(MAYBE_USE_COLLECT2) \
1259           -DTARGET_NAME=\"$(target_alias)\" \
1260           -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
1261
1262 rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
1263
1264 print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
1265 rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
1266
1267 varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h function.h \
1268    defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h \
1269    output.h bytecode.h c-pragma.h
1270 function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
1271    insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
1272    recog.h output.h bytecode.h bc-emit.h
1273 stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
1274    insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h except.h \
1275    loop.h recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h \
1276    bc-optab.h bc-emit.h
1277 except.o : except.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
1278    insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
1279    recog.h output.h except.h
1280 expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h regs.h \
1281    insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
1282    typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
1283    bc-emit.h modemap.def hard-reg-set.h
1284 calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
1285    insn-flags.h
1286 expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
1287    insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
1288 explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
1289    insn-config.h expr.h recog.h insn-flags.h insn-codes.h
1290 optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
1291    insn-flags.h insn-config.h insn-codes.h expr.h recog.h reload.h
1292 dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
1293    insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
1294 sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h except.h \
1295    function.h expr.h output.h hard-reg-set.h regs.h defaults.h real.h \
1296    insn-config.h bytecode.h obstack.h xcoffout.h c-pragma.h
1297 dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
1298    insn-config.h reload.h output.h defaults.h
1299 dwarf2out.o : dwarf2out.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf2.h flags.h \
1300    insn-config.h reload.h output.h defaults.h hard-reg-set.h regs.h expr.h
1301 xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
1302 emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
1303    function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
1304    bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
1305 real.o : real.c $(CONFIG_H) $(TREE_H)
1306 getpwd.o : getpwd.c $(CONFIG_H)
1307
1308 integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
1309    insn-flags.h insn-config.h insn-codes.h expr.h real.h regs.h function.h \
1310    bytecode.h
1311
1312 jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
1313    insn-config.h insn-flags.h insn-codes.h expr.h real.h
1314 stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
1315
1316 cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
1317    insn-config.h recog.h
1318 profile.o : profile.c $(CONFIG_H) $(RTL_H) flags.h insn-flags.h gcov-io.h \
1319    tree.h output.h
1320 loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
1321    insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
1322 unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
1323    integrate.h regs.h flags.h expr.h loop.h
1324 flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
1325    $(BASIC_BLOCK_H) regs.h hard-reg-set.h output.h
1326 combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h  \
1327    insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
1328    $(BASIC_BLOCK_H) recog.h real.h hard-reg-set.h
1329 regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
1330    $(BASIC_BLOCK_H) regs.h insn-config.h recog.h reload.h real.h bytecode.h
1331 local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h $(BASIC_BLOCK_H) \
1332    regs.h hard-reg-set.h insn-config.h recog.h output.h
1333 bitmap.o : bitmap.c $(CONFIG_H) $(RTL_H) flags.h $(BASIC_BLOCK_H) regs.h
1334 global.o : global.c $(CONFIG_H) $(RTL_H) flags.h  \
1335    $(BASIC_BLOCK_H) regs.h hard-reg-set.h insn-config.h output.h
1336
1337 reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h output.h expr.h\
1338    reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
1339 reload1.o : reload1.c $(CONFIG_H) $(RTL_H) real.h flags.h expr.h \
1340    reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
1341    $(BASIC_BLOCK_H) recog.h output.h
1342 caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
1343    regs.h hard-reg-set.h insn-codes.h insn-config.h $(BASIC_BLOCK_H) recog.h \
1344    reload.h expr.h
1345 reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
1346    $(BASIC_BLOCK_H) regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
1347    flags.h output.h
1348 alias.o : alias.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
1349    insn-codes.h
1350 regmove.o : regmove.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h output.h \
1351   reload.h regs.h hard-reg-set.h flags.h expr.h insn-flags.h
1352 $(SCHED_PREFIX)sched.o : $(SCHED_PREFIX)sched.c $(CONFIG_H) $(RTL_H) $(BASIC_BLOCK_H) regs.h hard-reg-set.h \
1353    flags.h insn-config.h insn-attr.h
1354 final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h regs.h \
1355    recog.h conditions.h insn-config.h insn-attr.h except.h real.h output.h \
1356    hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
1357 recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
1358    regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
1359    insn-flags.h insn-codes.h real.h
1360 reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
1361    regs.h hard-reg-set.h flags.h insn-config.h insn-flags.h
1362
1363 $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) \
1364    $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
1365    insn-flags.h output.h insn-attr.h insn-codes.h
1366         $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(out_file)
1367
1368 # Build auxiliary files that support ecoff format.
1369 mips-tfile: mips-tfile.o version.o $(LIBDEPS)
1370         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
1371
1372 mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H)
1373
1374 mips-tdump: mips-tdump.o version.o $(LIBDEPS)
1375         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
1376
1377 mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H)
1378
1379 # Build file to support OSF/rose half-pic format.
1380 halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H)
1381
1382 # Normally this target is not used; but it is used if you
1383 # define ALLOCA=alloca.o.  In that case, you must get a suitable alloca.c
1384 # from the GNU Emacs distribution.
1385 alloca.o:       alloca.c
1386         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
1387           -c `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
1388         $(ALLOCA_FINISH)
1389 #\f
1390 # Generate header and source files from the machine description, 
1391 # and compile them.
1392
1393 .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
1394   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
1395   insn-attr.h insn-attrtab.c
1396
1397 # The following pair of rules has this effect:
1398 # genconfig is run only if the md has changed since genconfig was last run;
1399 # but the file insn-config.h is touched only when its contents actually change.
1400
1401 # Each of the other insn-* files is handled by a similar pair of rules.
1402
1403 # This causes an anomaly in the results of make -n
1404 # because insn-* is older than stamp-*
1405 # and thus make -n thinks that insn-* will be updated
1406 # and force recompilation of things that depend on it.
1407 # We use move-if-change precisely to avoid such recompilation.
1408 # But there is no way to teach make -n that it will be avoided.
1409
1410 # Each of the insn-*.[ch] rules has a semicolon at the end,
1411 # for otherwise the system Make on SunOS 4.1 never tries
1412 # to recompile insn-*.o.  To avoid problems and extra noise from
1413 # versions of make which don't like empty commands (nothing after the
1414 # trailing `;'), we call true for each.
1415
1416 insn-config.h: stamp-config ; @true
1417 stamp-config : $(md_file) genconfig $(srcdir)/move-if-change
1418         ./genconfig $(md_file) > tmp-config.h
1419         $(srcdir)/move-if-change tmp-config.h insn-config.h
1420         touch stamp-config
1421
1422 insn-flags.h: stamp-flags ; @true
1423 stamp-flags : $(md_file) genflags $(srcdir)/move-if-change
1424         ./genflags $(md_file) > tmp-flags.h
1425         $(srcdir)/move-if-change tmp-flags.h insn-flags.h
1426         touch stamp-flags
1427
1428 insn-codes.h: stamp-codes ; @true
1429 stamp-codes : $(md_file) gencodes $(srcdir)/move-if-change
1430         ./gencodes $(md_file) > tmp-codes.h
1431         $(srcdir)/move-if-change tmp-codes.h insn-codes.h
1432         touch stamp-codes
1433
1434 insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
1435   insn-config.h insn-flags.h insn-codes.h
1436         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
1437
1438 insn-emit.c: stamp-emit ; @true
1439 stamp-emit : $(md_file) genemit $(srcdir)/move-if-change
1440         ./genemit $(md_file) > tmp-emit.c
1441         $(srcdir)/move-if-change tmp-emit.c insn-emit.c
1442         touch stamp-emit
1443
1444 insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \
1445   real.h output.h flags.h
1446         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
1447
1448 insn-recog.c: stamp-recog ; @true
1449 stamp-recog : $(md_file) genrecog $(srcdir)/move-if-change
1450         ./genrecog $(md_file) > tmp-recog.c
1451         $(srcdir)/move-if-change tmp-recog.c insn-recog.c
1452         touch stamp-recog
1453
1454 insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
1455   insn-config.h flags.h rtl.h recog.h expr.h reload.h
1456         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
1457
1458 insn-opinit.c: stamp-opinit ; @true
1459 stamp-opinit : $(md_file) genopinit $(srcdir)/move-if-change
1460         ./genopinit $(md_file) > tmp-opinit.c
1461         $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
1462         touch stamp-opinit
1463
1464 insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
1465         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
1466
1467 insn-extract.c: stamp-extract ; @true
1468 stamp-extract : $(md_file) genextract $(srcdir)/move-if-change
1469         ./genextract $(md_file) > tmp-extract.c
1470         $(srcdir)/move-if-change tmp-extract.c insn-extract.c
1471         touch stamp-extract
1472
1473 insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
1474         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
1475
1476 insn-peep.c: stamp-peep ; @true
1477 stamp-peep : $(md_file) genpeep $(srcdir)/move-if-change
1478         ./genpeep $(md_file) > tmp-peep.c
1479         $(srcdir)/move-if-change tmp-peep.c insn-peep.c
1480         touch stamp-peep
1481
1482 insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
1483      insn-attr.h insn-config.h
1484         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
1485
1486 insn-attr.h: stamp-attr ; @true
1487 stamp-attr : $(md_file) genattr $(srcdir)/move-if-change
1488         ./genattr $(md_file) > tmp-attr.h
1489         $(srcdir)/move-if-change tmp-attr.h insn-attr.h
1490         touch stamp-attr
1491
1492 insn-attrtab.c: stamp-attrtab ; @true
1493 stamp-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change
1494         if cmp -s $(PREMADE_ATTRTAB_MD) $(md_file);     \
1495         then                                    \
1496           echo Using $(PREMADE_ATTRTAB);        \
1497           cp $(PREMADE_ATTRTAB) tmp-attrtab.c;  \
1498         else                                    \
1499           ./genattrtab $(md_file) > tmp-attrtab.c;      \
1500         fi
1501         $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
1502         touch stamp-attrtab
1503
1504 insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
1505     hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
1506     insn-codes.h
1507         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
1508
1509 insn-output.c: stamp-output ; @true
1510 stamp-output : $(md_file) genoutput $(srcdir)/move-if-change
1511         ./genoutput $(md_file) > tmp-output.c
1512         $(srcdir)/move-if-change tmp-output.c insn-output.c
1513         touch stamp-output
1514 #\f
1515 # Compile the programs that generate insn-* from the machine description.
1516 # They are compiled with $(HOST_CC), and associated libraries,
1517 # since they need to run on this machine
1518 # even if GCC is being compiled to run on some other machine.
1519
1520 # $(CONFIG_H) is omitted from the deps of the gen*.o
1521 # because these programs don't really depend on anything 
1522 # about the target machine.  They do depend on config.h itself,
1523 # since that describes the host machine.
1524
1525 # Pass the md file through cpp if the target requests it.
1526 $(MD_FILE): $(MD_DEPS)
1527         rm -f $@
1528         $(MD_CPP) $(MD_CPPFLAGS) $(md_file) | sed 's/^# /; /g' > tmp-$@
1529         mv tmp-$@ $@
1530
1531 genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS)
1532         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1533           genconfig.o $(HOST_RTL) $(HOST_LIBS)
1534
1535 genconfig.o : genconfig.c $(RTL_H) $(build_xm_file)
1536         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
1537
1538 genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS)
1539         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1540          genflags.o $(HOST_RTL) $(HOST_LIBS)
1541
1542 genflags.o : genflags.c $(RTL_H) $(build_xm_file)
1543         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
1544
1545 gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS)
1546         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1547          gencodes.o $(HOST_RTL) $(HOST_LIBS)
1548
1549 gencodes.o : gencodes.c $(RTL_H) $(build_xm_file)
1550         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
1551
1552 genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
1553         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1554          genemit.o $(HOST_RTL) $(HOST_LIBS)
1555
1556 genemit.o : genemit.c $(RTL_H) $(build_xm_file)
1557         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
1558
1559 genopinit : genopinit.o $(HOST_RTL) $(HOST_LIBDEPS)
1560         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1561          genopinit.o $(HOST_RTL) $(HOST_LIBS)
1562
1563 genopinit.o : genopinit.c $(RTL_H) $(build_xm_file)
1564         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c
1565
1566 genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
1567         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1568          genrecog.o $(HOST_RTL) $(HOST_LIBS)
1569
1570 genrecog.o : genrecog.c $(RTL_H) $(build_xm_file)
1571         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
1572
1573 genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS)
1574         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1575          genextract.o $(HOST_RTL) $(HOST_LIBS)
1576
1577 genextract.o : genextract.c $(RTL_H) $(build_xm_file) insn-config.h
1578         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
1579
1580 genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS)
1581         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1582          genpeep.o $(HOST_RTL) $(HOST_LIBS)
1583
1584 genpeep.o : genpeep.c $(RTL_H) $(build_xm_file)
1585         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
1586
1587 genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS)
1588         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1589          genattr.o $(HOST_RTL) $(HOST_LIBS)
1590
1591 genattr.o : genattr.c $(RTL_H) $(build_xm_file)
1592         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
1593
1594 genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
1595         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1596          genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
1597
1598 genattrtab.o : genattrtab.c $(RTL_H)  $(build_xm_file) insn-config.h
1599         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
1600
1601 genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS)
1602         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1603          genoutput.o $(HOST_RTL) $(HOST_LIBS)
1604
1605 genoutput.o : genoutput.c $(RTL_H) $(build_xm_file)
1606         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
1607 #\f
1608 # Compile the libraries to be used by gen*.
1609 # If we are not cross-building, gen* use the same .o's that cc1 will use,
1610 # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1611 # with the rules for rtl.o, alloca.o, etc.
1612 $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H)
1613         rm -f $(HOST_PREFIX)rtl.c
1614         sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c
1615         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
1616
1617 $(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H)
1618         rm -f $(HOST_PREFIX)print-rtl.c
1619         sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c
1620         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c
1621
1622 $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
1623         rm -f $(HOST_PREFIX)rtlanal.c
1624         sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c
1625         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
1626
1627 $(HOST_PREFIX_1)alloca.o: alloca.c
1628         rm -f $(HOST_PREFIX)alloca.c
1629         cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
1630         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
1631
1632 $(HOST_PREFIX_1)obstack.o: obstack.c
1633         rm -f $(HOST_PREFIX)obstack.c
1634         sed -e 's/config[.]h/hconfig.h/' $(srcdir)/obstack.c > $(HOST_PREFIX)obstack.c
1635         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
1636
1637 $(HOST_PREFIX_1)malloc.o: malloc.c
1638         rm -f $(HOST_PREFIX)malloc.c
1639         sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c
1640         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
1641
1642 # This satisfies the dependency that we get if you cross-compile a compiler
1643 # that does not need to compile alloca, malloc or whatever.
1644 $(HOST_PREFIX_1): 
1645         touch $(HOST_PREFIX_1)
1646 #\f
1647 # Remake bytecode files.
1648 BI_OBJ=bi-parser.o bi-lexer.o bi-reverse.o
1649
1650 bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \
1651    bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
1652 bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \
1653    bc-opcode.h bc-typecd.h bc-typecd.def
1654
1655 bi-arity: bi-arity.o $(BI_OBJ) $(HOST_LIBDEPS)
1656         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1657          bi-arity.o $(BI_OBJ) $(HOST_LIBS)
1658 bi-opcode: bi-opcode.o $(BI_OBJ) $(HOST_LIBDEPS)
1659         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1660          bi-opcode.o $(BI_OBJ) $(HOST_LIBS)
1661 bi-opname: bi-opname.o $(BI_OBJ) $(HOST_LIBDEPS)
1662         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1663          bi-opname.o $(BI_OBJ) $(HOST_LIBS)
1664
1665 $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.c
1666 $(srcdir)/bi-parser.c: $(srcdir)/bi-parser.y
1667         cd $(srcdir); $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c
1668
1669 bi-parser.o: $(srcdir)/bi-parser.c bi-defs.h $(build_xm_file)
1670         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1671            $(srcdir)/bi-parser.c
1672 bi-lexer.o: bi-lexer.c $(srcdir)/bi-parser.h $(build_xm_file)
1673         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1674            $(srcdir)/bi-lexer.c
1675 bi-arity.o: bi-arity.c bi-defs.h $(build_xm_file)
1676         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1677            $(srcdir)/bi-arity.c
1678 bi-opcode.o: bi-opcode.c bi-defs.h $(build_xm_file)
1679         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1680            $(srcdir)/bi-opcode.c
1681 bi-opname.o: bi-opname.c bi-defs.h $(build_xm_file)
1682         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1683            $(srcdir)/bi-opname.c
1684 bi-reverse.o: bi-reverse.c bi-defs.h
1685         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1686            $(srcdir)/bi-reverse.c
1687
1688 bc-arity.h: stamp-bcarity ; @true
1689 stamp-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change
1690         ./bi-arity < $(srcdir)/bytecode.def >tmp-bc-arity.h
1691         $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
1692         touch stamp-bcarity
1693
1694 bc-opcode.h: stamp-bcopcode ; @true
1695 stamp-bcopcode : $(srcdir)/bytecode.def bi-opcode $(srcdir)/move-if-change
1696         ./bi-opcode < $(srcdir)/bytecode.def >tmp-bcopcd.h
1697         $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
1698         touch stamp-bcopcode
1699
1700 bc-opname.h: stamp-bcopname ; @true
1701 stamp-bcopname : $(srcdir)/bytecode.def bi-opname $(srcdir)/move-if-change
1702         ./bi-opname < $(srcdir)/bytecode.def >tmp-bcopnm.h
1703         $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
1704         touch stamp-bcopname
1705
1706 bytecode.mostlyclean:
1707         -rm -f bc-arity.h bc-opcode.h bc-opname.h
1708
1709 bytecode.distclean bytecode.clean:      bytecode.mostlyclean
1710         -rm -f bi-arity bi-opcode bi-opname bi-lexer
1711
1712 bytecode.maintainer-clean: bytecode.clean
1713         -rm -f bi-parser.c bi-parser.h
1714
1715 #\f
1716 # Remake cpp and protoize.
1717
1718 # Making the preprocessor
1719 cpp: $(CCCP)
1720         -rm -f cpp$(exeext)
1721         $(LN) $(CCCP)$(exeext) cpp$(exeext)
1722 cccp: cccp.o cexp.o version.o $(LIBDEPS)
1723         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cccp.o cexp.o \
1724           version.o $(LIBS)
1725 cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
1726         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
1727 $(srcdir)/cexp.c: $(srcdir)/cexp.y
1728         cd $(srcdir); $(BISON) -o cexp.c cexp.y
1729
1730 cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status
1731 # The reason we use $(libdir)/g++-include rather than using libsubdir
1732 # is for compatibility with the current version of libg++.
1733         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1734           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1735           -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1736           -DOLD_GPLUSPLUS_INCLUDE_DIR=\"$(old_gxx_include_dir)\" \
1737           -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1738           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1739           -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1740           -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1741
1742 cppmain: cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
1743   version.o $(LIBDEPS)
1744         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cppmain.o cpplib.o cpphash.o \
1745           cppalloc.o cpperror.o cppexp.o version.o $(LIBS)
1746
1747 cppmain.o: cppmain.c $(CONFIG_H) cpplib.h
1748
1749 cpplib.o: cpplib.c $(CONFIG_H) cpplib.h cpphash.h config.status
1750         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1751           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1752           -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1753           -DOLD_GPLUSPLUS_INCLUDE_DIR=\"$(old_gxx_include_dir)\" \
1754           -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1755           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1756           -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1757           -c `echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
1758
1759 cpperror.o: cpperror.c $(CONFIG_H) cpplib.h
1760
1761 cppexp.o: cppexp.c $(CONFIG_H) cpplib.h
1762
1763 cpphash.o: cpphash.c cpplib.h cpphash.h
1764
1765 cppalloc.o: cppalloc.c $(CONFIG_H)
1766
1767 # Note for the stamp targets, we run the program `true' instead of
1768 # having an empty command (nothing following the semicolon).
1769
1770 proto: config.status protoize unprotoize SYSCALLS.c.X
1771
1772 protoize: protoize.o getopt.o getopt1.o getpwd.o version.o \
1773     pexecute.o choose-temp.o $(LIBDEPS)
1774         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
1775           protoize.o getopt.o getopt1.o getpwd.o version.o \
1776           pexecute.o choose-temp.o $(LIBS)
1777 protoize.o: stamp-proto ; @true
1778
1779 unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o \
1780     pexecute.o choose-temp.o $(LIBDEPS)
1781         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
1782           unprotoize.o getopt.o getopt1.o getpwd.o version.o \
1783           pexecute.o choose-temp.o $(LIBS)
1784 unprotoize.o:   stamp-proto ; @true
1785
1786 stamp-proto: protoize.c getopt.h $(CONFIG_H)
1787         $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1788           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1789           -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1790           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1791           -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1792           -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1793           -DSTD_PROTO_DIR=\"$(libsubdir)\" \
1794           -DUNPROTOIZE $(srcdir)/protoize.c
1795         mv protoize$(objext) unprotoize$(objext)
1796         $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1797           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1798           -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1799           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1800           -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1801           -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1802           -DSTD_PROTO_DIR=\"$(libsubdir)\" \
1803           $(srcdir)/protoize.c
1804         touch stamp-proto
1805
1806 getopt.o: getopt.c getopt.h
1807         $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
1808 getopt1.o: getopt1.c getopt.h
1809         $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c
1810
1811 # This info describes the target machine, so compile with GCC just built.
1812 SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \
1813    stmp-int-hdrs
1814         -rm -f SYSCALLS.c tmp-SYSCALLS.s
1815         cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
1816         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1817           -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c
1818         -rm -f SYSCALLS.c tmp-SYSCALLS.s
1819
1820
1821 test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
1822         -rm -f tmp-proto.[cso]
1823         cp $(srcdir)/protoize.c tmp-proto.c
1824         chmod u+w tmp-proto.c
1825         ./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \
1826           $(CFLAGS) $(INCLUDES) \
1827           -DGCC_INCLUDE_DIR=0 \
1828           -DGPLUSPLUS_INCLUDE_DIR=0 \
1829           -DCROSS_INCLUDE_DIR=0 \
1830           -DTOOL_INCLUDE_DIR=0 \
1831           -DSTD_PROTO_DIR=0" tmp-proto.c
1832         @echo '**********' Expect 400 lines of differences.
1833         -diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff
1834         -wc -l tmp-proto.diff
1835         ./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \
1836           $(CFLAGS) $(INCLUDES) \
1837           -DGCC_INCLUDE_DIR=0 \
1838           -DGPLUSPLUS_INCLUDE_DIR=0 \
1839           -DCROSS_INCLUDE_DIR=0 \
1840           -DTOOL_INCLUDE_DIR=0 \
1841           -DSTD_PROTO_DIR=0" tmp-proto.c
1842         @echo Expect zero differences.
1843         diff $(srcdir)/protoize.c tmp-proto.c | cat
1844         -rm -f tmp-proto.[cs] tmp-proto$(objext)
1845
1846 gcov.o: gcov.c gcov-io.h
1847
1848 gcov: gcov.o $(LIBDEPS)
1849         $(CC) $(ALL_CFLAGS) $(LDFLAGS) gcov.o $(LIBS) -o $@
1850 #\f
1851 # Build the include directory.  The stamp files are stmp-* rather than
1852 # stamp-* so that mostlyclean does not force the include directory to
1853 # be rebuilt.
1854
1855 # Build the include directory except for float.h (which depends upon
1856 # enquire).
1857 stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h
1858 # Copy in the headers provided with gcc.
1859 # The sed command gets just the last file name component;
1860 # this is necessary because VPATH could add a dirname.
1861 # Using basename would be simpler, but some systems don't have it.
1862         for file in .. $(USER_H); do \
1863           if [ X$$file != X.. ]; then \
1864             realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
1865             rm -f include/$$realfile; \
1866             cp $$file include; \
1867             chmod a+r include/$$realfile; \
1868           fi; \
1869         done
1870         rm -f include/limits.h
1871         cp xlimits.h include/limits.h
1872         chmod a+r include/limits.h
1873 # Install the README
1874         rm -f include/README
1875         cp $(srcdir)/README-fixinc include/README
1876         chmod a+r include/README
1877         touch stmp-int-hdrs
1878
1879 # Build the complete include directory.
1880 stmp-headers: stmp-int-hdrs gfloat.h
1881         rm -f include/float.h
1882         cp gfloat.h include/float.h
1883         chmod a+r include/float.h
1884         touch stmp-headers
1885
1886 # Build fixed copies of system files.
1887 stmp-fixinc: $(FIXINCLUDES) gsyslimits.h
1888         rm -rf include
1889         mkdir include
1890         if [ x$(FIXINCLUDES) != xMakefile.in ]; \
1891         then \
1892           for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
1893             if [ -d $$dir ]; \
1894             then \
1895               $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
1896             else true; fi; \
1897           done; \
1898         else true; \
1899         fi
1900         rm -f include/syslimits.h
1901         if [ -f include/limits.h ]; then \
1902           mv include/limits.h include/syslimits.h; \
1903         else \
1904           cp $(srcdir)/gsyslimits.h include/syslimits.h; \
1905         fi
1906         chmod a+r include/syslimits.h
1907         touch stmp-fixinc
1908
1909 # Files related to the fixproto script.
1910
1911 deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
1912         CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
1913           export CC; \
1914           $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h
1915         mv tmp-deduced.h deduced.h
1916
1917 gen-protos: gen-protos.o scan.o cppalloc.o $(HOST_LIBDEPS)
1918         ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1919           gen-protos.o scan.o cppalloc.o $(HOST_LIBS)
1920
1921 gen-protos.o: gen-protos.c scan.h $(build_xm_file)
1922         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c
1923
1924 scan.o: scan.c scan.h $(build_xm_file)
1925         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c
1926
1927 xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
1928         cat deduced.h $(srcdir)/sys-protos.h > tmp-fixtmp.c
1929         mv tmp-fixtmp.c fixtmp.c
1930         $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \
1931           | sed -e 's/  / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
1932           | ./gen-protos >xsys-protos.hT
1933         mv xsys-protos.hT xsys-protos.h
1934         rm -rf fixtmp.c
1935
1936 fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
1937    cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o version.o
1938         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
1939            scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o version.o \
1940            cppexp.o $(HOST_LIBS)
1941
1942 fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h $(build_xm_file)
1943         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
1944
1945 scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file)
1946         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
1947
1948 # stmp-fixproto depends on this, not on fix-header directly.
1949 # The idea is to make sure fix-header gets built,
1950 # but not rerun fixproto after each stage
1951 # just because fix-header's mtime has changed.
1952 fixhdr.ready: fix-header
1953         -if [ -f fixhdr.ready ] ; then \
1954                 true; \
1955         else \
1956                 touch fixhdr.ready; \
1957         fi
1958
1959 # stmp-headers is to make sure fixincludes has already finished.
1960 # The if statement is so that we don't run fixproto a second time
1961 # if it has already been run on the files in `include'.
1962 stmp-fixproto: fixhdr.ready fixproto stmp-headers
1963         @echo "Various warnings and error messages from fixproto are normal"
1964         -if [ -d include ] ; then true; else mkdir include; fi
1965         -if [ -f include/fixed ] ; then true; \
1966         else \
1967           : This line works around a 'make' bug in BSDI 1.1.; \
1968           FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
1969           $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
1970           touch include/fixed; \
1971         fi
1972         touch stmp-fixproto
1973 #\f
1974 # Remake the info files.
1975
1976 doc: info
1977 info: cpp.info gcc.info lang.info
1978
1979 cpp.info: $(srcdir)/cpp.texi
1980         $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) $(srcdir)/cpp.texi -o cpp.info
1981
1982 gcc.info: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \
1983           $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \
1984           $(srcdir)/tm.texi $(srcdir)/gcov.texi
1985         $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) $(srcdir)/gcc.texi -o gcc.info
1986
1987 dvi: gcc.dvi cpp.dvi lang.dvi
1988
1989 # This works with GNU Make's default rule.
1990 gcc.dvi: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \
1991          $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \
1992          $(srcdir)/tm.texi $(srcdir)/gcov.texi
1993         TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex gcc.texi
1994         texindex gcc.??
1995         TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex gcc.texi
1996
1997 cpp.dvi: $(srcdir)/cpp.texi
1998         TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex cpp.texi
1999         texindex cpp.??
2000         TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex cpp.texi
2001
2002
2003 INSTALL: $(srcdir)/install1.texi $(srcdir)/install.texi
2004         $(MAKEINFO) -D INSTALLONLY --no-header --no-split \
2005         $(srcdir)/install1.texi -o INSTALL
2006 #\f
2007 # Deletion of files made during compilation.
2008 # There are four levels of this:
2009 #   `mostlyclean', `clean', `distclean' and `maintainer-clean'.
2010 # `mostlyclean' is useful while working on a particular type of machine.
2011 # It deletes most, but not all, of the files made by compilation.
2012 # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
2013 # `clean' deletes everything made by running `make all'.
2014 # `distclean' also deletes the files made by config.
2015 # `maintainer-clean' also deletes everything that could be regenerated
2016 # automatically, except for `configure'.
2017 # We remove as much from the language subdirectories as we can
2018 # (less duplicated code).
2019
2020
2021 mostlyclean: bytecode.mostlyclean lang.mostlyclean
2022         -rm -f $(STAGESTUFF)
2023 # Delete the temporary source copies for cross compilation.
2024         -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
2025         -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
2026         -rm -f $(HOST_PREFIX_1)obstack.c 
2027 # Delete the temp files made in the course of building libgcc.a.
2028         -rm -f tmplibgcc* tmpcopy xlimits.h libgcc1-test
2029         for name in $(LIB1FUNCS); do rm -f $${name}.c; done
2030 # Delete other temporary files.
2031         -rm -f tmp-float.h tmp-gcc.xtar.gz
2032         -rm -f tmp-foo1 tmp-foo2 tmp-proto.* tmp-unproto.1 tmp-SYSCALLS.s
2033         -rm -f tmp-c-parse.y tmp-gperf.h
2034         -rm -f tmp-specs t-float.h-cross tmp-xlimits.h
2035         -rm -f tmp-fixtmp.c xsys-protos.hT
2036 # Delete the stamp files.
2037         -rm -f stamp-* tmp-*
2038         -rm -f */stamp-* */tmp-*
2039 # Delete debugging dump files.
2040         -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
2041         -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack *.regmove
2042         -rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl
2043         -rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2
2044         -rm -f */*.sched2 */*.stack */*.regmove
2045 # Delete some files made during installation.
2046         -rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c
2047         -rm -f collect collect2 mips-tfile mips-tdump alloca.s
2048 # Delete files generated for fixproto
2049         -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
2050           gen-protos fixproto.list fixtmp.* fixhdr.ready
2051 # Delete unwanted output files from TeX.
2052         -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
2053         -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg
2054 # Delete sorted indices we don't actually use.
2055         -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
2056 # Delete core dumps.
2057         -rm -f core */core
2058         -rm -f *.bp */*.bp
2059
2060 # Delete all files made by compilation
2061 # that don't exist in the distribution.
2062 clean: mostlyclean bytecode.clean lang.clean
2063 # It may not be quite desirable to delete unprotoize.c here,
2064 # but the spec for `make clean' requires it.
2065 # Using unprotoize.c is not quite right in the first place, 
2066 # but what better way is there?
2067         -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
2068         -rm -f libgcc1.null
2069         -rm -f *.dvi
2070         -rm -f */*.dvi
2071         -if [ -f md.pre-cpp ]; then \
2072           rm -f md ; \
2073         fi
2074 # Delete the include directory.
2075         -rm -rf stmp-* include
2076         -rm -f */stmp-*
2077 # Delete files used by the "multilib" facility (including libgcc subdirs).
2078         -rm -f multilib.h tmpmultilib*
2079         -if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \
2080           rm -rf $(MULTILIB_DIRNAMES); \
2081         else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \
2082           rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
2083         fi ; fi
2084
2085 # Delete all files that users would normally create
2086 # while building and installing GCC.
2087 distclean: clean bytecode.distclean lang.distclean
2088         -rm -f tm.h config.h config2.h tconfig.h hconfig.h md cstamp-h
2089         -rm -f config.status config.run config.cache config.bak
2090         -rm -f Make-lang Make-hooks Make-host Make-target
2091         -rm -f Makefile specs.h options.h *.oaux
2092         -rm -fr stage1 stage2 stage3 stage4
2093         -rm -f */stage1 */stage2 */stage3 */stage4 */include
2094         -rm -f c-parse.output
2095         -rm -f *.asm
2096         -rm -f float.h
2097         -rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
2098         -rm -f testsuite/{gcc,g++}.{log,sum}
2099
2100 # Delete anything likely to be found in the source directory
2101 # that shouldn't be in the distribution.
2102 extraclean: distclean lang.extraclean
2103         -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
2104         -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
2105         -rm -f config/*/=* config/*/"#"* config/*/*~*
2106         -rm -f config/*/*.orig config/*/*.rej
2107         -rm -f *.dvi *.ps *.oaux *.d *.[zZ] *.gz
2108         -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
2109         -rm -f *lose config/*lose config/*/*lose
2110         -rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog
2111         -rm -f */=* */"#"* */*~*
2112         -rm -f */patch* */*.orig */*.rej
2113         -rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz
2114         -rm -f */*.tar */*.xtar */*diff */*.diff.* */*.tar.* */*.xtar.* */*diffs
2115         -rm -f */*lose */*.s */*.s[0-9] */*.i
2116
2117 # Get rid of every file that's generated from some other file, except for `configure'.
2118 # Most of these files ARE PRESENT in the GCC distribution.
2119 maintainer-clean:
2120         @echo 'This command is intended for maintainers to use; it'
2121         @echo 'deletes files that may need special tools to rebuild.'
2122         $(MAKE) distclean bytecode.maintainer-clean lang.maintainer-clean
2123         -rm -f c-parse.y c-gperf.h
2124         -rm -f c-parse.c c-parse.h c-parse.output
2125         -rm -f cexp.c cexp.output TAGS 
2126         -rm -f cpp.info* cpp.??s cpp.*aux
2127         -rm -f gcc.info* gcc.??s gcc.*aux
2128 #\f
2129 # Entry points `install' and `uninstall'.
2130 # Also use `install-collect2' to install collect2 when the config files don't.
2131
2132 # The semicolon is to prevent the install.sh -> install default rule
2133 # from doing anything.  Having it run true helps avoid problems and
2134 # noise from versions of make which don't like to have null commands.
2135 install: $(INSTALL_TARGET) ; @true
2136
2137 # Copy the compiler files into directories where they will be run.
2138 # Install the driver last so that the window when things are
2139 # broken is small.
2140 install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
2141     install-man install-info lang.install-normal install-driver
2142
2143 # Do nothing while making gcc with a cross-compiler. The person who
2144 # makes gcc for the target machine has to know how to put a complete
2145 # gcc together by hand.
2146 install-build: force
2147         @echo You have to install gcc on your target machine by hand.
2148
2149 # Run this on the target machine
2150 # to finish installation of cross compiler.
2151 install-cross-rest: install-float-h-cross
2152
2153 # Install float.h for cross compiler.
2154 # Run this on the target machine!
2155 install-float-h-cross: installdirs
2156 #       if [ -f enquire ] ; then true; else false; fi
2157 # Note: don't use -.  We should fail right away if enquire was not made.
2158         ./enquire -f > $(tmpdir)/float.h
2159         -rm -f $(libsubdir)/include/float.h
2160         $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h
2161         -rm -f $(tmpdir)/float.h
2162         chmod a-x $(libsubdir)/include/float.h
2163
2164 # Create the installation directories.
2165 installdirs:
2166         -if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; chmod a+rx $(prefix) ; fi
2167         -if [ -d $(exec_prefix) ] ; then true ; else mkdir $(exec_prefix) ; chmod a+rx $(exec_prefix) ; fi
2168         -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
2169         -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
2170 # This dir isn't currently searched by cpp.
2171 #       -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
2172         -if [ -d $(libdir)/gcc-lib/$(target_alias) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias) ; chmod a+rx $(libdir)/gcc-lib/$(target_alias) ; fi
2173         -if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version) ; chmod a+rx $(libdir)/gcc-lib/$(target_alias)/$(version) ; fi
2174         -if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version)/include ; chmod a+rx $(libdir)/gcc-lib/$(target_alias)/$(version)/include ; fi
2175         -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
2176         -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
2177         -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi
2178         -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi
2179         -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
2180 # We don't use mkdir -p to create the parents of mandir,
2181 # because some systems don't support it.
2182 # Instead, we use this technique to create the immediate parent of mandir.
2183         -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
2184         if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi
2185         -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; chmod a+rx $(mandir) ; fi
2186
2187 # Install the compiler executables built during cross compilation.
2188 install-common: native installdirs $(EXTRA_PARTS) lang.install-common
2189         for file in $(COMPILERS); do \
2190           if [ -f $$file ] ; then \
2191             rm -f $(libsubdir)/$$file; \
2192             $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
2193           else true; \
2194           fi; \
2195         done
2196         for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
2197           if [ x"$$file" != x.. ]; then \
2198             rm -f $(libsubdir)/$$file; \
2199             $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
2200           else true; fi; \
2201         done
2202         for file in $(EXTRA_PARTS) ..; do \
2203           if [ x"$$file" != x.. ]; then \
2204             rm -f $(libsubdir)/$$file; \
2205             $(INSTALL_DATA) $$file $(libsubdir)/$$file; \
2206           else true; fi; \
2207         done
2208 # Don't mess with specs if it doesn't exist yet.
2209         -if [ -f specs ] ; then \
2210           rm -f $(libsubdir)/specs; \
2211           $(INSTALL_DATA) specs $(libsubdir)/specs; \
2212         fi
2213 # Install protoize if it was compiled.
2214         -if [ -f protoize$(exeext) ]; \
2215         then \
2216             rm -f $(bindir)/protoize$(exeext); \
2217             $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/protoize$(exeext); \
2218             rm -f $(bindir)/unprotoize$(exeext); \
2219             $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/unprotoize$(exeext); \
2220             rm -f $(libsubdir)/SYSCALLS.c.X; \
2221             $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
2222             chmod a-x $(libsubdir)/SYSCALLS.c.X; \
2223         fi
2224         -rm -f $(libsubdir)/cpp$(exeext)
2225         $(INSTALL_PROGRAM) cpp$(exeext) $(libsubdir)/cpp$(exeext)
2226 # Install gcov if it was compiled.
2227         -if [ -f gcov$(exeext) ]; \
2228         then \
2229             rm -f $(bindir)/gcov$(exeext); \
2230             $(INSTALL_PROGRAM) gcov$(exeext) $(bindir)/gcov$(exeext); \
2231             chmod a+x $(bindir)/gcov$(exeext); \
2232         fi
2233
2234 # Install the driver program as $(target_alias)-gcc
2235 # and also as either gcc (if native) or $(tooldir)/bin/gcc.
2236 install-driver: xgcc
2237         -if [ -f gcc-cross$(exeext) ] ; then \
2238           rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
2239           $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
2240           if [ -d $(tooldir)/bin/. ] ; then \
2241             rm -f $(tooldir)/bin/gcc$(exeext); \
2242             $(INSTALL_PROGRAM) gcc-cross$(exeext) $(tooldir)/bin/gcc$(exeext); \
2243           else true; fi; \
2244         else \
2245           rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2246           $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2247           rm -f $(bindir)/$(target_alias)-gcc-1$(exeext); \
2248           $(LN) $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext); \
2249           mv $(bindir)/$(target_alias)-gcc-1$(exeext) $(bindir)/$(target_alias)-gcc$(exeext); \
2250         fi
2251
2252 # Install the info files.
2253 # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
2254 # to do the install.  The sed rule was copied from stmp-int-hdrs.
2255 install-info: doc installdirs lang.install-info
2256         -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
2257         for f in cpp.info* gcc.info*; do \
2258             realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
2259             $(INSTALL_DATA) $$f $(infodir)/$$realfile; \
2260         done
2261         -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
2262
2263 # Install the man pages.
2264 install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
2265         -if [ -f gcc-cross ] ; then \
2266           rm -f $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2267           $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2268           chmod a-x $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2269         else \
2270           rm -f $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2271           $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2272           chmod a-x $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2273         fi
2274         -rm -f $(mandir)/cccp$(manext)
2275         -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
2276         -chmod a-x $(mandir)/cccp$(manext)
2277
2278 # Install the library.
2279 install-libgcc: libgcc.a installdirs
2280         -if [ -f libgcc.a ] ; then \
2281           rm -f $(libsubdir)/libgcc.a; \
2282           $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
2283           if $(RANLIB_TEST) ; then \
2284             (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
2285           chmod a-x $(libsubdir)/libgcc.a; \
2286         else true; fi
2287
2288 # Install multiple versions of libgcc.a.
2289 install-multilib: stmp-multilib installdirs
2290         for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
2291           dir=`echo $$i | sed -e 's/;.*$$//'`; \
2292           if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \
2293           for f in libgcc.a $(EXTRA_MULTILIB_PARTS); do \
2294             rm -f $(libsubdir)/$${dir}/$${f}; \
2295             $(INSTALL_DATA) $${dir}/$${f} $(libsubdir)/$${dir}/$${f}; \
2296           done; \
2297           if $(RANLIB_TEST); then \
2298             (cd $(libsubdir)/$${dir}; $(RANLIB) libgcc.a); else true; fi; \
2299           chmod a-x $(libsubdir)/$${dir}/libgcc.a; \
2300         done
2301
2302 # Install all the header files built in the include subdirectory.
2303 install-headers: install-include-dir $(INSTALL_HEADERS_DIR) $(INSTALL_ASSERT_H)
2304 # Fix symlinks to absolute paths in the installed include directory to
2305 # point to the installed directory, not the build directory.
2306 # Don't need to use LN_S here since we really do need ln -s and no substitutes.
2307         -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
2308         if [ $$? -eq 0 ]; then \
2309           dir=`cd include; pwd`; \
2310           for i in $$files; do \
2311             dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
2312             if expr "$$dest" : "$$dir.*" > /dev/null; then \
2313               rm -f $(libsubdir)/include/$$i; \
2314               ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
2315             fi; \
2316           done; \
2317         fi
2318
2319 # Create or recreate the gcc private include file directory.
2320 install-include-dir: installdirs
2321         -rm -rf $(libsubdir)/include
2322         mkdir $(libsubdir)/include
2323         -chmod a+rx $(libsubdir)/include
2324
2325 # Install the include directory using tar.
2326 install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
2327         (cd include; \
2328          tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
2329 # /bin/sh on some systems returns the status of the first tar,
2330 # and that can lose with GNU tar which always writes a full block.
2331 # So use `exit 0' to ignore its exit status.
2332
2333 # Install the include directory using cpio.
2334 install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
2335         (cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
2336
2337 # Put assert.h where it won't override GNU libc's assert.h.
2338 # It goes in a dir that is searched after GNU libc's headers;
2339 # thus, the following conditionals are no longer needed.
2340 # But it's not worth deleting them now.
2341 ## Don't replace the assert.h already there if it is not from GCC.
2342 ## This code would be simpler if it tested for -f ... && ! grep ...
2343 ## but supposedly the ! operator is missing in sh on some systems.
2344 install-assert-h: assert.h installdirs
2345         if [ -f $(assertdir)/assert.h ]; \
2346         then \
2347           if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \
2348             then \
2349             rm -f $(assertdir)/assert.h; \
2350             $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
2351             chmod a-x $(assertdir)/assert.h; \
2352           else true; \
2353           fi; \
2354         else \
2355           rm -f $(assertdir)/assert.h; \
2356           $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
2357           chmod a-x $(assertdir)/assert.h; \
2358         fi
2359
2360 # Use this target to install the program `collect2' under the name `ld'.
2361 install-collect2: collect2 installdirs
2362         $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/ld$(exeext)
2363 # Install the driver program as $(libsubdir)/gcc for collect2.
2364         $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
2365
2366 # Cancel installation by deleting the installed files.
2367 uninstall: lang.uninstall
2368         -rm -rf $(libsubdir)
2369         -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext)
2370         -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext)
2371         -rm -rf $(bindir)/protoize$(exeext)
2372         -rm -rf $(bindir)/unprotoize$(exeext)
2373         -rm -rf $(mandir)/$(GCC_INSTALL_NAME)$(manext)
2374         -rm -rf $(mandir)/$(GCC_CROSS_NAME)$(manext)
2375         -rm -rf $(mandir)/cccp$(manext)
2376         -rm -rf $(mandir)/protoize$(manext)
2377         -rm -rf $(mandir)/unprotoize$(manext)
2378 #\f
2379 # These targets are for the dejagnu testsuites. The file site.exp 
2380 # contains global variables that all the testsuites will use.
2381
2382 # Set to $(target_alias)/ for cross.
2383 target_subdir = @target_subdir@
2384
2385 site.exp: ./config.status Makefile
2386         @echo "Making a new config file..."
2387         -@rm -f ./tmp?
2388         @touch site.exp
2389         -@mv site.exp site.bak
2390         @echo "## these variables are automatically generated by make ##" > ./tmp0
2391         @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
2392         @echo "# add them to the last section" >> ./tmp0
2393         @echo "set rootme \"`pwd`\"" >> ./tmp0
2394         @echo "set srcdir \"`cd ${srcdir}; pwd`\"" >> ./tmp0
2395         @echo "set host_triplet $(host_canonical)" >> ./tmp0
2396         @echo "set build_triplet $(build_canonical)" >> ./tmp0
2397         @echo "set target_triplet $(target)" >> ./tmp0
2398         @echo "set target_alias $(target_alias)" >> ./tmp0
2399 # CFLAGS is set even though it's empty to show we reserve the right to set it.
2400         @echo "set CFLAGS \"\"" >> ./tmp0
2401         @echo "set CXXFLAGS \"-I$(objdir)/../$(target_subdir)libio -I\$$srcdir/../libg++/src -I\$$srcdir/../libio -I\$$srcdir/../libstdc++ -I\$$srcdir/../libstdc++/stl -L$(objdir)/../$(target_subdir)libg++ -L$(objdir)/../$(target_subdir)libstdc++\"" >> ./tmp0
2402 # If newlib has been configured, we need to pass -B to gcc so it can find
2403 # newlib's crt0.o if it exists.  This will cause a "path prefix not used"
2404 # message if it doesn't, but the testsuite is supposed to ignore the message -
2405 # it's too difficult to tell when to and when not to pass -B (not all targets
2406 # have crt0's).  We could only add the -B if ../newlib/crt0.o exists, but that
2407 # seems like too selective a test.
2408 # ??? Another way to solve this might be to rely on linker scripts.  Then
2409 # theoretically the -B won't be needed.
2410 # We also need to pass -L ../ld so that the linker can find ldscripts.
2411         @if [ -d $(objdir)/../$(target_subdir)newlib ] ; then \
2412           echo "set newlib_cflags \"-I$(objdir)/../$(target_subdir)newlib/targ-include -I\$$srcdir/../newlib/libc/include\"" >> ./tmp0; \
2413           echo "set newlib_ldflags \"-B$(objdir)/../$(target_subdir)newlib/\"" >> ./tmp0; \
2414           echo "append CFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \
2415           echo "append CXXFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \
2416           echo "append LDFLAGS \" \$$newlib_ldflags\"" >> ./tmp0; \
2417         else true; \
2418         fi
2419         @if [ -d $(objdir)/../ld ] ; then \
2420           echo "append LDFLAGS \" -L$(objdir)/../ld\"" >> ./tmp0; \
2421         else true; \
2422         fi
2423         @if  [ $(build_canonical) != $(host_canonical) ] ; then \
2424           echo "set tmpdir /tmp" >> ./tmp0 ; \
2425         else echo "set tmpdir $(objdir)/testsuite" >> ./tmp0 ; \
2426         fi
2427         @echo "set srcdir \"\$${srcdir}/testsuite\"" >> ./tmp0
2428         @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
2429         @cat ./tmp0 > site.exp
2430         @cat site.bak | sed \
2431                 -e '1,/^## All variables above are.*##/ d' >> site.exp
2432         -@rm -f ./tmp?
2433
2434 CHECK_TARGETS = check-gcc check-g++ check-g77
2435
2436 check: $(CHECK_TARGETS)
2437
2438 testsuite/site.exp: site.exp
2439         if [ -d testsuite ]; then \
2440           true; \
2441         else \
2442           mkdir testsuite; \
2443         fi
2444         rm -rf testsuite/site.exp
2445         cp site.exp testsuite/site.exp
2446
2447 check-g++: testsuite/site.exp
2448         -rootme=`pwd`; export rootme; \
2449         srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
2450         cd testsuite; \
2451         EXPECT=${EXPECT} ; export EXPECT ; \
2452         if [ -f $${rootme}/../expect/expect ] ; then  \
2453            TCL_LIBRARY=$${srcdir}/../tcl/library ; \
2454             export TCL_LIBRARY ; fi ; \
2455         $(RUNTEST) --tool g++ $(RUNTESTFLAGS)
2456
2457 check-gcc: testsuite/site.exp
2458         -rootme=`pwd`; export rootme; \
2459         srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
2460         cd testsuite; \
2461         EXPECT=${EXPECT} ; export EXPECT ; \
2462         if [ -f $${rootme}/../expect/expect ] ; then  \
2463            TCL_LIBRARY=$${srcdir}/../tcl/library ; \
2464            export TCL_LIBRARY ; fi ; \
2465         $(RUNTEST) --tool gcc $(RUNTESTFLAGS)
2466
2467 check-g77: testsuite/site.exp
2468         -rootme=`pwd`; export rootme; \
2469         srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
2470         cd testsuite; \
2471         EXPECT=${EXPECT} ; export EXPECT ; \
2472         if [ -f $${rootme}/../expect/expect ] ; then  \
2473            TCL_LIBRARY=$${srcdir}/../tcl/library ; \
2474            export TCL_LIBRARY ; fi ; \
2475         $(RUNTEST) --tool g77 $(RUNTESTFLAGS)
2476
2477 # These exist for maintenance purposes.
2478
2479 # Update the tags table.
2480 TAGS: force
2481         cd $(srcdir);                                                   \
2482         mkdir temp;                                                     \
2483         mv -f c-parse.[ch] objc-parse.c cexp.c =*.[chy] temp;           \
2484         etags *.y *.h *.c;                                              \
2485         mv temp/* .;                                                    \
2486         rmdir temp
2487
2488 # Create the distribution tar file.
2489 #dist: gcc-$(version).tar.gz
2490 dist: gcc.xtar.gz
2491
2492 gcc.xtar.gz: gcc.xtar
2493         gzip --best < gcc.xtar > tmp-gcc.xtar.gz
2494         mv tmp-gcc.xtar.gz gcc.xtar.gz
2495
2496 #gcc-$(version).tar.gz: gcc-$(version).tar
2497 #       gzip < gcc-$(version).tar > gcc-$(version).tar.gz
2498
2499 #gcc-$(version).tar:
2500 gcc.xtar: distdir
2501 # Make the distribution.
2502         tar -chf gcc.xtar gcc-$(version)
2503
2504 # This target exists to do the initial work before the language specific
2505 # stuff gets done.
2506 distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
2507   $(srcdir)/objc-parse.y $(srcdir)/c-parse.c $(srcdir)/objc-parse.c \
2508   $(srcdir)/cexp.c
2509         @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \
2510         then true; \
2511         else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
2512         fi
2513 # Update the version number in README
2514         awk '$$1 " " $$2 " " $$3 == "This directory contains" \
2515                 { $$6 = version; print $$0 } \
2516              $$1 " " $$2 " " $$3 != "This directory contains"' \
2517           version=$(version) README > tmp.README
2518         mv tmp.README README
2519         -rm -rf gcc-$(version) tmp      
2520 # Put all the files in a temporary subdirectory
2521 # which has the name that we want to have in the tar file.
2522         mkdir tmp
2523         mkdir tmp/config
2524         mkdir tmp/ginclude
2525         mkdir tmp/objc
2526         for file in *[0-9a-zA-Z+]; do \
2527           $(LN) $$file tmp; \
2528         done
2529         cd config; \
2530         for file in *[0-9a-zA-Z+]; do \
2531           if test -d $$file && test "$$file" != RCS; then \
2532             mkdir ../tmp/config/$$file; \
2533             cd $$file; \
2534             for subfile in *[0-9a-zA-Z+]; do \
2535               $(LN) $$subfile ../../tmp/config/$$file; \
2536             done; \
2537             cd ..; \
2538           else \
2539             $(LN) $$file ../tmp/config; \
2540           fi; \
2541         done
2542         cd ginclude; \
2543         for file in *[0-9a-zA-Z+]; do \
2544           $(LN) $$file ../tmp/ginclude; \
2545         done
2546         cd objc; \
2547         for file in *[0-9a-zA-Z+]; do \
2548           $(LN) $$file ../tmp/objc; \
2549         done
2550         $(LN) .gdbinit tmp
2551
2552 # Finish making `distdir', after the languages have done their thing.
2553 distdir-finish:
2554         mv tmp gcc-$(version)
2555 # Get rid of everything we don't want in the distribution.  We'd want
2556 # this to use Makefile.in, but it doesn't have the `lang.foo' targets
2557 # expanded.
2558         cd gcc-$(version); make extraclean
2559
2560 distdir: distdir-start lang.distdir distdir-finish
2561
2562 # make diff oldversion=M.N 
2563 # creates a diff file between an older distribution and this one.
2564 # The -P option assumes this is GNU diff.
2565 diff:
2566         diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \
2567           -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c \
2568           -x bi-parser.h -x TAGS \
2569           -x "gcc.??" -x "gcc.??s" -x gcc.aux -x "gcc.info*" \
2570           -x "cpp.??" -x "cpp.??s" -x cpp.aux -x "cpp.info*" \
2571           $(LANG_DIFF_EXCLUDES) \
2572           gcc-$(oldversion) gcc-$(version) > diffs
2573
2574 bootstrap: force
2575 # Only build the C compiler for stage1, because that is the only one that
2576 # we can guarantee will build with the native compiler, and also it is the
2577 # only thing useful for building stage2.
2578         $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
2579         $(MAKE) stage1
2580 # This used to define ALLOCA as empty, but that would lead to bad results
2581 # for a subsequent `make install' since that would not have ALLOCA empty.
2582 # To prevent `make install' from compiling alloca.o and then relinking cc1
2583 # because alloca.o is newer, we permit these recursive makes to compile
2584 # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
2585         $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
2586         $(MAKE) stage2
2587         $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2588
2589 bootstrap-lean: force
2590 # Only build the C compiler for stage1, because that is the only one that
2591 # we can guarantee will build with the native compiler, and also it is the
2592 # only thing useful for building stage2.
2593         $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
2594         $(MAKE) stage1
2595 # This used to define ALLOCA as empty, but that would lead to bad results
2596 # for a subsequent `make install' since that would not have ALLOCA empty.
2597 # To prevent `make install' from compiling alloca.o and then relinking cc1
2598 # because alloca.o is newer, we permit these recursive makes to compile
2599 # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
2600         $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
2601         $(MAKE) stage2
2602         rm -rf stage1
2603         $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2604
2605 bootstrap2: force
2606         $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
2607         $(MAKE) stage2
2608         $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2609
2610 bootstrap3: force
2611         $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2612
2613 # Compare the object files in the current directory with those in the
2614 # stage2 directory.
2615
2616 # ./ avoids bug in some versions of tail.
2617 compare: force
2618         -rm -f .bad_compare
2619         for file in *$(objext); do \
2620           tail +16c ./$$file > tmp-foo1; \
2621           tail +16c stage2/$$file > tmp-foo2 \
2622             && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2623         done
2624         for dir in tmp-foo $(SUBDIRS); do \
2625           if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2626             for file in $$dir/*$(objext); do \
2627               tail +16c ./$$file > tmp-foo1; \
2628               tail +16c stage2/$$file > tmp-foo2 \
2629                 && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2630             done; \
2631           fi; \
2632         done
2633         -rm -f tmp-foo*
2634         if [ -f .bad_compare ]; then \
2635           echo "Bootstrap comparison failure!"; \
2636           cat .bad_compare; \
2637           exit 1; \
2638         else true; \
2639         fi
2640
2641 # ./ avoids bug in some versions of tail.
2642 compare-lean: force
2643         -rm -f .bad_compare
2644         for file in *$(objext); do \
2645           tail +16c ./$$file > tmp-foo1; \
2646           tail +16c stage2/$$file > tmp-foo2 \
2647             && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2648         done
2649         for dir in tmp-foo $(SUBDIRS); do \
2650           if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2651             for file in $$dir/*$(objext); do \
2652               tail +16c ./$$file > tmp-foo1; \
2653               tail +16c stage2/$$file > tmp-foo2 \
2654                 && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2655             done; \
2656           fi; \
2657         done
2658         -rm -f tmp-foo*
2659         if [ -f .bad_compare ]; then \
2660           echo "Bootstrap comparison failure!"; \
2661           cat .bad_compare; \
2662           exit 1; \
2663         else rm -rf stage2; \
2664         fi
2665
2666 # Similar, but compare with stage3 directory
2667 compare3: force
2668         for file in *$(objext); do \
2669           tail +16c ./$$file > tmp-foo1; \
2670           tail +16c stage3/$$file > tmp-foo2 2>/dev/null \
2671             && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
2672         done
2673         for dir in tmp-foo $(SUBDIRS); do \
2674           if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2675             for file in $$dir/*$(objext); do \
2676               tail +16c ./$$file > tmp-foo1; \
2677               tail +16c stage3/$$file > tmp-foo2 2>/dev/null \
2678                 && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
2679             done; \
2680           fi; \
2681         done
2682         -rm -f tmp-foo*
2683
2684 # Compare the object files in the current directory with those in the
2685 # stage2 directory.  Use gnu cmp (diffutils v2.4 or later) to avoid
2686 # running tail and the overhead of twice copying each object file.
2687
2688 gnucompare: force
2689         for file in *$(objext); do \
2690           cmp --ignore-initial=16 $$file stage2/$$file || true ; \
2691         done
2692         for dir in tmp-foo $(SUBDIRS); do \
2693           if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2694             for file in $$dir/*$(objext); do \
2695               cmp --ignore-initial=16 $$file stage2/$$file || true ; \
2696             done; \
2697           fi; \
2698         done
2699
2700 # Similar, but compare with stage3 directory
2701 gnucompare3: force
2702         for file in *$(objext); do \
2703           cmp --ignore-initial=16 $$file stage3/$$file || true ; \
2704         done
2705         for dir in tmp-foo $(SUBDIRS); do \
2706           if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2707             for file in $$dir/*$(objext); do \
2708               cmp --ignore-initial=16 $$file stage3/$$file || true ; \
2709             done; \
2710           fi; \
2711         done
2712
2713 # Copy the object files from a particular stage into a subdirectory.
2714 stage1-start:
2715         -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
2716         -for dir in . $(SUBDIRS) ; \
2717          do \
2718            if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
2719          done
2720         -mv $(STAGESTUFF) stage1
2721 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2722 # dir will work properly.
2723         -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage1 ; else true ; fi
2724         -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage1 ; else true ; fi
2725         -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage1 ; else true ; fi
2726         -rm -f stage1/libgcc.a
2727         -cp libgcc.a stage1
2728         -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
2729         -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2730           cp stage1/$${f} . ; \
2731         else true; \
2732         fi; done
2733 stage1: force stage1-start lang.stage1
2734
2735 stage2-start:
2736         -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
2737         -for dir in . $(SUBDIRS) ; \
2738          do \
2739            if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
2740          done
2741         -mv $(STAGESTUFF) stage2
2742 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2743 # dir will work properly.
2744         -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage2 ; else true ; fi
2745         -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage2 ; else true ; fi
2746         -if [ -f collect-ld ] ; then $(LN_S) ../collect-ld$(exeext) stage2 ; else true ; fi
2747         -rm -f stage2/libgcc.a
2748         -cp libgcc.a stage2
2749         -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
2750         -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2751           cp stage2/$${f} . ; \
2752         else true; \
2753         fi; done
2754 stage2: force stage2-start lang.stage2
2755
2756 stage3-start:
2757         -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
2758         -for dir in . $(SUBDIRS) ; \
2759          do \
2760            if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
2761          done
2762         -mv $(STAGESTUFF) stage3
2763 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2764 # dir will work properly.
2765         -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage3 ; else true ; fi
2766         -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage3 ; else true ; fi
2767         -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage3 ; else true ; fi
2768         -rm -f stage3/libgcc.a
2769         -cp libgcc.a stage3
2770         -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
2771         -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2772           cp stage3/$${f} . ; \
2773         else true; \
2774         fi; done
2775 stage3: force stage3-start lang.stage3
2776
2777 stage4-start:
2778         -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
2779         -for dir in . $(SUBDIRS) ; \
2780          do \
2781            if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
2782          done
2783         -mv $(STAGESTUFF) stage4
2784 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2785 # dir will work properly.
2786         -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage4 ; else true ; fi
2787         -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage4 ; else true ; fi
2788         -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage4 ; else true ; fi
2789         -rm -f stage4/libgcc.a
2790         -cp libgcc.a stage4
2791         -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
2792         -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2793           cp stage4/$${f} . ; \
2794         else true; \
2795         fi; done
2796 stage4: force stage4-start lang.stage4
2797
2798 # Copy just the executable files from a particular stage into a subdirectory,
2799 # and delete the object files.  Use this if you're just verifying a version
2800 # that is pretty sure to work, and you are short of disk space.
2801 risky-stage1: stage1
2802         -make clean
2803
2804 risky-stage2: stage2
2805         -make clean
2806
2807 risky-stage3: stage3
2808         -make clean
2809
2810 risky-stage4: stage4
2811         -make clean
2812
2813 #In GNU Make, ignore whether `stage*' exists.
2814 .PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap
2815 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2816
2817 force: