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