OSDN Git Service

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