OSDN Git Service

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