xref: /openbsd/gnu/usr.bin/gcc/gcc/Makefile.in (revision 776d5752)
1# Makefile for GNU C compiler.
2#   Copyright (C) 1987, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
3#   1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
4
5#This file is part of GCC.
6
7#GCC 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#GCC 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 GCC; 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# This is the default target.
28all:
29
30# Suppress smart makes who think they know how to automake Yacc files
31.y.c:
32
33# Directory where sources are, from where we are.
34srcdir = @srcdir@
35VPATH = @srcdir@
36LIBIBERTY_INCLUDES=$(srcdir)/../include/
37
38# Pointer to the GCC Project website
39website=http://gcc.gnu.org
40
41# Variables that exist for you to override.
42# See below for how to change them for certain systems.
43
44# List of language subdirectories.
45# This is overridden by configure.
46SUBDIRS =@subdirs@
47
48# Selection of languages to be made.
49# This is overridden by configure.
50CONFIG_LANGUAGES = @all_languages@
51LANGUAGES = c gcov$(exeext) $(CONFIG_LANGUAGES)
52
53# Selection of languages to be made during stage1 build.
54# This is overridden by configure.
55BOOT_LANGUAGES = c @all_boot_languages@
56
57# Various ways of specifying flags for compilations:
58# CFLAGS is for the user to override to, e.g., do a cross build with -O2.
59# For recursive  bootstrap builds CFLAGS is used to pass in STAGE1_CFLAGS
60# or BOOT_CFLAGS
61# STAGE1_CFLAGS is set by configure on some targets or passed from toplevel
62# and sets the CFLAGS passed to stage1 of a bootstrap compilation.
63# BOOT_CFLAGS is the value of CFLAGS to pass to the stage2, stage3 and stage4
64# bootstrap compilations.
65# XCFLAGS is used for most compilations but not when using the GCC just built.
66# TCFLAGS is used for compilations with the GCC just built.
67XCFLAGS =
68TCFLAGS =
69CFLAGS = -g
70STAGE1_CFLAGS = -g @stage1_cflags@
71BOOT_CFLAGS = -g -O2
72
73# Flags to determine code coverage. When coverage is disabled, this will
74# contain the optimization flags, as you normally want code coverage
75# without optimization. The -dumpbase $@ makes sure that the auxilary
76# files end up near the object files.
77COVERAGE_FLAGS = @coverage_flags@
78coverageexts = .{da,bb,bbg}
79
80# The warning flags are separate from BOOT_CFLAGS because people tend to
81# override optimization flags and we'd like them to still have warnings
82# turned on.  These flags are also used to pass other stage dependent
83# flags from configure.  The user is free to explicitly turn these flags
84# off if they wish.
85# LOOSE_WARN are the warning flags to use when compiling something
86# which is only compiled with gcc, such as libgcc and the frontends
87# other than C.
88# STRICT_WARN and STRICT2_WARN are the additional warning flags to
89# apply to the back end and the C front end, which may be compiled
90# with other compilers.  This is partially controlled by configure in
91# stage1, as not all versions of gcc understand -Wno-long-long.
92LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
93STRICT_WARN = -Wtraditional @strict1_warn@
94STRICT2_WARN = -Wtraditional -pedantic -Wno-long-long
95
96# This is set by --enable-checking.  The idea is to catch forgotten
97# "extern" tags in header files.
98NOCOMMON_FLAG = @nocommon_flag@
99
100# These are set by --enable-checking=valgrind.
101RUN_GEN = @valgrind_command@
102VALGRIND_DRIVER_DEFINES = @valgrind_path_defines@
103
104# This is how we control whether or not the additional warnings are applied.
105.-warn = $(STRICT_WARN)
106GCC_WARN_CFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG)
107
108# All warnings have to be shut off in stage1 if the compiler used then
109# isn't gcc; configure determines that.  WARN_CFLAGS will be either
110# $(GCC_WARN_CFLAGS), or nothing.
111WARN_CFLAGS = @warn_cflags@
112
113# These exists to be overridden by the x-* and t-* files, respectively.
114X_CFLAGS =
115T_CFLAGS =
116
117X_CPPFLAGS =
118T_CPPFLAGS =
119
120ADAC = @ADAC@
121AWK = @AWK@
122CC = @CC@
123BISON = @BISON@
124BISONFLAGS =
125FLEX = @FLEX@
126FLEXFLAGS =
127AR = ar
128AR_FLAGS = rc
129DLLTOOL = dlltool
130RANLIB = @RANLIB@
131SHELL = @SHELL@
132# pwd command to use.  Allow user to override default by setting PWDCMD in
133# the environment to account for automounters.  The make variable must not
134# be called PWDCMD, otherwise the value set here is passed to make
135# subprocesses and overrides the setting from the user's environment.
136# Don't use PWD since it is a common shell environment variable and we
137# don't want to corrupt it.
138PWD_COMMAND = $${PWDCMD-pwd}
139# on sysV, define this as cp.
140INSTALL = @INSTALL@
141# Some systems may be missing symbolic links, regular links, or both.
142# Allow configure to check this and use "ln -s", "ln", or "cp" as appropriate.
143LN=@LN@
144LN_S=@LN_S@
145# These permit overriding just for certain files.
146INSTALL_PROGRAM = @INSTALL_PROGRAM@
147INSTALL_DATA = @INSTALL_DATA@
148INSTALL_SCRIPT = @INSTALL@
149MAKEINFO = @MAKEINFO@
150MAKEINFOFLAGS =
151TEXI2DVI = texi2dvi
152TEXI2POD = perl $(srcdir)/../contrib/texi2pod.pl
153POD2MAN = pod2man --center="GNU" --release="gcc-$(version)"
154# For GNUmake: let us decide what gets passed to recursive makes.
155MAKEOVERRIDES =
156@SET_MAKE@
157# Some compilers can't handle cc -c blah.c -o foo/blah.o.
158# In stage2 and beyond, we force this to "-o $@" since we know we're using gcc.
159OUTPUT_OPTION = @OUTPUT_OPTION@
160
161# Some versions of `touch' (such as the version on Solaris 2.8)
162# do not correctly set the timestamp due to buggy versions of `utime'
163# in the kernel.  So, we use `echo' instead.
164STAMP = echo timestamp >
165
166# This is where we get zlib from.  zlibdir is -L../zlib and zlibinc is
167# -I../zlib, unless we were configured with --with-system-zlib, in which
168# case both are empty.
169ZLIB = @zlibdir@ -lz
170ZLIBINC = @zlibinc@
171
172# Substitution type for target's getgroups 2nd arg.
173TARGET_GETGROUPS_T = @TARGET_GETGROUPS_T@
174
175# Target to use when installing include directory.  Either
176# install-headers-tar, install-headers-cpio or install-headers-cp.
177INSTALL_HEADERS_DIR = @build_install_headers_dir@
178
179# Header files that are made available under the same name
180# to programs compiled with GCC.
181USER_H = $(srcdir)/ginclude/float.h \
182	 $(srcdir)/ginclude/iso646.h \
183	 $(srcdir)/ginclude/stdarg.h \
184	 $(srcdir)/ginclude/stdbool.h \
185	 $(srcdir)/ginclude/stddef.h \
186	 $(srcdir)/ginclude/varargs.h \
187	 $(srcdir)/unwind.h \
188	 $(EXTRA_HEADERS)
189
190# The GCC to use for compiling libgcc.a and crt*.o.
191# Usually the one we just built.
192# Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
193GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) ./xgcc -B./ -B$(build_tooldir)/bin/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include
194
195# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
196# It omits XCFLAGS, and specifies -B./.
197# It also specifies -isystem ./include to find, e.g., stddef.h.
198GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(LOOSE_WARN) -isystem ./include $(TCFLAGS)
199
200# Sed command to transform gcc to installed name.  Overwritten by configure.
201program_transform_name = @program_transform_name@
202program_transform_cross_name = s,^,$(target_alias)-,
203
204build_canonical = @build_canonical@
205host_canonical = @host_canonical@
206
207# Tools to use when building a cross-compiler.
208# These are used because `configure' appends `cross-make'
209# to the makefile when making a cross-compiler.
210
211# Use the tools from the build tree, if they are available.
212
213# objdir is set by configure.
214objdir = @objdir@
215
216AR_FOR_TARGET = ` \
217  if [ -f $(objdir)/../binutils/ar ] ; then \
218    echo $(objdir)/../binutils/ar ; \
219  else \
220    if [ "$(host_canonical)" = "$(target)" ] ; then \
221      echo ar; \
222    else \
223       t='$(program_transform_cross_name)'; echo ar | sed -e $$t ; \
224    fi; \
225  fi`
226AR_FLAGS_FOR_TARGET =
227AR_CREATE_FOR_TARGET = $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) rc
228AR_EXTRACT_FOR_TARGET = $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) x
229RANLIB_FOR_TARGET = ` \
230  if [ -f $(objdir)/../binutils/ranlib ] ; then \
231    echo $(objdir)/../binutils/ranlib ; \
232  else \
233    if [ "$(host_canonical)" = "$(target)" ] ; then \
234      echo ranlib; \
235    else \
236       t='$(program_transform_cross_name)'; echo ranlib | sed -e $$t ; \
237    fi; \
238  fi`
239RANLIB_TEST_FOR_TARGET = \
240  [ -f $(RANLIB_FOR_TARGET) ] \
241  || ( [ "$(host_canonical)" = "$(target)" ] \
242       && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )
243NM_FOR_TARGET = ` \
244  if [ -f ./nm ] ; then \
245    echo ./nm ; \
246  elif [ -f $(objdir)/../binutils/nm-new ] ; then \
247    echo $(objdir)/../binutils/nm-new ; \
248  else \
249    if [ "$(host_canonical)" = "$(target)" ] ; then \
250      echo nm; \
251    else \
252       t='$(program_transform_cross_name)'; echo nm | sed -e $$t ; \
253    fi; \
254  fi`
255
256# Where to find some libiberty headers.
257HASHTAB_H   = $(LIBIBERTY_INCLUDES)/hashtab.h
258OBSTACK_H   = $(LIBIBERTY_INCLUDES)/obstack.h
259SPLAY_TREE_H= $(LIBIBERTY_INCLUDES)/splay-tree.h
260FIBHEAP_H   = $(LIBIBERTY_INCLUDES)/fibheap.h
261PARTITION_H = $(LIBIBERTY_INCLUDES)/partition.h
262
263# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
264NATIVE_SYSTEM_HEADER_DIR = /usr/include
265# Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
266CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
267
268# autoconf sets SYSTEM_HEADER_DIR to one of the above.
269SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
270
271# Control whether to run fixproto and fixincludes.
272STMP_FIXPROTO = @STMP_FIXPROTO@
273STMP_FIXINC = @STMP_FIXINC@
274
275# Test to see whether <limits.h> exists in the system header files.
276LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
277
278# Directory for prefix to system directories, for
279# each of $(system_prefix)/usr/include, $(system_prefix)/usr/lib, etc.
280TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
281
282target=@target@
283target_alias=@target_alias@
284xmake_file=@dep_host_xmake_file@
285tmake_file=@dep_tmake_file@
286out_file=$(srcdir)/config/@out_file@
287out_object_file=@out_object_file@
288md_file=$(srcdir)/config/@md_file@
289tm_defines=@tm_defines@
290tm_p_file_list=@tm_p_file_list@
291tm_p_file=@tm_p_file@
292build_xm_file_list=@build_xm_file_list@
293build_xm_file=@build_xm_file@
294build_xm_defines=@build_xm_defines@
295host_xm_file_list=@host_xm_file_list@
296host_xm_file=@host_xm_file@
297host_xm_defines=@host_xm_defines@
298xm_file=@xm_file@
299xm_defines=@xm_defines@
300lang_specs_files=@lang_specs_files@
301lang_options_files=@lang_options_files@
302lang_tree_files=@lang_tree_files@
303target_cpu_default=@target_cpu_default@
304GCC_THREAD_FILE=@thread_file@
305OBJC_BOEHM_GC=@objc_boehm_gc@
306GTHREAD_FLAGS=@gthread_flags@
307# Be prepared for gcc2 merges.
308gcc_version=@gcc_version@
309gcc_version_trigger=@gcc_version_trigger@
310version=$(gcc_version)
311mainversion=`grep version_string $(srcdir)/version.c | sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/'`
312
313# Common prefix for installation directories.
314# NOTE: This directory must exist when you start installation.
315prefix = @prefix@
316# Directory in which to put localized header files. On the systems with
317# gcc as the native cc, `local_prefix' may not be `prefix' which is
318# `/usr'.
319# NOTE: local_prefix *should not* default from prefix.
320local_prefix = @local_prefix@
321# Directory in which to put host dependent programs and libraries
322exec_prefix = @exec_prefix@
323# Directory in which to put the executable for the command `gcc'
324bindir = @bindir@
325# Directory in which to put the directories used by the compiler.
326libdir = @libdir@
327# Directory in which the compiler finds executables, libraries, etc.
328libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
329# Used to produce a relative $(gcc_tooldir) in gcc.o
330unlibsubdir = ../../..
331# Directory in which to find other cross-compilation tools and headers.
332dollar = @dollar@
333# Used in install-cross.
334gcc_tooldir = @gcc_tooldir@
335# Used to install the shared libgcc.
336slibdir = @slibdir@
337# Since gcc_tooldir does not exist at build-time, use -B$(build_tooldir)/bin/
338build_tooldir = $(exec_prefix)/$(target_alias)
339# Directory in which the compiler finds target-independent g++ includes.
340gcc_gxx_include_dir = @gcc_gxx_include_dir@
341# Directory to search for site-specific includes.
342local_includedir = $(local_prefix)/include
343includedir = $(prefix)/include
344# where the info files go
345infodir = @infodir@
346# Where cpp should go besides $prefix/bin if necessary
347cpp_install_dir = @cpp_install_dir@
348# where the locale files go
349datadir = @datadir@
350localedir = $(datadir)/locale
351# Extension (if any) to put in installed man-page filename.
352man1ext = .1
353man7ext = .7
354objext = .o
355exeext = @host_exeext@
356build_exeext = @build_exeext@
357
358# Directory in which to put man pages.
359mandir = @mandir@
360man1dir = $(mandir)/man1
361man7dir = $(mandir)/man7
362# Dir for temp files.
363tmpdir = /tmp
364
365# Top build directory, relative to here.
366top_builddir = .
367
368# Whether we were configured with NLS.
369USE_NLS = @USE_NLS@
370
371# Internationalization library.
372INTLLIBS = @INTLLIBS@
373INTLDEPS = @INTLDEPS@
374
375# Character encoding conversion library.
376LIBICONV = @LIBICONV@
377
378# List of internationalization subdirectories.
379INTL_SUBDIRS = intl
380
381# The GC method to be used on this system.
382GGC=@GGC@.o
383
384# If a supplementary library is being used for the GC.
385GGC_LIB=
386
387# libgcc.a may be built directly or via stmp-multilib,
388# and installed likewise.  Overridden by t-fragment.
389LIBGCC = libgcc.a
390INSTALL_LIBGCC = install-libgcc
391
392# Options to use when compiling libgcc2.a.
393#
394LIBGCC2_DEBUG_CFLAGS = -g
395LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED @inhibit_libc@ -fno-stack-protector
396
397# Additional options to use when compiling libgcc2.a.
398# Some targets override this to -isystem include
399LIBGCC2_INCLUDES =
400
401# Additional target-dependent options for compiling libgcc2.a.
402TARGET_LIBGCC2_CFLAGS =
403
404# Options to use when compiling crtbegin/end.
405CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
406  -finhibit-size-directive -fno-inline-functions -fno-exceptions \
407  -fno-zero-initialized-in-bss
408
409# Additional sources to handle exceptions; overridden by targets as needed.
410LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
411  $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
412LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
413
414# nm flags to list global symbols in libgcc object files.
415SHLIB_NM_FLAGS = -pg
416
417# List of extra executables that should be compiled for this target machine
418# that are used for compiling from source code to object code.
419# The rules for compiling them should be in the t-* file for the machine.
420EXTRA_PASSES =@extra_passes@
421
422# Like EXTRA_PASSES, but these are used when linking.
423EXTRA_PROGRAMS = @extra_programs@
424
425# List of extra object files that should be compiled for this target machine.
426# The rules for compiling them should be in the t-* file for the machine.
427EXTRA_PARTS = @extra_parts@
428
429# List of extra object files that should be compiled and linked with
430# compiler proper (cc1, cc1obj, cc1plus).
431EXTRA_OBJS = @extra_objs@
432
433# List of extra object files that should be compiled and linked with
434# the gcc driver.
435EXTRA_GCC_OBJS =@host_extra_gcc_objs@
436
437# List of additional header files to install.
438# Often this is edited directly by `configure'.
439EXTRA_HEADERS =@extra_headers_list@
440
441# It is convenient for configure to add the assignment at the beginning,
442# so don't override it here.
443USE_COLLECT2 = collect2$(exeext)
444
445# List of extra C and assembler files to add to static and shared libgcc2.
446# Assembler files should have names ending in `.asm'.
447LIB2FUNCS_EXTRA =
448
449# List of extra C and assembler files to add to static libgcc2.
450# Assembler files should have names ending in `.asm'.
451LIB2FUNCS_STATIC_EXTRA =
452
453# Program to convert libraries.
454LIBCONVERT =
455
456# Control whether header files are installed.
457INSTALL_HEADERS=install-headers install-mkheaders
458
459# Control whether Info documentation is built and installed.
460BUILD_INFO = @BUILD_INFO@
461
462# Control whether manpages generated by texi2pod.pl can be rebuilt.
463GENERATED_MANPAGES = @GENERATED_MANPAGES@
464
465# Additional directories of header files to run fixincludes on.
466# These should be directories searched automatically by default
467# just as /usr/include is.
468# *Do not* use this for directories that happen to contain
469# header files, but are not searched automatically by default.
470# On most systems, this is empty.
471OTHER_FIXINCLUDES_DIRS=
472
473# A list of all the language-specific executables.
474# This is overridden by configure.
475COMPILERS = cc1$(exeext) @all_compilers@
476
477# List of things which should already be built whenever we try to use xgcc
478# to compile anything (without linking).
479GCC_PASSES=xgcc$(exeext) cc1$(exeext) specs $(EXTRA_PASSES)
480
481# List of things which should already be built whenever we try to use xgcc
482# to link anything.
483GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
484
485# Directory to link to, when using the target `maketest'.
486DIR = ../gcc
487
488# Flags to use when cross-building GCC.
489# Prefix to apply to names of object files when using them
490# to run on the machine we are compiling on.
491BUILD_PREFIX = @BUILD_PREFIX@
492# Prefix to apply to names of object files when compiling them
493# to run on the machine we are compiling on.
494# The default for this variable is chosen to keep these rules
495# out of the way of the other rules for compiling the same source files.
496BUILD_PREFIX_1 = @BUILD_PREFIX_1@
497# Native compiler for the build machine and its switches.
498HOST_CC = @HOST_CC@
499HOST_CFLAGS= @HOST_CFLAGS@ -DGENERATOR_FILE
500
501# Native linker and preprocessor flags.  For x-fragment overrides.
502HOST_LDFLAGS=$(LDFLAGS)
503HOST_CPPFLAGS=$(ALL_CPPFLAGS)
504
505# Actual name to use when installing a native compiler.
506GCC_INSTALL_NAME = `echo gcc|sed '$(program_transform_name)'`
507GCC_TARGET_INSTALL_NAME = $(target_alias)-`echo gcc|sed '$(program_transform_name)'`
508CPP_INSTALL_NAME = `echo cpp|sed '$(program_transform_name)'`
509PROTOIZE_INSTALL_NAME = `echo protoize|sed '$(program_transform_name)'`
510UNPROTOIZE_INSTALL_NAME = `echo unprotoize|sed '$(program_transform_name)'`
511GCOV_INSTALL_NAME = `echo gcov|sed '$(program_transform_name)'`
512GCCBUG_INSTALL_NAME = `echo gccbug|sed '$(program_transform_name)'`
513
514# Actual name to use when installing a cross-compiler.
515GCC_CROSS_NAME = `echo gcc|sed '$(program_transform_cross_name)'`
516CPP_CROSS_NAME = `echo cpp|sed '$(program_transform_cross_name)'`
517PROTOIZE_CROSS_NAME = `echo protoize|sed '$(program_transform_cross_name)'`
518UNPROTOIZE_CROSS_NAME = `echo unprotoize|sed '$(program_transform_cross_name)'`
519
520# Set by autoconf to "all.internal" for a native build, or
521# "all.cross" to build a cross compiler.
522ALL = @ALL@
523
524# Setup the testing framework, if you have one
525EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
526            echo $${rootme}/../expect/expect ; \
527          else echo expect ; fi`
528
529RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
530	       echo $${srcdir}/../dejagnu/runtest ; \
531	    else echo runtest; fi`
532RUNTESTFLAGS =
533
534# Extra symbols for fixproto to define when parsing headers.
535FIXPROTO_DEFINES =
536
537# Extra flags to use when compiling crt{begin,end}.o.
538CRTSTUFF_T_CFLAGS =
539
540# Extra flags to use when compiling [m]crt0.o.
541CRT0STUFF_T_CFLAGS =
542
543# "t" or nothing, for building multilibbed versions of, say, crtbegin.o.
544T =
545
546# Should T contain a `=', libgcc.mk will make T_TARGET, setting
547# $(T_TARGET) to the name of the actual target filename.
548T_TARGET =
549T_TARGET : $(T_TARGET)
550
551# End of variables for you to override.
552
553# Definition of `all' is here so that new rules inserted by sed
554# do not specify the default target.
555# The real definition is under `all.internal' (for native compilers)
556# or `all.cross' (for cross compilers).
557all: all.indirect
558
559# This tells GNU Make version 3 not to put all variables in the environment.
560.NOEXPORT:
561
562# GCONFIG_H lists the config files that the generator files depend on, while
563# CONFIG_H lists the ones ordinary gcc files depend on, which includes
564# several files generated by those generators.
565GCONFIG_H = config.h $(host_xm_file_list)
566HCONFIG_H = hconfig.h $(build_xm_file_list)
567CONFIG_H = $(GCONFIG_H) insn-constants.h insn-flags.h
568TCONFIG_H = tconfig.h $(xm_file_list)
569TARGET_H = target.h
570HOOKS_H = hooks.h
571LANGHOOKS_DEF_H = langhooks-def.h $(HOOKS_H)
572TARGET_DEF_H = target-def.h $(HOOKS_H)
573TM_P_H = tm_p.h $(tm_p_file_list) tm-preds.h
574
575MACHMODE_H = machmode.h machmode.def @extra_modes_file@
576RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H)
577RTL_H = $(RTL_BASE_H) genrtl.h
578PARAMS_H = params.h params.def
579TREE_H = tree.h tree.def $(MACHMODE_H) tree-check.h version.h builtins.def \
580          location.h
581BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h $(PARTITION_H) \
582          hard-reg-set.h
583DEMANGLE_H = $(srcdir)/../include/demangle.h
584RECOG_H = recog.h
585EXPR_H = expr.h
586OPTABS_H = optabs.h insn-codes.h
587REGS_H = regs.h varray.h $(MACHMODE_H)
588INTEGRATE_H = integrate.h varray.h
589LOOP_H = loop.h varray.h bitmap.h
590GCC_H = gcc.h version.h
591GGC_H = ggc.h varray.h gtype-desc.h
592TIMEVAR_H = timevar.h timevar.def
593INSN_ATTR_H = insn-attr.h $(srcdir)/insn-addr.h $(srcdir)/varray.h
594C_COMMON_H = c-common.h $(SPLAY_TREE_H) $(CPPLIB_H)
595C_TREE_H = c-tree.h $(C_COMMON_H)
596SYSTEM_H = system.h hwint.h $(LIBIBERTY_INCLUDES)/libiberty.h
597PREDICT_H = predict.h predict.def
598CPPLIB_H = cpplib.h line-map.h
599
600# sed inserts variable overrides after the following line.
601####target overrides
602@target_overrides@
603
604####host overrides
605@host_overrides@
606#
607# Now figure out from those variables how to compile and link.
608
609all.indirect: $(ALL)
610
611# IN_GCC distinguishes between code compiled into GCC itself and other
612# programs built during a bootstrap.
613# autoconf inserts -DCROSS_COMPILE if we are building a cross compiler.
614INTERNAL_CFLAGS = -DIN_GCC @CROSS@
615
616# This is the variable actually used when we compile.
617# If you change this line, you probably also need to change the definition
618# of HOST_CFLAGS in build-make to match.
619ALL_CFLAGS = $(X_CFLAGS) $(T_CFLAGS) \
620  $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) $(XCFLAGS) @DEFS@
621
622# Likewise.
623ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
624
625# Build and host support libraries.  FORBUILD is either
626# .. or ../$(build_alias) depending on whether host != build.
627LIBIBERTY = ../libiberty/libiberty.a
628BUILD_LIBIBERTY = @FORBUILD@/libiberty/libiberty.a
629
630# Dependencies on the intl and portability libraries.
631LIBDEPS= $(INTLDEPS) $(LIBIBERTY)
632
633# Likewise, for use in the tools that must run on this machine
634# even if we are cross-building GCC.
635HOST_LIBDEPS= $(BUILD_LIBIBERTY)
636
637# How to link with both our special library facilities
638# and the system's installed libraries.
639LIBS =	$(INTLLIBS) @LIBS@ $(LIBIBERTY)
640
641# Any system libraries needed just for GNAT.
642SYSLIBS = @GNAT_LIBEXC@
643
644# Libs needed (at present) just for jcf-dump.
645LDEXP_LIB = @LDEXP_LIB@
646
647# Likewise, for use in the tools that must run on this machine
648# even if we are cross-building GCC.
649HOST_LIBS = $(BUILD_LIBIBERTY)
650
651HOST_RTL = $(BUILD_PREFIX)rtl.o read-rtl.o $(BUILD_PREFIX)bitmap.o \
652		$(BUILD_PREFIX)ggc-none.o
653HOST_SUPPORT = gensupport.o insn-conditions.o
654HOST_EARLY_SUPPORT = gensupport.o dummy-conditions.o
655
656HOST_PRINT = print-rtl1.o
657HOST_ERRORS = $(BUILD_PREFIX)errors.o
658HOST_VARRAY = $(BUILD_PREFIX)varray.o
659
660# Specify the directories to be searched for header files.
661# Both . and srcdir are used, in that order,
662# so that *config.h will be found in the compilation
663# subdirectory rather than in the source directory.
664# -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file
665# currently being compiled, in both source trees, to be examined as well.
666INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
667	   -I$(srcdir)/config -I$(srcdir)/../include
668
669# Always use -I$(srcdir)/config when compiling.
670.c.o:
671	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
672
673# This tells GNU make version 3 not to export all the variables
674# defined in this file into the environment.
675.NOEXPORT:
676#
677# Support for additional languages (other than c and objc).
678# ??? objc can be supported this way too (leave for later).
679
680# These next lines are overridden by configure.
681LANG_MAKEFILES = @all_lang_makefiles@
682LANG_STAGESTUFF = @all_stagestuff@
683
684# Flags to pass to recursive makes.
685# CC is set by configure.  Hosts without symlinks need special handling
686# because we need CC="stage1/xgcc -Bstage1/" to work in the language
687# subdirectories.
688# ??? The choices here will need some experimenting with.
689ORDINARY_FLAGS_TO_PASS = \
690	"AR=$(AR)" \
691	"AR_FLAGS_FOR_TARGET=$(AR_FLAGS_FOR_TARGET)" \
692	"AR_CREATE_FOR_TARGET=$(AR_CREATE_FOR_TARGET)" \
693	"AR_EXTRACT_FOR_TARGET=$(AR_EXTRACT_FOR_TARGET)" \
694	"AR_FOR_TARGET=$(AR_FOR_TARGET)" \
695	"BISON=$(BISON)" \
696	"BISONFLAGS=$(BISONFLAGS)" \
697	"CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \
698	"DESTDIR=$(DESTDIR)" \
699	"GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
700	"LDFLAGS=$(LDFLAGS)" \
701	"FLEX=$(FLEX)" \
702	"FLEXFLAGS=$(FLEXFLAGS)" \
703	"LN=$(LN)" \
704	"LN_S=$(LN_S)" \
705	"MAKEINFO=$(MAKEINFO)" \
706	"MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
707	"MAKEOVERRIDES=" \
708	"RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
709	"RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
710	"SHELL=$(SHELL)" \
711	"exeext=$(exeext)" \
712	"build_exeext=$(build_exeext)" \
713	"objext=$(objext)" \
714	"exec_prefix=$(exec_prefix)" \
715	"prefix=$(prefix)" \
716	"local_prefix=$(local_prefix)" \
717	"gxx_include_dir=$(gcc_gxx_include_dir)" \
718	"build_tooldir=$(build_tooldir)" \
719	"gcc_tooldir=$(gcc_tooldir)" \
720	"bindir=$(bindir)" \
721	"libsubdir=$(libsubdir)" \
722	"datadir=$(datadir)" \
723	"localedir=$(localedir)"
724FLAGS_TO_PASS = $(ORDINARY_FLAGS_TO_PASS) "CC=@cc_set_by_configure@" \
725	"STAGE_PREFIX=@stage_prefix_set_by_configure@"
726PREPEND_DOTDOT_TO_RELATIVE_PATHS = sed \
727	-e 's|^ *[^ /][^ /]*/|%&|' \
728	-e 's| -B| -B%|g' \
729	-e 's|% *[^- /]|%&|g' \
730	-e 's|%% *|../|g' \
731	-e 's|%||g'
732SUBDIR_FLAGS_TO_PASS = $(ORDINARY_FLAGS_TO_PASS) \
733	"CC=`echo @quoted_cc_set_by_configure@ | $(PREPEND_DOTDOT_TO_RELATIVE_PATHS)`" \
734	"STAGE_PREFIX=`echo @quoted_stage_prefix_set_by_configure@ | $(PREPEND_DOTDOT_TO_RELATIVE_PATHS)`"
735#
736# Lists of files for various purposes.
737
738# Target specific, C specific object file
739C_TARGET_OBJS=@c_target_objs@
740
741# Target specific, C++ specific object file
742CXX_TARGET_OBJS=@cxx_target_objs@
743
744# Language-specific object files for C and Objective C.
745C_AND_OBJC_OBJS = attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \
746  c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-bounded.o \
747  c-semantics.o c-objc-common.o c-dump.o libcpp.a $(C_TARGET_OBJS)
748
749# Language-specific object files for C.
750C_OBJS = c-parse.o c-lang.o c-pretty-print.o $(C_AND_OBJC_OBJS)
751
752# Language-independent object files.
753
754OBJS = alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o	   \
755 cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o		   \
756 cfgrtl.o combine.o conflict.o convert.o cse.o cselib.o dbxout.o	   \
757 debug.o df.o diagnostic.o doloop.o dominance.o		                   \
758 dwarf2asm.o dwarf2out.o dwarfout.o emit-rtl.o except.o explow.o	   \
759 expmed.o expr.o final.o flow.o fold-const.o function.o gcse.o		   \
760 genrtl.o ggc-common.o global.o graph.o gtype-desc.o			   \
761 haifa-sched.o hashtable.o hooks.o ifcvt.o insn-attrtab.o insn-emit.o	   \
762 insn-extract.o insn-opinit.o insn-output.o insn-peep.o insn-recog.o	   \
763 integrate.o intl.o jump.o  langhooks.o lcm.o lists.o local-alloc.o	   \
764 loop.o mbchar.o optabs.o params.o predict.o print-rtl.o print-tree.o	   \
765 profile.o ra.o ra-build.o ra-colorize.o ra-debug.o ra-rewrite.o	   \
766 real.o recog.o reg-stack.o regclass.o regmove.o regrename.o		   \
767 reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o	   \
768 sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o	   \
769 sibcall.o simplify-rtx.o ssa.o ssa-ccp.o ssa-dce.o stmt.o		   \
770 stor-layout.o stringpool.o timevar.o toplev.o tracer.o tree.o tree-dump.o \
771 tree-inline.o unroll.o varasm.o varray.o version.o vmsdbgout.o xcoffout.o \
772 et-forest.o protector.o $(GGC) $(out_object_file) $(EXTRA_OBJS)
773
774BACKEND = main.o libbackend.a
775
776# Files to be copied away after each stage in building.
777STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
778 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
779 insn-attr.h insn-attrtab.c insn-opinit.c insn-constants.h tm-preds.h \
780 tree-check.h insn-conditions.c \
781 s-flags s-config s-codes s-mlib s-genrtl s-gtype gtyp-gen.h \
782 s-output s-recog s-emit s-extract s-peep s-check s-conditions \
783 s-attr s-attrtab s-opinit s-preds s-constants s-crt0 \
784 genemit$(build_exeext) genoutput$(build_exeext) genrecog$(build_exeext) \
785 genextract$(build_exeext) genflags$(build_exeext) gencodes$(build_exeext) \
786 genconfig$(build_exeext) genpeep$(build_exeext) genattrtab$(build_exeext) \
787 genattr$(build_exeext) genopinit$(build_exeext) gengenrtl$(build_exeext) \
788 gencheck$(build_exeext) genpreds$(build_exeext) genconstants$(build_exeext) \
789 gengtype$(build_exeext) genconditions$(build_exeext) \
790 genrtl.c genrtl.h gt-*.h gtype-*.h gtype-desc.c \
791 xgcc$(exeext) cpp$(exeext) cc1$(exeext) $(EXTRA_PASSES) \
792 $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) cc1obj$(exeext) \
793 protoize$(exeext) unprotoize$(exeext) \
794 specs collect2$(exeext) $(USE_COLLECT2) \
795 gcov$(exeext) *.[0-9][0-9].* *.[si] libcpp.a libbackend.a libgcc.mk \
796 $(LANG_STAGESTUFF)
797
798# Library members defined in libgcc2.c.
799# Variable length limited to 255 charactes when passed to a shell script.
800LIB2FUNCS_1 = _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _clz \
801    _cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi \
802    _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi
803
804LIB2FUNCS_2 = _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi _floatditf \
805    _clear_cache _trampoline __main _exit _absvsi2 _absvdi2 _addvsi3 \
806    _addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors _stack_smash_handler
807
808# Defined in libgcc2.c, included only in the static library.
809LIB2FUNCS_ST = _eprintf _bb __gcc_bcmp
810
811FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \
812    _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \
813    _lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf _make_sf \
814    _sf_to_df _sf_to_tf _thenan_sf _sf_to_usi _usi_to_sf
815
816DPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \
817    _fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df \
818    _lt_df _le_df _unord_df _si_to_df _df_to_si _negate_df _make_df \
819    _df_to_sf _df_to_tf _thenan_df _df_to_usi _usi_to_df
820
821TPBIT_FUNCS = _pack_tf _unpack_tf _addsub_tf _mul_tf _div_tf \
822    _fpcmp_parts_tf _compare_tf _eq_tf _ne_tf _gt_tf _ge_tf \
823    _lt_tf _le_tf _unord_tf _si_to_tf _tf_to_si _negate_tf _make_tf \
824    _tf_to_df _tf_to_sf _thenan_tf _tf_to_usi _usi_to_tf
825
826# These might cause a divide overflow trap and so are compiled with
827# unwinder info.
828LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
829
830# The only suffixes we want for implicit rules are .c and .o, so clear
831# the list and add them.  This speeds up GNU Make, and allows -r to work.
832# For i18n support, we also need .gmo, .po, .pox.
833# This must come before the language makefile fragments to allow them to
834# add suffixes and rules of their own.
835.SUFFIXES:
836.SUFFIXES: .c .o .po .pox .gmo
837
838#
839# Language makefile fragments.
840
841# The following targets define the interface between us and the languages.
842#
843# all.cross, start.encap, rest.encap,
844# info, dvi,
845# install-normal, install-common, install-info, install-man,
846# uninstall,
847# mostlyclean, clean, distclean, extraclean, maintainer-clean,
848# stage1, stage2, stage3, stage4
849#
850# Each language is linked in with a series of hooks (since we can't use `::'
851# targets).  The name of each hooked is "lang.${target_name}" (eg: lang.info).
852# Configure computes and adds these here.
853
854####language hooks
855@language_hooks@
856
857# sed inserts language fragments after the following line.
858####language fragments
859@language_fragments@
860
861# End of language makefile fragments.
862#
863
864config.h: cs-config.h ; @true
865hconfig.h: cs-hconfig.h ; @true
866tconfig.h: cs-tconfig.h ; @true
867tm_p.h: cs-tm_p.h ; @true
868
869cs-config.h: Makefile
870	TM_DEFINES="$(tm_defines)" \
871	HEADERS="$(host_xm_file)" XM_DEFINES="$(host_xm_defines)" \
872	TARGET_CPU_DEFAULT="$(target_cpu_default)" \
873	$(SHELL) $(srcdir)/mkconfig.sh config.h
874
875cs-hconfig.h: Makefile
876	TM_DEFINES="$(tm_defines)" \
877	HEADERS="$(build_xm_file)" XM_DEFINES="$(build_xm_defines)" \
878	TARGET_CPU_DEFAULT="$(target_cpu_default)" \
879	$(SHELL) $(srcdir)/mkconfig.sh hconfig.h
880
881cs-tconfig.h: Makefile
882	TM_DEFINES="$(tm_defines)" \
883	HEADERS="$(xm_file)" XM_DEFINES="$(xm_defines)" \
884	TARGET_CPU_DEFAULT="" \
885	$(SHELL) $(srcdir)/mkconfig.sh tconfig.h
886
887cs-tm_p.h: Makefile
888	TM_DEFINES="" \
889	HEADERS="$(tm_p_file)" XM_DEFINES="" TARGET_CPU_DEFAULT="" \
890	$(SHELL) $(srcdir)/mkconfig.sh tm_p.h
891
892# Don't automatically run autoconf, since configure.in might be accidentally
893# newer than configure.  Also, this writes into the source directory which
894# might be on a read-only file system.  If configured for maintainer mode
895# then do allow autoconf to be run.
896
897$(srcdir)/configure: @MAINT@ $(srcdir)/configure.in
898	(cd $(srcdir) && autoconf)
899
900gccbug:	$(srcdir)/gccbug.in
901	CONFIG_FILES=gccbug CONFIG_HEADERS= ./config.status
902
903mklibgcc: $(srcdir)/mklibgcc.in
904	CONFIG_FILES=mklibgcc CONFIG_HEADERS= ./config.status
905
906mkheaders: $(srcdir)/mkheaders.in
907	CONFIG_FILES=mkheaders CONFIG_HEADERS= ./config.status
908
909# cstamp-h.in controls rebuilding of config.in.
910# It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't
911# delete it.  A stamp file is needed as autoheader won't update the file if
912# nothing has changed.
913# It remains in the source directory and is part of the distribution.
914# This follows what is done in shellutils, fileutils, etc.
915# "echo timestamp" is used instead of touch to be consistent with other
916# packages that use autoconf (??? perhaps also to avoid problems with patch?).
917# ??? Newer versions have a maintainer mode that may be useful here.
918
919# Don't run autoheader automatically either.
920# Only run it if maintainer mode is enabled.
921@MAINT@ $(srcdir)/config.in: $(srcdir)/cstamp-h.in
922@MAINT@ $(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h
923@MAINT@	(cd $(srcdir) && autoheader)
924@MAINT@	@rm -f $(srcdir)/cstamp-h.in
925@MAINT@	echo timestamp > $(srcdir)/cstamp-h.in
926auto-host.h: cstamp-h ; @true
927cstamp-h: config.in config.status
928	CONFIG_HEADERS=auto-host.h:config.in LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status
929
930auto-build.h: config.in config.status
931	CONFIG_HEADERS=auto-build.h:config.in LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status
932
933# Really, really stupid make features, such as SUN's KEEP_STATE, may force
934# a target to build even if it is up-to-date.  So we must verify that
935# config.status does not exist before failing.
936config.status: $(srcdir)/configure $(srcdir)/config.gcc version.c
937	@if [ ! -f config.status ] ; then \
938	  echo You must configure gcc.  Look at http://gcc.gnu.org/install/ for details.; \
939	  false; \
940	else \
941	  LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status --recheck; \
942	fi
943
944all.internal: start.encap rest.encap doc
945# This is what to compile if making a cross-compiler.
946all.cross: native gcc-cross cpp$(exeext) specs \
947	$(LIBGCC) $(EXTRA_PARTS) lang.all.cross doc
948# This is what must be made before installing GCC and converting libraries.
949start.encap: native xgcc$(exeext) cpp$(exeext) specs \
950	xlimits.h lang.start.encap
951# These can't be made until after GCC can run.
952rest.encap: $(STMP_FIXPROTO) $(LIBGCC) $(EXTRA_PARTS) lang.rest.encap
953# This is what is made with the host's compiler
954# whether making a cross compiler or not.
955native: config.status auto-host.h intl.all build-@POSUB@ $(LANGUAGES) \
956	$(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
957
958# Define the names for selecting languages in LANGUAGES.
959C c: cc1$(exeext)
960PROTO: proto
961
962# Tell GNU make these are phony targets.
963.PHONY: C c PROTO proto
964
965# On the target machine, finish building a cross compiler.
966# This does the things that can't be done on the host machine.
967rest.cross: $(LIBGCC) specs
968
969# Recompile all the language-independent object files.
970# This is used only if the user explicitly asks for it.
971compilations: $(BACKEND)
972
973# Like libcpp.a, this archive is strictly for the host.
974libbackend.a: $(OBJS)
975	-rm -rf libbackend.a
976	$(AR) $(AR_FLAGS) libbackend.a $(OBJS)
977	-$(RANLIB) libbackend.a
978
979# We call this executable `xgcc' rather than `gcc'
980# to avoid confusion if the current directory is in the path
981# and CC is `gcc'.  It is renamed to `gcc' when it is installed.
982xgcc$(exeext): gcc.o gccspec.o version.o intl.o prefix.o \
983   version.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
984	$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o gccspec.o intl.o \
985	  prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS)
986
987# cpp is to cpp0 as gcc is to cc1.
988# The only difference from xgcc is that it's linked with cppspec.o
989# instead of gccspec.o.
990cpp$(exeext): gcc.o cppspec.o version.o intl.o prefix.o \
991   version.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
992	$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o cppspec.o intl.o \
993	  prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS)
994
995# Dump a specs file to make -B./ read these specs over installed ones.
996specs: xgcc$(exeext)
997	$(GCC_FOR_TARGET) -dumpspecs > tmp-specs
998	mv tmp-specs specs
999
1000# We do want to create an executable named `xgcc', so we can use it to
1001# compile libgcc2.a.
1002# Also create gcc-cross, so that install-common will install properly.
1003gcc-cross: xgcc$(exeext)
1004	cp xgcc$(exeext) gcc-cross$(exeext)
1005
1006cc1$(exeext): $(C_OBJS) $(BACKEND) $(LIBDEPS)
1007	$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1$(exeext) \
1008		$(C_OBJS) $(BACKEND) $(LIBS)
1009
1010# Build the version of limits.h that we will install.
1011xlimits.h: glimits.h limitx.h limity.h
1012	if $(LIMITS_H_TEST) ; then \
1013	  cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \
1014	else \
1015	  cat $(srcdir)/glimits.h > tmp-xlimits.h; \
1016	fi
1017	mv tmp-xlimits.h xlimits.h
1018#
1019# Build libgcc.a.
1020
1021LIB2ADD = $(LIB2FUNCS_EXTRA)
1022LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA)
1023
1024libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) $(LIB2ADD_ST) xgcc$(exeext) specs
1025	objext='$(objext)' \
1026	LIB1ASMFUNCS='$(LIB1ASMFUNCS)' \
1027	LIB2FUNCS_1='$(LIB2FUNCS_1)' \
1028	LIB2FUNCS_2='$(LIB2FUNCS_2)' \
1029	LIB2FUNCS_ST='$(LIB2FUNCS_ST)' \
1030	LIB2ADD='$(LIB2ADD)' \
1031	LIB2ADD_ST='$(LIB2ADD_ST)' \
1032	LIB2ADDEH='$(LIB2ADDEH)' \
1033	LIB2ADDEHDEP='$(LIB2ADDEHDEP)' \
1034	FPBIT='$(FPBIT)' \
1035	FPBIT_FUNCS='$(FPBIT_FUNCS)' \
1036	LIB2_DIVMOD_FUNCS='$(LIB2_DIVMOD_FUNCS)' \
1037	DPBIT='$(DPBIT)' \
1038	DPBIT_FUNCS='$(DPBIT_FUNCS)' \
1039	TPBIT='$(TPBIT)' \
1040	TPBIT_FUNCS='$(TPBIT_FUNCS)' \
1041	MULTILIBS=`$(GCC_FOR_TARGET) --print-multi-lib` \
1042	EXTRA_MULTILIB_PARTS='$(EXTRA_MULTILIB_PARTS)' \
1043	SHLIB_LINK='$(SHLIB_LINK)' \
1044	SHLIB_INSTALL='$(SHLIB_INSTALL)' \
1045	SHLIB_EXT='$(SHLIB_EXT)' \
1046	SHLIB_MULTILIB='$(SHLIB_MULTILIB)' \
1047	SHLIB_MKMAP='$(SHLIB_MKMAP)' \
1048	SHLIB_MKMAP_OPTS='$(SHLIB_MKMAP_OPTS)' \
1049	SHLIB_MAPFILES='$(SHLIB_MAPFILES)' \
1050	SHLIB_NM_FLAGS='$(SHLIB_NM_FLAGS)' \
1051	MULTILIB_OSDIRNAMES='$(MULTILIB_OSDIRNAMES)' \
1052	mkinstalldirs='$(SHELL) $(srcdir)/mkinstalldirs' \
1053	  $(SHELL) mklibgcc > tmp-libgcc.mk
1054	mv tmp-libgcc.mk libgcc.mk
1055
1056# All the things that might cause us to want to recompile bits of libgcc.
1057LIBGCC_DEPS = $(GCC_PASSES) $(LANGUAGES) stmp-int-hdrs $(STMP_FIXPROTO) \
1058	libgcc.mk $(srcdir)/libgcc2.c $(TCONFIG_H) \
1059	$(MACHMODE_H) longlong.h gbl-ctors.h config.status stmp-int-hdrs \
1060	tsystem.h $(FPBIT) $(DPBIT) $(TPBIT) $(LIB2ADD) \
1061	$(LIB2ADD_ST) $(LIB2ADDEH) $(LIB2ADDEHDEP) $(EXTRA_PARTS) \
1062	$(srcdir)/config/$(LIB1ASMSRC)
1063
1064libgcc.a: $(LIBGCC_DEPS)
1065	$(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1066	  BUILD_PREFIX="$(BUILD_PREFIX)" BUILD_PREFIX_1="$(BUILD_PREFIX_1)" \
1067	  AR_FOR_TARGET="$(AR_FOR_TARGET)" \
1068	  AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \
1069	  AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \
1070	  CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \
1071	  RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)" \
1072	  RANLIB_TEST_FOR_TARGET="$(RANLIB_TEST_FOR_TARGET)" \
1073	  NM_FOR_TARGET="$(NM_FOR_TARGET)" AWK="$(AWK)" \
1074	  LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" \
1075	  INCLUDES="$(INCLUDES)" \
1076	  CONFIG_H="$(TCONFIG_H)" MACHMODE_H="$(MACHMODE_H)" \
1077	  LIB1ASMSRC='$(LIB1ASMSRC)' \
1078	  MAKEOVERRIDES= \
1079	  -f libgcc.mk all
1080
1081# Use the genmultilib shell script to generate the information the gcc
1082# driver program needs to select the library directory based on the
1083# switches.
1084multilib.h: s-mlib; @true
1085s-mlib: $(srcdir)/genmultilib Makefile
1086	if test @enable_multilib@ = yes \
1087	   || test -n "$(MULTILIB_OSDIRNAMES)"; then \
1088	  $(SHELL) $(srcdir)/genmultilib \
1089	    "$(MULTILIB_OPTIONS)" \
1090	    "$(MULTILIB_DIRNAMES)" \
1091	    "$(MULTILIB_MATCHES)" \
1092	    "$(MULTILIB_EXCEPTIONS)" \
1093	    "$(MULTILIB_EXTRA_OPTS)" \
1094	    "$(MULTILIB_EXCLUSIONS)" \
1095	    "$(MULTILIB_OSDIRNAMES)" \
1096	    "@enable_multilib@" \
1097	    > tmp-mlib.h; \
1098	else \
1099	  $(SHELL) $(srcdir)/genmultilib '' '' '' '' '' '' '' no \
1100	    > tmp-mlib.h; \
1101	fi
1102	$(SHELL) $(srcdir)/move-if-change tmp-mlib.h multilib.h
1103	$(STAMP) s-mlib
1104
1105# Build multiple copies of libgcc.a, one for each target switch.
1106stmp-multilib: $(LIBGCC_DEPS)
1107	$(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1108	  BUILD_PREFIX="$(BUILD_PREFIX)" BUILD_PREFIX_1="$(BUILD_PREFIX_1)" \
1109	  AR_FOR_TARGET="$(AR_FOR_TARGET)" \
1110	  AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \
1111	  AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \
1112	  CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \
1113	  RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)" \
1114	  RANLIB_TEST_FOR_TARGET="$(RANLIB_TEST_FOR_TARGET)" \
1115	  NM_FOR_TARGET="$(NM_FOR_TARGET)" AWK="$(AWK)" \
1116	  LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" \
1117	  INCLUDES="$(INCLUDES)" \
1118	  CONFIG_H="$(CONFIG_H)" MACHMODE_H="$(MACHMODE_H)" \
1119	  LIB1ASMSRC='$(LIB1ASMSRC)' \
1120	  MAKEOVERRIDES= \
1121	  -f libgcc.mk all
1122	$(STAMP) stmp-multilib
1123
1124# Compile two additional files that are linked with every program
1125# linked using GCC on systems using COFF or ELF, for the sake of C++
1126# constructors.
1127$(T)crtbegin.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
1128  gbl-ctors.h stmp-int-hdrs tsystem.h
1129	$(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \
1130	  @inhibit_libc@ -c $(srcdir)/crtstuff.c -DCRT_BEGIN \
1131	  -o $(T)crtbegin$(objext)
1132
1133$(T)crtend.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
1134  gbl-ctors.h stmp-int-hdrs tsystem.h
1135	$(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \
1136	  @inhibit_libc@ -c $(srcdir)/crtstuff.c -DCRT_END \
1137	  -o $(T)crtend$(objext)
1138
1139# These are versions of crtbegin and crtend for shared libraries.
1140$(T)crtbeginS.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
1141  gbl-ctors.h stmp-int-hdrs tsystem.h
1142	$(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS_S) \
1143	  @inhibit_libc@ -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFS_O \
1144	  -o $(T)crtbeginS$(objext)
1145
1146$(T)crtendS.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
1147  gbl-ctors.h stmp-int-hdrs tsystem.h
1148	$(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS_S) \
1149	  @inhibit_libc@ -c $(srcdir)/crtstuff.c -DCRT_END -DCRTSTUFFS_O \
1150	  -o $(T)crtendS$(objext)
1151
1152# This is a version of crtbegin for -static links.
1153$(T)crtbeginT.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
1154  gbl-ctors.h stmp-int-hdrs tsystem.h
1155	$(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \
1156	  @inhibit_libc@ -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O \
1157	  -o $(T)crtbeginT$(objext)
1158
1159# Compile the start modules crt0.o and mcrt0.o that are linked with
1160# every program
1161crt0.o: s-crt0 ; @true
1162mcrt0.o: s-crt0; @true
1163
1164s-crt0:	$(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H)
1165	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
1166	  -o crt0.o -c $(CRT0_S)
1167	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
1168	  -o mcrt0.o -c $(MCRT0_S)
1169	$(STAMP) s-crt0
1170#
1171# Compiling object files from source files.
1172
1173# Note that dependencies on obstack.h are not written
1174# because that file is not part of GCC.
1175
1176# C language specific files.
1177
1178c-errors.o: c-errors.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) flags.h \
1179    diagnostic.h $(TM_P_H)
1180c-parse.o : c-parse.c $(CONFIG_H) $(TREE_H) $(GGC_H) intl.h \
1181    $(C_TREE_H) input.h flags.h $(SYSTEM_H) toplev.h output.h $(CPPLIB_H) \
1182    gt-c-parse.h
1183	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1184	       -c c-parse.c $(OUTPUT_OPTION)
1185
1186c-parse.c: c-parse.y
1187	if $(BISON) $(BISONFLAGS) -o c-p$$$$.c c-parse.y; then \
1188	  test -f c-p$$$$.output && mv -f c-p$$$$.output c-parse.output ; \
1189	  mv -f c-p$$$$.c c-parse.c ; \
1190	else \
1191	  rm -f c-p$$$$.* ; \
1192	  false ; \
1193	fi
1194
1195c-parse.y: $(srcdir)/c-parse.in
1196	echo '/*WARNING: This file is automatically generated!*/' >tmp-c-parse.y
1197	sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
1198	  -e "/^ifc$$/d" -e "/^end ifc$$/d" \
1199	  $(srcdir)/c-parse.in >>tmp-c-parse.y
1200	$(SHELL) $(srcdir)/move-if-change tmp-c-parse.y c-parse.y
1201
1202c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) $(C_TREE_H) \
1203    $(GGC_H) $(TARGET_H) flags.h function.h output.h $(EXPR_H) \
1204    debug.h toplev.h intl.h $(TM_P_H) tree-inline.h $(TIMEVAR_H) c-pragma.h \
1205    gt-c-decl.h libfuncs.h except.h
1206c-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
1207    $(TARGET_H) flags.h intl.h output.h $(EXPR_H) $(RTL_H) toplev.h $(TM_P_H)
1208c-lang.o : c-lang.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
1209    $(GGC_H) langhooks.h $(LANGHOOKS_DEF_H) c-common.h gtype-c.h
1210c-lex.o : c-lex.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) \
1211    debug.h $(C_TREE_H) c-common.h real.h \
1212    c-pragma.h input.h intl.h flags.h toplev.h output.h \
1213    mbchar.h $(CPPLIB_H) $(EXPR_H) $(TM_P_H)
1214c-objc-common.o : c-objc-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
1215    $(C_TREE_H) $(RTL_H) insn-config.h integrate.h $(EXPR_H) $(C_TREE_H) \
1216    flags.h toplev.h tree-inline.h diagnostic.h integrate.h $(VARRAY_H) \
1217    langhooks.h $(GGC_H) gt-c-objc-common.h $(TARGET_H)
1218c-aux-info.o : c-aux-info.c  $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
1219    flags.h toplev.h
1220c-convert.o : c-convert.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h toplev.h \
1221    $(C_COMMON_H)
1222c-pragma.o: c-pragma.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) function.h \
1223    c-pragma.h toplev.h output.h $(GGC_H) $(TM_P_H) $(C_COMMON_H) gt-c-pragma.h
1224mbchar.o: mbchar.c $(CONFIG_H) $(SYSTEM_H) mbchar.h
1225graph.o: graph.c $(CONFIG_H) $(SYSTEM_H) toplev.h flags.h output.h $(RTL_H) \
1226    function.h hard-reg-set.h $(BASIC_BLOCK_H) graph.h
1227sbitmap.o: sbitmap.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h hard-reg-set.h \
1228    $(BASIC_BLOCK_H)
1229
1230COLLECT2_OBJS = collect2.o tlink.o intl.o version.o
1231COLLECT2_LIBS = @COLLECT2_LIBS@
1232collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS)
1233# Don't try modifying collect2 (aka ld) in place--it might be linking this.
1234	$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o T$@ \
1235		$(COLLECT2_OBJS) $(LIBS) $(COLLECT2_LIBS)
1236	mv -f T$@ $@
1237
1238collect2.o : collect2.c $(CONFIG_H) $(SYSTEM_H) gstab.h intl.h \
1239	$(OBSTACK_H) $(DEMANGLE_H) collect2.h version.h
1240	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES)  \
1241	-DTARGET_MACHINE=\"$(target_alias)\" \
1242	-c $(srcdir)/collect2.c $(OUTPUT_OPTION)
1243
1244tlink.o: tlink.c $(DEMANGLE_H) $(HASHTAB_H) $(CONFIG_H) $(SYSTEM_H) \
1245    $(OBSTACK_H) collect2.h intl.h
1246
1247# A file used by all variants of C.
1248
1249c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) \
1250	$(C_COMMON_H) flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
1251	$(EXPR_H) $(TM_P_H) builtin-types.def builtin-attrs.def $(TARGET_H) \
1252	diagnostic.h except.h gt-c-common.h real.h langhooks.h c-tree.h
1253c-pretty-print.o : c-pretty-print.c c-pretty-print.h pretty-print.h \
1254	$(C_COMMON_H) $(CONFIG_H) $(SYSTEM_H) real.h
1255
1256c-opts.o : c-opts.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_COMMON_H) \
1257        c-pragma.h flags.h toplev.h langhooks.h tree-inline.h diagnostic.h \
1258	intl.h
1259
1260# A file used by all variants of C and some other languages.
1261
1262attribs.o : attribs.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h \
1263	toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) $(EXPR_H) $(TM_P_H) \
1264	builtin-types.def $(TARGET_H) langhooks.h
1265
1266c-format.o : c-format.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) langhooks.h \
1267	$(C_COMMON_H) flags.h toplev.h intl.h diagnostic.h
1268
1269c-bounded.o : c-bounded.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) langhooks.h \
1270	$(C_COMMON_H) flags.h toplev.h intl.h diagnostic.h
1271
1272c-semantics.o : c-semantics.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
1273	flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
1274	$(EXPR_H) $(PREDICT_H)
1275
1276c-dump.o : c-dump.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) tree-dump.h
1277
1278# Language-independent files.
1279
1280DRIVER_DEFINES = \
1281  -DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \
1282  -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
1283  -DDEFAULT_TARGET_VERSION=\"$(version)\" \
1284  -DDEFAULT_TARGET_MACHINE=\"$(target_alias)\" \
1285  -DSTANDARD_BINDIR_PREFIX=\"$(bindir)/\" \
1286  -DTOOLDIR_BASE_PREFIX=\"$(unlibsubdir)/../\" \
1287  @TARGET_SYSTEM_ROOT_DEFINE@ \
1288  $(VALGRIND_DRIVER_DEFINES) \
1289  `test "X$${SHLIB_LINK}" = "X" || test "@enable_shared@" != "yes" || echo "-DENABLE_SHARED_LIBGCC"` \
1290  `test "X$${SHLIB_MULTILIB}" = "X" || echo "-DNO_SHARED_LIBGCC_MULTILIB"`
1291
1292gcc.o: gcc.c $(CONFIG_H) $(SYSTEM_H) intl.h multilib.h \
1293    Makefile $(lang_specs_files) specs.h prefix.h $(GCC_H)
1294	(SHLIB_LINK='$(SHLIB_LINK)' \
1295	SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \
1296	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1297  $(DRIVER_DEFINES) \
1298  -c $(srcdir)/gcc.c $(OUTPUT_OPTION))
1299
1300gccspec.o: gccspec.c $(CONFIG_H) $(SYSTEM_H) $(GCC_H)
1301	(SHLIB_LINK='$(SHLIB_LINK)' \
1302	SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \
1303	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1304  $(DRIVER_DEFINES) \
1305  -c $(srcdir)/gccspec.c $(OUTPUT_OPTION))
1306
1307cppspec.o: cppspec.c $(CONFIG_H) $(SYSTEM_H) $(GCC_H)
1308
1309tree-check.h: s-check ; @true
1310s-check : gencheck$(build_exeext) $(srcdir)/move-if-change
1311	$(RUN_GEN) ./gencheck$(build_exeext) > tmp-check.h
1312	$(SHELL) $(srcdir)/move-if-change tmp-check.h tree-check.h
1313	$(STAMP) s-check
1314
1315gencheck$(build_exeext) : gencheck.o $(HOST_LIBDEPS)
1316	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1317	 gencheck.o $(HOST_LIBS)
1318
1319gencheck.o : gencheck.c gencheck.h tree.def $(HCONFIG_H) $(SYSTEM_H) \
1320             $(lang_tree_files)
1321	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1322	  $(srcdir)/gencheck.c $(OUTPUT_OPTION)
1323
1324gencheck.h : s-gencheck ; @true
1325s-gencheck : Makefile
1326	ltf="$(lang_tree_files)"; for f in $$ltf; do \
1327	    echo "#include \"$$f\""; \
1328	done | sed 's|$(srcdir)/||' > tmp-gencheck.h
1329	$(SHELL) $(srcdir)/move-if-change tmp-gencheck.h gencheck.h
1330	$(STAMP) s-gencheck
1331
1332options.h : s-options ; @true
1333s-options : Makefile
1334	lof="$(lang_options_files)"; for f in $$lof; do \
1335	    echo "#include \"$$f\""; \
1336	done | sed 's|$(srcdir)/||' > tmp-options.h
1337	$(SHELL) $(srcdir)/move-if-change tmp-options.h options.h
1338	$(STAMP) s-options
1339
1340specs.h : s-specs ; @true
1341s-specs : Makefile
1342	lsf="$(lang_specs_files)"; for f in $$lsf; do \
1343	    echo "#include \"$$f\""; \
1344	done | sed 's|$(srcdir)/||' > tmp-specs.h
1345	$(SHELL) $(srcdir)/move-if-change tmp-specs.h specs.h
1346	$(STAMP) s-specs
1347
1348dumpvers: dumpvers.c
1349
1350version.o: version.c version.h
1351
1352gtype-desc.o: gtype-desc.c $(CONFIG_H) $(SYSTEM_H) varray.h $(HASHTAB_H) \
1353	$(TREE_H) $(RTL_H) function.h insn-config.h $(EXPR_H) $(OPTABS_H) \
1354	libfuncs.h debug.h $(GGC_H) bitmap.h $(BASIC_BLOCK_H) hard-reg-set.h \
1355	ssa.h cselib.h insn-addr.h
1356
1357ggc-common.o: ggc-common.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \
1358	flags.h $(GGC_H) varray.h $(HASHTAB_H) $(TM_P_H) langhooks.h \
1359	$(PARAMS_H)
1360
1361ggc-simple.o: ggc-simple.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
1362	$(GGC_H) varray.h $(TIMEVAR_H) $(TM_P_H) $(PARAMS_H)
1363
1364ggc-page.o: ggc-page.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
1365	toplev.h $(GGC_H) $(TIMEVAR_H) $(TM_P_H)
1366
1367stringpool.o: stringpool.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) \
1368	flags.h toplev.h $(GGC_H)
1369
1370hashtable.o: hashtable.c hashtable.h $(CONFIG_H) $(SYSTEM_H) $(OBSTACK_H)
1371
1372line-map.o: line-map.c line-map.h intl.h $(CONFIG_H) $(SYSTEM_H)
1373
1374ggc-none.o: ggc-none.c $(GCONFIG_H) $(SYSTEM_H) $(GGC_H)
1375	$(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
1376
1377prefix.o: prefix.c $(CONFIG_H) $(SYSTEM_H) Makefile prefix.h
1378	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1379	-DPREFIX=\"$(prefix)\" \
1380	  -c $(srcdir)/prefix.c $(OUTPUT_OPTION)
1381
1382convert.o: convert.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h convert.h \
1383   toplev.h langhooks.h
1384
1385langhooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) toplev.h \
1386   tree-inline.h $(RTL_H) insn-config.h integrate.h langhooks.h \
1387   $(LANGHOOKS_DEF_H) flags.h
1388tree.o : tree.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h function.h toplev.h \
1389   $(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h \
1390   real.h gt-tree.h
1391tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
1392   flags.h langhooks.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
1393   $(EXPR_H) $(SPLAY_TREE_H) tree-dump.h
1394tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) \
1395   expr.h flags.h params.h input.h insn-config.h $(INTEGRATE_H) \
1396   $(VARRAY_H) $(HASHTAB_H) $(SPLAY_TREE_H) toplev.h langhooks.h \
1397   $(C_COMMON_H) tree-inline.h
1398print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GGC_H) \
1399   langhooks.h real.h
1400stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h \
1401   function.h $(EXPR_H) $(RTL_H) toplev.h $(GGC_H) $(TM_P_H) $(TARGET_H) \
1402   langhooks.h
1403fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h real.h \
1404   toplev.h $(HASHTAB_H) $(EXPR_H) $(RTL_H) $(GGC_H) $(TM_P_H) langhooks.h
1405diagnostic.o : diagnostic.c diagnostic.h real.h diagnostic.def \
1406   $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_P_H) flags.h $(GGC_H) \
1407   input.h toplev.h intl.h langhooks.h $(LANGHOOKS_DEF_H)
1408toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) function.h \
1409   flags.h xcoffout.h input.h $(INSN_ATTR_H) output.h diagnostic.h \
1410   debug.h insn-config.h intl.h $(RECOG_H) Makefile toplev.h \
1411   dwarf2out.h sdbout.h dbxout.h $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) \
1412   graph.h $(LOOP_H) except.h $(REGS_H) $(TIMEVAR_H) $(lang_options_files) \
1413   ssa.h $(PARAMS_H) $(TM_P_H) reload.h dwarf2asm.h $(TARGET_H) \
1414   langhooks.h insn-flags.h options.h cfglayout.h real.h
1415	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1416	  -DSTACK_PROTECTOR -DTARGET_NAME=\"$(target_alias)\" \
1417	  -c $(srcdir)/toplev.c $(OUTPUT_OPTION)
1418main.o : main.c $(CONFIG_H) $(SYSTEM_H) toplev.h
1419
1420rtl-error.o: rtl-error.c system.h $(RTL_H) $(INSN_ATTR_H) insn-config.h \
1421   input.h toplev.h intl.h diagnostic.h $(CONFIG_H)
1422
1423rtl.o : rtl.c $(GCONFIG_H) $(SYSTEM_H) $(RTL_H) real.h $(GGC_H) errors.h
1424	$(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
1425
1426print-rtl.o : print-rtl.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \
1427    hard-reg-set.h $(BASIC_BLOCK_H) real.h
1428rtlanal.o : rtlanal.c $(CONFIG_H) $(SYSTEM_H) toplev.h $(RTL_H) \
1429   hard-reg-set.h $(TM_P_H) insn-config.h $(RECOG_H) real.h flags.h
1430
1431errors.o : errors.c $(GCONFIG_H) $(SYSTEM_H) errors.h
1432	$(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
1433
1434varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
1435   function.h $(EXPR_H) hard-reg-set.h $(REGS_H) \
1436   output.h c-pragma.h toplev.h xcoffout.h debug.h $(GGC_H) $(TM_P_H) \
1437   $(HASHTAB_H) $(TARGET_H) langhooks.h gt-varasm.h real.h
1438function.o : function.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
1439   function.h $(EXPR_H) libfuncs.h $(REGS_H) hard-reg-set.h \
1440   insn-config.h $(RECOG_H) output.h toplev.h except.h $(HASHTAB_H) $(GGC_H) \
1441   $(TM_P_H) langhooks.h gt-function.h
1442stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h function.h  \
1443   insn-config.h hard-reg-set.h $(EXPR_H) libfuncs.h except.h \
1444   $(LOOP_H) $(RECOG_H) toplev.h output.h varray.h $(GGC_H) $(TM_P_H) \
1445   langhooks.h $(PREDICT_H) gt-stmt.h
1446except.o : except.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
1447   except.h function.h $(EXPR_H) libfuncs.h integrate.h langhooks.h \
1448   insn-config.h hard-reg-set.h $(BASIC_BLOCK_H) output.h \
1449   dwarf2asm.h dwarf2out.h toplev.h $(HASHTAB_H) intl.h $(GGC_H) \
1450   gt-except.h
1451expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h function.h \
1452   $(REGS_H) $(EXPR_H) $(OPTABS_H) libfuncs.h insn-attr.h insn-config.h \
1453   $(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \
1454   except.h reload.h $(GGC_H) langhooks.h intl.h $(TM_P_H) real.h
1455builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
1456   $(TARGET_H) function.h $(REGS_H) $(EXPR_H) $(OPTABS_H) insn-config.h \
1457   $(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \
1458   except.h $(TM_P_H) $(PREDICT_H) libfuncs.h real.h langhooks.h
1459calls.o : calls.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
1460   $(EXPR_H) langhooks.h $(TARGET_H) \
1461   libfuncs.h $(REGS_H) toplev.h output.h function.h $(TIMEVAR_H) $(TM_P_H) \
1462   except.h
1463expmed.o : expmed.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h  \
1464   insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) real.h \
1465   toplev.h $(TM_P_H) langhooks.h
1466explow.o : explow.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
1467   hard-reg-set.h insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) \
1468   toplev.h function.h ggc.h $(TM_P_H) gt-explow.h
1469optabs.o : optabs.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h  \
1470   insn-config.h $(EXPR_H) $(OPTABS_H) libfuncs.h $(RECOG_H) reload.h \
1471   toplev.h $(GGC_H) real.h $(TM_P_H) except.h gt-optabs.h $(BASIC_BLOCK_H)
1472dbxout.o : dbxout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
1473    $(REGS_H) debug.h $(TM_P_H) $(TARGET_H) function.h langhooks.h \
1474   insn-config.h reload.h gstab.h xcoffout.h output.h dbxout.h toplev.h
1475debug.o : debug.c debug.h $(CONFIG_H) $(SYSTEM_H)
1476sdbout.o : sdbout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
1477   function.h $(EXPR_H) output.h hard-reg-set.h $(REGS_H) real.h \
1478   insn-config.h xcoffout.h c-pragma.h ggc.h \
1479   sdbout.h toplev.h $(TM_P_H) except.h debug.h langhooks.h gt-sdbout.h
1480dwarfout.o : dwarfout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) dwarf.h \
1481   flags.h insn-config.h reload.h output.h toplev.h $(TM_P_H) \
1482   debug.h langhooks.h
1483dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) dwarf2.h \
1484   debug.h flags.h insn-config.h reload.h output.h diagnostic.h real.h \
1485   hard-reg-set.h $(REGS_H) $(EXPR_H) libfuncs.h toplev.h dwarf2out.h varray.h \
1486   $(GGC_H) except.h dwarf2asm.h $(TM_P_H) langhooks.h $(HASHTAB_H) gt-dwarf2out.h
1487dwarf2asm.o : dwarf2asm.c $(CONFIG_H) $(SYSTEM_H) flags.h $(RTL_H) $(TREE_H) \
1488   output.h dwarf2asm.h $(TM_P_H) $(GGC_H)
1489vmsdbgout.o : vmsdbgout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
1490   output.h vmsdbg.h debug.h langhooks.h function.h
1491xcoffout.o : xcoffout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) xcoffout.h \
1492   flags.h toplev.h output.h dbxout.h $(GGC_H) $(TARGET_H)
1493emit-rtl.o : emit-rtl.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
1494   function.h $(REGS_H) insn-config.h $(RECOG_H) real.h $(GGC_H) \
1495   $(EXPR_H) $(OBSTACK_H) hard-reg-set.h bitmap.h toplev.h \
1496   $(HASHTAB_H) $(TM_P_H) debug.h langhooks.h
1497real.o : real.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) toplev.h $(TM_P_H)
1498integrate.o : integrate.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
1499   debug.h $(INTEGRATE_H) insn-config.h $(EXPR_H) real.h $(REGS_H) \
1500   intl.h function.h output.h $(RECOG_H) except.h toplev.h $(LOOP_H) \
1501   $(PARAMS_H) $(TM_P_H) $(TARGET_H) langhooks.h gt-integrate.h
1502jump.o : jump.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h hard-reg-set.h $(REGS_H) \
1503   insn-config.h $(RECOG_H) $(EXPR_H) real.h except.h function.h \
1504   toplev.h $(INSN_ATTR_H) $(TM_P_H) reload.h $(PREDICT_H)
1505
1506simplify-rtx.o : simplify-rtx.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) \
1507   hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h \
1508   output.h function.h $(GGC_H) $(OBSTACK_H) $(TM_P_H) $(TREE_H)
1509cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) \
1510   hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h \
1511   output.h function.h cselib.h $(GGC_H) $(TM_P_H) gt-cselib.h
1512cse.o : cse.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \
1513   real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h output.h function.h \
1514   $(BASIC_BLOCK_H) $(GGC_H) $(TM_P_H) $(TIMEVAR_H) $(TARGET_H)
1515gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) hard-reg-set.h \
1516   flags.h real.h insn-config.h ggc.h $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) \
1517   function.h output.h toplev.h $(TM_P_H) $(PARAMS_H) except.h gt-gcse.h
1518sibcall.o : sibcall.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) function.h \
1519   hard-reg-set.h flags.h insn-config.h $(RECOG_H) $(BASIC_BLOCK_H)
1520resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) \
1521   $(BASIC_BLOCK_H) $(REGS_H) flags.h output.h resource.h function.h toplev.h \
1522   $(INSN_ATTR_H) except.h $(PARAMS_H) $(TM_P_H)
1523lcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \
1524   real.h insn-config.h $(INSN_ATTR_H) $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) \
1525   $(TM_P_H) df.h
1526ssa.o : ssa.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) varray.h $(EXPR_H) \
1527   hard-reg-set.h flags.h function.h real.h insn-config.h $(RECOG_H)	\
1528   $(BASIC_BLOCK_H) output.h ssa.h
1529ssa-dce.o : ssa-dce.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) hard-reg-set.h \
1530   $(BASIC_BLOCK_H) ssa.h insn-config.h $(RECOG_H) output.h
1531ssa-ccp.o : ssa-ccp.c $(CONFIG_H) system.h $(RTL_H) hard-reg-set.h \
1532    $(BASIC_BLOCK_H) ssa.h insn-config.h $(RECOG_H) output.h \
1533    errors.h $(GGC_H) df.h function.h
1534df.o : df.c $(CONFIG_H) system.h $(RTL_H) insn-config.h $(RECOG_H) \
1535   function.h $(REGS_H) $(OBSTACK_H) hard-reg-set.h $(BASIC_BLOCK_H) df.h \
1536   $(FIBHEAP_H)
1537conflict.o : conflict.c $(CONFIG_H) $(SYSTEM_H) $(OBSTACK_H) $(HASHTAB_H) \
1538   $(RTL_H) hard-reg-set.h $(BASIC_BLOCK_H)
1539profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
1540   insn-config.h output.h $(REGS_H) $(EXPR_H) function.h \
1541   gcov-io.h toplev.h $(GGC_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TARGET_H) \
1542   langhooks.h profile.h libfuncs.h gt-profile.h
1543loop.o : loop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h $(LOOP_H) \
1544   insn-config.h $(REGS_H) hard-reg-set.h $(RECOG_H) $(EXPR_H) \
1545   real.h $(PREDICT_H) $(BASIC_BLOCK_H) function.h \
1546   toplev.h varray.h except.h cselib.h $(OPTABS_H) $(TM_P_H) $(GGC_H)
1547doloop.o : doloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h $(LOOP_H) \
1548   $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) toplev.h
1549unroll.o : unroll.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) insn-config.h function.h \
1550   $(INTEGRATE_H) $(REGS_H) $(RECOG_H) flags.h $(EXPR_H) $(LOOP_H) toplev.h \
1551   hard-reg-set.h varray.h $(BASIC_BLOCK_H) $(TM_P_H) $(PREDICT_H) $(PARAMS_H)
1552flow.o : flow.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h insn-config.h \
1553   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
1554   function.h except.h $(EXPR_H) ssa.h $(GGC_H) $(TM_P_H)
1555cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h insn-config.h \
1556   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
1557   function.h except.h $(GGC_H) $(TM_P_H)
1558cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h insn-config.h \
1559   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
1560   function.h except.h $(GGC_H) $(TM_P_H) insn-config.h
1561cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(BASIC_BLOCK_H) \
1562   hard-reg-set.h insn-config.h $(RECOG_H) $(GGC_H) $(TM_P_H)
1563cfgbuild.o : cfgbuild.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h insn-config.h \
1564   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
1565   function.h except.h $(GGC_H)
1566cfgcleanup.o : cfgcleanup.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TIMEVAR_H)\
1567   $(BASIC_BLOCK_H) hard-reg-set.h output.h flags.h $(RECOG_H) toplev.h \
1568   $(GGC_H) insn-config.h cselib.h $(TARGET_H) $(TM_P_H) $(PARAMS_H)
1569cfgloop.o : cfgloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
1570   $(BASIC_BLOCK_H) hard-reg-set.h
1571dominance.o : dominance.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) hard-reg-set.h \
1572   $(BASIC_BLOCK_H) et-forest.h
1573et-forest.o : et-forest.c $(CONFIG_H) $(SYSTEM_H) et-forest.h
1574combine.o : combine.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h function.h \
1575   insn-config.h $(INSN_ATTR_H) $(REGS_H) $(EXPR_H) \
1576   $(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h $(TM_P_H)
1577regclass.o : regclass.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) hard-reg-set.h flags.h \
1578   $(BASIC_BLOCK_H) $(REGS_H) insn-config.h $(RECOG_H) reload.h real.h \
1579   toplev.h function.h output.h $(GGC_H) $(TM_P_H) $(EXPR_H)
1580local-alloc.o : local-alloc.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h \
1581   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \
1582   output.h function.h $(INSN_ATTR_H) toplev.h  except.h $(TM_P_H)
1583bitmap.o : bitmap.c $(GCONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h \
1584   $(BASIC_BLOCK_H) $(REGS_H) $(GGC_H)
1585	$(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
1586global.o : global.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h reload.h function.h \
1587   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h insn-config.h output.h toplev.h \
1588   $(TM_P_H)
1589varray.o : varray.c $(CONFIG_H) $(SYSTEM_H) varray.h $(GGC_H) errors.h
1590ra.o : ra.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H)  $(TM_P_H) insn-config.h \
1591   $(RECOG_H) integrate.h function.h $(REGS_H) $(OBSTACK_H) hard-reg-set.h \
1592   $(BASIC_BLOCK_H) df.h expr.h output.h toplev.h flags.h reload.h ra.h
1593ra-build.o : ra-build.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_P_H) \
1594   insn-config.h $(RECOG_H) function.h $(REGS_H) hard-reg-set.h \
1595   $(BASIC_BLOCK_H) df.h output.h ggc.h ra.h gt-ra-build.h reload.h
1596ra-colorize.o : ra-colorize.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_P_H) \
1597    function.h $(REGS_H) hard-reg-set.h $(BASIC_BLOCK_H) df.h output.h ra.h
1598ra-debug.o : ra-debug.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H)  insn-config.h \
1599   $(RECOG_H) function.h hard-reg-set.h $(BASIC_BLOCK_H) df.h output.h ra.h \
1600   $(TM_P_H)
1601ra-rewrite.o : ra-rewrite.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_P_H) \
1602   function.h $(REGS_H) hard-reg-set.h $(BASIC_BLOCK_H) df.h expr.h \
1603   output.h except.h ra.h reload.h insn-config.h
1604reload.o : reload.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h output.h \
1605   $(EXPR_H) $(OPTABS_H) reload.h $(RECOG_H) hard-reg-set.h insn-config.h \
1606   $(REGS_H) function.h real.h toplev.h $(TM_P_H)
1607reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) real.h flags.h \
1608   $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) hard-reg-set.h insn-config.h \
1609   $(BASIC_BLOCK_H) $(RECOG_H) output.h function.h toplev.h cselib.h $(TM_P_H) \
1610   except.h $(TREE_H)
1611caller-save.o : caller-save.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h \
1612   $(REGS_H) hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) function.h \
1613   $(RECOG_H) reload.h $(EXPR_H) toplev.h $(TM_P_H)
1614reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) conditions.h hard-reg-set.h \
1615   $(BASIC_BLOCK_H) $(REGS_H) insn-config.h $(INSN_ATTR_H) except.h \
1616   $(RECOG_H) function.h flags.h output.h $(EXPR_H) toplev.h $(PARAMS_H) $(TM_P_H)
1617alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h hard-reg-set.h \
1618   $(BASIC_BLOCK_H) $(REGS_H) toplev.h output.h $(EXPR_H) \
1619   $(GGC_H) function.h cselib.h $(TREE_H) $(TM_P_H) langhooks.h $(TARGET_H) \
1620   gt-alias.h
1621regmove.o : regmove.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) insn-config.h \
1622   $(RECOG_H) output.h $(REGS_H) hard-reg-set.h flags.h function.h \
1623   $(EXPR_H) $(BASIC_BLOCK_H) toplev.h $(TM_P_H) except.h reload.h
1624haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \
1625   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h function.h \
1626   $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) $(TARGET_H)
1627sched-deps.o : sched-deps.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \
1628   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h function.h \
1629   $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h cselib.h $(PARAMS_H) $(TM_P_H)
1630sched-rgn.o : sched-rgn.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \
1631   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h function.h \
1632   $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) $(TARGET_H)
1633sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \
1634   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h function.h \
1635   $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H)
1636sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \
1637   hard-reg-set.h $(BASIC_BLOCK_H) $(INSN_ATTR_H) $(REGS_H) $(TM_P_H) \
1638   $(TARGET_H) real.h
1639final.o : final.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h intl.h \
1640   $(REGS_H) $(RECOG_H) conditions.h insn-config.h $(INSN_ATTR_H) function.h \
1641   real.h output.h hard-reg-set.h except.h debug.h xcoffout.h profile.h \
1642   toplev.h reload.h dwarf2out.h $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H) $(EXPR_H)
1643recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) function.h $(BASIC_BLOCK_H) \
1644   $(REGS_H) $(RECOG_H) $(EXPR_H) hard-reg-set.h flags.h insn-config.h \
1645   $(INSN_ATTR_H) real.h toplev.h output.h reload.h $(TM_P_H)
1646reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) $(RECOG_H) \
1647   $(REGS_H) hard-reg-set.h flags.h insn-config.h toplev.h reload.h \
1648   varray.h function.h $(TM_P_H) $(GGC_H) gt-reg-stack.h
1649predict.o: predict.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
1650   insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h \
1651   $(RECOG_H) function.h except.h $(EXPR_H) $(TM_P_H) $(PREDICT_H) real.h \
1652   $(PARAMS_H) $(TARGET_H)
1653lists.o: lists.c $(CONFIG_H) $(SYSTEM_H) toplev.h $(RTL_H) $(GGC_H)
1654bb-reorder.o : bb-reorder.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \
1655   flags.h $(BASIC_BLOCK_H) hard-reg-set.h output.h cfglayout.h $(TARGET_H)
1656tracer.o : tracer.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \
1657   $(BASIC_BLOCK_H) hard-reg-set.h output.h cfglayout.h flags.h \
1658   $(PARAMS_H) profile.h
1659cfglayout.o : cfglayout.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \
1660   insn-config.h $(BASIC_BLOCK_H) hard-reg-set.h output.h function.h \
1661   cfglayout.h
1662timevar.o : timevar.c $(CONFIG_H) $(SYSTEM_H) $(TIMEVAR_H) flags.h intl.h
1663regrename.o : regrename.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) insn-config.h \
1664   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h $(RECOG_H) function.h \
1665   resource.h $(OBSTACK_H) flags.h $(TM_P_H)
1666ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) toplev.h \
1667   flags.h insn-config.h function.h $(RECOG_H) $(BASIC_BLOCK_H) $(EXPR_H) \
1668   output.h except.h $(TM_P_H) real.h
1669params.o : params.c $(CONFIG_H) $(SYSTEM_H) $(PARAMS_H) toplev.h
1670hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) $(HOOKS_H)
1671protector.o: protector.c $(CONFIG_H) insn-config.h flags.h $(RTL_H) \
1672	$(TREE_H) $(EXPR_H) $(REGS_H) $(RECOG_H) $(INSN_ATTR_H) \
1673	$(C_TREE_H) real.h output.h except.h
1674
1675
1676$(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) $(GGC_H) \
1677   $(RTL_H) $(REGS_H) hard-reg-set.h real.h insn-config.h conditions.h \
1678   output.h $(INSN_ATTR_H) $(SYSTEM_H) toplev.h $(TARGET_H) libfuncs.h \
1679   $(TARGET_DEF_H) function.h sched-int.h $(TM_P_H) $(EXPR_H) $(OPTABS_H) \
1680   langhooks.h
1681	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1682		$(out_file) $(OUTPUT_OPTION)
1683
1684# Build auxiliary files that support ecoff format.
1685mips-tfile: mips-tfile.o version.o $(LIBDEPS)
1686	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
1687
1688mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H) version.h
1689
1690mips-tdump: mips-tdump.o version.o $(LIBDEPS)
1691	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
1692
1693mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H)
1694
1695#
1696# Generate header and source files from the machine description,
1697# and compile them.
1698
1699.PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \
1700  insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
1701  insn-attr.h insn-attrtab.c
1702
1703# The following pair of rules has this effect:
1704# genconfig is run only if the md has changed since genconfig was last run;
1705# but the file insn-config.h is touched only when its contents actually change.
1706
1707# Each of the other insn-* files is handled by a similar pair of rules.
1708
1709# This causes an anomaly in the results of make -n
1710# because insn-* is older than s-*
1711# and thus make -n thinks that insn-* will be updated
1712# and force recompilation of things that depend on it.
1713# We use move-if-change precisely to avoid such recompilation.
1714# But there is no way to teach make -n that it will be avoided.
1715
1716# Each of the insn-*.[ch] rules has a semicolon at the end,
1717# for otherwise the system Make on SunOS 4.1 never tries
1718# to recompile insn-*.o.  To avoid problems and extra noise from
1719# versions of make which don't like empty commands (nothing after the
1720# trailing `;'), we call true for each.
1721
1722insn-config.h: s-config ; @true
1723s-config : $(md_file) genconfig$(build_exeext) $(srcdir)/move-if-change
1724	$(RUN_GEN) ./genconfig$(build_exeext) $(md_file) > tmp-config.h
1725	$(SHELL) $(srcdir)/move-if-change tmp-config.h insn-config.h
1726	$(STAMP) s-config
1727
1728insn-conditions.c: s-conditions ; @true
1729s-conditions : $(md_file) genconditions$(build_exeext) $(srcdir)/move-if-change
1730	$(RUN_GEN) ./genconditions$(build_exeext) $(md_file) > tmp-conditions.c
1731	$(SHELL) $(srcdir)/move-if-change tmp-conditions.c insn-conditions.c
1732	$(STAMP) s-conditions
1733
1734insn-conditions.o : insn-conditions.c $(GCONFIG_H) $(SYSTEM_H) $(RTL_H) \
1735  $(TM_P_H) $(REGS_H) function.h $(RECOG_H) real.h output.h flags.h \
1736  hard-reg-set.h resource.h toplev.h reload.h gensupport.h insn-constants.h
1737	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) insn-conditions.c
1738
1739dummy-conditions.o : dummy-conditions.c $(HCONFIG_H) $(SYSTEM_H) gensupport.h
1740	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1741	    $(srcdir)/dummy-conditions.c $(OUTPUT_OPTION)
1742
1743insn-flags.h: s-flags ; @true
1744s-flags : $(md_file) genflags$(build_exeext) $(srcdir)/move-if-change
1745	$(RUN_GEN) ./genflags$(build_exeext) $(md_file) > tmp-flags.h
1746	$(SHELL) $(srcdir)/move-if-change tmp-flags.h insn-flags.h
1747	$(STAMP) s-flags
1748
1749insn-codes.h: s-codes ; @true
1750s-codes : $(md_file) gencodes$(build_exeext) $(srcdir)/move-if-change
1751	$(RUN_GEN) ./gencodes$(build_exeext) $(md_file) > tmp-codes.h
1752	$(SHELL) $(srcdir)/move-if-change tmp-codes.h insn-codes.h
1753	$(STAMP) s-codes
1754
1755insn-constants.h: s-constants ; @true
1756s-constants : $(md_file) genconstants$(build_exeext) $(srcdir)/move-if-change
1757	$(RUN_GEN) ./genconstants$(build_exeext) $(md_file) > tmp-constants.h
1758	$(SHELL) $(srcdir)/move-if-change tmp-constants.h insn-constants.h
1759	$(STAMP) s-constants
1760
1761insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) $(EXPR_H) real.h output.h \
1762  insn-config.h $(OPTABS_H) $(SYSTEM_H) reload.h $(RECOG_H) toplev.h \
1763  function.h flags.h hard-reg-set.h resource.h $(TM_P_H)
1764	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c \
1765	  $(OUTPUT_OPTION)
1766
1767insn-emit.c: s-emit ; @true
1768s-emit : $(md_file) genemit$(build_exeext) $(srcdir)/move-if-change
1769	$(RUN_GEN) ./genemit$(build_exeext) $(md_file) > tmp-emit.c
1770	$(SHELL) $(srcdir)/move-if-change tmp-emit.c insn-emit.c
1771	$(STAMP) s-emit
1772
1773insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h $(RECOG_H) \
1774  real.h output.h flags.h $(SYSTEM_H) function.h hard-reg-set.h resource.h \
1775  $(TM_P_H) toplev.h reload.h
1776	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c \
1777	  $(OUTPUT_OPTION)
1778
1779insn-recog.c: s-recog ; @true
1780s-recog : $(md_file) genrecog$(build_exeext) $(srcdir)/move-if-change
1781	$(RUN_GEN) ./genrecog$(build_exeext) $(md_file) > tmp-recog.c
1782	$(SHELL) $(srcdir)/move-if-change tmp-recog.c insn-recog.c
1783	$(STAMP) s-recog
1784
1785insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) \
1786  insn-config.h flags.h $(RECOG_H) $(EXPR_H) $(OPTABS_H) reload.h $(SYSTEM_H)
1787	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c \
1788	  $(OUTPUT_OPTION)
1789
1790insn-opinit.c: s-opinit ; @true
1791s-opinit : $(md_file) genopinit$(build_exeext) $(srcdir)/move-if-change
1792	$(RUN_GEN) ./genopinit$(build_exeext) $(md_file) > tmp-opinit.c
1793	$(SHELL) $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
1794	$(STAMP) s-opinit
1795
1796insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H) toplev.h \
1797  insn-config.h $(RECOG_H)
1798	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c \
1799	  $(OUTPUT_OPTION)
1800
1801insn-extract.c: s-extract ; @true
1802s-extract : $(md_file) genextract$(build_exeext) $(srcdir)/move-if-change
1803	$(RUN_GEN) ./genextract$(build_exeext) $(md_file) > tmp-extract.c
1804	$(SHELL) $(srcdir)/move-if-change tmp-extract.c insn-extract.c
1805	$(STAMP) s-extract
1806
1807insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) $(REGS_H) output.h real.h \
1808	$(SYSTEM_H) insn-config.h $(RECOG_H) except.h function.h $(TM_P_H)
1809	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c \
1810	  $(OUTPUT_OPTION)
1811
1812insn-peep.c: s-peep ; @true
1813s-peep : $(md_file) genpeep$(build_exeext) $(srcdir)/move-if-change
1814	$(RUN_GEN) ./genpeep$(build_exeext) $(md_file) > tmp-peep.c
1815	$(SHELL) $(srcdir)/move-if-change tmp-peep.c insn-peep.c
1816	$(STAMP) s-peep
1817
1818insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) $(REGS_H) real.h \
1819    output.h $(INSN_ATTR_H) insn-config.h $(SYSTEM_H) toplev.h $(RECOG_H) \
1820	$(TM_P_H) flags.h
1821	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c \
1822	  $(OUTPUT_OPTION)
1823
1824insn-attr.h: s-attr ; @true
1825s-attr : $(md_file) genattr$(build_exeext) $(srcdir)/move-if-change
1826	$(RUN_GEN) ./genattr$(build_exeext) $(md_file) > tmp-attr.h
1827	$(SHELL) $(srcdir)/move-if-change tmp-attr.h insn-attr.h
1828	$(STAMP) s-attr
1829
1830insn-attrtab.c: s-attrtab ; @true
1831s-attrtab : $(md_file) genattrtab$(build_exeext) $(srcdir)/move-if-change
1832	$(RUN_GEN) ./genattrtab$(build_exeext) $(md_file) > tmp-attrtab.c
1833	$(SHELL) $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
1834	$(STAMP) s-attrtab
1835
1836insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) $(GGC_H) $(REGS_H) real.h \
1837    conditions.h hard-reg-set.h insn-config.h $(INSN_ATTR_H) $(EXPR_H) \
1838    output.h $(RECOG_H) function.h $(SYSTEM_H) toplev.h flags.h \
1839    insn-codes.h $(TM_P_H)
1840	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c \
1841	  $(OUTPUT_OPTION)
1842
1843insn-output.c: s-output ; @true
1844s-output : $(md_file) genoutput$(build_exeext) $(srcdir)/move-if-change
1845	$(RUN_GEN) ./genoutput$(build_exeext) $(md_file) > tmp-output.c
1846	$(SHELL) $(srcdir)/move-if-change tmp-output.c insn-output.c
1847	$(STAMP) s-output
1848
1849genrtl.o : genrtl.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H) $(GGC_H)
1850genrtl.c genrtl.h : s-genrtl
1851	@true	# force gnu make to recheck modification times.
1852
1853s-genrtl: gengenrtl$(build_exeext) $(srcdir)/move-if-change $(RTL_BASE_H)
1854	$(RUN_GEN) ./gengenrtl$(build_exeext) -h > tmp-genrtl.h
1855	$(SHELL) $(srcdir)/move-if-change tmp-genrtl.h genrtl.h
1856	$(RUN_GEN) ./gengenrtl$(build_exeext) > tmp-genrtl.c
1857	$(SHELL) $(srcdir)/move-if-change tmp-genrtl.c genrtl.c
1858	$(STAMP) s-genrtl
1859
1860tm-preds.h: s-preds; @true
1861
1862s-preds: genpreds$(build_exeext) $(srcdir)/move-if-change
1863	$(RUN_GEN) ./genpreds$(build_exeext) > tmp-preds.h
1864	$(SHELL) $(srcdir)/move-if-change tmp-preds.h tm-preds.h
1865	$(STAMP) s-preds
1866
1867GTFILES = $(GCONFIG_H) $(srcdir)/location.h \
1868  $(HASHTAB_H) \
1869  $(srcdir)/bitmap.h $(srcdir)/function.h  $(srcdir)/rtl.h $(srcdir)/optabs.h \
1870  $(srcdir)/tree.h $(srcdir)/libfuncs.h $(srcdir)/hashtable.h $(srcdir)/real.h \
1871  $(srcdir)/varray.h $(srcdir)/ssa.h $(srcdir)/insn-addr.h $(srcdir)/cselib.h \
1872  $(srcdir)/c-common.h $(srcdir)/c-tree.h \
1873  $(srcdir)/basic-block.h \
1874  $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c \
1875  $(srcdir)/dwarf2out.c $(srcdir)/emit-rtl.c \
1876  $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \
1877  $(srcdir)/fold-const.c $(srcdir)/function.c \
1878  $(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \
1879  $(srcdir)/profile.c $(srcdir)/ra-build.c $(srcdir)/regclass.c \
1880  $(srcdir)/reg-stack.c \
1881  $(srcdir)/sdbout.c $(srcdir)/stmt.c $(srcdir)/stor-layout.c \
1882  $(srcdir)/tree.c $(srcdir)/varasm.c \
1883  $(out_file) \
1884  @all_gtfiles@
1885
1886GTFILES_FILES_LANGS = @all_gtfiles_files_langs@
1887GTFILES_FILES_FILES = @all_gtfiles_files_files@
1888GTFILES_LANG_DIR_NAMES = @subdirs@
1889GTFILES_SRCDIR = @srcdir@
1890
1891gtype-desc.h gtype-desc.c gt-except.h gt-function.h : s-gtype; @true
1892gt-integrate.h gt-stmt.h gt-tree.h gt-varasm.h gt-emit-rtl.h : s-gtype; @true
1893gt-explow.h gt-stor-layout.h gt-regclass.h gt-lists.h : s-gtype; @true
1894gt-alias.h gt-cselib.h gt-fold-const.h gt-gcse.h gt-profile.h : s-gtype; @true
1895gt-expr.h gt-sdbout.h gt-optabs.h gt-bitmap.h gt-dwarf2out.h : s-gtype ; @true
1896gt-ra-build.h gt-reg-stack.h : s-gtype ; @true
1897gt-c-common.h gt-c-decl.h gt-c-parse.h gt-c-pragma.h : s-gtype; @true
1898gt-c-objc-common.h gtype-c.h gt-location.h : s-gtype ; @true
1899
1900gtyp-gen.h: Makefile
1901	echo "/* This file is machine generated.  Do not edit.  */" > tmp-gtyp.h
1902	echo "static const char *srcdir = "  >> tmp-gtyp.h
1903	echo "\"$(GTFILES_SRCDIR)\"" >> tmp-gtyp.h
1904	echo ";" >> tmp-gtyp.h
1905	echo "static const char *lang_files[] = {" >> tmp-gtyp.h
1906	ll="$(GTFILES_FILES_FILES)"; \
1907	for f in $$ll; do \
1908	echo "\"$$f\", "; done >> tmp-gtyp.h
1909	echo "NULL};" >> tmp-gtyp.h
1910	echo "static const char *langs_for_lang_files[] = {" >> tmp-gtyp.h
1911	ff="$(GTFILES_FILES_LANGS)"; \
1912	for f in $$ff; do \
1913	echo "\"$$f\", " ; done  >> tmp-gtyp.h
1914	echo "NULL};" >> tmp-gtyp.h
1915	echo "static const char *all_files[] = {" >> tmp-gtyp.h
1916	gf="$(GTFILES)"; \
1917	for f in $$gf; do \
1918	echo "\"$$f\", "; done >> tmp-gtyp.h
1919	echo " NULL};" >> tmp-gtyp.h
1920	echo "static const char *lang_dir_names[] = { \"c\", " >> tmp-gtyp.h
1921	gf="$(GTFILES_LANG_DIR_NAMES)"; \
1922	for l in $$gf; do \
1923	echo "\"$$l\", "; done >> tmp-gtyp.h
1924	echo "NULL};" >> tmp-gtyp.h
1925	$(SHELL) $(srcdir)/move-if-change tmp-gtyp.h gtyp-gen.h
1926
1927s-gtype: gengtype$(build_exeext) $(GTFILES)
1928	$(RUN_GEN) ./gengtype
1929	$(STAMP) s-gtype
1930
1931#
1932# Compile the programs that generate insn-* from the machine description.
1933# They are compiled with $(HOST_CC), and associated libraries,
1934# since they need to run on this machine
1935# even if GCC is being compiled to run on some other machine.
1936
1937# $(CONFIG_H) is omitted from the deps of the gen*.o
1938# because these programs don't really depend on anything
1939# about the target machine.  They do depend on config.h itself,
1940# since that describes the host machine.
1941
1942read-rtl.o: read-rtl.c $(HCONFIG_H) $(SYSTEM_H) $(RTL_H) \
1943  $(OBSTACK_H) $(HASHTAB_H)
1944	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/read-rtl.c $(OUTPUT_OPTION)
1945
1946gensupport.o: gensupport.c $(RTL_H) $(OBSTACK_H) $(SYSTEM_H) errors.h gensupport.h
1947	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gensupport.c $(OUTPUT_OPTION)
1948
1949genconfig$(build_exeext) : genconfig.o $(HOST_RTL) $(HOST_SUPPORT) \
1950  $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
1951	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1952	  genconfig.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \
1953	    $(HOST_ERRORS) $(HOST_LIBS)
1954
1955genconfig.o : genconfig.c $(RTL_H) $(HCONFIG_H) \
1956  $(SYSTEM_H) errors.h gensupport.h
1957	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c $(OUTPUT_OPTION)
1958
1959genflags$(build_exeext) : genflags.o $(HOST_RTL) $(HOST_SUPPORT) \
1960  $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
1961	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1962	 genflags.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \
1963	    $(HOST_ERRORS) $(HOST_LIBS)
1964
1965genflags.o : genflags.c $(RTL_H) $(OBSTACK_H) $(HCONFIG_H) \
1966  $(SYSTEM_H) errors.h gensupport.h
1967	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c $(OUTPUT_OPTION)
1968
1969gencodes$(build_exeext) : gencodes.o $(HOST_RTL) $(HOST_SUPPORT) \
1970  $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
1971	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1972	 gencodes.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \
1973	    $(HOST_ERRORS) $(HOST_LIBS)
1974
1975gencodes.o : gencodes.c $(RTL_H) $(HCONFIG_H) \
1976  $(SYSTEM_H) errors.h gensupport.h
1977	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c $(OUTPUT_OPTION)
1978
1979genconstants$(build_exeext) : genconstants.o $(HOST_RTL) $(HOST_EARLY_SUPPORT) \
1980  $(HOST_ERRORS) $(HOST_LIBDEPS)
1981	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1982	 genconstants.o $(HOST_EARLY_SUPPORT) $(HOST_RTL) \
1983	    $(HOST_ERRORS) $(HOST_LIBS)
1984
1985genconstants.o : genconstants.c $(RTL_H) $(HCONFIG_H) $(SYSTEM_H) errors.h
1986	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconstants.c $(OUTPUT_OPTION)
1987
1988genemit$(build_exeext) : genemit.o $(HOST_RTL) $(HOST_SUPPORT) \
1989  $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
1990	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1991	 genemit.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \
1992	    $(HOST_ERRORS) $(HOST_LIBS)
1993
1994genemit.o : genemit.c $(RTL_H) $(HCONFIG_H) $(SYSTEM_H) errors.h gensupport.h
1995	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c $(OUTPUT_OPTION)
1996
1997genopinit$(build_exeext) : genopinit.o $(HOST_RTL) $(HOST_SUPPORT) \
1998  $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
1999	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
2000	 genopinit.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \
2001	    $(HOST_ERRORS) $(HOST_LIBS)
2002
2003genopinit.o : genopinit.c $(RTL_H) $(HCONFIG_H) \
2004  $(SYSTEM_H) errors.h gensupport.h
2005	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c $(OUTPUT_OPTION)
2006
2007genrecog$(build_exeext) : genrecog.o $(HOST_RTL) $(HOST_SUPPORT) \
2008    $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
2009	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
2010	 genrecog.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \
2011	    $(HOST_ERRORS) $(HOST_LIBS)
2012
2013genrecog.o : genrecog.c $(RTL_H) $(HCONFIG_H) \
2014  $(SYSTEM_H) errors.h gensupport.h
2015	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c $(OUTPUT_OPTION)
2016
2017genextract$(build_exeext) : genextract.o $(HOST_RTL) $(HOST_SUPPORT) \
2018  $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
2019	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
2020	 genextract.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \
2021	    $(HOST_ERRORS) $(HOST_LIBS)
2022
2023genextract.o : genextract.c $(RTL_H) $(HCONFIG_H) \
2024  $(SYSTEM_H) insn-config.h errors.h gensupport.h
2025	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c $(OUTPUT_OPTION)
2026
2027genpeep$(build_exeext) : genpeep.o $(HOST_RTL) $(HOST_SUPPORT) \
2028  $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
2029	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
2030	 genpeep.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \
2031	    $(HOST_ERRORS) $(HOST_LIBS)
2032
2033genpeep.o : genpeep.c $(RTL_H) $(HCONFIG_H) $(SYSTEM_H) errors.h gensupport.h
2034	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c $(OUTPUT_OPTION)
2035
2036genattr$(build_exeext) : genattr.o $(HOST_RTL) $(HOST_SUPPORT) \
2037  $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
2038	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
2039	 genattr.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \
2040	    $(HOST_ERRORS) $(HOST_LIBS)
2041
2042genattr.o : genattr.c $(RTL_H) $(HCONFIG_H) $(SYSTEM_H) errors.h gensupport.h
2043	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c $(OUTPUT_OPTION)
2044
2045genattrtab$(build_exeext) : genattrtab.o genautomata.o \
2046  $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_VARRAY) \
2047  $(HOST_LIBDEPS)
2048	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
2049	 genattrtab.o genautomata.o \
2050	 $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) $(HOST_ERRORS) \
2051	 $(HOST_VARRAY) $(HOST_LIBS) -lm
2052
2053genattrtab.o : genattrtab.c $(RTL_H) $(OBSTACK_H) $(HCONFIG_H) \
2054  $(SYSTEM_H) errors.h $(GGC_H) gensupport.h genattrtab.h
2055	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c $(OUTPUT_OPTION)
2056
2057genautomata.o : genautomata.c $(RTL_H) $(OBSTACK_H) $(HCONFIG_H) \
2058  $(SYSTEM_H) errors.h varray.h genattrtab.h $(HASHTAB_H)
2059	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genautomata.c $(OUTPUT_OPTION)
2060
2061genoutput$(build_exeext) : genoutput.o $(HOST_RTL) $(HOST_SUPPORT) \
2062  $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
2063	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
2064	 genoutput.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \
2065	    $(HOST_ERRORS) $(HOST_LIBS)
2066
2067genoutput.o : genoutput.c $(RTL_H) $(HCONFIG_H) \
2068  $(SYSTEM_H) errors.h gensupport.h
2069	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c $(OUTPUT_OPTION)
2070
2071gengenrtl$(build_exeext) : gengenrtl.o $(HOST_LIBDEPS)
2072	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
2073	 gengenrtl.o $(HOST_LIBS)
2074
2075gengenrtl.o : gengenrtl.c $(RTL_BASE_H) $(HCONFIG_H) $(SYSTEM_H) real.h
2076	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gengenrtl.c $(OUTPUT_OPTION)
2077
2078genpreds$(build_exeext) : genpreds.o $(HOST_LIBDEPS)
2079	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
2080	 genpreds.o $(HOST_LIBS)
2081
2082genpreds.o : genpreds.c $(RTL_BASE_H) $(HCONFIG_H) $(SYSTEM_H)
2083	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpreds.c $(OUTPUT_OPTION)
2084
2085gengtype$(build_exeext) : gengtype.o gengtype-lex.o gengtype-yacc.o \
2086  $(HOST_LIBDEPS)
2087	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
2088	 gengtype.o gengtype-lex.o gengtype-yacc.o $(HOST_LIBS)
2089
2090gengtype.o : gengtype.c gengtype.h $(HCONFIG_H) $(SYSTEM_H) real.h rtl.def \
2091  gtyp-gen.h
2092	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
2093	  $(srcdir)/gengtype.c $(OUTPUT_OPTION)
2094
2095gengtype-lex.o : gengtype-lex.c gengtype.h gengtype-yacc.c \
2096  $(HCONFIG_H) $(SYSTEM_H)
2097	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
2098	  gengtype-lex.c $(OUTPUT_OPTION)
2099
2100gengtype-yacc.o : gengtype-yacc.c gengtype.h $(HCONFIG_H) $(SYSTEM_H)
2101	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
2102	  gengtype-yacc.c $(OUTPUT_OPTION)
2103
2104# The sed command works around a bug in flex-2.5.4.
2105gengtype-lex.c : $(srcdir)/gengtype-lex.l
2106	$(FLEX) $(FLEXFLAGS) -t -o$@ $(srcdir)/gengtype-lex.l | \
2107	  sed 's/^\(char msg\[\];\)/yyconst \1/' > g-$$$$ ; \
2108	if test $$? -eq 0 ; then \
2109	  mv -f g-$$$$ gengtype-lex.c ; \
2110	else \
2111	  rm -f g-$$$$.* ; \
2112	  false ; \
2113	fi
2114
2115gengtype-yacc.c: $(srcdir)/gengtype-yacc.y
2116	 $(BISON) $(BISONFLAGS) -d -o gengtype-yacc.c $(srcdir)/gengtype-yacc.y || \
2117	 ( rm -f $@ && false )
2118
2119genconditions$(build_exeext) : genconditions.o $(HOST_EARLY_SUPPORT) \
2120  $(HOST_RTL) $(HOST_ERRORS) $(HOST_LIBDEPS)
2121	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
2122	 genconditions.o $(HOST_EARLY_SUPPORT) $(HOST_RTL) \
2123	    $(HOST_ERRORS) $(HOST_LIBS)
2124
2125genconditions.o : genconditions.c $(RTL_H) $(HCONFIG_H) $(SYSTEM_H) errors.h
2126	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
2127		$(srcdir)/genconditions.c $(OUTPUT_OPTION)
2128
2129#
2130# Compile the libraries to be used by gen*.
2131# If we are not cross-building, gen* use the same .o's that cc1 will use,
2132# and BUILD_PREFIX_1 is `loser-', just to ensure these rules don't conflict
2133# with the rules for rtl.o, etc.
2134$(BUILD_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(HCONFIG_H) $(SYSTEM_H) $(RTL_H) \
2135  real.h $(GGC_H) errors.h
2136	rm -f $(BUILD_PREFIX)rtl.c
2137	sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(BUILD_PREFIX)rtl.c
2138	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(BUILD_PREFIX)rtl.c $(OUTPUT_OPTION)
2139
2140print-rtl1.o: $(srcdir)/print-rtl.c $(HCONFIG_H) \
2141  $(RTL_H) $(TREE_H) hard-reg-set.h $(BASIC_BLOCK_H)
2142	rm -f print-rtl1.c
2143	sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > print-rtl1.c
2144	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) print-rtl1.c $(OUTPUT_OPTION)
2145
2146$(BUILD_PREFIX_1)bitmap.o: $(srcdir)/bitmap.c $(HCONFIG_H) $(SYSTEM_H) \
2147  $(RTL_H) flags.h $(BASIC_BLOCK_H) $(REGS_H) $(GGC_H)
2148	rm -f $(BUILD_PREFIX)bitmap.c
2149	sed -e 's/config[.]h/hconfig.h/' $(srcdir)/bitmap.c > $(BUILD_PREFIX)bitmap.c
2150	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(BUILD_PREFIX)bitmap.c $(OUTPUT_OPTION)
2151
2152$(BUILD_PREFIX_1)errors.o: errors.c $(HCONFIG_H) $(SYSTEM_H) errors.h
2153	rm -f $(BUILD_PREFIX)errors.c
2154	sed -e 's/config[.]h/hconfig.h/' $(srcdir)/errors.c > $(BUILD_PREFIX)errors.c
2155	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(BUILD_PREFIX)errors.c $(OUTPUT_OPTION)
2156
2157$(BUILD_PREFIX_1)varray.o: varray.c $(HCONFIG_H) $(SYSTEM_H) varray.h \
2158  $(RTL_H) $(GGC_H) $(TREE_H) bitmap.h errors.h
2159	rm -f $(BUILD_PREFIX)varray.c
2160	sed -e 's/config[.]h/hconfig.h/' $(srcdir)/varray.c > \
2161		$(BUILD_PREFIX)varray.c
2162	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
2163		$(BUILD_PREFIX)varray.c $(OUTPUT_OPTION)
2164
2165$(BUILD_PREFIX_1)ggc-none.o: ggc-none.c $(HCONFIG_H) $(SYSTEM_H) $(GGC_H)
2166	rm -f $(BUILD_PREFIX)ggc-none.c
2167	sed -e 's/config[.]h/hconfig.h/' $(srcdir)/ggc-none.c > $(BUILD_PREFIX)ggc-none.c
2168	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(BUILD_PREFIX)ggc-none.c $(OUTPUT_OPTION)
2169
2170#
2171# Remake internationalization support.
2172intl.o: intl.c $(CONFIG_H) system.h intl.h Makefile
2173	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2174	  -DLOCALEDIR=\"$(localedir)\" \
2175	  -c $(srcdir)/intl.c $(OUTPUT_OPTION)
2176
2177$(top_builddir)/intl/libintl.a: intl.all
2178
2179intl.all intl.install intl.uninstall \
2180  intl.mostlyclean intl.clean intl.distclean intl.maintainer-clean:
2181	@for d in $(INTL_SUBDIRS); do \
2182	  target=`expr $@ : 'intl.\(.*\)'` && \
2183	  echo "(cd $$d && $(MAKE) $$target)" && \
2184	  (cd $$d && AWK='$(AWK)' $(MAKE) $(SUBDIR_FLAGS_TO_PASS) $$target); \
2185	  if [ $$? -eq 0 ] ; then true ; else exit 1 ; fi ; \
2186	done
2187
2188# intl.all and intl.install need config.h to exist, and the files it includes.
2189# (FIXME: intl/*.c shouldn't need to see insn-foo.h!)
2190intl.all intl.install: config.h insn-flags.h insn-constants.h
2191
2192# Make-lang.in should add dependencies of po-generated on any generated
2193# files which need to be scanned by gettext (usually Yacc-generated parsers).
2194po-generated: c-parse.c
2195
2196#
2197# Remake cpp and protoize.
2198
2199PREPROCESSOR_DEFINES = \
2200  -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
2201  -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
2202  -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_alias)\" \
2203  -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
2204  -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
2205  -DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
2206  -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
2207  @TARGET_SYSTEM_ROOT_DEFINE@
2208
2209LIBCPP_OBJS =	cpplib.o cpplex.o cppmacro.o cppexp.o cppfiles.o cpptrad.o \
2210		cpphash.o cpperror.o cppinit.o cppdefault.o cppmain.o \
2211		hashtable.o line-map.o mkdeps.o prefix.o mbchar.o
2212
2213LIBCPP_DEPS =	$(CPPLIB_H) cpphash.h line-map.h hashtable.h intl.h \
2214		$(OBSTACK_H) $(SYSTEM_H)
2215
2216# Most of the other archives built/used by this makefile are for
2217# targets.  This one is strictly for the host.
2218libcpp.a: $(LIBCPP_OBJS)
2219	-rm -rf libcpp.a
2220	$(AR) $(AR_FLAGS) libcpp.a $(LIBCPP_OBJS)
2221	-$(RANLIB) libcpp.a
2222
2223cppmain.o:  cppmain.c  $(CONFIG_H) $(LIBCPP_DEPS)
2224
2225cpperror.o: cpperror.c $(CONFIG_H) $(LIBCPP_DEPS)
2226cppexp.o:   cppexp.c   $(CONFIG_H) $(LIBCPP_DEPS)
2227cpplex.o:   cpplex.c   $(CONFIG_H) $(LIBCPP_DEPS) mbchar.h
2228cppmacro.o: cppmacro.c $(CONFIG_H) $(LIBCPP_DEPS)
2229cpplib.o:   cpplib.c   $(CONFIG_H) $(LIBCPP_DEPS)
2230cpphash.o:  cpphash.c  $(CONFIG_H) $(LIBCPP_DEPS)
2231cpptrad.o:  cpptrad.c  $(CONFIG_H) $(LIBCPP_DEPS)
2232cppfiles.o: cppfiles.c $(CONFIG_H) $(LIBCPP_DEPS) $(SPLAY_TREE_H) mkdeps.h
2233cppinit.o:  cppinit.c  $(CONFIG_H) $(LIBCPP_DEPS) cppdefault.h \
2234		mkdeps.h prefix.h
2235
2236cppdefault.o: cppdefault.c $(CONFIG_H) $(SYSTEM_H) cppdefault.h Makefile
2237	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2238	  $(PREPROCESSOR_DEFINES) \
2239	  -c $(srcdir)/cppdefault.c $(OUTPUT_OPTION)
2240
2241mkdeps.o: mkdeps.c $(CONFIG_H) $(SYSTEM_H) mkdeps.h
2242
2243# Note for the stamp targets, we run the program `true' instead of
2244# having an empty command (nothing following the semicolon).
2245
2246proto: config.status protoize$(exeext) unprotoize$(exeext) SYSCALLS.c.X
2247
2248PROTO_OBJS = intl.o version.o cppdefault.o
2249
2250protoize$(exeext): protoize.o $(PROTO_OBJS) $(LIBDEPS)
2251	$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ protoize.o $(PROTO_OBJS) $(LIBS)
2252
2253unprotoize$(exeext): unprotoize.o $(PROTO_OBJS) $(LIBDEPS)
2254	$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ unprotoize.o $(PROTO_OBJS) $(LIBS)
2255
2256protoize.o: protoize.c $(LIBIBERTY_INCLUDES)/getopt.h $(CONFIG_H) $(SYSTEM_H) \
2257   Makefile version.h
2258	(SHLIB_LINK='$(SHLIB_LINK)' \
2259	SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \
2260	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2261	  $(DRIVER_DEFINES) \
2262	  $(srcdir)/protoize.c $(OUTPUT_OPTION))
2263
2264unprotoize.o: protoize.c $(LIBIBERTY_INCLUDES)/getopt.h \
2265   $(CONFIG_H) $(SYSTEM_H) Makefile version.h
2266	(SHLIB_LINK='$(SHLIB_LINK)' \
2267	SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \
2268	$(CC) -c -DUNPROTOIZE $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2269	  $(DRIVER_DEFINES) \
2270	  $(srcdir)/protoize.c $(OUTPUT_OPTION))
2271
2272# This info describes the target machine, so compile with GCC just built.
2273SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \
2274   stmp-int-hdrs
2275	-rm -f SYSCALLS.c tmp-SYSCALLS.s
2276	sed -e s/TARGET_GETGROUPS_T/$(TARGET_GETGROUPS_T)/ \
2277	  $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
2278	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2279	  -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c
2280	-rm -f SYSCALLS.c tmp-SYSCALLS.s
2281
2282
2283test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
2284	-rm -f tmp-proto.[cso]
2285	cp $(srcdir)/protoize.c tmp-proto.c
2286	chmod u+w tmp-proto.c
2287	./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \
2288	  $(GCC_CFLAGS) $(INCLUDES) \
2289	  -DGCC_INCLUDE_DIR=0 \
2290	  -DGPLUSPLUS_INCLUDE_DIR=0 \
2291	  -DCROSS_INCLUDE_DIR=0 \
2292	  -DTOOL_INCLUDE_DIR=0 \
2293	  -DSTANDARD_EXEC_PREFIX=0 \
2294	  -DDEFAULT_TARGET_MACHINE=0 \
2295	  -DDEFAULT_TARGET_VERSION=0" tmp-proto.c
2296	@echo '**********' Expect 400 lines of differences.
2297	-diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff
2298	-wc -l tmp-proto.diff
2299	./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \
2300	  $(GCC_CFLAGS) $(INCLUDES) \
2301	  -DGCC_INCLUDE_DIR=0 \
2302	  -DGPLUSPLUS_INCLUDE_DIR=0 \
2303	  -DCROSS_INCLUDE_DIR=0 \
2304	  -DTOOL_INCLUDE_DIR=0 \
2305	  -DSTANDARD_EXEC_PREFIX=0 \
2306	  -DDEFAULT_TARGET_MACHINE=0 \
2307	  -DDEFAULT_TARGET_VERSION=0" tmp-proto.c
2308	@echo Expect zero differences.
2309	diff $(srcdir)/protoize.c tmp-proto.c | cat
2310	-rm -f tmp-proto.[cs] tmp-proto$(objext)
2311
2312gcov.o: gcov.c gcov-io.h intl.h $(SYSTEM_H) $(CONFIG_H)
2313
2314# Only one of 'gcov' or 'gcov.exe' is actually built, depending
2315# upon whether $(exeext) is empty or not.
2316GCOV_OBJS = gcov.o intl.o version.o
2317gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS)
2318	$(CC) $(ALL_CFLAGS) $(LDFLAGS) $(GCOV_OBJS) $(LIBS) -o $@
2319#
2320# Build the include directory.  The stamp files are stmp-* rather than
2321# s-* so that mostlyclean does not force the include directory to
2322# be rebuilt.
2323
2324# Build the include directory
2325stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) xlimits.h
2326# Copy in the headers provided with gcc.
2327# The sed command gets just the last file name component;
2328# this is necessary because VPATH could add a dirname.
2329# Using basename would be simpler, but some systems don't have it.
2330# The touch command is here to workaround an AIX/Linux NFS bug.
2331	-if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
2332	for file in .. $(USER_H); do \
2333	  if [ X$$file != X.. ]; then \
2334	    realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
2335	    $(STAMP) include/$$realfile; \
2336	    rm -f include/$$realfile; \
2337	    cp $$file include; \
2338	    chmod a+r include/$$realfile; \
2339	  fi; \
2340	done
2341	rm -f include/limits.h
2342	cp xlimits.h include/limits.h
2343	chmod a+r include/limits.h
2344# Install the README
2345	rm -f include/README
2346	cp $(srcdir)/README-fixinc include/README
2347	chmod a+r include/README
2348	$(STAMP) $@
2349
2350# fixinc.sh depends on this, not on specs directly.
2351# The idea is to make sure specs gets built, but not rerun fixinc.sh
2352# after each stage just because specs' mtime has changed.
2353specs.ready: specs
2354	-if [ -f specs.ready ] ; then \
2355		true; \
2356	else \
2357		$(STAMP) specs.ready; \
2358	fi
2359
2360FIXINCSRCDIR=$(srcdir)/fixinc
2361fixinc.sh: $(FIXINCSRCDIR)/mkfixinc.sh $(FIXINCSRCDIR)/fixincl.c \
2362	$(FIXINCSRCDIR)/procopen.c $(FIXINCSRCDIR)/gnu-regex.c \
2363	$(FIXINCSRCDIR)/server.c $(FIXINCSRCDIR)/gnu-regex.h \
2364	$(FIXINCSRCDIR)/server.h $(FIXINCSRCDIR)/inclhack.def specs.ready
2365	(MAKE="$(MAKE)"; srcdir=`cd $(srcdir)/fixinc && ${PWD_COMMAND}` ; \
2366	CC="$(HOST_CC)"; CFLAGS="$(HOST_CFLAGS)"; LDFLAGS="$(HOST_LDFLAGS)"; \
2367	WARN_CFLAGS="$(WARN_CFLAGS)"; LIBERTY=`pwd`/"$(BUILD_LIBIBERTY)"; \
2368	export MAKE srcdir CC CFLAGS LDFLAGS WARN_CFLAGS LIBERTY; \
2369	cd ./fixinc && \
2370	$(SHELL) $${srcdir}/mkfixinc.sh $(build_canonical) $(target))
2371
2372.PHONY: install-gcc-tooldir
2373install-gcc-tooldir:
2374	$(SHELL) ${srcdir}/mkinstalldirs $(gcc_tooldir)
2375
2376# Build fixed copies of system files.
2377stmp-fixinc: fixinc.sh gsyslimits.h
2378	@if test ! -d ${SYSTEM_HEADER_DIR}; then \
2379	  echo The directory that should contain system headers does not exist: >&2 ; \
2380	  echo "  ${SYSTEM_HEADER_DIR}" >&2 ; \
2381	  if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
2382	  then sleep 1; else exit 1; fi; \
2383	fi
2384	rm -rf include; mkdir include
2385	-chmod a+rx include
2386	(TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \
2387	SHELL='$(SHELL)' ;\
2388	export TARGET_MACHINE srcdir SHELL ; \
2389	$(SHELL) ./fixinc.sh `${PWD_COMMAND}`/include $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); \
2390	rm -f include/syslimits.h; \
2391	if [ -f include/limits.h ]; then \
2392	  mv include/limits.h include/syslimits.h; \
2393	else \
2394	  cp $(srcdir)/gsyslimits.h include/syslimits.h; \
2395	fi; \
2396	chmod a+r include/syslimits.h)
2397	$(STAMP) stmp-fixinc
2398
2399# Files related to the fixproto script.
2400# gen-protos and fix-header are compiled with HOST_CC, but they are only
2401# used in native and host-x-target builds, so it's safe to link them with
2402# libiberty.a.
2403
2404deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
2405	if [ -d "$(SYSTEM_HEADER_DIR)" ]; \
2406	then \
2407	  CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -isystem include -isystem ${SYSTEM_HEADER_DIR}"; \
2408	  export CC; \
2409	  $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h; \
2410	  mv tmp-deduced.h deduced.h; \
2411	else \
2412	  $(STAMP) deduced.h; \
2413	fi
2414
2415GEN_PROTOS_OBJS = gen-protos.o scan.o
2416gen-protos$(build_exeext): $(GEN_PROTOS_OBJS)
2417	${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
2418	  $(GEN_PROTOS_OBJS) $(HOST_LIBS)
2419
2420gen-protos.o: gen-protos.c scan.h $(HCONFIG_H) $(SYSTEM_H)
2421	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c $(OUTPUT_OPTION)
2422
2423scan.o: scan.c scan.h $(HCONFIG_H) $(SYSTEM_H)
2424	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c $(OUTPUT_OPTION)
2425
2426xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos$(build_exeext) Makefile
2427	sed -e s/TARGET_GETGROUPS_T/$(TARGET_GETGROUPS_T)/ \
2428	  deduced.h $(srcdir)/sys-protos.h > tmp-fixtmp.c
2429	mv tmp-fixtmp.c fixtmp.c
2430	$(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \
2431	  | sed -e 's/	/ /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
2432	  | $(RUN_GEN) ./gen-protos >xsys-protos.hT
2433	mv xsys-protos.hT xsys-protos.h
2434	rm -rf fixtmp.c
2435
2436# This is nominally a 'build' program, but it's run only when host==build,
2437# so we can (indeed, must) use $(LIBDEPS) and $(LIBS).
2438fix-header$(build_exeext): fix-header.o scan-decls.o scan.o xsys-protos.h \
2439           $(LIBDEPS) libcpp.a
2440	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
2441	   scan-decls.o scan.o libcpp.a $(LIBS)
2442
2443fix-header.o: fix-header.c $(OBSTACK_H) scan.h \
2444	xsys-protos.h $(HCONFIG_H) $(SYSTEM_H) $(CPPLIB_H)
2445	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c $(OUTPUT_OPTION)
2446
2447scan-decls.o: scan-decls.c scan.h $(CPPLIB_H) $(HCONFIG_H) $(SYSTEM_H)
2448	$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c $(OUTPUT_OPTION)
2449
2450# stmp-fixproto depends on this, not on fix-header directly.
2451# The idea is to make sure fix-header gets built,
2452# but not rerun fixproto after each stage
2453# just because fix-header's mtime has changed.
2454fixhdr.ready: fix-header$(build_exeext)
2455	-if [ -f fixhdr.ready ] ; then \
2456		true; \
2457	else \
2458		$(STAMP) fixhdr.ready; \
2459	fi
2460
2461# stmp-int-headers is to make sure fixincludes has already finished.
2462# The if statement is so that we don't run fixproto a second time
2463# if it has already been run on the files in `include'.
2464stmp-fixproto: fixhdr.ready fixproto stmp-int-hdrs
2465	if [ -f include/fixed ] ; then true; \
2466	else \
2467	  : This line works around a 'make' bug in BSDI 1.1.; \
2468	  FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
2469	  mkinstalldirs="$(SHELL) $(srcdir)/mkinstalldirs"; \
2470	    export mkinstalldirs; \
2471	  if [ -d "$(SYSTEM_HEADER_DIR)" ]; then \
2472	    $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
2473	    if [ $$? -eq 0 ] ; then true ; else exit 1 ; fi ; \
2474	  else true; fi; \
2475	  $(STAMP) include/fixed; \
2476	fi
2477	$(STAMP) stmp-fixproto
2478#
2479# Remake the info files.
2480
2481docdir = $(srcdir)/doc
2482
2483doc: $(BUILD_INFO) $(GENERATED_MANPAGES) gccbug
2484info: cpp.info gcc.info gccint.info gccinstall.info lang.info cppinternals.info
2485
2486TEXI_CPP_FILES = $(docdir)/cpp.texi $(docdir)/include/fdl.texi \
2487  $(docdir)/cppenv.texi $(docdir)/cppopts.texi
2488
2489TEXI_GCC_FILES = $(docdir)/gcc.texi $(docdir)/include/gcc-common.texi \
2490	 $(docdir)/frontends.texi $(docdir)/standards.texi \
2491	 $(docdir)/invoke.texi $(docdir)/extend.texi $(docdir)/md.texi \
2492	 $(docdir)/objc.texi $(docdir)/gcov.texi $(docdir)/trouble.texi \
2493	 $(docdir)/bugreport.texi $(docdir)/service.texi \
2494	 $(docdir)/contribute.texi $(docdir)/compat.texi \
2495	 $(docdir)/include/funding.texi $(docdir)/gnu.texi \
2496	 $(docdir)/include/gpl.texi $(docdir)/include/fdl.texi \
2497	 $(docdir)/contrib.texi $(docdir)/cppenv.texi $(docdir)/cppopts.texi
2498
2499TEXI_GCCINT_FILES = $(docdir)/gccint.texi \
2500	 $(docdir)/include/gcc-common.texi $(docdir)/contribute.texi \
2501	 $(docdir)/makefile.texi $(docdir)/configterms.texi \
2502	 $(docdir)/portability.texi $(docdir)/interface.texi \
2503	 $(docdir)/passes.texi $(docdir)/c-tree.texi \
2504	 $(docdir)/rtl.texi $(docdir)/md.texi $(docdir)/tm.texi \
2505	 $(docdir)/hostconfig.texi $(docdir)/fragments.texi \
2506	 $(docdir)/configfiles.texi $(docdir)/collect2.texi \
2507	 $(docdir)/headerdirs.texi $(docdir)/include/funding.texi \
2508	 $(docdir)/gnu.texi $(docdir)/include/gpl.texi \
2509	 $(docdir)/include/fdl.texi $(docdir)/contrib.texi \
2510	 $(docdir)/languages.texi $(docdir)/sourcebuild.texi \
2511	 $(docdir)/gty.texi
2512
2513TEXI_GCCINSTALL_FILES = $(docdir)/install.texi $(docdir)/install-old.texi \
2514	 $(docdir)/include/fdl.texi
2515
2516TEXI_CPPINT_FILES = $(docdir)/cppinternals.texi
2517
2518cpp.info: $(TEXI_CPP_FILES)
2519	$(MAKEINFO) $(MAKEINFOFLAGS) -I $(srcdir)/doc -I $(srcdir)/doc/include -o cpp.info $(srcdir)/doc/cpp.texi
2520
2521gcc.info: $(TEXI_GCC_FILES)
2522	$(MAKEINFO) $(MAKEINFOFLAGS) -I $(srcdir)/doc -I $(srcdir)/doc/include -o gcc.info $(srcdir)/doc/gcc.texi
2523
2524gccint.info: $(TEXI_GCCINT_FILES)
2525	$(MAKEINFO) $(MAKEINFOFLAGS) -I $(srcdir)/doc -I $(srcdir)/doc/include -o gccint.info $(srcdir)/doc/gccint.texi
2526
2527gccinstall.info: $(TEXI_GCCINSTALL_FILES)
2528	$(MAKEINFO) $(MAKEINFOFLAGS) -I $(srcdir)/doc -I $(srcdir)/doc/include -o gccinstall.info $(srcdir)/doc/install.texi
2529
2530cppinternals.info: $(TEXI_CPPINT_FILES)
2531	$(MAKEINFO) $(MAKEINFOFLAGS) -I $(srcdir)/doc -I $(srcdir)/doc/include -o cppinternals.info \
2532		$(srcdir)/doc/cppinternals.texi
2533
2534dvi: gcc.dvi gccint.dvi gccinstall.dvi cpp.dvi lang.dvi cppinternals.dvi
2535
2536# This works with GNU Make's default rule.
2537cpp.dvi: $(TEXI_CPP_FILES)
2538	$(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/cpp.texi
2539
2540gcc.dvi: $(TEXI_GCC_FILES)
2541	$(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/gcc.texi
2542
2543gccint.dvi: $(TEXI_GCCINT_FILES)
2544	$(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/gccint.texi
2545
2546gccinstall.dvi: $(TEXI_GCCINSTALL_FILES)
2547	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2548	$(TEXI2DVI) -I $$s/doc -I $$s/doc/include -o $@ $$s/doc/install.texi
2549
2550cppinternals.dvi: $(TEXI_CPPINT_FILES)
2551	$(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/cppinternals.texi
2552
2553generated-manpages: gcov.1 cpp.1 gcc.1 \
2554	 gfdl.7 gpl.7 fsf-funding.7 \
2555	 lang.generated-manpages
2556
2557gcov.1: $(docdir)/gcov.texi
2558	$(STAMP) gcov.1
2559	-$(TEXI2POD) $(docdir)/gcov.texi > gcov.pod
2560	-($(POD2MAN) --section=1 gcov.pod > gcov.1.T$$$$ && \
2561		mv -f gcov.1.T$$$$ gcov.1) || \
2562		(rm -f gcov.1.T$$$$ && exit 1)
2563	-rm -f gcov.pod
2564
2565cpp.1: $(docdir)/cpp.texi $(docdir)/cppenv.texi \
2566  $(docdir)/cppopts.texi
2567	$(STAMP) cpp.1
2568	-$(TEXI2POD) $(docdir)/cpp.texi > cpp.pod
2569	-($(POD2MAN) --section=1 cpp.pod > cpp.1.T$$$$ && \
2570		mv -f cpp.1.T$$$$ cpp.1) || \
2571		(rm -f cpp.1.T$$$$ && exit 1)
2572	-rm -f cpp.pod
2573
2574gcc.1: $(docdir)/invoke.texi $(docdir)/cppenv.texi \
2575  $(docdir)/cppopts.texi
2576	$(STAMP) gcc.1
2577	-$(TEXI2POD) $(docdir)/invoke.texi > gcc.pod
2578	-($(POD2MAN) --section=1 gcc.pod > gcc.1.T$$$$ && \
2579		mv -f gcc.1.T$$$$ gcc.1) || \
2580		(rm -f gcc.1.T$$$$ && exit 1)
2581	-rm -f gcc.pod
2582
2583gfdl.7: $(docdir)/include/fdl.texi
2584	$(STAMP) gfdl.7
2585	-$(TEXI2POD) $(docdir)/include/fdl.texi > gfdl.pod
2586	-($(POD2MAN) --section=7 gfdl.pod > gfdl.7.T$$$$ && \
2587		mv -f gfdl.7.T$$$$ gfdl.7) || \
2588		(rm -f gfdl.7.T$$$$ && exit 1)
2589	-rm -f gfdl.pod
2590
2591gpl.7: $(docdir)/include/gpl.texi
2592	$(STAMP) gpl.7
2593	-$(TEXI2POD) $(docdir)/include/gpl.texi > gpl.pod
2594	-($(POD2MAN) --section=7 gpl.pod > gpl.7.T$$$$ && \
2595		mv -f gpl.7.T$$$$ gpl.7) || \
2596		(rm -f gpl.7.T$$$$ && exit 1)
2597	-rm -f gpl.pod
2598
2599fsf-funding.7: $(docdir)/include/funding.texi
2600	$(STAMP) fsf-funding.7
2601	-$(TEXI2POD) $(docdir)/include/funding.texi > fsf-funding.pod
2602	-($(POD2MAN) --section=7 fsf-funding.pod \
2603		> fsf-funding.7.T$$$$ && \
2604	    mv -f fsf-funding.7.T$$$$ fsf-funding.7) || \
2605	    (rm -f fsf-funding.7.T$$$$ && exit 1)
2606	-rm -f fsf-funding.pod
2607
2608#
2609# Deletion of files made during compilation.
2610# There are four levels of this:
2611#   `mostlyclean', `clean', `distclean' and `maintainer-clean'.
2612# `mostlyclean' is useful while working on a particular type of machine.
2613# It deletes most, but not all, of the files made by compilation.
2614# It does not delete libgcc.a or its parts, so it won't have to be recompiled.
2615# `clean' deletes everything made by running `make all'.
2616# `distclean' also deletes the files made by config.
2617# `maintainer-clean' also deletes everything that could be regenerated
2618# automatically, except for `configure'.
2619# We remove as much from the language subdirectories as we can
2620# (less duplicated code).
2621
2622INTL_MOSTLYCLEAN = intl.mostlyclean
2623mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean
2624	-rm -f $(STAGESTUFF)
2625	-rm -f *$(coverageexts)
2626	-rm -rf libgcc
2627# Delete the temporary source copies for cross compilation.
2628	-rm -f $(BUILD_PREFIX_1)rtl.c $(BUILD_PREFIX_1)print-rtl.c
2629	-rm -f $(BUILD_PREFIX_1)bitmap.c $(BUILD_PREFIX_1)errors.c
2630	-rm -f $(BUILD_PREFIX_1)ggc-none.c
2631# Delete the temp files made in the course of building libgcc.a.
2632	-rm -f xlimits.h
2633# Delete other built files.
2634	-rm -f xsys-protos.hT
2635	-rm -f specs.h options.h gencheck.h
2636# Delete the stamp and temporary files.
2637	-rm -f s-* tmp-* stamp-* stmp-*
2638	-rm -f */stamp-* */tmp-*
2639# Delete debugging dump files.
2640	-rm -f *.[0-9][0-9].* */*.[0-9][0-9].*
2641# Delete some files made during installation.
2642	-rm -f specs SYSCALLS.c.X SYSCALLS.c
2643	-rm -f collect collect2 mips-tfile mips-tdump
2644# Delete files generated for fixproto
2645	-rm -rf fix-header$(build_exeext) xsys-protos.h deduced.h tmp-deduced.h \
2646	  gen-protos$(build_exeext) fixproto.list fixtmp.* fixhdr.ready
2647# Delete files generated for fixincl
2648	-rm -rf fixincl fixinc.sh specs.ready
2649	(cd fixinc && $(MAKE) clean)
2650# Delete unwanted output files from TeX.
2651	-rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
2652	-rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg
2653# Delete sorted indices we don't actually use.
2654	-rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
2655# Delete core dumps.
2656	-rm -f core */core
2657# Delete file generated for gengtype.c
2658	-rm -f gtyp-gen.h
2659# Delete files generated by gengtype.c
2660	-rm -f gtype-*
2661	-rm -f gt-*
2662
2663# Delete all files made by compilation
2664# that don't exist in the distribution.
2665INTL_CLEAN = intl.clean
2666clean: mostlyclean $(INTL_CLEAN) lang.clean
2667	-rm -f libgcc.a libgcc_eh.a libgcc_s$(SHLIB_EXT) libgcc_s$(SHLIB_EXT).1
2668	-rm -f config.h tconfig.h hconfig.h tm_p.h
2669	-rm -f cs-*
2670	-rm -rf libgcc
2671	-rm -f *.dvi
2672	-rm -f */*.dvi
2673# Delete the include directory.
2674	-rm -rf include
2675# Delete files used by the "multilib" facility (including libgcc subdirs).
2676	-rm -f multilib.h tmpmultilib*
2677	-if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \
2678	  rm -rf $(MULTILIB_DIRNAMES); \
2679	else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \
2680	  rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
2681	fi ; fi
2682	-rm -fr stage1 stage2 stage3 stage4
2683# Delete stamps of bootstrap stages
2684	-rm -f stage?_*
2685	-rm -f clean?_*
2686	-rm -f stage_last
2687
2688# Delete all files that users would normally create
2689# while building and installing GCC.
2690INTL_DISTCLEAN = intl.distclean
2691distclean: clean $(INTL_DISTCLEAN) lang.distclean
2692	-rm -f auto-host.h auto-build.h
2693	-rm -f cstamp-h
2694	-rm -f config.status config.run config.cache config.bak
2695	-rm -f Make-lang Make-hooks Make-host Make-target
2696	-rm -f Makefile *.oaux
2697	-rm -f gthr-default.h
2698	-rm -f */stage1 */stage2 */stage3 */stage4 */include
2699	-rm -f c-parse.output
2700	-rm -f *.asm
2701	-rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
2702	-rm -f testsuite/*.log testsuite/*.sum
2703	-cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.c
2704	-cd testsuite && rm -f *.out *.gcov *.bb *.bbg
2705	-rm -rf ${QMTEST_DIR} stamp-qmtest
2706	-rm -f intl/libintl.h libintl.h
2707	-rm -f cxxmain.c
2708	-rm -f mklibgcc mkheaders gccbug .gdbinit configargs.h
2709	-rm -f gcov.pod
2710	-rm -f fixinc/Makefile
2711# Delete po/*.gmo only if we are not building in the source directory.
2712	-if [ ! -f po/exgettext ]; then rm -f po/*.gmo; fi
2713	-rmdir ada cp f java objc fixinc intl po testsuite 2>/dev/null
2714
2715# Delete anything likely to be found in the source directory
2716# that shouldn't be in the distribution.
2717extraclean: distclean lang.extraclean
2718	-rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
2719	-rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
2720	-rm -f config/*/=* config/*/"#"* config/*/*~*
2721	-rm -f config/*/*.orig config/*/*.rej
2722	-rm -f *.dvi *.ps *.oaux *.d *.[zZ] *.gz
2723	-rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
2724	-rm -f *lose config/*lose config/*/*lose
2725	-rm -f *.s *.s[0-9] *.i config/ChangeLog
2726	-rm -f y.tab.c yacc.*
2727	-rm -f */=* */"#"* */*~*
2728	-rm -f */patch* */*.orig */*.rej
2729	-rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz
2730	-rm -f */*.tar */*.xtar */*diff */*.diff.* */*.tar.* */*.xtar.* */*diffs
2731	-rm -f */*lose */*.s */*.s[0-9] */*.i
2732
2733# Get rid of every file that's generated from some other file, except for `configure'.
2734# Most of these files ARE PRESENT in the GCC distribution.
2735# We define INTL_DISTCLEAN, INTL_CLEAN & INTL_MOSTLYCLEAN to be empty in the
2736# submake, so that we don't descend into intl after its makefile has been
2737# removed.
2738maintainer-clean:
2739	@echo 'This command is intended for maintainers to use; it'
2740	@echo 'deletes files that may need special tools to rebuild.'
2741	$(MAKE) INTL_DISTCLEAN= INTL_CLEAN= INTL_MOSTLYCLEAN= \
2742		intl.maintainer-clean lang.maintainer-clean distclean
2743	-rm -f c-parse.y c-parse.c c-parse.output TAGS
2744	-rm -f cpp.??s cpp.*aux
2745	-rm -f gcc.??s gcc.*aux
2746	-rm -f cpp.info* gcc.info* gccint.info*
2747	-rm -f cppinternals.info*
2748	-rm -f gcov.1 cpp.1 gcc.1
2749	-rm -f fsf-funding.7 gfdl.7 gpl.7
2750#
2751# Entry points `install' and `uninstall'.
2752# Also use `install-collect2' to install collect2 when the config files don't.
2753
2754# Copy the compiler files into directories where they will be run.
2755# Install the driver last so that the window when things are
2756# broken is small.
2757install: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
2758    install-cpp install-man install-info intl.install install-@POSUB@ \
2759    lang.install-normal install-driver
2760
2761# Handle cpp installation.
2762install-cpp: cpp$(exeext)
2763	-if [ -f gcc-cross$(exeext) ] ; then \
2764	  rm -f $(DESTDIR)$(bindir)/$(CPP_CROSS_NAME)$(exeext); \
2765	  $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(bindir)/$(CPP_CROSS_NAME)$(exeext); \
2766	  if [ x$(cpp_install_dir) != x ]; then \
2767	    rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \
2768	    $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \
2769	  else true; fi; \
2770	else \
2771	  rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext); \
2772	  $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext); \
2773	  if [ x$(cpp_install_dir) != x ]; then \
2774	    rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
2775	    $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
2776	  else true; fi; \
2777	fi
2778
2779# Create the installation directories.
2780# $(libdir)/gcc-lib/include isn't currently searched by cpp.
2781installdirs:
2782	$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(libsubdir)
2783	$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(bindir)
2784	$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(includedir)
2785	$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(infodir)
2786	$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(slibdir)
2787	$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(man1dir)
2788	$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(man7dir)
2789
2790# Install the compiler executables built during cross compilation.
2791install-common: native $(EXTRA_PARTS) lang.install-common
2792	for file in $(COMPILERS); do \
2793	  if [ -f $$file ] ; then \
2794	    rm -f $(DESTDIR)$(libsubdir)/$$file; \
2795	    $(INSTALL_PROGRAM) $$file $(DESTDIR)$(libsubdir)/$$file; \
2796	  else true; \
2797	  fi; \
2798	done
2799	for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
2800	  if [ x"$$file" != x.. ]; then \
2801	    rm -f $(DESTDIR)$(libsubdir)/$$file; \
2802	    $(INSTALL_PROGRAM) $$file $(DESTDIR)$(libsubdir)/$$file; \
2803	  else true; fi; \
2804	done
2805	for file in $(EXTRA_PARTS) ..; do \
2806	  if [ x"$$file" != x.. ]; then \
2807	    rm -f $(DESTDIR)$(libsubdir)/$$file; \
2808	    $(INSTALL_DATA) $$file $(DESTDIR)$(libsubdir)/$$file; \
2809	    chmod a-x $(DESTDIR)$(libsubdir)/$$file; \
2810	  else true; fi; \
2811	done
2812# Don't mess with specs if it doesn't exist yet.
2813	-if [ -f specs ] ; then \
2814	  rm -f $(DESTDIR)$(libsubdir)/specs; \
2815	  $(INSTALL_DATA) specs $(DESTDIR)$(libsubdir)/specs; \
2816	  chmod a-x $(DESTDIR)$(libsubdir)/specs; \
2817	fi
2818# Install protoize if it was compiled.
2819	-if [ -f protoize$(exeext) ]; \
2820	then \
2821	    if [ -f gcc-cross$(exeext) ] ; then \
2822		rm -f $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \
2823		$(INSTALL_PROGRAM) protoize$(exeext) $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \
2824		rm -f $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \
2825		$(INSTALL_PROGRAM) unprotoize$(exeext) $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \
2826	    else \
2827		rm -f $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
2828		$(INSTALL_PROGRAM) protoize$(exeext) $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
2829		rm -f $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
2830		$(INSTALL_PROGRAM) unprotoize$(exeext) $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
2831	    fi ; \
2832	    rm -f $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
2833	    $(INSTALL_DATA) SYSCALLS.c.X $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
2834	    chmod a-x $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
2835	fi
2836# Install gcov if it was compiled.
2837	-if [ -f gcov$(exeext) ]; \
2838	then \
2839	    rm -f $(DESTDIR)$(bindir)/gcov$(exeext); \
2840	    $(INSTALL_PROGRAM) gcov$(exeext) $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \
2841	fi
2842	$(INSTALL_SCRIPT) gccbug $(DESTDIR)$(bindir)/$(GCCBUG_INSTALL_NAME)
2843
2844# Install the driver program as $(target_alias)-gcc,
2845# $(target-alias)-gcc-$(version)
2846# and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc.
2847install-driver: installdirs xgcc$(exeext)
2848	-if [ -f gcc-cross$(exeext) ] ; then \
2849	  rm -f $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext); \
2850	  $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext); \
2851	  rm -f $(DESTDIR)$(bindir)/$(target_alias)-gcc-$(version); \
2852	  ( cd $(DESTDIR)$(bindir) && \
2853	    $(LN) $(GCC_CROSS_NAME)$(exeext) $(target_alias)-gcc-$(version) ); \
2854	  if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
2855	    rm -f $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
2856	    $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
2857	  else true; fi; \
2858	else \
2859	  rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2860	  $(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2861	  rm -f $(DESTDIR)$(bindir)/$(target_alias)-gcc-$(version); \
2862	  ( cd $(DESTDIR)$(bindir) && \
2863	    $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_alias)-gcc-$(version) ); \
2864	  rm -f $(DESTDIR)$(bindir)/$(target_alias)-gcc-tmp$(exeext); \
2865	  ( cd $(DESTDIR)$(bindir) && \
2866	    $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_alias)-gcc-tmp$(exeext) && \
2867	    mv -f $(target_alias)-gcc-tmp$(exeext) $(GCC_TARGET_INSTALL_NAME)$(exeext) ); \
2868	fi
2869
2870# Install the info files.
2871# $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
2872# to do the install.
2873install-info: doc installdirs lang.install-info
2874	-rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info*
2875	-rm -f $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info*
2876	if [ -f gcc.info ]; then \
2877	  for f in cpp.info* gcc.info* \
2878		cppinternals.info* gccint.info*; do \
2879	    realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
2880	    $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/$$realfile; \
2881	  done; \
2882	else true; fi
2883	-if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
2884	  if [ -f $(DESTDIR)$(infodir)/dir ] ; then \
2885	    for f in cpp.info gcc.info gccint.info cppinternals.info; do \
2886		if [ -f $(DESTDIR)$(infodir)/$$f ]; then \
2887		  install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/$$f; \
2888		else true; fi; \
2889	    done; \
2890	  else true; fi; \
2891	else true; fi;
2892	-chmod a-x $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info*
2893	-chmod a-x $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info*
2894
2895# Install the man pages.
2896install-man: installdirs $(GENERATED_MANPAGES) lang.install-man
2897	-if [ -f gcc-cross$(exeext) ] ; then \
2898	  rm -f $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
2899	  $(INSTALL_DATA) $(docdir)/gcc.1 $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
2900	  chmod a-x $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
2901	else \
2902	  rm -f $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
2903	  $(INSTALL_DATA) $(docdir)/gcc.1 $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
2904	  chmod a-x $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
2905	fi
2906	-rm -f $(DESTDIR)$(man1dir)/cpp$(man1ext)
2907	-$(INSTALL_DATA) $(docdir)/cpp.1 $(DESTDIR)$(man1dir)/cpp$(man1ext)
2908	-chmod a-x $(DESTDIR)$(man1dir)/cpp$(man1ext)
2909	-rm -f $(DESTDIR)$(man1dir)/gcov$(man1ext)
2910	-$(INSTALL_DATA) $(docdir)/gcov.1 $(DESTDIR)$(man1dir)/gcov$(man1ext)
2911	-chmod a-x $(DESTDIR)$(man1dir)/gcov$(man1ext)
2912	-rm -f $(DESTDIR)$(man7dir)/fsf-funding$(man7ext)
2913	-$(INSTALL_DATA) $(docdir)/fsf-funding.7 $(DESTDIR)$(man7dir)/fsf-funding$(man7ext)
2914	-chmod a-x $(DESTDIR)$(man7dir)/fsf-funding$(man7ext)
2915	-rm -f $(DESTDIR)$(man7dir)/gfdl$(man7ext)
2916	-$(INSTALL_DATA) $(docdir)/gfdl.7 $(DESTDIR)$(man7dir)/gfdl$(man7ext)
2917	-chmod a-x $(DESTDIR)$(man7dir)/gfdl$(man7ext)
2918	-rm -f $(DESTDIR)$(man7dir)/gpl$(man7ext)
2919	-$(INSTALL_DATA) $(docdir)/gpl.7 $(DESTDIR)$(man7dir)/gpl$(man7ext)
2920	-chmod a-x $(DESTDIR)$(man7dir)/gpl$(man7ext)
2921
2922# Install the library.
2923install-libgcc: libgcc.mk libgcc.a installdirs
2924	if $(RANLIB_TEST_FOR_TARGET); then \
2925	  r_f_t=$(RANLIB_FOR_TARGET); \
2926	else \
2927	  r_f_t=: ; \
2928	fi; \
2929	$(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
2930	  BUILD_PREFIX="$(BUILD_PREFIX)" BUILD_PREFIX_1="$(BUILD_PREFIX_1)" \
2931	  AR_FOR_TARGET="$(AR_FOR_TARGET)" \
2932	  AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \
2933	  AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \
2934	  CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \
2935	  RANLIB_TEST_FOR_TARGET="$(RANLIB_TEST_FOR_TARGET)" \
2936	  NM_FOR_TARGET="$(NM_FOR_TARGET)" AWK="$(AWK)" \
2937	  LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" \
2938	  INCLUDES="$(INCLUDES)" \
2939	  CONFIG_H="$(TCONFIG_H)" MACHMODE_H="$(MACHMODE_H)" \
2940	  LIB1ASMSRC='$(LIB1ASMSRC)' \
2941	  MAKEOVERRIDES= \
2942	  INSTALL_DATA="$(INSTALL_DATA)" \
2943	  RANLIB_FOR_TARGET="$$r_f_t" \
2944	  DESTDIR="$(DESTDIR)" \
2945	  libsubdir="$(libsubdir)" \
2946	  slibdir="$(slibdir)" \
2947	  -f libgcc.mk install
2948
2949# Install multiple versions of libgcc.a.
2950install-multilib: stmp-multilib installdirs
2951	if $(RANLIB_TEST_FOR_TARGET); then \
2952	  r_f_t=$(RANLIB_FOR_TARGET); \
2953	else \
2954	  r_f_t=: ; \
2955	fi; \
2956	$(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
2957	  BUILD_PREFIX="$(BUILD_PREFIX)" BUILD_PREFIX_1="$(BUILD_PREFIX_1)" \
2958	  AR_FOR_TARGET="$(AR_FOR_TARGET)" \
2959	  AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \
2960	  AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \
2961	  CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \
2962	  RANLIB_TEST_FOR_TARGET="$(RANLIB_TEST_FOR_TARGET)" \
2963	  NM_FOR_TARGET="$(NM_FOR_TARGET)" AWK="$(AWK)" \
2964	  LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" \
2965	  INCLUDES="$(INCLUDES)" \
2966	  CONFIG_H="$(CONFIG_H)" MACHMODE_H="$(MACHMODE_H)" \
2967	  LIB1ASMSRC='$(LIB1ASMSRC)' \
2968	  MAKEOVERRIDES= \
2969	  INSTALL_DATA="$(INSTALL_DATA)" \
2970	  RANLIB_FOR_TARGET="$$r_f_t" \
2971	  DESTDIR="$(DESTDIR)" \
2972	  libsubdir="$(libsubdir)" \
2973	  slibdir="$(slibdir)" \
2974	  -f libgcc.mk install
2975
2976# Install all the header files built in the include subdirectory.
2977install-headers: $(INSTALL_HEADERS_DIR)
2978# Fix symlinks to absolute paths in the installed include directory to
2979# point to the installed directory, not the build directory.
2980# Don't need to use LN_S here since we really do need ln -s and no substitutes.
2981	-files=`cd $(DESTDIR)$(libsubdir)/include; find . -type l -print 2>/dev/null`; \
2982	if [ $$? -eq 0 ]; then \
2983	  dir=`cd include; ${PWD_COMMAND}`; \
2984	  for i in $$files; do \
2985	    dest=`ls -ld $(DESTDIR)$(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
2986	    if expr "$$dest" : "$$dir.*" > /dev/null; then \
2987	      rm -f $(DESTDIR)$(libsubdir)/include/$$i; \
2988	      ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(DESTDIR)$(libsubdir)/include/$$i; \
2989	    fi; \
2990	  done; \
2991	fi
2992
2993# Create or recreate the gcc private include file directory.
2994install-include-dir: installdirs
2995	-rm -rf $(DESTDIR)$(libsubdir)/include
2996	mkdir $(DESTDIR)$(libsubdir)/include
2997	-chmod a+rx $(DESTDIR)$(libsubdir)/include
2998
2999# Install the include directory using tar.
3000install-headers-tar: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
3001# We use `pwd`/include instead of just include to problems with CDPATH
3002# Unless a full pathname is provided, some shells would print the new CWD,
3003# found in CDPATH, corrupting the output.  We could just redirect the
3004# output of `cd', but some shells lose on redirection within `()'s
3005	(cd `${PWD_COMMAND}`/include ; \
3006	 tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include; tar xpf - )
3007# /bin/sh on some systems returns the status of the first tar,
3008# and that can lose with GNU tar which always writes a full block.
3009# So use `exit 0' to ignore its exit status.
3010
3011# Install the include directory using cpio.
3012install-headers-cpio: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
3013# See discussion about the use of `pwd` above
3014	cd `${PWD_COMMAND}`/include ; \
3015	find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include
3016
3017# Install the include directory using cp.
3018install-headers-cp: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
3019	cp -p -r include $(DESTDIR)$(libsubdir)
3020
3021itoolsdir = $(libsubdir)/install-tools
3022# Don't install the headers.  Instead, install appropriate scripts
3023# and supporting files for fixincludes to be run later.
3024install-mkheaders: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir \
3025    mkheaders xlimits.h
3026	-rm -rf $(DESTDIR)$(itoolsdir)
3027	$(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(itoolsdir)/include
3028	for file in $(USER_H); do \
3029	  realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
3030	  $(INSTALL_DATA) $$file \
3031	    $(DESTDIR)$(itoolsdir)/include/$$realfile ; \
3032	done
3033	$(INSTALL_DATA) xlimits.h $(DESTDIR)$(itoolsdir)/include/limits.h
3034	if [ x$(STMP_FIXINC) != x ] ; then \
3035	  $(INSTALL_DATA) $(srcdir)/README-fixinc \
3036	    $(DESTDIR)$(itoolsdir)/include/README ; \
3037	  $(INSTALL_PROGRAM) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh ; \
3038	  $(INSTALL_PROGRAM) fixinc/fixincl $(DESTDIR)$(itoolsdir)/fixincl ; \
3039	  $(INSTALL_DATA) $(srcdir)/gsyslimits.h $(DESTDIR)$(itoolsdir)/gsyslimits.h ; \
3040	else :; fi
3041	if [ x$(STMP_FIXPROTO) != x ] ; then \
3042	  $(INSTALL_PROGRAM) $(srcdir)/mkinstalldirs \
3043		$(DESTDIR)$(itoolsdir)/mkinstalldirs ; \
3044	  $(INSTALL_PROGRAM) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \
3045	  $(INSTALL_PROGRAM) fix-header$(build_exeext) \
3046		$(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \
3047	else :; fi
3048	$(INSTALL_PROGRAM) mkheaders $(DESTDIR)$(itoolsdir)/mkheaders
3049	echo 'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \
3050		> $(DESTDIR)$(itoolsdir)/mkheaders.conf
3051	echo 'OTHER_FIXINCLUDES_DIRS="$(OTHER_FIXINCLUDES_DIRS)"' \
3052		>> $(DESTDIR)$(itoolsdir)/mkheaders.conf
3053	echo 'FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"' \
3054		>> $(DESTDIR)$(itoolsdir)/mkheaders.conf
3055	echo 'STMP_FIXPROTO="$(STMP_FIXPROTO)"' >> $(DESTDIR)$(itoolsdir)/mkheaders.conf
3056	echo 'STMP_FIXINC="$(STMP_FIXINC)"' >> $(DESTDIR)$(itoolsdir)/mkheaders.conf
3057
3058# Use this target to install the program `collect2' under the name `collect2'.
3059install-collect2: collect2 installdirs
3060	$(INSTALL_PROGRAM) collect2$(exeext) $(DESTDIR)$(libsubdir)/collect2$(exeext)
3061# Install the driver program as $(libsubdir)/gcc for collect2.
3062	$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(libsubdir)/gcc$(exeext)
3063
3064# Cancel installation by deleting the installed files.
3065uninstall: intl.uninstall lang.uninstall
3066	-rm -rf $(DESTDIR)$(libsubdir)
3067	-rm -rf $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
3068	-rm -rf $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext)
3069	-rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext)
3070	-rm -f $(DESTDIR)$(bindir)/$(CPP_CROSS_NAME)$(exeext)
3071	-if [ x$(cpp_install_dir) != x ]; then \
3072	  rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
3073	  rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \
3074	else true; fi
3075	-rm -rf $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext)
3076	-rm -rf $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext)
3077	-rm -rf $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext)
3078	-rm -rf $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext)
3079	-rm -rf $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext)
3080	-rm -rf $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext)
3081	-rm -rf $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext)
3082	-rm -rf $(DESTDIR)$(man1dir)/cpp$(man1ext)
3083	-rm -rf $(DESTDIR)$(man1dir)/protoize$(man1ext)
3084	-rm -rf $(DESTDIR)$(man1dir)/unprotoize$(man1ext)
3085	-rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info*
3086	-rm -f $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info*
3087#
3088# These targets are for the dejagnu testsuites. The file site.exp
3089# contains global variables that all the testsuites will use.
3090
3091# Set to $(target_alias)/ for cross.
3092target_subdir = @target_subdir@
3093
3094site.exp: ./config.status Makefile
3095	@echo "Making a new config file..."
3096	-@rm -f ./tmp?
3097	@$(STAMP) site.exp
3098	-@mv site.exp site.bak
3099	@echo "## these variables are automatically generated by make ##" > ./tmp0
3100	@echo "# Do not edit here. If you wish to override these values" >> ./tmp0
3101	@echo "# add them to the last section" >> ./tmp0
3102	@echo "set rootme \"`${PWD_COMMAND}`\"" >> ./tmp0
3103	@echo "set srcdir \"`cd ${srcdir}; ${PWD_COMMAND}`\"" >> ./tmp0
3104	@echo "set host_triplet $(host_canonical)" >> ./tmp0
3105	@echo "set build_triplet $(build_canonical)" >> ./tmp0
3106	@echo "set target_triplet $(target)" >> ./tmp0
3107	@echo "set target_alias $(target_alias)" >> ./tmp0
3108# CFLAGS is set even though it's empty to show we reserve the right to set it.
3109	@echo "set CFLAGS \"\"" >> ./tmp0
3110	@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
3111	@echo "set TESTING_IN_BUILD_TREE 1" >> ./tmp0
3112	@echo "set HAVE_LIBSTDCXX_V3 1" >> ./tmp0
3113# If newlib has been configured, we need to pass -B to gcc so it can find
3114# newlib's crt0.o if it exists.  This will cause a "path prefix not used"
3115# message if it doesn't, but the testsuite is supposed to ignore the message -
3116# it's too difficult to tell when to and when not to pass -B (not all targets
3117# have crt0's).  We could only add the -B if ../newlib/crt0.o exists, but that
3118# seems like too selective a test.
3119# ??? Another way to solve this might be to rely on linker scripts.  Then
3120# theoretically the -B won't be needed.
3121# We also need to pass -L ../ld so that the linker can find ldscripts.
3122	@if [ -d $(objdir)/../$(target_subdir)newlib ] ; then \
3123	  echo "set newlib_cflags \"-I$(objdir)/../$(target_subdir)newlib/targ-include -I\$$srcdir/../newlib/libc/include\"" >> ./tmp0; \
3124	  echo "set newlib_ldflags \"-B$(objdir)/../$(target_subdir)newlib/\"" >> ./tmp0; \
3125	  echo "append CFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \
3126	  echo "append CXXFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \
3127	  echo "append LDFLAGS \" \$$newlib_ldflags\"" >> ./tmp0; \
3128	else true; \
3129	fi
3130	@if [ -d $(objdir)/../ld ] ; then \
3131	  echo "append LDFLAGS \" -L$(objdir)/../ld\"" >> ./tmp0; \
3132	else true; \
3133	fi
3134	echo "set tmpdir $(objdir)/testsuite" >> ./tmp0
3135	@echo "set srcdir \"\$${srcdir}/testsuite\"" >> ./tmp0
3136	@if [ "X$(ALT_CXX_UNDER_TEST)" != "X" ] ; then \
3137	  echo "set ALT_CXX_UNDER_TEST $(ALT_CXX_UNDER_TEST)" >> ./tmp0; \
3138	else true; \
3139	fi
3140	@if [ "X$(COMPAT_OPTIONS)" != "X" ] ; then \
3141	  echo "set COMPAT_OPTIONS $(COMPAT_OPTIONS)" >> ./tmp0; \
3142	else true; \
3143	fi
3144	@echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
3145	@cat ./tmp0 > site.exp
3146	@cat site.bak | sed \
3147		-e '1,/^## All variables above are.*##/ d' >> site.exp
3148	-@rm -f ./tmp?
3149
3150CHECK_TARGETS = check-gcc @check_languages@
3151
3152check-c++ : check-g++
3153check-f77 : check-g77
3154check-java :
3155
3156check: $(CHECK_TARGETS)
3157
3158# The idea is to parallelize testing of multilibs, for example:
3159#   make -j3 check-gcc//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
3160# will run 3 concurrent sessions of check-gcc, eventually testing
3161# all 10 combinations.  GNU make is required, as is a shell that expands
3162# alternations within braces.
3163check-gcc//% check-g++//% check-g77//% check-objc//%: site.exp
3164	target=`echo "$@" | sed 's,//.*,,'`; \
3165	variant=`echo "$@" | sed 's,^[^/]*//,,'`; \
3166	vardots=`echo "$$variant" | sed 's,/,.,g'`; \
3167	$(MAKE) TESTSUITEDIR="testsuite.$$vardots" \
3168	  RUNTESTFLAGS="--target_board=$$variant $(RUNTESTFLAGS)" \
3169	  "$$target"
3170
3171TESTSUITEDIR = testsuite
3172
3173$(TESTSUITEDIR)/site.exp: site.exp
3174	test -d $(TESTSUITEDIR) || mkdir $(TESTSUITEDIR)
3175	-rm -f $@
3176	sed '/set tmpdir/ s|testsuite|$(TESTSUITEDIR)|' < site.exp > $@
3177
3178check-g++: $(TESTSUITEDIR)/site.exp
3179	-(rootme=`${PWD_COMMAND}`; export rootme; \
3180	srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \
3181	cd $(TESTSUITEDIR); \
3182	EXPECT=${EXPECT} ; export EXPECT ; \
3183	if [ -f $${rootme}/../expect/expect ] ; then  \
3184	   TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \
3185	    export TCL_LIBRARY ; fi ; \
3186	$(RUNTEST) --tool g++ $(RUNTESTFLAGS))
3187
3188check-gcc: $(TESTSUITEDIR)/site.exp
3189	-(rootme=`${PWD_COMMAND}`; export rootme; \
3190	srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \
3191	cd $(TESTSUITEDIR); \
3192	EXPECT=${EXPECT} ; export EXPECT ; \
3193	if [ -f $${rootme}/../expect/expect ] ; then  \
3194	   TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \
3195	   export TCL_LIBRARY ; fi ; \
3196	$(RUNTEST) --tool gcc $(RUNTESTFLAGS))
3197
3198check-g77: $(TESTSUITEDIR)/site.exp
3199	-(rootme=`${PWD_COMMAND}`; export rootme; \
3200	srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \
3201	cd $(TESTSUITEDIR); \
3202	EXPECT=${EXPECT} ; export EXPECT ; \
3203	if [ -f $${rootme}/../expect/expect ] ; then  \
3204	   TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \
3205	   export TCL_LIBRARY ; fi ; \
3206	$(RUNTEST) --tool g77 $(RUNTESTFLAGS))
3207
3208check-objc: $(TESTSUITEDIR)/site.exp
3209	-(rootme=`${PWD_COMMAND}`; export rootme; \
3210	srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \
3211	cd $(TESTSUITEDIR); \
3212	EXPECT=${EXPECT} ; export EXPECT ; \
3213	if [ -f $${rootme}/../expect/expect ] ; then  \
3214	   TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \
3215	    export TCL_LIBRARY ; fi ; \
3216	$(RUNTEST) --tool objc $(RUNTESTFLAGS))
3217
3218check-consistency: testsuite/site.exp
3219	-rootme=`${PWD_COMMAND}`; export rootme; \
3220	srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \
3221	cd testsuite; \
3222	EXPECT=${EXPECT} ; export EXPECT ; \
3223	if [ -f $${rootme}/../expect/expect ] ; then  \
3224	   TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \
3225	   export TCL_LIBRARY ; fi ; \
3226	$(RUNTEST) --tool consistency $(RUNTESTFLAGS)
3227
3228# QMTest targets
3229
3230# The path to qmtest.
3231QMTEST_PATH=qmtest
3232
3233# The flags to pass to qmtest.
3234QMTESTFLAGS=
3235
3236# The flags to pass to "qmtest run".
3237QMTESTRUNFLAGS=
3238
3239# The command to use to invoke qmtest.
3240QMTEST=${QMTEST_PATH} ${QMTESTFLAGS}
3241
3242# The tests (or suites) to run.
3243QMTEST_GPP_TESTS=gpp
3244
3245# The subdirectory of the OBJDIR that will be used to store the QMTest
3246# test database configuration and that will be used for temporary
3247# scratch space during QMTest's execution.
3248QMTEST_DIR=qmtestsuite
3249
3250# Create the QMTest database configuration.
3251${QMTEST_DIR} stamp-qmtest:
3252	debug_options=""; \
3253	    ${STAMP} empty.C; \
3254	    for option in \
3255	        -gdwarf-2 -gstabs -gstabs+ -gxcoff -gxcoff+ -gcoff; do \
3256		(./cc1plus -q $${option} empty.C 2>&1 | \
3257		     grep "unknown or unsupported -g option" > /dev/null) || \
3258		debug_options="$${debug_options}$${option} "; done; \
3259	    ${QMTEST} -D ${QMTEST_DIR} create-tdb \
3260	        -c gcc_database.GCCDatabase \
3261	        -a GCCDatabase.testsuite_root=`cd ${srcdir}/testsuite && pwd` \
3262	        -a GCCDatabase.debug_options="$${debug_options}"
3263	rm -f empty.C empty.s
3264	$(STAMP) stamp-qmtest
3265
3266# Create the QMTest context file.
3267${QMTEST_DIR}/context: stamp-qmtest
3268	echo "GCCTest.flags=-B${objdir}" >> $@
3269	echo "GCCTest.objdir=${objdir}/.." >> $@
3270	echo "GCCTest.host=${host_canonical}" >> $@
3271	echo "GCCTest.target=${target}" >> $@
3272	echo "GCCTest.gcov=${objdir}/gcov" >> $@
3273	echo "GPPTest.gpp=${objdir}/g++" >> $@
3274	echo "DGTest.demangler=${objdir}/c++filt" >> $@
3275
3276# Run the G++ testsuite using QMTest.
3277qmtest-g++: ${QMTEST_DIR}/context ${QMTEST_DIR}/gpp-expected.qmr
3278	cd ${QMTEST_DIR} && ${QMTEST} run ${QMTESTRUNFLAGS} -C context \
3279	   -o gpp.qmr -O gpp-expected.qmr \
3280	   ${QMTEST_GPP_TESTS}
3281
3282# Use the QMTest GUI.
3283qmtest-gui: ${QMTEST_DIR}/context
3284	cd ${QMTEST_DIR} && ${QMTEST} gui -C context
3285
3286# Build the set of expected G++ failures.
3287${QMTEST_DIR}/gpp-expected.qmr: ${QMTEST_DIR}/context
3288	echo "Determining expected results..."
3289	cd ${QMTEST_DIR} && ${QMTEST} run ${QMTESTRUNFLAGS} -C context \
3290           -c "GCCTest.generate_xfails=1" -o gpp-expected.qmr \
3291	   ${QMTEST_GPP_TESTS} \
3292	   > /dev/null
3293
3294.PHONY: qmtest-g++
3295
3296# Run Paranoia on real.c.
3297
3298paranoia.o: $(srcdir)/../contrib/paranoia.cc $(CONFIG_H) $(SYSTEM_H) \
3299  real.h $(TREE_H)
3300	g++ -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
3301
3302paranoia: paranoia.o real.o $(LIBIBERTY)
3303	g++ -o $@ paranoia.o real.o $(LIBIBERTY)
3304
3305# These exist for maintenance purposes.
3306
3307# Update the tags table.
3308TAGS: force
3309	(cd $(srcdir);							\
3310	mkdir tmp-tags;							\
3311	mv -f c-parse.[ch] =*.[chy] tmp-tags;				\
3312	etags *.y *.h *.c;						\
3313	mv tmp-tags/* .;						\
3314	rmdir tmp-tags)
3315
3316# A list of files to be destroyed during "lean" builds.
3317VOL_FILES=`echo $(BACKEND) $(OBJS) $(C_OBJS) $(LIBCPP_OBJS) *.c *.h gen*`
3318
3319# Flags to pass to stage2 and later recursive makes.  Note that the
3320# WARN_CFLAGS setting can't be to the expansion of GCC_WARN_CFLAGS in
3321# the context of the stage_x rule.
3322STAGE2_FLAGS_TO_PASS = \
3323	ADAC="\$$(CC)" \
3324	AR_FOR_TARGET="$(AR_FOR_TARGET)" \
3325	RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)" \
3326	CFLAGS="$(BOOT_CFLAGS)" \
3327	LDFLAGS="$(BOOT_LDFLAGS)" \
3328	WARN_CFLAGS="\$$(GCC_WARN_CFLAGS)" \
3329	STRICT_WARN="$(STRICT2_WARN)" \
3330	libdir=$(libdir) \
3331	LANGUAGES="$(LANGUAGES)" \
3332	MAKEOVERRIDES= \
3333	OUTPUT_OPTION="-o \$$@"
3334
3335# Only build the C compiler for stage1, because that is the only one that
3336# we can guarantee will build with the native compiler, and also it is the
3337# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
3338# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
3339# overrideable (for a bootstrap build stage1 also builds gcc.info).
3340stage1_build:
3341	$(MAKE) AR_FOR_TARGET="$(AR_FOR_TARGET)" \
3342	        RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)" \
3343		CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)" \
3344		CFLAGS="$(STAGE1_CFLAGS)" MAKEINFO="$(MAKEINFO)" \
3345		MAKEINFOFLAGS="$(MAKEINFOFLAGS)" COVERAGE_FLAGS=
3346	$(STAMP) stage1_build
3347	echo stage1_build > stage_last
3348
3349stage1_copy: stage1_build
3350	$(MAKE) stage1
3351	$(STAMP) stage1_copy
3352	echo stage2_build > stage_last
3353
3354stage2_build: stage1_copy
3355	$(MAKE) CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \
3356		 STAGE_PREFIX=stage1/ \
3357		 $(STAGE2_FLAGS_TO_PASS)
3358	$(STAMP) stage2_build
3359	echo stage2_build > stage_last
3360
3361stage2_copy: stage2_build
3362	$(MAKE) stage2
3363	$(STAMP) stage2_copy
3364	echo stage3_build > stage_last
3365
3366stage3_build: stage2_copy
3367	$(MAKE) CC="$(STAGE_CC_WRAPPER) stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" \
3368		 STAGE_PREFIX=stage2/ \
3369		 $(STAGE2_FLAGS_TO_PASS)
3370	$(STAMP) stage3_build
3371	echo stage3_build > stage_last
3372
3373# For bootstrap4:
3374stage3_copy: stage3_build
3375	$(MAKE) stage3
3376	$(STAMP) stage3_copy
3377	echo stage4_build > stage_last
3378
3379stage4_build: stage3_copy
3380	$(MAKE) CC="$(STAGE_CC_WRAPPER) stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" \
3381		 STAGE_PREFIX=stage3/ \
3382		 $(STAGE2_FLAGS_TO_PASS)
3383	$(STAMP) stage4_build
3384	echo stage4_build > stage_last
3385
3386# Additional steps for *-lean targets:
3387clean_s1: stage1_copy
3388	-(cd stage1 && rm -f $(VOL_FILES))
3389	$(STAMP) clean_s1
3390
3391clean_s2: stage2_copy
3392	-rm -rf stage1
3393	$(STAMP) clean_s2
3394
3395# The various entry points for bootstrapping.
3396
3397bootstrap: stage3_build
3398	@echo
3399	@echo Bootstrap complete - make \"quickstrap\" to redo last build,
3400	@echo \"restage1\" through \"restage3\" to rebuild specific stages,
3401	@echo \"restrap\" to redo the bootstrap from stage1, or
3402	@echo \"cleanstrap\" to redo the bootstrap from scratch.
3403
3404bootstrap-lean : clean_s1 clean_s2 stage3_build
3405	@echo
3406	@echo Bootstrap complete - make \"quickstrap\" to redo last build,
3407	@echo or \"cleanstrap\" to redo the bootstrap from scratch.
3408
3409bootstrap2: bootstrap
3410
3411bootstrap2-lean : bootstrap-lean
3412
3413bootstrap3 bootstrap3-lean: bootstrap
3414
3415bootstrap4 bootstrap4-lean: stage4_build
3416
3417unstage1 unstage2 unstage3 unstage4:
3418	-set -vx; stage=`echo $@ | sed -e 's/un//'`; \
3419	rm -f $$stage/as$(exeext); \
3420	rm -f $$stage/ld$(exeext); \
3421	rm -f $$stage/collect-ld$(exeext); \
3422	if test -d $$stage; then \
3423	  mv $$stage/* . 2>/dev/null; \
3424	  for i in `cd $$stage; echo *` ; do \
3425	    if test -d $$stage/$$i; then \
3426	      mv $$stage/$$i/* $$i/. 2>/dev/null; \
3427	    else \
3428	      mv $$stage/$$i .; \
3429	    fi; \
3430	  done \
3431	fi ; \
3432	rm -f $${stage}_build $${stage}_copy ;\
3433	echo $${stage}_build > stage_last
3434
3435restage1: unstage1
3436	$(MAKE) stage1_build
3437
3438restage2: unstage2
3439	$(MAKE) LANGUAGES="$(LANGUAGES)" stage2_build
3440
3441restage3: unstage3
3442	$(MAKE) LANGUAGES="$(LANGUAGES)" stage3_build
3443
3444restage4: unstage4
3445	$(MAKE) LANGUAGES="$(LANGUAGES)" stage4_build
3446
3447bubblestrap:
3448	if test -f stage3_build; then true; else \
3449	  echo; echo You must \"make bootstrap\" first.; \
3450	  exit 1; \
3451	fi
3452	for i in stage3 \
3453		unstage1 stage1_build stage1_copy \
3454		unstage2 stage2_build stage2_copy \
3455		unstage3 stage3_build ; \
3456	do \
3457	  $(MAKE) LANGUAGES="$(LANGUAGES)" $$i || exit 1 ; \
3458	done
3459
3460quickstrap:
3461	if test -f stage_last ; then \
3462	  LAST=`cat stage_last`; rm $$LAST; $(MAKE) LANGUAGES="$(LANGUAGES)" $$LAST; \
3463	else \
3464	  $(MAKE) stage1_build; \
3465	fi
3466
3467cleanstrap:
3468	-$(MAKE) clean
3469	$(MAKE) LANGUAGES="$(LANGUAGES)" bootstrap
3470
3471unstrap:
3472	-rm -rf stage[234]*
3473	$(MAKE) unstage1
3474
3475# Differs from cleanstrap in that it starts from the earlier stage1 build,
3476# not from scratch.
3477restrap:
3478	$(MAKE) unstrap
3479	$(MAKE) LANGUAGES="$(LANGUAGES)" bootstrap
3480
3481# Compare the object files in the current directory with those in the
3482# stage2 directory.
3483
3484# ./ avoids bug in some versions of tail.
3485compare compare3 compare4 compare-lean compare3-lean compare4-lean: force
3486	-rm -f .bad_compare
3487	case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
3488	for file in *$(objext); do \
3489	  tail +16c ./$$file > tmp-foo1; \
3490	  tail +16c stage$$stage/$$file > tmp-foo2 \
3491	    && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
3492	done
3493	case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
3494	for dir in tmp-foo intl $(SUBDIRS); do \
3495	  if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
3496	    for file in $$dir/*$(objext); do \
3497	      tail +16c ./$$file > tmp-foo1; \
3498	      tail +16c stage$$stage/$$file > tmp-foo2 \
3499	        && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
3500	    done; \
3501	  else true; fi; \
3502	done
3503	-rm -f tmp-foo*
3504	case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
3505	if [ -f .bad_compare ]; then \
3506	  echo "Bootstrap comparison failure!"; \
3507	  cat .bad_compare; \
3508	  exit 1; \
3509	else \
3510	  case "$@" in \
3511	    *-lean ) rm -rf stage$$stage ;; \
3512	    *) ;; \
3513	  esac; true; \
3514	fi
3515
3516# Compare the object files in the current directory with those in the
3517# stage2 directory.  Use gnu cmp (diffutils v2.4 or later) to avoid
3518# running tail and the overhead of twice copying each object file.
3519# An exit status of 1 is precisely the result we're looking for (other
3520# values mean other problems).
3521gnucompare gnucompare3 gnucompare4 gnucompare-lean gnucompare3-lean gnucompare4-lean: force
3522	-rm -f .bad_compare
3523	case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
3524	for file in *$(objext); do \
3525	  cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1; \
3526	  test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
3527	done
3528	case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
3529	for dir in tmp-foo intl $(SUBDIRS); do \
3530	  if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
3531	    for file in $$dir/*$(objext); do \
3532	      cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1; \
3533	      test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
3534	    done; \
3535	  else true; fi; \
3536	done
3537	case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
3538	if [ -f .bad_compare ]; then \
3539	  echo "Bootstrap comparison failure!"; \
3540	  cat .bad_compare; \
3541	  exit 1; \
3542	else \
3543	  case "$@" in \
3544	    *-lean ) rm -rf stage$$stage ;; \
3545	  esac; true; \
3546	fi
3547
3548# Copy the object files from a particular stage into a subdirectory.
3549stage1-start:
3550	-if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
3551	$(MAKE) -f libgcc.mk libgcc-stage-start stage=stage1
3552	-for dir in intl $(SUBDIRS) ; \
3553	 do \
3554	   if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
3555	 done
3556	-mv $(STAGESTUFF) stage1
3557	-mv intl/*$(objext) stage1/intl
3558# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
3559# dir will work properly.
3560	-if [ -f as$(exeext) ] ; then (cd stage1 && $(LN_S) ../as$(exeext) .) ; else true ; fi
3561	-if [ -f ld$(exeext) ] ; then (cd stage1 && $(LN_S) ../ld$(exeext) .) ; else true ; fi
3562	-if [ -f collect-ld$(exeext) ] ; then (cd stage1 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
3563	-rm -f stage1/libgcc.a stage1/libgcc_eh.a stage1/libgcc_s*$(SHLIB_EXT)
3564	-cp libgcc.a stage1
3565	-if $(RANLIB_TEST_FOR_TARGET) ; then \
3566	  $(RANLIB_FOR_TARGET) stage1/libgcc.a; \
3567	else true; fi
3568	-if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage1; \
3569	  if $(RANLIB_TEST_FOR_TARGET) ; then \
3570	   $(RANLIB_FOR_TARGET) stage1/libgcc_eh.a; \
3571	  else true; fi; fi
3572	-cp libgcc_s*$(SHLIB_EXT) stage1/
3573	-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
3574	  cp stage1/$${f} . ; \
3575	else true; \
3576	fi; done
3577stage1: force stage1-start lang.stage1
3578
3579stage2-start:
3580	-if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
3581	$(MAKE) -f libgcc.mk libgcc-stage-start stage=stage2
3582	-for dir in intl $(SUBDIRS) ; \
3583	 do \
3584	   if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
3585	 done
3586	-mv $(STAGESTUFF) stage2
3587	-mv intl/*$(objext) stage2/intl
3588# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
3589# dir will work properly.
3590	-if [ -f as$(exeext) ] ; then (cd stage2 && $(LN_S) ../as$(exeext) .) ; else true ; fi
3591	-if [ -f ld$(exeext) ] ; then (cd stage2 && $(LN_S) ../ld$(exeext) .) ; else true ; fi
3592	-if [ -f collect-ld$(exeext) ] ; then (cd stage2 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
3593	-rm -f stage2/libgcc.a stage2/libgcc_eh.a stage2/libgcc_s*$(SHLIB_EXT)
3594	-cp libgcc.a stage2
3595	-if $(RANLIB_TEST_FOR_TARGET) ; then \
3596	  $(RANLIB_FOR_TARGET) stage2/libgcc.a; \
3597	else true; fi
3598	-if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage2; \
3599	  if $(RANLIB_TEST_FOR_TARGET) ; then \
3600	   $(RANLIB_FOR_TARGET) stage2/libgcc_eh.a; \
3601	  else true; fi; fi
3602	-cp libgcc_s*$(SHLIB_EXT) stage2/
3603	-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
3604	  cp stage2/$${f} . ; \
3605	else true; \
3606	fi; done
3607stage2: force stage2-start lang.stage2
3608
3609stage3-start:
3610	-if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
3611	$(MAKE) -f libgcc.mk libgcc-stage-start stage=stage3
3612	-for dir in intl $(SUBDIRS) ; \
3613	 do \
3614	   if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
3615	 done
3616	-mv $(STAGESTUFF) stage3
3617	-mv intl/*$(objext) stage3/intl
3618# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
3619# dir will work properly.
3620	-if [ -f as$(exeext) ] ; then (cd stage3 && $(LN_S) ../as$(exeext) .) ; else true ; fi
3621	-if [ -f ld$(exeext) ] ; then (cd stage3 && $(LN_S) ../ld$(exeext) .) ; else true ; fi
3622	-if [ -f collect-ld$(exeext) ] ; then (cd stage3 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
3623	-rm -f stage3/libgcc.a stage3/libgcc_eh.a stage3/libgcc_s*$(SHLIB_EXT)
3624	-cp libgcc.a stage3
3625	-if $(RANLIB_TEST_FOR_TARGET) ; then \
3626	  $(RANLIB_FOR_TARGET) stage3/libgcc.a; \
3627	else true; fi
3628	-if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage3; \
3629	  if $(RANLIB_TEST_FOR_TARGET) ; then \
3630	   $(RANLIB_FOR_TARGET) stage3/libgcc_eh.a; \
3631	  else true; fi; fi
3632	-cp libgcc_s*$(SHLIB_EXT) stage3/
3633	-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
3634	  cp stage3/$${f} . ; \
3635	else true; \
3636	fi; done
3637stage3: force stage3-start lang.stage3
3638
3639stage4-start:
3640	-if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
3641	$(MAKE) -f libgcc.mk libgcc-stage-start stage=stage4
3642	-for dir in intl $(SUBDIRS) ; \
3643	 do \
3644	   if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
3645	 done
3646	-mv $(STAGESTUFF) stage4
3647	-mv intl/*$(objext) stage4/intl
3648# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
3649# dir will work properly.
3650	-if [ -f as$(exeext) ] ; then (cd stage4 && $(LN_S) ../as$(exeext) .) ; else true ; fi
3651	-if [ -f ld$(exeext) ] ; then (cd stage4 && $(LN_S) ../ld$(exeext) .) ; else true ; fi
3652	-if [ -f collect-ld$(exeext) ] ; then (cd stage4 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
3653	-rm -f stage4/libgcc.a stage4/libgcc_eh.a stage4/libgcc_s*$(SHLIB_EXT)
3654	-cp libgcc.a stage4
3655	-if $(RANLIB_TEST_FOR_TARGET) ; then \
3656	  $(RANLIB_FOR_TARGET) stage4/libgcc.a; \
3657	else true; fi
3658	-if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage4; \
3659	  if $(RANLIB_TEST_FOR_TARGET) ; then \
3660	   $(RANLIB_FOR_TARGET) stage4/libgcc_eh.a; \
3661	  else true; fi; fi
3662	-cp libgcc_s*$(SHLIB_EXT) stage4/
3663	-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
3664	  cp stage4/$${f} . ; \
3665	else true; \
3666	fi; done
3667stage4: force stage4-start lang.stage4
3668
3669# Copy just the executable files from a particular stage into a subdirectory,
3670# and delete the object files.  Use this if you're just verifying a version
3671# that is pretty sure to work, and you are short of disk space.
3672risky-stage1: stage1
3673	-$(MAKE) clean
3674
3675risky-stage2: stage2
3676	-$(MAKE) clean
3677
3678risky-stage3: stage3
3679	-$(MAKE) clean
3680
3681risky-stage4: stage4
3682	-$(MAKE) clean
3683
3684#In GNU Make, ignore whether `stage*' exists.
3685.PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap
3686.PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
3687
3688force:
3689
3690# Rules for generating translated message descriptions.
3691# Disabled by autoconf if the tools are not available.
3692
3693XGETTEXT = @XGETTEXT@
3694GMSGFMT = @GMSGFMT@
3695MSGMERGE = msgmerge
3696
3697PACKAGE = @PACKAGE@
3698CATALOGS = @CATALOGS@
3699
3700.PHONY: build- install- build-po install-po update-po
3701
3702# Dummy rules to deal with dependencies produced by use of
3703# "build-@POSUB@" and "install-@POSUB@" above, when NLS is disabled.
3704build-: ; @true
3705install-: ; @true
3706
3707build-po: $(CATALOGS)
3708
3709# This notation should be acceptable to all Make implementations used
3710# by people who are interested in updating .po files.
3711update-po: $(CATALOGS:.gmo=.pox)
3712
3713# N.B. We do not attempt to copy these into $(srcdir).  The snapshot
3714# script does that.
3715.po.gmo:
3716	-test -d po || mkdir po
3717	$(GMSGFMT) --statistics -o $@ $<
3718
3719# The new .po has to be gone over by hand, so we deposit it into
3720# build/po with a different extension.
3721# If build/po/$(PACKAGE).pot exists, use it (it was just created),
3722# else use the one in srcdir.
3723.po.pox:
3724	-test -d po || mkdir po
3725	$(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
3726			then echo po/$(PACKAGE).pot; \
3727			else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
3728
3729# This rule has to look for .gmo modules in both srcdir and
3730# the cwd, and has to check that we actually have a catalog
3731# for each language, in case they weren't built or included
3732# with the distribution.
3733install-po:
3734	$(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(datadir)
3735	for cat in $(CATALOGS); do \
3736	  lang=`basename $$cat | sed 's/\.gmo$$//'`; \
3737	  if [ -f $$cat ]; then :; \
3738	  elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
3739	  else continue; \
3740	  fi; \
3741	  dir=$(localedir)/$$lang/LC_MESSAGES; \
3742	  echo $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$$dir; \
3743	  $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$$dir || exit 1; \
3744	  echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
3745	  $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
3746	done
3747
3748# Rule for regenerating the message template (gcc.pot).
3749# Instead of forcing everyone to edit POTFILES.in, which proved impractical,
3750# this rule has no dependencies and always regenerates gcc.pot.  This is
3751# relatively harmless since the .po files do not directly depend on it.
3752# Note that exgettext has an awk script embedded in it which requires a
3753# fairly modern (POSIX-compliant) awk.
3754# The .pot file is left in the build directory.
3755$(PACKAGE).pot: po/$(PACKAGE).pot
3756po/$(PACKAGE).pot: force
3757	-test -d po || mkdir po
3758	$(MAKE) po-generated
3759	AWK=$(AWK) $(SHELL) $(srcdir)/po/exgettext \
3760		$(XGETTEXT) $(PACKAGE) $(srcdir)
3761