OSDN Git Service

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