]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/Makefile.in
(output_type): Do early exit only if TYPE_CONTEXT is NULL
[thirdparty/gcc.git] / gcc / Makefile.in
CommitLineData
32e6d418 1# Makefile for GNU C compiler.
dd20fff6 2# Copyright (C) 1987, 88, 90-96, 1997 Free Software Foundation, Inc.
32e6d418 3
4#This file is part of GNU CC.
5
6#GNU CC is free software; you can redistribute it and/or modify
7#it under the terms of the GNU General Public License as published by
8#the Free Software Foundation; either version 2, or (at your option)
9#any later version.
10
11#GNU CC is distributed in the hope that it will be useful,
12#but WITHOUT ANY WARRANTY; without even the implied warranty of
13#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14#GNU General Public License for more details.
15
16#You should have received a copy of the GNU General Public License
17#along with GNU CC; see the file COPYING. If not, write to
8d62a21c 18#the Free Software Foundation, 59 Temple Place - Suite 330,
19#Boston MA 02111-1307, USA.
32e6d418 20
21# The targets for external use include:
22# all, doc, proto, install, install-cross, install-cross-rest,
a8514488 23# uninstall, TAGS, mostlyclean, clean, distclean, maintainer-clean,
32e6d418 24# stage1, stage2, stage3, stage4.
25
c6396a0b 26# Suppress smart makes who think they know how to automake Yacc files
27.y.c:
28
32e6d418 29# Variables that exist for you to override.
30# See below for how to change them for certain systems.
31
73027c94 32# List of language subdirectories.
33# This is overridden by configure.
34SUBDIRS =
35
32e6d418 36# Selection of languages to be made.
73027c94 37# This is overridden by configure.
38LANGUAGES = c objective-c proto
32e6d418 39
e754efc9 40# Selection of languages to be made during stage1 build.
41# This is overridden by configure.
42BOOT_LANGUAGES = c
43
32e6d418 44ALLOCA =
1ab99fde 45ALLOCA_FLAGS =
94c53b91 46ALLOCA_FINISH = true
32e6d418 47
48# Various ways of specifying flags for compilations:
49# CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
50# BOOT_CFLAGS is the value of CFLAGS to pass
51# to the stage2 and stage3 compilations
52# XCFLAGS is used for most compilations but not when using the GCC just built.
329da2a1 53# TCFLAGS is used for compilations with the GCC just built.
32e6d418 54XCFLAGS =
329da2a1 55TCFLAGS =
32e6d418 56CFLAGS = -g
57BOOT_CFLAGS = -O $(CFLAGS)
58# These exists to be overridden by the x-* and t-* files, respectively.
59X_CFLAGS =
60T_CFLAGS =
61
62X_CPPFLAGS =
63T_CPPFLAGS =
64
65CC = cc
66BISON = bison
3f1608f3 67BISONFLAGS =
73027c94 68LEX = flex
69LEXFLAGS =
32e6d418 70AR = ar
71OLDAR_FLAGS = qc
72AR_FLAGS = rc
73SHELL = /bin/sh
74# on sysV, define this as cp.
75INSTALL = install -c
76# These permit overriding just for certain files.
77INSTALL_PROGRAM = $(INSTALL)
78INSTALL_DATA = $(INSTALL)
bc51108a 79MAKEINFO = makeinfo
64cda823 80MAKEINFOFLAGS =
f345940f 81TEXI2DVI = texi2dvi
73027c94 82# For GNUmake: let us decide what gets passed to recursive makes.
83MAKEOVERRIDES =
32e6d418 84
85# Define this as & to perform parallel make on a Sequent.
86# Note that this has some bugs, and it seems currently necessary
87# to compile all the gen* files first by hand to avoid erroneous results.
88P =
89
90# How to invoke ranlib.
91RANLIB = ranlib
92# Test to use to see whether ranlib exists on the system.
93RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
94
95# Compiler to use for compiling libgcc1.a.
96# OLDCC should not be the GNU C compiler,
97# since that would compile typical libgcc1.a functions such as mulsi3
98# into infinite recursions.
99OLDCC = cc
100
101# CFLAGS for use with OLDCC, for compiling libgcc1.a.
102# NOTE: -O does not work on some Unix systems!
103CCLIBFLAGS = -O
104
c6396a0b 105# Version of ar to use when compiling libgcc1.a.
32e6d418 106OLDAR = ar
107
2cfd79fe 108# Target to use when installing include directory. Either
109# install-headers-tar or install-headers-cpio.
110INSTALL_HEADERS_DIR = install-headers-tar
111
c8763215 112# Header files that are made available under the same name
113# to programs compiled with GCC.
114USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
115 $(srcdir)/ginclude/varargs.h $(srcdir)/ginclude/va-alpha.h \
116 $(srcdir)/ginclude/va-h8300.h $(srcdir)/ginclude/va-i860.h \
117 $(srcdir)/ginclude/va-i960.h $(srcdir)/ginclude/va-mips.h \
118 $(srcdir)/ginclude/va-m88k.h $(srcdir)/ginclude/va-pa.h \
119 $(srcdir)/ginclude/va-pyr.h $(srcdir)/ginclude/va-sparc.h \
120 $(srcdir)/ginclude/va-clipper.h $(srcdir)/ginclude/va-spur.h \
121 $(srcdir)/ginclude/iso646.h $(srcdir)/ginclude/va-ppc.h \
6143c0f8 122 $(srcdir)/ginclude/proto.h $(srcdir)/ginclude/va-sh.h $(EXTRA_HEADERS) \
123 $(LANG_EXTRA_HEADERS)
c8763215 124
125# Target to use whe installing assert.h. Some systems may
126# want to set this empty.
127INSTALL_ASSERT_H = install-assert-h
128
3b9b6fde 129# The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
b3781cc4 130# Usually the one we just built.
32e6d418 131# Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
79613d1b 132GCC_FOR_TARGET = ./xgcc -B./
32e6d418 133
134# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
135# It omits XCFLAGS, and specifies -B./.
66820558 136# It also specifies -I./include to find, e.g., stddef.h.
329da2a1 137GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -I./include $(TCFLAGS)
32e6d418 138
139# Special flags for compiling enquire.
140# We disable optimization to make floating point more reliable.
c7341319 141ENQUIRE_CFLAGS = -DNO_MEM -DNO_LONG_DOUBLE_IO -O0
32e6d418 142ENQUIRE_LDFLAGS = $(LDFLAGS)
143
b541ad9d 144# Sed command to transform gcc to installed name. Overwritten by configure.
2ec1d248 145program_transform_name = -e s,x,x,
67cb4bc1 146program_transform_cross_name = -e s,^,$(target_alias)-,
b541ad9d 147
32e6d418 148# Tools to use when building a cross-compiler.
149# These are used because `configure' appends `cross-make'
150# to the makefile when making a cross-compiler.
151
152TARGET_TOOLPREFIX = $(tooldir)/bin/
153AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
154AR_FOR_TARGET_FLAGS = rc
155RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
156RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
32e6d418 157
3f69fed5 158# Dir to search for system headers. Overridden by cross-make.
159SYSTEM_HEADER_DIR = /usr/include
160
61fad423 161# Control whether to run fixproto.
162STMP_FIXPROTO = stmp-fixproto
a5889b74 163
0848b369 164# Test to see whether <limits.h> exists in the system header files.
165LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
166
8bd8ea06 167# There may be a premade insn-attrtab.c for this machine.
168# (You could rebuild it with genattrtab as usual, but it takes a long time.)
169# PREMADE_ATTRTAB is the file name of the file to use.
170# PREMADE_ATTRTAB_MD is the md file it corresponds to.
171PREMADE_ATTRTAB_MD = Makefile # Guaranteed not to cmp equal to md.
172PREMADE_ATTRTAB =
173
32e6d418 174target= ... `configure' substitutes actual target name here.
67cb4bc1 175target_alias= ... `configure' substitutes specified target name here.
32e6d418 176xmake_file= ... `configure' substitutes actual x- file name here.
177tmake_file= ... `configure' substitutes actual t- file name here.
229a7db0 178out_file= ... `configure' substitutes actual out file name here.
179out_object_file= ... `configure' substitutes actual out object file name here.
c20b28d5 180md_file= ... `configure' substitutes actual md file name here.
181tm_file= ... `configure' substitutes actual tm file name here.
182build_xm_file= ... `configure' substitutes actual build xm- file name here.
183host_xm_file= ... `configure' substitutes actual host xm- file name here.
636fef92 184lang_specs_files= ... `configure' substitutes actual lang spec file names here.
185lang_options_files= ... `configure' puts actual lang options file names here.
8b095439 186OBJC_THREAD_FILE= ... `configure' puts actual objc thread file name here.
18196d1e 187version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
2b19125c 188mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
32e6d418 189
190# Directory where sources are, from where we are.
191srcdir = .
192# Common prefix for installation directories.
193# NOTE: This directory must exist when you start installation.
194prefix = /usr/local
2ffdcadf 195# Directory in which to put localized header files. On the systems with
196# gcc as the native cc, `local_prefix' may not be `prefix' which is
197# `/usr'.
a2aa0fc1 198# NOTE: local_prefix *should not* default from prefix.
199local_prefix = /usr/local
c6396a0b 200# Directory in which to put host dependent programs and libraries
201exec_prefix = $(prefix)
32e6d418 202# Directory in which to put the executable for the command `gcc'
c6396a0b 203bindir = $(exec_prefix)/bin
32e6d418 204# Directory in which to put the directories used by the compiler.
c6396a0b 205libdir = $(exec_prefix)/lib
32e6d418 206# Directory in which the compiler finds executables, libraries, etc.
67cb4bc1 207libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
3bf5d4dc 208# Directory in which the compiler finds g++ includes.
ac2f5cba 209gxx_include_dir= $(prefix)/include/g++
210# Directory in which the old g++ header files may be found.
211old_gxx_include_dir= $(libdir)/g++-include
35df828f 212# Directory to search for site-specific includes.
9671ce48 213includedir = $(local_prefix)/include
db9a0b19 214# assertdir is overridden in cross-make.
9d8314a9 215# (But this currently agrees with what is in cross-make.)
216assertdir = $(tooldir)/include
a2aa0fc1 217# where the info files go
218infodir = $(prefix)/info
32e6d418 219# Extension (if any) to put in installed man-page filename.
220manext = .1
f403cbcb 221objext = .o
62268150 222exeext =
f403cbcb 223
32e6d418 224# Directory in which to put man pages.
225mandir = $(prefix)/man/man1
226# Directory in which to find other cross-compilation tools and headers.
227# Used in install-cross.
67cb4bc1 228tooldir = $(exec_prefix)/$(target_alias)
f32abccb 229# Dir for temp files.
230tmpdir = /tmp
32e6d418 231
232# Additional system libraries to link with.
233CLIB=
234
235# Change this to a null string if obstacks are installed in the
236# system library.
237OBSTACK=obstack.o
238
2289acd7 239# Specify the rule for actually making libgcc.a,
240LIBGCC = libgcc.a
241# and the rule for installing it.
242INSTALL_LIBGCC = install-libgcc
243
32e6d418 244# Specify the rule for actually making libgcc1.a.
c6396a0b 245# The value may be empty; that means to do absolutely nothing
246# with or for libgcc1.a.
32e6d418 247LIBGCC1 = libgcc1.a
248
b0d230b7 249# Specify the rule for making libgcc1.a for a cross-compiler.
250# The default rule assumes that libgcc1.a is supplied by the user.
251CROSS_LIBGCC1 = libgcc1.cross
252
32e6d418 253# Specify the rule for actually making libgcc2.a.
254LIBGCC2 = libgcc2.a
255
256# Options to use when compiling libgcc2.a.
257# -g1 causes output of debug info only for file-scope entities.
258# we use this here because that should be enough, and also
259# so that -g1 will be tested.
329da2a1 260LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
690a93ea 261
262# Additional options to use when compiling libgcc2.a.
263# Some targets override this to -Iinclude
264LIBGCC2_INCLUDES =
265
b5dba0c7 266# Additional target-dependent options for compiling libgcc2.a.
267TARGET_LIBGCC2_CFLAGS =
268
690a93ea 269# Things which must be built before building libgcc2.a.
270# Some targets override this to stmp-int-hdrs
271LIBGCC2_DEPS =
32e6d418 272
17886975 273# Enquire target (This is a variable so that a target can choose not to
274# build it.)
275ENQUIRE = enquire
276
3b9b6fde 277# libgcc1-test target (must also be overridable for a target)
278LIBGCC1_TEST = libgcc1-test
17886975 279
32e6d418 280# List of extra executables that should be compiled for this target machine
281# that are used for compiling from source code to object code.
282# The rules for compiling them should be in the t-* file for the machine.
283EXTRA_PASSES =
284
c6396a0b 285# Like EXTRA_PASSES, but these are used when linking.
286EXTRA_PROGRAMS =
287
288# List of extra object files that should be compiled for this target machine.
32e6d418 289# The rules for compiling them should be in the t-* file for the machine.
290EXTRA_PARTS =
291
c6396a0b 292# List of extra object files that should be compiled and linked with
293# compiler proper (cc1, cc1obj, cc1plus).
294EXTRA_OBJS =
295
17108b2b 296# List of extra object files that should be compiled and linked with
297# the gcc driver.
298EXTRA_GCC_OBJS =
299
630c76ba 300# List of additional header files to install.
301# Often this is edited directly by `configure'.
302EXTRA_HEADERS =
303
79f818d0 304# Set this to `ld' to enable use of collect2.
305# USE_COLLECT2 =
306# It is convenient for configure to add the assignment at the beginning,
307# so don't override it here.
308
32e6d418 309# List of extra C and assembler files to add to libgcc1.a.
310# Assembler files should have names ending in `.asm'.
311LIB1FUNCS_EXTRA =
312
313# List of extra C and assembler files to add to libgcc2.a.
314# Assembler files should have names ending in `.asm'.
315LIB2FUNCS_EXTRA =
316
2cfd79fe 317# Default float.h source to use for cross-compiler.
ae115421 318# This is overidden by configure.
2cfd79fe 319CROSS_FLOAT_H=float.h-cross
320
32e6d418 321# Program to convert libraries.
322LIBCONVERT =
323
324# Control whether header files are installed.
32e6d418 325INSTALL_HEADERS=install-headers
326
ed2f1f67 327# Options for tar when copying trees. So HPUX can override it.
328TAROUTOPTS = xpBf
329
32e6d418 330# Select which version of fixincludes to use (I.E. regular versus SVR4)
6848a9c6 331# This value is overridden directly by configure.
32e6d418 332FIXINCLUDES=fixincludes
333
106a27e5 334# Additional directories of header files to run fixincludes on.
af731fc2 335# These should be directories searched automatically by default
336# just as /usr/include is.
337# *Do not* use this for directories that happen to contain
338# header files, but are not searched automatically by default.
106a27e5 339# On most systems, this is empty.
340OTHER_FIXINCLUDES_DIRS=
341
77a164d8 342# List of things which should already be built whenever we try to use xgcc
32e6d418 343# to compile anything (without linking).
2feda28e 344GCC_PASSES=xgcc$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES)
32e6d418 345
77a164d8 346# List of things which should already be built whenever we try to use xgcc
32e6d418 347# to link anything.
2289acd7 348GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
32e6d418 349
32e6d418 350# Directory to link to, when using the target `maketest'.
351DIR = ../gcc
352
89e36a04 353# Guaranteed to not exist when not passing md through cpp.
2c352995 354# This value is overridden directly by configure.
89e36a04 355MD_FILE = md-cpp-not-used
356
32e6d418 357# Flags to use when cross-building GCC.
358# Prefix to apply to names of object files when using them
359# to run on the machine we are compiling on.
360HOST_PREFIX=
361# Prefix to apply to names of object files when compiling them
362# to run on the machine we are compiling on.
363# The default for this variable is chosen to keep these rules
364# out of the way of the other rules for compiling the same source files.
365HOST_PREFIX_1=loser-
366HOST_CC=$(CC)
367HOST_CFLAGS=$(ALL_CFLAGS)
c6396a0b 368HOST_CLIB=$(CLIB)
32e6d418 369HOST_LDFLAGS=$(LDFLAGS)
370HOST_CPPFLAGS=$(ALL_CPPFLAGS)
c6396a0b 371HOST_ALLOCA=$(ALLOCA)
372HOST_MALLOC=$(MALLOC)
373HOST_OBSTACK=$(OBSTACK)
32e6d418 374
b541ad9d 375# Actual name to use when installing a native compiler.
376GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed $$t`
377
378# Actual name to use when installing a cross-compiler.
379GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed $$t`
380
32e6d418 381# Choose the real default target.
382ALL=all.internal
383
384# Choose the real install target.
2cfd79fe 385INSTALL_TARGET=install-normal
386
387# Source for float.h. Overridden by cross-make.
388FLOAT_H=float.h-nat
32e6d418 389
b33b80ed 390# Extra symbols for fixproto to define when parsing headers.
391FIXPROTO_DEFINES =
392
b7c87ff2 393# Extra flags to use when compiling crt{begin,end}.o.
394CRTSTUFF_T_CFLAGS =
395
4d3c962c 396# Extra flags to use when compiling [m]crt0.o.
397CRT0STUFF_T_CFLAGS =
398
32e6d418 399# End of variables for you to override.
400
401# Definition of `all' is here so that new rules inserted by sed
402# do not specify the default target.
403# The real definition is under `all.internal' (for native compilers)
404# or `all.cross' (for cross compilers).
c6396a0b 405all: all.indirect
32e6d418 406
131b361e 407# This tells GNU Make version 3 not to put all variables in the environment.
408.NOEXPORT:
409
32e6d418 410# sed inserts variable overrides after the following line.
a0a99f10 411####target overrides
412####host overrides
413####cross overrides
e77fd588 414####build overrides
32e6d418 415\f
416# Now figure out from those variables how to compile and link.
417
c6396a0b 418all.indirect: $(ALL)
419
335ebf8f 420# IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
421# ??? IN_GCC should be obsolete now.
34b1478f 422INTERNAL_CFLAGS = $(CROSS) -DIN_GCC
32e6d418 423
424# This is the variable actually used when we compile.
425ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)
426
427# Likewise.
428ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
429
430# Even if ALLOCA is set, don't use it if compiling with GCC.
cdd3cf30 431USE_ALLOCA= ` case "${CC}" in "${OLDCC}") echo "${ALLOCA}" ;; esac `
c6396a0b 432USE_HOST_ALLOCA= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
433USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
434USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
32e6d418 435
436# Dependency on obstack, alloca, malloc or whatever library facilities
437# are not installed in the system libraries.
438# We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
439LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
440
441# Likewise, for use in the tools that must run on this machine
442# even if we are cross-building GCC.
443# We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
c6396a0b 444HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC)
32e6d418 445
446# How to link with both our special library facilities
447# and the system's installed libraries.
448LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(CLIB)
449
450# Likewise, for use in the tools that must run on this machine
451# even if we are cross-building GCC.
c6396a0b 452HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC) \
453 $(HOST_CLIB)
32e6d418 454
455HOST_RTL = $(HOST_PREFIX)rtl.o
456HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
262d46de 457HOST_PRINT = $(HOST_PREFIX)print-rtl.o
32e6d418 458
459# Specify the directories to be searched for header files.
460# Both . and srcdir are used, in that order,
461# so that tm.h and config.h will be found in the compilation
462# subdirectory rather than in the source directory.
463INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
32e6d418 464
465# Always use -I$(srcdir)/config when compiling.
466.c.o:
467 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
468
469# This tells GNU make version 3 not to export all the variables
470# defined in this file into the environment.
471.NOEXPORT:
472\f
73027c94 473# Support for additional languages (other than c and objc).
474# ??? objc can be supported this way too (leave for later).
475
476# These next lines are overridden by configure.
477LANG_MAKEFILES =
478LANG_STAGESTUFF =
479LANG_DIFF_EXCLUDES =
6143c0f8 480LANG_LIB2FUNCS =
481LANG_EXTRA_HEADERS =
73027c94 482
483# Flags to pass to recursive makes.
484# CC is set by configure. Hosts without symlinks need special handling
485# because we need CC="stage1/xgcc -Bstage1/" to work in the language
486# subdirectories.
487# ??? The choices here will need some experimenting with.
488FLAGS_TO_PASS = \
489 "AR_FLAGS=$(AR_FLAGS)" \
490 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
491 "BISON=$(BISON)" \
492 "BISONFLAGS=$(BISONFLAGS)" \
493 "CC=set-by-configure" \
494 "CFLAGS=$(CFLAGS)" \
2feda28e 495 "CLIB=$(CLIB)" \
c1a2e040 496 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
73027c94 497 "LDFLAGS=$(LDFLAGS)" \
498 "LEX=$(LEX)" \
499 "LEXFLAGS=$(LEXFLAGS)" \
500 "MAKEINFO=$(MAKEINFO)" \
501 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
73027c94 502 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
503 "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
504 "SHELL=$(SHELL)" \
dd20fff6 505 "STAGE_PREFIX=set-by-configure" \
62268150 506 "exeext=$(exeext)" \
507 "objext=$(objext)" \
73027c94 508 "exec_prefix=$(exec_prefix)" \
509 "prefix=$(prefix)" \
510 "tooldir=$(tooldir)" \
511 "bindir=$(bindir)" \
512 "libsubdir=$(libsubdir)"
513\f
32e6d418 514# Lists of files for various purposes.
515
516# A list of all the language-specific executables.
73027c94 517# This is overridden by configure.
f403cbcb 518COMPILERS = cc1$(exeext) cc1obj$(exeext)
32e6d418 519
520# Language-specific object files for C.
1294913b 521C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
522 c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
32e6d418 523
8dff2b2b 524# Language-specific object files for Objective C.
1294913b 525OBJC_OBJS = objc-parse.o objc-act.o c-lex.o c-pragma.o \
526 c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
32e6d418 527
649d8da6 528# Files specific to the C interpreter bytecode compiler(s).
529BC_OBJS = bc-emit.o bc-optab.o
530
84a49858 531# Bytecode header files constructed at build time; vmsconfig.com wants this.
532BC_ALL = bc-arity.h bc-opcode.h bc-opname.h
533
32e6d418 534# Language-independent object files.
535OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
037a5228 536 function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o \
537 varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
632478b5 538 dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o \
32e6d418 539 integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
8a4b1e01 540 regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
32e6d418 541 insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
bdb66cef 542 insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
229a7db0 543 insn-attrtab.o $(out_object_file) getpwd.o convert.o $(EXTRA_OBJS)
32e6d418 544
545# GEN files are listed separately, so they can be built before doing parallel
546# makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load
547# them before rtl.o is compiled.
548GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
549
3e4227af 550CCCP=cccp
551# Uncomment this line if you want to use cppmain (w/cpplib) as cpp.
552#CCCP=cppmain
553
32e6d418 554# Files to be copied away after each stage in building.
62268150 555STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
32e6d418 556 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
d95fa18c 557 insn-attr.h insn-attrtab.c insn-opinit.c \
3d97d965 558 stamp-flags stamp-config stamp-codes stamp-mlib \
32e6d418 559 stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
4d3c962c 560 stamp-attr stamp-attrtab stamp-opinit stamp-proto stamp-crt stamp-crtS stamp-crt0 \
fb750222 561 genemit$(exeext) genoutput$(exeext) genrecog$(exeext) genextract$(exeext) \
562 genflags$(exeext) gencodes$(exeext) genconfig$(exeext) genpeep$(exeext) \
563 genattrtab$(exeext) genattr$(exeext) genopinit$(exeext) \
84a49858 564 $(BC_ALL) \
8bb62f3d 565 stamp-bcarity stamp-bcopcode stamp-bcopname \
fb750222 566 bi-arity$(exeext) bi-opcode$(exeext) bi-opname$(exeext) \
62268150 567 $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
568 $(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \
569 protoize$(exeext) unprotoize$(exeext) \
c20b28d5 570 specs collect2$(exeext) $(USE_COLLECT2) underscore.c \
389cd241 571 *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \
572 *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack \
573 *.[si] \
73027c94 574 $(LANG_STAGESTUFF)
32e6d418 575
576# Members of libgcc1.a.
577LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
799330a9 578 _lshrsi3 _ashrsi3 _ashlsi3 \
32e6d418 579 _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
580 _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
581 _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
582 _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
583 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
584
585# Library members defined in libgcc2.c.
586LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
799330a9 587 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
4b8f50a8 588 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
32e6d418 589 _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
619c3e71 590 _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
d055d75f 591 _fixtfdi _fixunstfdi _floatditf \
dc44ba4b 592 __gcc_bcmp _varargs __dummy _eprintf _op_new _op_vnew _new_handler \
593 _op_delete _op_vdel _bb _shtab _clear_cache _trampoline __main _exit \
594 _ctors _eh _pure
32e6d418 595
32e6d418 596# The files that "belong" in CONFIG_H are deliberately omitted
597# because having them there would not be useful in actual practice.
598# All they would do is cause complete recompilation every time
599# one of the machine description files is edited.
600# That may or may not be what one wants to do.
601# If it is, rm *.o is an easy way to do it.
c20b28d5 602# CONFIG_H = $(host_xm_file) $(tm_file)
32e6d418 603CONFIG_H =
604RTL_H = rtl.h rtl.def machmode.h machmode.def
605TREE_H = tree.h real.h tree.def machmode.h machmode.def
649d8da6 606BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
cdc96909 607
608# "t" or nothing, for building multilibbed versions of, say, crtbegin.o.
609T =
32e6d418 610\f
73027c94 611# Language makefile fragments.
612
613# The following targets define the interface between us and the languages.
614#
615# all.build, all.cross, start.encap, rest.encap,
616# info, dvi,
617# install-normal, install-common, install-info, install-man,
618# uninstall, distdir,
a8514488 619# mostlyclean, clean, distclean, extraclean, maintainer-clean,
73027c94 620# stage1, stage2, stage3, stage4
621#
622# Each language is linked in with a series of hooks (since we can't use `::'
623# targets). The name of each hooked is "lang.${target_name}" (eg: lang.info).
624# Configure computes and adds these here.
625
626####language hooks
627
628# sed inserts language fragments after the following line.
629####language fragments
630
631# End of language makefile fragments.
632\f
32e6d418 633# Avoid a lot of time thinking about remaking Makefile.in and *.def.
634.SUFFIXES: .in .def
635
79f818d0 636Makefile: $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/version.c \
c9512ea9 637 $(xmake_file) $(tmake_file) \
73027c94 638 $(LANG_MAKEFILES)
f403cbcb 639 cp config.status config.run
640 $(SHELL) config.run
5484bc67 641 rm -f config.run
32e6d418 642
643all.internal: start.encap rest.encap
644# This is what to compile if making a cross-compiler.
73027c94 645# Note that we can compile enquire using the cross-compiler just built,
87540b0a 646# although we can't run it on this machine.
73027c94 647all.cross: native gcc-cross specs stmp-headers $(LIBGCC) $(STMP_FIXPROTO) \
3b9b6fde 648 $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross
e77fd588 649# This is what to compile if making gcc with a cross-compiler.
73027c94 650all.build: native xgcc $(EXTRA_PARTS) lang.all.build
32e6d418 651# This is what must be made before installing GCC and converting libraries.
73027c94 652start.encap: native xgcc specs $(LIBGCC1) xlimits.h lang.start.encap
335ebf8f 653# These can't be made until after GCC can run.
73027c94 654rest.encap: stmp-headers $(LIBGCC) $(STMP_FIXPROTO) $(EXTRA_PARTS) lang.rest.encap
32e6d418 655# This is what is made with the host's compiler
656# whether making a cross compiler or not.
852e59cd 657native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
32e6d418 658
659# Define the names for selecting languages in LANGUAGES.
660C c: cc1
732b8330 661OBJC objc: cc1obj objc-runtime
662OBJECTIVE-C objective-c: cc1obj objc-runtime
32e6d418 663PROTO: proto
664
ee4720a9 665# Tell GNU make these are phony targets.
666.PHONY: C c OBJC objc OBJECTIVE-C objective-c PROTO proto
667
c6396a0b 668# Really, really stupid make features, such as SUN's KEEP_STATE, may force
669# a target to build even if it is up-to-date. So we must verify that
670# config.status does not exist before failing.
32e6d418 671config.status:
c6396a0b 672 @if [ ! -f config.status ] ; then \
673 echo You must configure gcc. Look at the INSTALL file for details.; \
674 false; \
675 else \
676 true; \
677 fi
32e6d418 678
840a6e8d 679# On the target machine, finish building a cross compiler.
680# This does the things that can't be done on the host machine.
2289acd7 681rest.cross: $(LIBGCC) gfloat.h specs
840a6e8d 682
3b9b6fde 683# Verify that it works to compile and link libgcc1-test.
d7330690 684# If it does, then there are sufficient replacements for libgcc1.a.
3b9b6fde 685libgcc1-test: libgcc1-test.o native $(GCC_PARTS)
55e40402 686 @echo "Testing libgcc1. Ignore linker warning messages."
3b9b6fde 687 $(GCC_FOR_TARGET) $(GCC_CFLAGS) libgcc1-test.o -o libgcc1-test \
b6f6ec68 688 -nostartfiles -nostdlib `$(GCC_FOR_TARGET) --print-libgcc-file-name`
3b9b6fde 689libgcc1-test.o: libgcc1-test.c native xgcc
690 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/libgcc1-test.c
d7330690 691
840a6e8d 692# Recompile all the language-independent object files.
693# This is used only if the user explicitly asks for it.
32e6d418 694compilations: ${OBJS}
695
03f51dea 696# Create a list of the language-independent object files so the language
697# subdirectories needn't mention their names explicitly.
6143c0f8 698stamp-objlist: $(OBJS) $(BC_OBJS)
247746d7 699 echo " $(OBJS) $(BC_OBJS)" | sed -e 's, \([a-z0-9]\), ../\1,g' -e 's/\.o/$(objext)/g' >stamp-objlist
03f51dea 700
77a164d8 701# We call this executable `xgcc' rather than `gcc'
702# to avoid confusion if the current directory is in the path
703# and CC is `gcc'. It is renamed to `gcc' when it is installed.
c90a87d1 704xgcc: gcc.o version.o choose-temp.o pexecute.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
705 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o version.o \
706 choose-temp.o pexecute.o $(EXTRA_GCC_OBJS) $(LIBS)
840a6e8d 707
708# Dump a specs file to make -B./ read these specs over installed ones.
17108b2b 709specs: xgcc
c92e16d4 710 $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
711 mv tmp-specs specs
32e6d418 712
77a164d8 713# We do want to create an executable named `xgcc', so we can use it to
32e6d418 714# compile libgcc2.a.
715# Also create gcc-cross, so that install-common will install properly.
77a164d8 716gcc-cross: xgcc
62268150 717 cp xgcc$(exeext) gcc-cross$(exeext)
32e6d418 718
675fc1b6 719cc1: $(P) $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
62268150 720 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
32e6d418 721
675fc1b6 722cc1obj: $(P) $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
62268150 723 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
32e6d418 724
2cfd79fe 725# Copy float.h from its source.
d82b9c93 726gfloat.h: $(FLOAT_H)
98d3f9df 727 -rm -f gfloat.h
d82b9c93 728 cp $(FLOAT_H) gfloat.h
2cfd79fe 729
730# Create float.h source for the native machine.
731float.h-nat: enquire
121c5e86 732 -./enquire -f > tmp-float.h
733 mv tmp-float.h float.h-nat
2cfd79fe 734
735# Create a dummy float.h source for a cross-compiler.
ae115421 736# ??? This isn't used anymore. Should we create config/float-unkn.h
737# and make that the default float_format in configure?
2cfd79fe 738float.h-cross:
329da2a1 739 echo "#ifndef __GCC_FLOAT_NOT_NEEDED" > t-float.h-cross
740 echo "#error float.h values not known for cross-compiler" >> t-float.h-cross
741 echo "#endif" >> t-float.h-cross
c92e16d4 742 mv t-float.h-cross float.h-cross
32e6d418 743
744# Used to compile enquire with standard cc, but have forgotten why.
745# Let's try with GCC.
746enquire: enquire.o $(GCC_PARTS)
62268150 747 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
25407fa4 748enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs
c6396a0b 749# Breaking this line caused a problem with one version of GNU make.
1a754c64 750 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c $(srcdir)/enquire.c
3f69fed5 751
752# Build the version of limits.h that we will install.
753xlimits.h: glimits.h limitx.h limity.h
0848b369 754 if $(LIMITS_H_TEST) ; then \
c92e16d4 755 cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \
3f69fed5 756 else \
c92e16d4 757 cat $(srcdir)/glimits.h > tmp-xlimits.h; \
3f69fed5 758 fi
c92e16d4 759 mv tmp-xlimits.h xlimits.h
32e6d418 760\f
761# Build libgcc.a.
762# This is done in two parts because some functions, in libgcc1.c,
77a164d8 763# must be compiled with something other than GCC,
764# while the rest, in libgcc2.c, must be compiled with xgcc.
765# That means we can't do libgcc2.c until after xgcc, cc1, etc.
32e6d418 766
767# Use this as value of LIBGCC1 to cause conversion to GNU library format.
768# LIBCONVERT should put its output in libgcc1.conv.
769libgcc1.conv: libgcc1.a
770 $(LIBCONVERT) libgcc1.a libgcc1.conv
771
772# Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
773# Make an empty file instead.
66e9b81a 774libgcc1.null: $(GCC_PASSES)
32e6d418 775 echo "__foo () {}" > dummy.c
776 $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
62268150 777 $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy$(objext)
778 rm -f dummy$(objext) dummy.c
32e6d418 779
fe918d35 780# This is $(LIBGCC1) for a cross-compiler.
781# We have no automatic way of building libgcc1.a,
782# so it's up to the installer to find a way to do that.
783# This rule deliberately does not depend on libgcc1.a
784# so that it will fail if the installer hasn't provided it.
785libgcc1.cross:
786 mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a; false)
787
32e6d418 788# Compile the library of arithmetic subroutines with the native compiler.
77a164d8 789# Don't compile it with GCC!
32e6d418 790# (That would cause most arithmetic functions to call themselves.)
5eef7030 791#
792# NOTE: If you modify these rules substantially, please be sure to
793# check at least config/i386/t-sco5 and possibly other makefile
794# fragments.
32e6d418 795libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
796 -rm -f tmplibgcc1.a
797# Actually build it in tmplibgcc1.a, then rename at end,
798# so that libgcc1.a itself remains nonexistent if compilation is aborted.
799# -e causes any failing command to make this rule fail.
800# -e doesn't work in certain shells, so we test $$? as well.
547e1b60 801# lynx has a broken ar, it always complains when the initial library is
802# empty, thus this command works only if we don't do -e
803# There is a trailing backslash (\) deleted from the following line.
804# set -e;
32e6d418 805 for name in $(LIB1FUNCS); \
806 do \
807 echo $${name}; \
62268150 808 rm -f $${name}$(objext); \
5eef7030 809 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
32e6d418 810 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
62268150 811 mv libgcc1$(objext) $${name}$(objext); \
812 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
813 rm -f $${name}$(objext); \
32e6d418 814 done
815# Some shells crash when a loop has no items.
816# So make sure there is always at least one--`..'.
817# Then ignore it.
818# We don't use -e here because there are if statements
819# that should not make the command give up when the if condition is false.
820# Instead, we test for failure after each command where it matters.
4daa2154 821 for file in .. $(LIB1FUNCS_EXTRA); \
32e6d418 822 do \
823 if [ x$${file} != x.. ]; then \
24f83907 824 name=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \
32e6d418 825 echo $${name}; \
826 if [ $${name}.asm = $${file} ]; then \
f32abccb 827 cp $${file} $${name}.s || exit 1; file=$${name}.s; \
32e6d418 828 else true; fi; \
5eef7030 829 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
32e6d418 830 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
62268150 831 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
32e6d418 832 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
62268150 833 rm -f $${name}.s $${name}$(objext); \
32e6d418 834 else true; \
835 fi; \
836 done
0f557c81 837 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc1.a; else true; fi
32e6d418 838 mv tmplibgcc1.a libgcc1.a
839
cf80c04b 840# Build libgcc1.a from assembler source. LIB1ASMFUNCS is the list of
841# functions. LIB1ASMSRC is the name of the source file in the config
842# subdirectory.
843libgcc1-asm.a: libgcc2.ready config.status $(srcdir)/config/$(LIB1ASMSRC)
844 -rm -f tmplibgcc1.a libgcc1.S
845 cp $(srcdir)/config/$(LIB1ASMSRC) libgcc1.S
846# Actually build it in tmplibgcc1.a, then rename at end,
847# so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
848# -e causes any failing command to make this rule fail.
849# -e doesn't work in certain shells, so we test $$? as well.
850# lynx has a broken ar, it always complains when the initial library is
851# empty, thus this command works only if we don't do -e
852# There is a trailing backslash (\) deleted from the following line.
853# set -e;
854 for name in $(LIB1ASMFUNCS); \
855 do \
856 echo $${name}; \
857 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \
858 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
62268150 859 mv libgcc1$(objext) $${name}$(objext); \
860 $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}$(objext); \
861 rm -f $${name}$(objext); \
cf80c04b 862 done
863 -rm -f libgcc1.S
864 mv tmplibgcc1.a libgcc1-asm.a
865
a20b21eb 866# Generate assembly versions of the functions required for libgcc1.
867# You'll still need to massage the code by hand (possibly hacking
868# underscores and local labels) but this will get you started.
869libgcc1.S: libgcc1.c $(CONFIG_H) config.status
870 -rm -f libgcc1.S
871 touch libgcc1.S
872 for name in $(LIB1FUNCS); \
873 do \
874 echo $${name}; \
5eef7030 875 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -S -DL$${name} $(srcdir)/libgcc1.c; \
a20b21eb 876 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
877 echo '#ifdef ' L$${name} >> libgcc1.S; \
878 cat libgcc1.s >> libgcc1.S; \
879 echo '#endif /*' L$${name} '*/' >> libgcc1.S; \
880 echo "" >> libgcc1.S; \
881 done
882
32e6d418 883# Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
884# But recompiling cc1 should not force recompilation of libgcc2.a.
885# If you want to force recompilation, delete libgcc2.a.
732b8330 886libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs
32e6d418 887 -if [ -f libgcc2.ready ] ; then \
888 true; \
889 else \
890 touch libgcc2.ready; \
891 fi
892
893libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
6143c0f8 894 $(LANG_LIB2FUNCS) machmode.h longlong.h gbl-ctors.h config.status
32e6d418 895# Actually build it in tmplibgcc2.a, then rename at end,
896# so that libgcc2.a itself remains nonexistent if compilation is aborted.
897 -rm -f tmplibgcc2.a
898# -e causes any failing command to make this rule fail.
899# -e doesn't work in certain shells, so we test $$? as well.
547e1b60 900# lynx has a broken ar, it always complains when the initial library is
901# empty, thus this command works only if we don't do -e
902# There is a trailing backslash (\) deleted from the following line.
903# set -e;
32e6d418 904 for name in $(LIB2FUNCS); \
905 do \
906 echo $${name}; \
c6396a0b 907 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
62268150 908 $(srcdir)/libgcc2.c -o $${name}$(objext); \
32e6d418 909 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
62268150 910 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
911 rm -f $${name}$(objext); \
32e6d418 912 done
913# Some shells crash when a loop has no items.
914# So make sure there is always at least one--`..'.
915# Then ignore it.
916# We don't use -e here because there are if statements
917# that should not make the command give up when the if condition is false.
918# Instead, we test for failure after each command where it matters.
6143c0f8 919 for file in .. $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS); \
32e6d418 920 do \
921 if [ x$${file} != x.. ]; then \
6143c0f8 922 name=`echo $${file} | sed -e 's/[.][cSo]$$//' -e 's/[.]asm$$//' -e 's/[.]txt$$//'`; \
d901718e 923 oname=` echo $${name} | sed -e 's,.*/,,'`; \
6143c0f8 924 if [ $${name}.txt = $${file} ]; then \
925 for f in .. `cat $${file}`; do if [ x$${f} != x.. ]; then \
926 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
927 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" \
928 CFLAGS="$(CFLAGS)" HOST_PREFIX="$(HOST_PREFIX)" \
929 HOST_PREFIX_1="$(HOST_PREFIX_1)" \
930 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $${f}; \
931 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
932 $(AR) $(AR_FLAGS) tmplibgcc2.a $${f}; \
933 rm -f $${f}; \
934 fi; done; \
935 else \
936 echo $${name}; \
937 if [ $${name}.asm = $${file} ]; then \
938 cp $${file} $${name}.s || exit 1; file=$${name}.s; \
939 else true; fi; \
940 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
941 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
942 $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
943 rm -f $${name}.s $${oname}$(objext); \
944 fi; \
32e6d418 945 else true; \
946 fi; \
947 done
948 mv tmplibgcc2.a libgcc2.a
949# These lines were deleted from above the mv command
950# because ranlibing libgcc.a itself should suffice.
951# -if [ x${HPUX_GAS} = x ] ; then \
13194ea9 952# if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
32e6d418 953# else true; fi
954
955# Combine the various libraries into a single library, libgcc.a.
956libgcc.a: $(LIBGCC1) $(LIBGCC2)
957 -rm -rf tmplibgcc.a libgcc.a tmpcopy
958 mkdir tmpcopy
c6396a0b 959 -if [ x$(LIBGCC1) != x ]; \
960 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
961 else true; \
962 fi
edf5976e 963# Some versions of ar (specifically the one in RISC/os 5.x), create an
964# unwritable table of contents file, and then print an error message when
965# the second ar command tries to overwrite this file. To avoid the error
966# message from ar, we make sure all files are writable.
75c6d942 967 -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
32e6d418 968 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
62268150 969 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
32e6d418 970 rm -rf tmpcopy
971 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
972# Actually build it in tmplibgcc.a, then rename at end,
973# so that libgcc.a itself remains nonexistent if compilation is aborted.
974 mv tmplibgcc.a libgcc.a
975
f1ad3130 976# Use the genmultilib shell script to generate the information the gcc
977# driver program needs to select the library directory based on the
978# switches.
3d97d965 979multilib.h: stamp-mlib; @true
980stamp-mlib: $(srcdir)/genmultilib Makefile
981 $(SHELL) $(srcdir)/genmultilib \
982 "$(MULTILIB_OPTIONS)" \
983 "$(MULTILIB_DIRNAMES)" \
984 "$(MULTILIB_MATCHES)" \
985 "$(MULTILIB_EXCEPTIONS)" \
986 "$(MULTILIB_EXTRA_OPTS)" > tmp-mlib.h
987 $(srcdir)/move-if-change tmp-mlib.h multilib.h
988 touch stamp-mlib
f1ad3130 989
990# Build multiple copies of libgcc.a, one for each target switch.
991stmp-multilib: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \
0990b8d9 992 $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS) machmode.h longlong.h gbl-ctors.h \
993 config.status
f1ad3130 994 for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
995 dir=`echo $$i | sed -e 's/;.*$$//'`; \
996 flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
f1ad3130 997 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
3ab62051 998 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
00075505 999 RANLIB="$(RANLIB)" RANLIB_TEST="$(RANLIB_TEST)" \
f1ad3130 1000 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
00075505 1001 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \
cdc96909 1002 MULTILIB_CFLAGS="$${flags}" \
00075505 1003 LIBGCC1="$(LIBGCC1)" LIBGCC2="$(LIBGCC2)" \
1004 dir="$${dir}" stmp-multilib-sub; \
ee4720a9 1005 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
f1ad3130 1006 done
1007 touch stmp-multilib
1008
00075505 1009# Subroutine of stmp-multilib so make -n works.
1010stmp-multilib-sub:
cdc96909 1011 rm -f $(LIBGCC2)
1012 if [ -d $(dir) ]; then \
1013 cd $(dir); \
1014 rm -f libgcc.a $(EXTRA_MULTILIB_PARTS); \
a123fd67 1015 else true; \
cdc96909 1016 fi
00075505 1017 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
3ab62051 1018 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
00075505 1019 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1020 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC2)
1021 if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
1022 then true; \
1023 else rm -f $(LIBGCC1); \
1024 fi
1025 if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
1026 then true; \
1027 else \
1028 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
3ab62051 1029 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
00075505 1030 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1031 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC1); \
1032 fi
1033 rm -rf tmplibgcc.a tmpcopy
1034 mkdir tmpcopy
1035 if [ x$(LIBGCC1) != x ]; \
1036 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
1037 else true; \
1038 fi
1039 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
601520ec 1040 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
00075505 1041 rm -rf libgcc2.a tmpcopy
1042 if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
1043 if [ -d $(dir) ]; then true; else mkdir $(dir); fi
1044 mv tmplibgcc.a $(dir)/libgcc.a
cdc96909 1045 for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
1046 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1047 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1048 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1049 MULTILIB_CFLAGS="$(MULTILIB_CFLAGS)" T="t" t$${f}; \
1050 mv t$${f} $(dir)/$${f}; \
a123fd67 1051 else true; \
cdc96909 1052 fi; done
00075505 1053
4f1fd857 1054objc-runtime: libobjc.a
1055
bd594491 1056# Build the Objective C runtime library.
54564ebf 1057libobjc.a: cc1obj specs stmp-int-hdrs libgcc2.ready $(USE_COLLECT2) $(EXTRA_PARTS)
d6518ea8 1058 if [ -d objc ]; then true; else mkdir objc; fi
4f1fd857 1059 thisdir1=`pwd`; \
e5190fd1 1060 srcdir1=`cd $(srcdir); pwd`; \
4f1fd857 1061 cd objc; \
72bce1c3 1062 $(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
1063 srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
1064 GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
8b095439 1065 GCC_CFLAGS="$(GCC_CFLAGS)" OBJC_THREAD_FILE="$(OBJC_THREAD_FILE)"
553479e8 1066 -rm -f libobjc.a
8281617f 1067 ln objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a .
4f1fd857 1068 -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
1069
1070# This is used by objc/Makefile if the user runs that directly.
54564ebf 1071sublibobjc.a: cc1obj specs stmp-int-hdrs libgcc2.ready
e5190fd1 1072 thisdir1=`pwd`; \
1073 srcdir1=`cd $(srcdir); pwd`; \
1074 cd objc; \
553479e8 1075 $(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
e5190fd1 1076 srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
1077 GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \
8b095439 1078 GCC_CFLAGS="$(GCC_CFLAGS)" OBJC_THREAD_FILE="$(OBJC_THREAD_FILE)"
32e6d418 1079
1080# Compile two additional files that are linked with every program
6bcd7097 1081# linked using GCC on systems using COFF or ELF, for the sake of C++
1082# constructors.
cdc96909 1083$(T)crtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
6efd403b 1084 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
1085 -finhibit-size-directive -fno-inline-functions $(CRTSTUFF_T_CFLAGS) \
1086 -c $(srcdir)/crtstuff.c -DCRT_BEGIN -o $(T)crtbegin$(objext)
cdc96909 1087
1088$(T)crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
6efd403b 1089 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
1090 -finhibit-size-directive -fno-inline-functions $(CRTSTUFF_T_CFLAGS) \
1091 -c $(srcdir)/crtstuff.c -DCRT_END -o $(T)crtend$(objext)
6bcd7097 1092
1093# On some systems we also want to install versions of these files
1094# compiled using PIC for use in shared libraries.
1095crtbeginS.o crtendS.o: stamp-crtS ; @true
1096
1097stamp-crtS: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
5eef7030 1098 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
6bcd7097 1099 -DCRT_BEGIN -finhibit-size-directive -fno-inline-functions \
5eef7030 1100 -g0 -c $(srcdir)/crtstuff.c
6bcd7097 1101 mv crtstuff$(objext) crtbeginS$(objext)
5eef7030 1102 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
6bcd7097 1103 -DCRT_END -finhibit-size-directive -fno-inline-functions \
e5cfbd5b 1104 -g0 -c $(srcdir)/crtstuff.c -o crtendS$(objext)
6bcd7097 1105 touch stamp-crtS
4d3c962c 1106
1107# Compile the start modules crt0.o and mcrt0.o that are linked with every program
1108crt0.o: stamp-crt0 ; @true
1109mcrt0.o: stamp-crt0; @true
1110
1111stamp-crt0: $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H)
1112 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
1113 -o crt0.o -c $(CRT0_S)
1114 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
1115 -o mcrt0.o -c $(MCRT0_S)
1116 touch stamp-crt0
32e6d418 1117\f
1118# Compiling object files from source files.
1119
1120# Note that dependencies on obstack.h are not written
1121# because that file is not part of GCC.
32e6d418 1122
1123# C language specific files.
1124
41b06fe4 1125c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
1126 $(srcdir)/c-parse.h c-tree.h input.h flags.h
32e6d418 1127 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c
112e5dd0 1128$(srcdir)/c-parse.h: $(srcdir)/c-parse.c
1129$(srcdir)/c-parse.c: $(srcdir)/c-parse.y
ab2562cb 1130 cd $(srcdir); $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
0f557c81 1131$(srcdir)/c-parse.y: c-parse.in
04e167f4 1132 echo '/*WARNING: This file is automatically generated!*/' >tmp-c-parse.y
d7c691fa 1133 sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
1134 -e "/^ifc$$/d" -e "/^end ifc$$/d" \
04e167f4 1135 $(srcdir)/c-parse.in >>tmp-c-parse.y
a58045a1 1136 $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y
d7c691fa 1137
0f557c81 1138$(srcdir)/c-gperf.h: c-parse.gperf
6a4a0b58 1139 gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$$ \
a58045a1 1140 $(srcdir)/c-parse.gperf >tmp-gperf.h
1141 $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h
6a4a0b58 1142
66a1f274 1143c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h output.h
1144c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h output.h
32e6d418 1145c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
41b06fe4 1146c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h $(srcdir)/c-parse.h \
917aa082 1147 input.h flags.h $(srcdir)/c-gperf.h c-pragma.h
32e6d418 1148c-aux-info.o : c-aux-info.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
1149c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
2feda28e 1150c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H) except.h function.h \
1151 defaults.h c-pragma.h
1294913b 1152c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
32e6d418 1153
79f818d0 1154# To make a configuration always use collect2, set USE_COLLECT2 to ld.
1155ld: collect2
f403cbcb 1156 rm -f ld$(exeext)
291dddd5 1157 ln collect2$(exeext) ld$(exeext) > /dev/null 2>&1 \
1158 || cp collect2$(exeext) ld$(exeext)
79f818d0 1159
6c468b11 1160collect2 : collect2.o cplus-dem.o underscore.o version.o \
1161 choose-temp.o $(LIBDEPS)
e77fd588 1162# Don't try modifying collect2 (aka ld) in place--it might be linking this.
62268150 1163 -rm -f collect2$(exeext)
1164 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ collect2.o \
6c468b11 1165 cplus-dem.o underscore.o version.o choose-temp.o $(LIBS)
32e6d418 1166
d2f0b724 1167collect2.o : collect2.c $(CONFIG_H) gstab.h obstack.h demangle.h
5e03c63d 1168 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
67cb4bc1 1169 -DTARGET_MACHINE=\"$(target_alias)\" $(MAYBE_USE_COLLECT2) \
5e03c63d 1170 -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
32e6d418 1171
d2f0b724 1172cplus-dem.o: cplus-dem.c demangle.h
1173
7306ddcf 1174underscore.c: stamp-under ; @true
1175
1176stamp-under: $(GCC_PASSES)
c20b28d5 1177 echo "int xxy_us_dummy;" >tmp-dum.c
1178 $(GCC_FOR_TARGET) -S tmp-dum.c
1179 echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c
1180 if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \
1181 echo "int prepends_underscore = 1;" >>tmp-under.c; \
d2f0b724 1182 else \
c20b28d5 1183 echo "int prepends_underscore = 0;" >>tmp-under.c; \
d2f0b724 1184 fi
c20b28d5 1185 $(srcdir)/move-if-change tmp-under.c underscore.c
1186 -rm -f tmp-dum.c tmp-dum.s
7306ddcf 1187 touch stamp-under
d2f0b724 1188
8dff2b2b 1189# Objective C language specific files.
32e6d418 1190
1191objc-parse.o : $(srcdir)/objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
222e139b 1192 c-tree.h input.h flags.h objc-act.h
32e6d418 1193 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/objc-parse.c
1194$(srcdir)/objc-parse.c : $(srcdir)/objc-parse.y
1195 cd $(srcdir); $(BISON) $(BISONFLAGS) objc-parse.y -o objc-parse.c
ab2562cb 1196$(srcdir)/objc-parse.y: $(srcdir)/c-parse.in
1a8d7a00 1197 echo '/*WARNING: This file is automatically generated!*/' >tmp-objc-prs.y
ab2562cb 1198 sed -e "/^ifc$$/,/^end ifc$$/d" \
1199 -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \
04e167f4 1200 $(srcdir)/c-parse.in >>tmp-objc-prs.y
bfd24c7b 1201 $(srcdir)/move-if-change tmp-objc-prs.y $(srcdir)/objc-parse.y
32e6d418 1202
7c4f0e88 1203objc-act.o : objc-act.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h c-lex.h \
1204 flags.h objc-act.h input.h function.h $(srcdir)/c-parse.h
32e6d418 1205
1206# A file used by all variants of C.
1207
1208c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
1209
1210# Language-independent files.
1211
4813bdd4 1212DRIVER_DEFINES = \
32e6d418 1213 -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
c6396a0b 1214 -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
7df9e578 1215 -DDEFAULT_TARGET_VERSION=\"$(version)\" \
67cb4bc1 1216 -DDEFAULT_TARGET_MACHINE=\"$(target_alias)\" \
4813bdd4 1217 -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\"
1218gcc.o: gcc.c $(CONFIG_H) multilib.h config.status $(lang_specs_files)
1219 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1220 $(DRIVER_DEFINES) \
32e6d418 1221 -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
1222
1223dumpvers: dumpvers.c
1224
1225version.o: version.c
1226obstack.o: obstack.c
6c468b11 1227choose-temp.o: choose-temp.c
c90a87d1 1228pexecute.o: pexecute.c
32e6d418 1229
beb68ac1 1230convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h
1231
335ebf8f 1232tree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h function.h
32e6d418 1233print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
a6a1ab64 1234stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) flags.h function.h
32e6d418 1235fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h
636fef92 1236toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) bytecode.h bc-emit.h \
1237 flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
1238 $(lang_options_files)
b600804e 1239 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(MAYBE_USE_COLLECT2) \
67cb4bc1 1240 -DTARGET_NAME=\"$(target_alias)\" \
fe918d35 1241 -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
32e6d418 1242
1243rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
1244
1245print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
1246rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
1247
35325097 1248varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h function.h \
66a1f274 1249 defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h \
917aa082 1250 output.h bytecode.h c-pragma.h
32e6d418 1251function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
1252 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
d9bf0cf4 1253 recog.h output.h bytecode.h bc-emit.h
32e6d418 1254stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
037a5228 1255 insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h except.h \
1256 loop.h recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h \
1257 bc-optab.h bc-emit.h
1258except.o : except.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
1259 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
1260 recog.h output.h except.h
93ad9ce9 1261expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h regs.h \
e83ee760 1262 insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
1263 typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
9af573e1 1264 bc-emit.h modemap.def hard-reg-set.h
32e6d418 1265calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
335ebf8f 1266 insn-flags.h
32e6d418 1267expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
1268 insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
1269explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
1270 insn-config.h expr.h recog.h insn-flags.h insn-codes.h
1271optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
a8a33ff5 1272 insn-flags.h insn-config.h insn-codes.h expr.h recog.h reload.h
32e6d418 1273dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
e7748130 1274 insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
f95d8264 1275sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h except.h \
1276 function.h expr.h output.h hard-reg-set.h regs.h defaults.h real.h \
1277 bytecode.h obstack.h xcoffout.h c-pragma.h
32e6d418 1278dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
8a19d0d5 1279 insn-config.h reload.h output.h defaults.h
632478b5 1280dwarf2out.o : dwarf2out.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf2.h flags.h \
1281 insn-config.h reload.h output.h defaults.h hard-reg-set.h regs.h
79f818d0 1282xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
335ebf8f 1283emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
5e93c400 1284 function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
1285 bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
6d9f2c4c 1286real.o : real.c $(CONFIG_H) $(TREE_H)
c6396a0b 1287getpwd.o : getpwd.c $(CONFIG_H)
32e6d418 1288
1289integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
beed1a9f 1290 insn-flags.h insn-config.h insn-codes.h expr.h real.h regs.h function.h \
832bfff4 1291 bytecode.h
32e6d418 1292
1293jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
1294 insn-config.h insn-flags.h insn-codes.h expr.h real.h
1295stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
1296
1297cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
1298 insn-config.h recog.h
1299loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
1300 insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
1301unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
1302 integrate.h regs.h flags.h expr.h loop.h
1303flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
1304 basic-block.h regs.h hard-reg-set.h output.h
335ebf8f 1305combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h \
32e6d418 1306 insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
f0a903c4 1307 basic-block.h recog.h real.h hard-reg-set.h
32e6d418 1308regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
832bfff4 1309 basic-block.h regs.h insn-config.h recog.h reload.h real.h bytecode.h
32e6d418 1310local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
1311 regs.h hard-reg-set.h insn-config.h recog.h output.h
8a4b1e01 1312global.o : global.c $(CONFIG_H) $(RTL_H) flags.h \
32e6d418 1313 basic-block.h regs.h hard-reg-set.h insn-config.h output.h
1314
c345cc01 1315reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h output.h \
32e6d418 1316 reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
067fa30b 1317reload1.o : reload1.c $(CONFIG_H) $(RTL_H) real.h flags.h expr.h \
32e6d418 1318 reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
1319 basic-block.h recog.h output.h
1320caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
f8de8de7 1321 regs.h hard-reg-set.h insn-codes.h insn-config.h basic-block.h recog.h \
1322 reload.h expr.h
32e6d418 1323reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
1324 basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
1325 flags.h output.h
1326sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
1327 flags.h insn-config.h insn-attr.h
335ebf8f 1328final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h regs.h \
037a5228 1329 recog.h conditions.h insn-config.h insn-attr.h except.h real.h output.h \
fe918d35 1330 hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
32e6d418 1331recog.o : recog.c $(CONFIG_H) $(RTL_H) \
1332 regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
1333 insn-flags.h insn-codes.h real.h
1334reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
d9bf0cf4 1335 regs.h hard-reg-set.h flags.h insn-config.h insn-flags.h
48c6936b 1336
5e7432f7 1337$(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) \
32e6d418 1338 $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
1339 insn-flags.h output.h insn-attr.h insn-codes.h
b600804e 1340 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(out_file)
32e6d418 1341
f213fcf9 1342# Build auxiliary files that support ecoff format.
1343mips-tfile: mips-tfile.o version.o $(LIBDEPS)
62268150 1344 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
f213fcf9 1345
1346mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H)
1347
1348mips-tdump: mips-tdump.o version.o $(LIBDEPS)
62268150 1349 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
f213fcf9 1350
1351mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H)
1352
636b182c 1353# Build file to support OSF/rose half-pic format.
1354halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H)
1355
32e6d418 1356# Normally this target is not used; but it is used if you
1357# define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
1358# from the GNU Emacs distribution.
32e6d418 1359alloca.o: alloca.c
32e6d418 1360 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
cc2af6ca 1361 -c `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
32e6d418 1362 $(ALLOCA_FINISH)
1363\f
1364# Generate header and source files from the machine description,
1365# and compile them.
1366
1367.PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
1368 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
1369 insn-attr.h insn-attrtab.c
1370
1371# The following pair of rules has this effect:
1372# genconfig is run only if the md has changed since genconfig was last run;
1373# but the file insn-config.h is touched only when its contents actually change.
1374
1375# Each of the other insn-* files is handled by a similar pair of rules.
1376
3f69fed5 1377# This causes an anomaly in the results of make -n
1378# because insn-* is older than stamp-*
1379# and thus make -n thinks that insn-* will be updated
1380# and force recompilation of things that depend on it.
9ac790c5 1381# We use move-if-change precisely to avoid such recompilation.
3f69fed5 1382# But there is no way to teach make -n that it will be avoided.
1383
32e6d418 1384# Each of the insn-*.[ch] rules has a semicolon at the end,
1385# for otherwise the system Make on SunOS 4.1 never tries
876dc5b0 1386# to recompile insn-*.o. To avoid problems and extra noise from
1387# versions of make which don't like empty commands (nothing after the
1388# trailing `;'), we call true for each.
32e6d418 1389
c2a18965 1390insn-config.h: stamp-config ; @true
c20b28d5 1391stamp-config : $(md_file) genconfig $(srcdir)/move-if-change
1392 ./genconfig $(md_file) > tmp-config.h
32e6d418 1393 $(srcdir)/move-if-change tmp-config.h insn-config.h
1394 touch stamp-config
1395
c2a18965 1396insn-flags.h: stamp-flags ; @true
c20b28d5 1397stamp-flags : $(md_file) genflags $(srcdir)/move-if-change
1398 ./genflags $(md_file) > tmp-flags.h
32e6d418 1399 $(srcdir)/move-if-change tmp-flags.h insn-flags.h
1400 touch stamp-flags
1401
c2a18965 1402insn-codes.h: stamp-codes ; @true
c20b28d5 1403stamp-codes : $(md_file) gencodes $(srcdir)/move-if-change
1404 ./gencodes $(md_file) > tmp-codes.h
32e6d418 1405 $(srcdir)/move-if-change tmp-codes.h insn-codes.h
1406 touch stamp-codes
1407
1408insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
1409 insn-config.h insn-flags.h insn-codes.h
1410 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
1411
c2a18965 1412insn-emit.c: stamp-emit ; @true
c20b28d5 1413stamp-emit : $(md_file) genemit $(srcdir)/move-if-change
1414 ./genemit $(md_file) > tmp-emit.c
32e6d418 1415 $(srcdir)/move-if-change tmp-emit.c insn-emit.c
1416 touch stamp-emit
1417
1418insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \
1419 real.h output.h flags.h
1420 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
1421
c2a18965 1422insn-recog.c: stamp-recog ; @true
c20b28d5 1423stamp-recog : $(md_file) genrecog $(srcdir)/move-if-change
1424 ./genrecog $(md_file) > tmp-recog.c
32e6d418 1425 $(srcdir)/move-if-change tmp-recog.c insn-recog.c
1426 touch stamp-recog
1427
bdb66cef 1428insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
1429 insn-config.h flags.h rtl.h recog.h expr.h reload.h
1430 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
1431
1432insn-opinit.c: stamp-opinit ; @true
c20b28d5 1433stamp-opinit : $(md_file) genopinit $(srcdir)/move-if-change
1434 ./genopinit $(md_file) > tmp-opinit.c
bdb66cef 1435 $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
1436 touch stamp-opinit
1437
32e6d418 1438insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
1439 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
1440
c2a18965 1441insn-extract.c: stamp-extract ; @true
c20b28d5 1442stamp-extract : $(md_file) genextract $(srcdir)/move-if-change
1443 ./genextract $(md_file) > tmp-extract.c
32e6d418 1444 $(srcdir)/move-if-change tmp-extract.c insn-extract.c
1445 touch stamp-extract
1446
1447insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
1448 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
1449
c2a18965 1450insn-peep.c: stamp-peep ; @true
c20b28d5 1451stamp-peep : $(md_file) genpeep $(srcdir)/move-if-change
1452 ./genpeep $(md_file) > tmp-peep.c
32e6d418 1453 $(srcdir)/move-if-change tmp-peep.c insn-peep.c
1454 touch stamp-peep
1455
1456insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
1457 insn-attr.h insn-config.h
1458 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
1459
c2a18965 1460insn-attr.h: stamp-attr ; @true
c20b28d5 1461stamp-attr : $(md_file) genattr $(srcdir)/move-if-change
1462 ./genattr $(md_file) > tmp-attr.h
32e6d418 1463 $(srcdir)/move-if-change tmp-attr.h insn-attr.h
1464 touch stamp-attr
1465
c2a18965 1466insn-attrtab.c: stamp-attrtab ; @true
c20b28d5 1467stamp-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change
1468 if cmp -s $(PREMADE_ATTRTAB_MD) $(md_file); \
8bd8ea06 1469 then \
1470 echo Using $(PREMADE_ATTRTAB); \
ab866dde 1471 cp $(PREMADE_ATTRTAB) tmp-attrtab.c; \
8bd8ea06 1472 else \
c20b28d5 1473 ./genattrtab $(md_file) > tmp-attrtab.c; \
8bd8ea06 1474 fi
32e6d418 1475 $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
1476 touch stamp-attrtab
1477
1478insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
1479 hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
1480 insn-codes.h
1481 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
1482
c2a18965 1483insn-output.c: stamp-output ; @true
c20b28d5 1484stamp-output : $(md_file) genoutput $(srcdir)/move-if-change
1485 ./genoutput $(md_file) > tmp-output.c
32e6d418 1486 $(srcdir)/move-if-change tmp-output.c insn-output.c
1487 touch stamp-output
1488\f
1489# Compile the programs that generate insn-* from the machine description.
1490# They are compiled with $(HOST_CC), and associated libraries,
1491# since they need to run on this machine
1492# even if GCC is being compiled to run on some other machine.
1493
1494# $(CONFIG_H) is omitted from the deps of the gen*.o
1495# because these programs don't really depend on anything
1496# about the target machine. They do depend on config.h itself,
1497# since that describes the host machine.
1498
89e36a04 1499# Pass the md file through cpp if the target requests it.
2c352995 1500$(MD_FILE): $(MD_DEPS)
1501 rm -f $@
c20b28d5 1502 $(MD_CPP) $(MD_CPPFLAGS) $(md_file) | sed 's/^# /; /g' > tmp-$@
c92e16d4 1503 mv tmp-$@ $@
89e36a04 1504
32e6d418 1505genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS)
62268150 1506 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
32e6d418 1507 genconfig.o $(HOST_RTL) $(HOST_LIBS)
1508
c20b28d5 1509genconfig.o : genconfig.c $(RTL_H) $(build_xm_file)
32e6d418 1510 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
1511
1512genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS)
62268150 1513 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
32e6d418 1514 genflags.o $(HOST_RTL) $(HOST_LIBS)
1515
c20b28d5 1516genflags.o : genflags.c $(RTL_H) $(build_xm_file)
32e6d418 1517 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
1518
1519gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS)
62268150 1520 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
32e6d418 1521 gencodes.o $(HOST_RTL) $(HOST_LIBS)
1522
c20b28d5 1523gencodes.o : gencodes.c $(RTL_H) $(build_xm_file)
32e6d418 1524 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
1525
1526genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
62268150 1527 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
32e6d418 1528 genemit.o $(HOST_RTL) $(HOST_LIBS)
1529
c20b28d5 1530genemit.o : genemit.c $(RTL_H) $(build_xm_file)
32e6d418 1531 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
1532
bdb66cef 1533genopinit : genopinit.o $(HOST_RTL) $(HOST_LIBDEPS)
62268150 1534 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
bdb66cef 1535 genopinit.o $(HOST_RTL) $(HOST_LIBS)
1536
c20b28d5 1537genopinit.o : genopinit.c $(RTL_H) $(build_xm_file)
bdb66cef 1538 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c
1539
32e6d418 1540genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
62268150 1541 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
32e6d418 1542 genrecog.o $(HOST_RTL) $(HOST_LIBS)
1543
c20b28d5 1544genrecog.o : genrecog.c $(RTL_H) $(build_xm_file)
32e6d418 1545 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
1546
1547genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS)
62268150 1548 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
32e6d418 1549 genextract.o $(HOST_RTL) $(HOST_LIBS)
1550
c20b28d5 1551genextract.o : genextract.c $(RTL_H) $(build_xm_file) insn-config.h
32e6d418 1552 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
1553
1554genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS)
62268150 1555 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
32e6d418 1556 genpeep.o $(HOST_RTL) $(HOST_LIBS)
1557
c20b28d5 1558genpeep.o : genpeep.c $(RTL_H) $(build_xm_file)
32e6d418 1559 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
1560
1561genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS)
62268150 1562 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
32e6d418 1563 genattr.o $(HOST_RTL) $(HOST_LIBS)
1564
c20b28d5 1565genattr.o : genattr.c $(RTL_H) $(build_xm_file)
32e6d418 1566 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
1567
262d46de 1568genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
62268150 1569 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
262d46de 1570 genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
32e6d418 1571
c20b28d5 1572genattrtab.o : genattrtab.c $(RTL_H) $(build_xm_file) insn-config.h
32e6d418 1573 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
1574
1575genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS)
62268150 1576 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
32e6d418 1577 genoutput.o $(HOST_RTL) $(HOST_LIBS)
1578
c20b28d5 1579genoutput.o : genoutput.c $(RTL_H) $(build_xm_file)
32e6d418 1580 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
1581\f
1582# Compile the libraries to be used by gen*.
1583# If we are not cross-building, gen* use the same .o's that cc1 will use,
1584# and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1585# with the rules for rtl.o, alloca.o, etc.
1586$(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H)
1587 rm -f $(HOST_PREFIX)rtl.c
e77fd588 1588 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c
32e6d418 1589 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
1590
262d46de 1591$(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H)
1592 rm -f $(HOST_PREFIX)print-rtl.c
e77fd588 1593 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c
262d46de 1594 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c
1595
32e6d418 1596$(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
1597 rm -f $(HOST_PREFIX)rtlanal.c
e77fd588 1598 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c
32e6d418 1599 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
1600
1601$(HOST_PREFIX_1)alloca.o: alloca.c
1602 rm -f $(HOST_PREFIX)alloca.c
1603 cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
1604 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
1605
1606$(HOST_PREFIX_1)obstack.o: obstack.c
1607 rm -f $(HOST_PREFIX)obstack.c
e77fd588 1608 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/obstack.c > $(HOST_PREFIX)obstack.c
32e6d418 1609 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
1610
1611$(HOST_PREFIX_1)malloc.o: malloc.c
1612 rm -f $(HOST_PREFIX)malloc.c
e77fd588 1613 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c
32e6d418 1614 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
1615
1616# This satisfies the dependency that we get if you cross-compile a compiler
1617# that does not need to compile alloca, malloc or whatever.
1618$(HOST_PREFIX_1):
1619 touch $(HOST_PREFIX_1)
1620\f
649d8da6 1621# Remake bytecode files.
649d8da6 1622BI_OBJ=bi-parser.o bi-lexer.o bi-reverse.o
1623
7e20ea39 1624bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \
62268150 1625 bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
7e20ea39 1626bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \
62268150 1627 bc-opcode.h bc-typecd.h bc-typecd.def
649d8da6 1628
7e20ea39 1629bi-arity: bi-arity.o $(BI_OBJ) $(HOST_LIBDEPS)
62268150 1630 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
c3eff1f2 1631 bi-arity.o $(BI_OBJ) $(HOST_LIBS)
7e20ea39 1632bi-opcode: bi-opcode.o $(BI_OBJ) $(HOST_LIBDEPS)
62268150 1633 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
c3eff1f2 1634 bi-opcode.o $(BI_OBJ) $(HOST_LIBS)
7e20ea39 1635bi-opname: bi-opname.o $(BI_OBJ) $(HOST_LIBDEPS)
62268150 1636 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
c3eff1f2 1637 bi-opname.o $(BI_OBJ) $(HOST_LIBS)
7e20ea39 1638
112e5dd0 1639$(srcdir)/bi-parser.h: $(srcdir)/bi-parser.c
1640$(srcdir)/bi-parser.c: $(srcdir)/bi-parser.y
7e20ea39 1641 cd $(srcdir); $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c
62268150 1642
0f557c81 1643bi-parser.o: $(srcdir)/bi-parser.c bi-defs.h $(build_xm_file)
7e20ea39 1644 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1645 $(srcdir)/bi-parser.c
0f557c81 1646bi-lexer.o: bi-lexer.c $(srcdir)/bi-parser.h $(build_xm_file)
7e20ea39 1647 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1648 $(srcdir)/bi-lexer.c
62268150 1649bi-arity.o: bi-arity.c bi-defs.h $(build_xm_file)
7e20ea39 1650 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1651 $(srcdir)/bi-arity.c
62268150 1652bi-opcode.o: bi-opcode.c bi-defs.h $(build_xm_file)
7e20ea39 1653 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1654 $(srcdir)/bi-opcode.c
62268150 1655bi-opname.o: bi-opname.c bi-defs.h $(build_xm_file)
7e20ea39 1656 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1657 $(srcdir)/bi-opname.c
62268150 1658bi-reverse.o: bi-reverse.c bi-defs.h
7e20ea39 1659 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1660 $(srcdir)/bi-reverse.c
832bfff4 1661
e6baec2f 1662bc-arity.h: stamp-bcarity ; @true
1663stamp-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change
e78095bc 1664 ./bi-arity < $(srcdir)/bytecode.def >tmp-bc-arity.h
1665 $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
675fc1b6 1666 touch stamp-bcarity
649d8da6 1667
e6baec2f 1668bc-opcode.h: stamp-bcopcode ; @true
1669stamp-bcopcode : $(srcdir)/bytecode.def bi-opcode $(srcdir)/move-if-change
f698a3d1 1670 ./bi-opcode < $(srcdir)/bytecode.def >tmp-bcopcd.h
1671 $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
675fc1b6 1672 touch stamp-bcopcode
649d8da6 1673
e6baec2f 1674bc-opname.h: stamp-bcopname ; @true
1675stamp-bcopname : $(srcdir)/bytecode.def bi-opname $(srcdir)/move-if-change
f698a3d1 1676 ./bi-opname < $(srcdir)/bytecode.def >tmp-bcopnm.h
1677 $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
675fc1b6 1678 touch stamp-bcopname
649d8da6 1679
1680bytecode.mostlyclean:
1681 -rm -f bc-arity.h bc-opcode.h bc-opname.h
1682
1683bytecode.distclean bytecode.clean: bytecode.mostlyclean
7e20ea39 1684 -rm -f bi-arity bi-opcode bi-opname bi-lexer
649d8da6 1685
a8514488 1686bytecode.maintainer-clean: bytecode.clean
91cbf3f1 1687 -rm -f bi-parser.c bi-parser.h
649d8da6 1688
1689\f
32e6d418 1690# Remake cpp and protoize.
1691
1692# Making the preprocessor
3e4227af 1693cpp: $(CCCP)
f403cbcb 1694 -rm -f cpp$(exeext)
3e4227af 1695 ln $(CCCP)$(exeext) cpp$(exeext) > /dev/null 2>&1 \
1696 || cp $(CCCP)$(exeext) cpp$(exeext)
32e6d418 1697cccp: cccp.o cexp.o version.o $(LIBDEPS)
62268150 1698 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cccp.o cexp.o \
1699 version.o $(LIBS)
0f557c81 1700cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
32e6d418 1701 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
1702$(srcdir)/cexp.c: $(srcdir)/cexp.y
1703 cd $(srcdir); $(BISON) -o cexp.c cexp.y
62268150 1704
d6b50af2 1705cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status
32e6d418 1706# The reason we use $(libdir)/g++-include rather than using libsubdir
1707# is for compatibility with the current version of libg++.
1708 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
c6396a0b 1709 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
3bf5d4dc 1710 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
ac2f5cba 1711 -DOLD_GPLUSPLUS_INCLUDE_DIR=\"$(old_gxx_include_dir)\" \
9a4f2cdd 1712 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
c6396a0b 1713 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
46073b39 1714 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
32e6d418 1715 -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1716
3e4227af 1717cppmain: cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
1718 version.o $(LIBDEPS)
62268150 1719 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cppmain.o cpplib.o cpphash.o \
1720 cppalloc.o cpperror.o cppexp.o version.o $(LIBS)
3e4227af 1721
f03d7bcd 1722cppmain.o: cppmain.c $(CONFIG_H) cpplib.h
1723
7d1e7284 1724cpplib.o: cpplib.c $(CONFIG_H) cpplib.h cpphash.h config.status
3e4227af 1725 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1726 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1727 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
ac2f5cba 1728 -DOLD_GPLUSPLUS_INCLUDE_DIR=\"$(old_gxx_include_dir)\" \
3e4227af 1729 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1730 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1731 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1732 -c `echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
1733
7d1e7284 1734cpperror.o: cpperror.c $(CONFIG_H) cpplib.h
1735
1736cppexp.o: cppexp.c $(CONFIG_H) cpplib.h
1737
1738cpphash.o: cpphash.c cpplib.h cpphash.h
1739
885be33e 1740cppalloc.o: cppalloc.c $(CONFIG_H)
1741
876dc5b0 1742# Note for the stamp targets, we run the program `true' instead of
1743# having an empty command (nothing following the semicolon).
1744
732b8330 1745proto: config.status protoize unprotoize SYSCALLS.c.X
32e6d418 1746
c90a87d1 1747protoize: protoize.o getopt.o getopt1.o getpwd.o version.o \
1748 pexecute.o choose-temp.o $(LIBDEPS)
62268150 1749 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
c90a87d1 1750 protoize.o getopt.o getopt1.o getpwd.o version.o \
1751 pexecute.o choose-temp.o $(LIBS)
c2a18965 1752protoize.o: stamp-proto ; @true
ab866dde 1753
c90a87d1 1754unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o \
1755 pexecute.o choose-temp.o $(LIBDEPS)
62268150 1756 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
c90a87d1 1757 unprotoize.o getopt.o getopt1.o getpwd.o version.o \
1758 pexecute.o choose-temp.o $(LIBS)
c2a18965 1759unprotoize.o: stamp-proto ; @true
ab866dde 1760
62268150 1761stamp-proto: protoize.c getopt.h $(CONFIG_H)
32e6d418 1762 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1763 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
3bf5d4dc 1764 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
32e6d418 1765 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
46073b39 1766 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
9a4f2cdd 1767 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
32e6d418 1768 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
ab866dde 1769 -DUNPROTOIZE $(srcdir)/protoize.c
62268150 1770 mv protoize$(objext) unprotoize$(objext)
32e6d418 1771 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1772 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
3bf5d4dc 1773 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
32e6d418 1774 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
46073b39 1775 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
9a4f2cdd 1776 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
32e6d418 1777 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
ab866dde 1778 $(srcdir)/protoize.c
77a164d8 1779 touch stamp-proto
32e6d418 1780
62268150 1781getopt.o: getopt.c getopt.h
32e6d418 1782 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
62268150 1783getopt1.o: getopt1.c getopt.h
32e6d418 1784 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c
1785
32e6d418 1786# This info describes the target machine, so compile with GCC just built.
62268150 1787SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \
1788 stmp-int-hdrs
f678532a 1789 -rm -f SYSCALLS.c tmp-SYSCALLS.s
79f818d0 1790 cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
32e6d418 1791 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
f678532a 1792 -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c
1793 -rm -f SYSCALLS.c tmp-SYSCALLS.s
0b20f012 1794
a5889b74 1795
0b20f012 1796test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
c548e550 1797 -rm -f tmp-proto.[cso]
262d46de 1798 cp $(srcdir)/protoize.c tmp-proto.c
1799 chmod u+w tmp-proto.c
c548e550 1800 ./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \
1801 $(CFLAGS) $(INCLUDES) \
0b20f012 1802 -DGCC_INCLUDE_DIR=0 \
1803 -DGPLUSPLUS_INCLUDE_DIR=0 \
1804 -DCROSS_INCLUDE_DIR=0 \
46073b39 1805 -DTOOL_INCLUDE_DIR=0 \
262d46de 1806 -DSTD_PROTO_DIR=0" tmp-proto.c
1a754c64 1807 @echo '**********' Expect 400 lines of differences.
c548e550 1808 -diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff
1809 -wc -l tmp-proto.diff
1810 ./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \
1811 $(CFLAGS) $(INCLUDES) \
0b20f012 1812 -DGCC_INCLUDE_DIR=0 \
1813 -DGPLUSPLUS_INCLUDE_DIR=0 \
1814 -DCROSS_INCLUDE_DIR=0 \
46073b39 1815 -DTOOL_INCLUDE_DIR=0 \
262d46de 1816 -DSTD_PROTO_DIR=0" tmp-proto.c
0b20f012 1817 @echo Expect zero differences.
262d46de 1818 diff $(srcdir)/protoize.c tmp-proto.c | cat
62268150 1819 -rm -f tmp-proto.[cs] tmp-proto$(objext)
32e6d418 1820\f
2cfd79fe 1821# Build the include directory. The stamp files are stmp-* rather than
1822# stamp-* so that mostlyclean does not force the include directory to
1823# be rebuilt.
1824
690a93ea 1825# Build the include directory except for float.h (which depends upon
1826# enquire).
335ebf8f 1827stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h objc-headers
2cfd79fe 1828# Copy in the headers provided with gcc.
1829# The sed command gets just the last file name component;
1830# this is necessary because VPATH could add a dirname.
1831# Using basename would be simpler, but some systems don't have it.
c8763215 1832 for file in .. $(USER_H); do \
1833 if [ X$$file != X.. ]; then \
1834 realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
1941d7da 1835 rm -f include/$$realfile; \
1836 cp $$file include; \
1837 chmod a+r include/$$realfile; \
c8763215 1838 fi; \
2cfd79fe 1839 done
b5850e21 1840 rm -f include/limits.h
2cfd79fe 1841 cp xlimits.h include/limits.h
1842 chmod a+r include/limits.h
2cfd79fe 1843# Install the README
b5850e21 1844 rm -f include/README
2cfd79fe 1845 cp $(srcdir)/README-fixinc include/README
1846 chmod a+r include/README
690a93ea 1847 touch stmp-int-hdrs
1848
1849# Build the complete include directory.
1850stmp-headers: stmp-int-hdrs gfloat.h
1851 rm -f include/float.h
1852 cp gfloat.h include/float.h
1853 chmod a+r include/float.h
2cfd79fe 1854 touch stmp-headers
1855
1856# Build fixed copies of system files.
62268150 1857stmp-fixinc: $(FIXINCLUDES) gsyslimits.h
2cfd79fe 1858 rm -rf include
1859 mkdir include
92d223d1 1860 if [ x$(FIXINCLUDES) != xMakefile.in ]; \
6848a9c6 1861 then \
1862 for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
1863 if [ -d $$dir ]; \
1864 then \
cee3b7e3 1865 $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
6848a9c6 1866 else true; fi; \
92d223d1 1867 done; \
6848a9c6 1868 else true; \
1869 fi
b7d4d520 1870 rm -f include/syslimits.h
1871 if [ -f include/limits.h ]; then \
1872 mv include/limits.h include/syslimits.h; \
1873 else \
1874 cp $(srcdir)/gsyslimits.h include/syslimits.h; \
1875 fi
1876 chmod a+r include/syslimits.h
9e74f24f 1877 touch stmp-fixinc
7c4f0e88 1878
15045969 1879# copy objc header files into build directory
9fdf517e 1880objc-headers: stmp-fixinc
c7341319 1881 if [ -d include ]; then true; else mkdir include; fi
a5199ad9 1882 if [ -d objc ]; then true; else mkdir objc; fi
7c4f0e88 1883 thisdir1=`pwd`; \
1884 srcdir1=`cd $(srcdir); pwd`; \
1885 cd objc; \
6eaaa27e 1886 if [ -f $${srcdir1}/objc/Makefile ]; then \
1887 $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
1888 srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
1889 GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
1890 GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include; \
1891 fi
15045969 1892 touch objc-headers
a5889b74 1893
1894# Files related to the fixproto script.
1895
047c2b8b 1896deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
f55e1a13 1897 CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
a5889b74 1898 export CC; \
6518b023 1899 $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h
a5889b74 1900 mv tmp-deduced.h deduced.h
1901
ff8281e4 1902gen-protos: gen-protos.o scan.o cppalloc.o $(HOST_LIBDEPS)
62268150 1903 ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
ff8281e4 1904 gen-protos.o scan.o cppalloc.o $(HOST_LIBS)
a5889b74 1905
c20b28d5 1906gen-protos.o: gen-protos.c scan.h $(build_xm_file)
c68462d9 1907 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c
1908
c20b28d5 1909scan.o: scan.c scan.h $(build_xm_file)
c68462d9 1910 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c
9541a717 1911
047c2b8b 1912xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
c92e16d4 1913 cat deduced.h $(srcdir)/sys-protos.h > tmp-fixtmp.c
1914 mv tmp-fixtmp.c fixtmp.c
2f9d2927 1915 $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \
6fc3eafd 1916 | sed -e 's/ / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
c92e16d4 1917 | ./gen-protos >xsys-protos.hT
1918 mv xsys-protos.hT xsys-protos.h
d7c4552e 1919 rm -rf fixtmp.c
a5889b74 1920
62268150 1921fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
1922 cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o version.o
1923 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
1924 scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o version.o \
1925 cppexp.o $(HOST_LIBS)
a5889b74 1926
9d6a1aa2 1927fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h $(build_xm_file)
c68462d9 1928 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
1929
caf36bd8 1930scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file)
c68462d9 1931 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
a5889b74 1932
047c2b8b 1933# stmp-fixproto depends on this, not on fix-header directly.
1934# The idea is to make sure fix-header gets built,
1935# but not rerun fixproto after each stage
1936# just because fix-header's mtime has changed.
1937fixhdr.ready: fix-header
1938 -if [ -f fixhdr.ready ] ; then \
1939 true; \
1940 else \
1941 touch fixhdr.ready; \
1942 fi
1943
7bf27989 1944# stmp-headers is to make sure fixincludes has already finished.
276709eb 1945# The if statement is so that we don't run fixproto a second time
1946# if it has already been run on the files in `include'.
6a0b7b7c 1947stmp-fixproto: fixhdr.ready fixproto stmp-headers
2deaa28d 1948 @echo "Various warnings and error messages from fixproto are normal"
4fbc622f 1949 -if [ -d include ] ; then true; else mkdir include; fi
b948f736 1950 -if [ -f include/fixed ] ; then true; \
276709eb 1951 else \
6f1f992e 1952 : This line works around a 'make' bug in BSDI 1.1.; \
ff8281e4 1953 FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
1954 $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
276709eb 1955 touch include/fixed; \
1956 fi
a5889b74 1957 touch stmp-fixproto
2cfd79fe 1958\f
32e6d418 1959# Remake the info files.
1960
627defc4 1961doc: info
73027c94 1962info: $(srcdir)/cpp.info $(srcdir)/gcc.info lang.info
32e6d418 1963
630c76ba 1964$(srcdir)/cpp.info: cpp.texi
64cda823 1965 cd $(srcdir); $(MAKEINFO) $(MAKEINFOFLAGS) cpp.texi
32e6d418 1966
630c76ba 1967$(srcdir)/gcc.info: gcc.texi extend.texi install.texi invoke.texi \
1968 md.texi rtl.texi tm.texi
64cda823 1969 cd $(srcdir); $(MAKEINFO) $(MAKEINFOFLAGS) gcc.texi
630c76ba 1970
73027c94 1971dvi: $(srcdir)/gcc.dvi $(srcdir)/cpp.dvi lang.dvi
627defc4 1972
64616031 1973# This works with GNU Make's default rule.
1974$(srcdir)/gcc.dvi: gcc.texi extend.texi install.texi invoke.texi \
1975 md.texi rtl.texi tm.texi
f345940f 1976 $(TEXI2DVI) $<
64616031 1977
1978# This works with GNU Make's default rule.
1979$(srcdir)/cpp.dvi: cpp.texi
f345940f 1980 $(TEXI2DVI) $<
64616031 1981
630c76ba 1982$(srcdir)/INSTALL: install1.texi install.texi
0b9e1f1f 1983 $(MAKEINFO) -D INSTALLONLY --no-header --no-split \
1984 `echo $(srcdir)/install1.texi | sed 's,^\./,,'`
32e6d418 1985\f
1986# Deletion of files made during compilation.
1987# There are four levels of this:
a8514488 1988# `mostlyclean', `clean', `distclean' and `maintainer-clean'.
32e6d418 1989# `mostlyclean' is useful while working on a particular type of machine.
c6396a0b 1990# It deletes most, but not all, of the files made by compilation.
32e6d418 1991# It does not delete libgcc.a or its parts, so it won't have to be recompiled.
c6396a0b 1992# `clean' deletes everything made by running `make all'.
79f818d0 1993# `distclean' also deletes the files made by config.
a8514488 1994# `maintainer-clean' also deletes everything that could be regenerated
1995# automatically. We remove as much from the language subdirectories as we can
73027c94 1996# (less duplicated code).
32e6d418 1997
79f818d0 1998
73027c94 1999mostlyclean: bytecode.mostlyclean lang.mostlyclean
32e6d418 2000 -rm -f $(STAGESTUFF)
343505c4 2001# Clean the objc subdir if we created one.
2002 if [ -d objc ]; then \
2003 srcdir1=`cd $(srcdir); pwd`; \
8c6da369 2004 cd objc; $(MAKE) -f $$srcdir1/objc/Makefile mostlyclean; \
343505c4 2005 else true; fi
bd594491 2006 -rm -f libobjc.a
32e6d418 2007# Delete the temporary source copies for cross compilation.
2008 -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
2009 -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
2010 -rm -f $(HOST_PREFIX_1)obstack.c
2011# Delete the temp files made in the course of building libgcc.a.
590613c7 2012 -rm -f tmplibgcc* tmpcopy xlimits.h
32e6d418 2013 for name in $(LIB1FUNCS); do rm -f $${name}.c; done
2014# Delete other temporary files.
e5b63666 2015 -rm -f tmp-float.h tmp-gcc.xtar.gz
f678532a 2016 -rm -f tmp-foo1 tmp-foo2 tmp-proto.* tmp-unproto.1 tmp-SYSCALLS.s
bfd24c7b 2017 -rm -f tmp-c-parse.y tmp-objc-prs.y tmp-gperf.h
c92e16d4 2018 -rm -f tmp-specs t-float.h-cross tmp-xlimits.h
2019 -rm -f tmp-fixtmp.c xsys-protos.hT
32e6d418 2020# Delete the stamp files.
2021 -rm -f stamp-* tmp-*
73027c94 2022 -rm -f */stamp-* */tmp-*
c6396a0b 2023# Delete debugging dump files.
32e6d418 2024 -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
c6396a0b 2025 -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack
73027c94 2026 -rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl
2027 -rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2
2028 -rm -f */*.sched2 */*.stack
c6396a0b 2029# Delete some files made during installation.
d82b9c93 2030 -rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c
e98401fc 2031 -rm -f collect collect2 mips-tfile mips-tdump alloca.s
a5889b74 2032# Delete files generated for fixproto
15dece2a 2033 -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
c9c7b9d8 2034 gen-protos fixproto.list fixtmp.* fixhdr.ready
c6396a0b 2035# Delete unwanted output files from TeX.
2036 -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
73027c94 2037 -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg
79f818d0 2038# Delete sorted indices we don't actually use.
2039 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
c6396a0b 2040# Delete core dumps.
73027c94 2041 -rm -f core */core
32e6d418 2042
79f818d0 2043# Delete all files made by compilation
2044# that don't exist in the distribution.
73027c94 2045clean: mostlyclean bytecode.clean lang.clean
8bd8ea06 2046# It may not be quite desirable to delete unprotoize.c here,
2047# but the spec for `make clean' requires it.
2048# Using unprotoize.c is not quite right in the first place,
2049# but what better way is there?
745e3a0d 2050 -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
17108b2b 2051 -rm -f libgcc1.null
131b361e 2052 -rm -f *.dvi
73027c94 2053 -rm -f */*.dvi
89e36a04 2054 -if [ -f md.pre-cpp ]; then \
2055 rm -f md ; \
2056 fi
2cfd79fe 2057# Delete the include directory.
5b1fce59 2058 -rm -rf stmp-* include objc-headers
73027c94 2059 -rm -f */stmp-*
d73a48cc 2060# Delete files used by the "multilib" facility (including libgcc subdirs).
f1ad3130 2061 -rm -f multilib.h tmpmultilib*
d73a48cc 2062 -if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \
2063 rm -rf $(MULTILIB_DIRNAMES); \
2064 else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \
2065 rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
2066 fi ; fi
32e6d418 2067
79f818d0 2068# Delete all files that users would normally create
2069# while building and installing GCC.
73027c94 2070distclean: clean bytecode.distclean lang.distclean
636fef92 2071 -rm -f tm.h config.h tconfig.h hconfig.h md
5484bc67 2072 -rm -f config.status config.run
636fef92 2073 -rm -f Makefile specs.h options.h *.oaux
79f818d0 2074 -rm -fr stage1 stage2 stage3 stage4
c4ed51d6 2075 -rm -f */stage1 */stage2 */stage3 */stage4 */include
08d7a103 2076 -rm -f objc-parse.output
2077 -rm -f c-parse.output
b541ad9d 2078 -rm -f *.asm
ae115421 2079 -rm -f float.h
c6396a0b 2080
2081# Delete anything likely to be found in the source directory
2082# that shouldn't be in the distribution.
73027c94 2083extraclean: distclean lang.extraclean
bbbdbddd 2084 -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
131b361e 2085 -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
08d7a103 2086 -rm -f config/*/=* config/*/"#"* config/*/*~*
2087 -rm -f config/*/*.orig config/*/*.rej
300d5cb3 2088 -rm -f *.dvi *.ps *.oaux *.d *.[zZ] *.gz
13da1009 2089 -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
08d7a103 2090 -rm -f *lose config/*lose config/*/*lose
3a0781a0 2091 -rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog
73027c94 2092 -rm -f */=* */"#"* */*~*
2093 -rm -f */patch* */*.orig */*.rej
2094 -rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz
2095 -rm -f */*.tar */*.xtar */*diff */*.diff.* */*.tar.* */*.xtar.* */*diffs
2096 -rm -f */*lose */*.s */*.s[0-9] */*.i
32e6d418 2097
2098# Get rid of every file that's generated from some other file.
2099# Most of these files ARE PRESENT in the GCC distribution.
a8514488 2100maintainer-clean: distclean bytecode.maintainer-clean lang.maintainer-clean
6a4a0b58 2101 -rm -f c-parse.y c-gperf.h objc-parse.y
32e6d418 2102 -rm -f objc-parse.c objc-parse.output
32e6d418 2103 -rm -f c-parse.c c-parse.h c-parse.output
2104 -rm -f cexp.c cexp.output TAGS
c6396a0b 2105 -rm -f cpp.info* cpp.??s cpp.*aux
2106 -rm -f gcc.info* gcc.??s gcc.*aux
32e6d418 2107\f
2108# Entry points `install' and `uninstall'.
c6396a0b 2109# Also use `install-collect2' to install collect2 when the config files don't.
32e6d418 2110
3f69fed5 2111# The semicolon is to prevent the install.sh -> install default rule
876dc5b0 2112# from doing anything. Having it run true helps avoid problems and
2113# noise from versions of make which don't like to have null commands.
c2a18965 2114install: $(INSTALL_TARGET) ; @true
32e6d418 2115
2cfd79fe 2116# Copy the compiler files into directories where they will be run.
62268150 2117# Install the driver last so that the window when things are
2118# broken is small.
2289acd7 2119install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
62268150 2120 install-libobjc install-man install-info lang.install-normal install-driver
32e6d418 2121
e77fd588 2122# Do nothing while making gcc with a cross-compiler. The person who
2123# makes gcc for the target machine has to know how to put a complete
2124# gcc together by hand.
2125install-build: force
2126 @echo You have to install gcc on your target machine by hand.
2127
32e6d418 2128# Run this on the target machine
2129# to finish installation of cross compiler.
2130install-cross-rest: install-float-h-cross
2131
2132# Install float.h for cross compiler.
2133# Run this on the target machine!
0d5bce1b 2134install-float-h-cross: installdirs
9f10de4b 2135# if [ -f enquire ] ; then true; else false; fi
2136# Note: don't use -. We should fail right away if enquire was not made.
2137 ./enquire -f > $(tmpdir)/float.h
32e6d418 2138 -rm -f $(libsubdir)/include/float.h
f32abccb 2139 $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h
2140 -rm -f $(tmpdir)/float.h
32e6d418 2141 chmod a-x $(libsubdir)/include/float.h
2142
0d5bce1b 2143# Create the installation directories.
2144installdirs:
2145 -if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; chmod a+rx $(prefix) ; fi
2146 -if [ -d $(exec_prefix) ] ; then true ; else mkdir $(exec_prefix) ; chmod a+rx $(exec_prefix) ; fi
47db7968 2147 -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
2148 -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
444c3fb0 2149# This dir isn't currently searched by cpp.
47db7968 2150# -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
67cb4bc1 2151 -if [ -d $(libdir)/gcc-lib/$(target_alias) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias) ; chmod a+rx $(libdir)/gcc-lib/$(target_alias) ; fi
2152 -if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version) ; chmod a+rx $(libdir)/gcc-lib/$(target_alias)/$(version) ; fi
2153 -if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version)/include ; chmod a+rx $(libdir)/gcc-lib/$(target_alias)/$(version)/include ; fi
47db7968 2154 -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
2155 -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
2156 -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi
2157 -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi
2158 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
32e6d418 2159# We don't use mkdir -p to create the parents of mandir,
2160# because some systems don't support it.
2161# Instead, we use this technique to create the immediate parent of mandir.
2388f67d 2162 -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
47db7968 2163 if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi
2164 -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; chmod a+rx $(mandir) ; fi
32e6d418 2165
2166# Install the compiler executables built during cross compilation.
0d5bce1b 2167install-common: native installdirs $(EXTRA_PARTS) lang.install-common
32e6d418 2168 for file in $(COMPILERS); do \
2169 if [ -f $$file ] ; then \
2170 rm -f $(libsubdir)/$$file; \
2171 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
2172 else true; \
2173 fi; \
2174 done
1a1e7b42 2175 for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
32e6d418 2176 if [ x"$$file" != x.. ]; then \
2177 rm -f $(libsubdir)/$$file; \
2178 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
2179 else true; fi; \
2180 done
1a1e7b42 2181 for file in $(EXTRA_PARTS) ..; do \
2182 if [ x"$$file" != x.. ]; then \
2183 rm -f $(libsubdir)/$$file; \
2184 $(INSTALL_DATA) $$file $(libsubdir)/$$file; \
2185 else true; fi; \
2186 done
8a4b1e01 2187# Don't mess with specs if it doesn't exist yet.
94c53b91 2188 -if [ -f specs ] ; then \
2189 rm -f $(libsubdir)/specs; \
8a4b1e01 2190 $(INSTALL_DATA) specs $(libsubdir)/specs; \
2191 fi
62268150 2192# Install protoize if it was compiled.
2193 -if [ -f protoize$(exeext) ]; \
2194 then \
2195 rm -f $(bindir)/protoize$(exeext); \
2196 $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/protoize$(exeext); \
2197 rm -f $(bindir)/unprotoize$(exeext); \
2198 $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/unprotoize$(exeext); \
2199 rm -f $(libsubdir)/SYSCALLS.c.X; \
2200 $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
2201 chmod a-x $(libsubdir)/SYSCALLS.c.X; \
2202 fi
2203 -rm -f $(libsubdir)/cpp$(exeext)
2204 $(INSTALL_PROGRAM) cpp$(exeext) $(libsubdir)/cpp$(exeext)
2205
67cb4bc1 2206# Install the driver program as $(target_alias)-gcc
32e6d418 2207# and also as either gcc (if native) or $(tooldir)/bin/gcc.
62268150 2208install-driver: xgcc
f403cbcb 2209 -if [ -f gcc-cross$(exeext) ] ; then \
2210 rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
12d8e722 2211 $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
32e6d418 2212 if [ -d $(tooldir)/bin/. ] ; then \
f403cbcb 2213 rm -f $(tooldir)/bin/gcc$(exeext); \
2214 $(INSTALL_PROGRAM) gcc-cross$(exeext) $(tooldir)/bin/gcc$(exeext); \
32e6d418 2215 else true; fi; \
2216 else \
f403cbcb 2217 rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2218 $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
67cb4bc1 2219 rm -f $(bindir)/$(target_alias)-gcc-1$(exeext); \
2220 ln $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext) \
f403cbcb 2221 > /dev/null 2>&1 \
67cb4bc1 2222 || cp $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext); \
2223 mv $(bindir)/$(target_alias)-gcc-1$(exeext) $(bindir)/$(target_alias)-gcc$(exeext); \
32e6d418 2224 fi
32e6d418 2225
a2aa0fc1 2226# Install the info files.
0d5bce1b 2227install-info: doc installdirs lang.install-info
a2aa0fc1 2228 -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
2229 cd $(srcdir); for f in cpp.info* gcc.info*; \
2230 do $(INSTALL_DATA) $$f $(infodir)/$$f; done
2231 -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
2232
32e6d418 2233# Install the man pages.
0d5bce1b 2234install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
b541ad9d 2235 -if [ -f gcc-cross ] ; then \
2236 rm -f $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2237 $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2238 chmod a-x $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2239 else \
2240 rm -f $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2241 $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2242 chmod a-x $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2243 fi
c6396a0b 2244 -rm -f $(mandir)/cccp$(manext)
ab866dde 2245 -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
2246 -chmod a-x $(mandir)/cccp$(manext)
32e6d418 2247
2248# Install the library.
0d5bce1b 2249install-libgcc: libgcc.a installdirs
32e6d418 2250 -if [ -f libgcc.a ] ; then \
2251 rm -f $(libsubdir)/libgcc.a; \
2252 $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
2253 if $(RANLIB_TEST) ; then \
2254 (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
2255 chmod a-x $(libsubdir)/libgcc.a; \
2256 else true; fi
2257
f1ad3130 2258# Install multiple versions of libgcc.a.
0d5bce1b 2259install-multilib: stmp-multilib installdirs
f1ad3130 2260 for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
2261 dir=`echo $$i | sed -e 's/;.*$$//'`; \
2262 if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \
cdc96909 2263 for f in libgcc.a $(EXTRA_MULTILIB_PARTS); do \
2264 rm -f $(libsubdir)/$${dir}/$${f}; \
2265 $(INSTALL_DATA) $${dir}/$${f} $(libsubdir)/$${dir}/$${f}; \
2266 done; \
f1ad3130 2267 if $(RANLIB_TEST); then \
2268 (cd $(libsubdir)/$${dir}; $(RANLIB) libgcc.a); else true; fi; \
2269 chmod a-x $(libsubdir)/$${dir}/libgcc.a; \
2270 done
2271
f32abccb 2272# Install the objc run time library.
0d5bce1b 2273install-libobjc: installdirs
f32abccb 2274 -if [ -f libobjc.a ] ; then \
2275 rm -f $(libsubdir)/libobjc.a; \
2276 $(INSTALL_DATA) libobjc.a $(libsubdir)/libobjc.a; \
2277 if $(RANLIB_TEST) ; then \
2278 (cd $(libsubdir); $(RANLIB) libobjc.a); else true; fi; \
2279 chmod a-x $(libsubdir)/libobjc.a; \
2280 else true; fi
2281
2cfd79fe 2282# Install all the header files built in the include subdirectory.
c8763215 2283install-headers: install-include-dir $(INSTALL_HEADERS_DIR) $(INSTALL_ASSERT_H)
2cfd79fe 2284# Fix symlinks to absolute paths in the installed include directory to
2285# point to the installed directory, not the build directory.
2286 -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
2287 if [ $$? -eq 0 ]; then \
2288 dir=`cd include; pwd`; \
2289 for i in $$files; do \
2290 dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
2291 if expr "$$dest" : "$$dir.*" > /dev/null; then \
2292 rm -f $(libsubdir)/include/$$i; \
5822e312 2293 ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
2cfd79fe 2294 fi; \
2295 done; \
2296 fi
32e6d418 2297
2cfd79fe 2298# Create or recreate the gcc private include file directory.
0d5bce1b 2299install-include-dir: installdirs
2cfd79fe 2300 -rm -rf $(libsubdir)/include
2301 mkdir $(libsubdir)/include
2302 -chmod a+rx $(libsubdir)/include
2303
2304# Install the include directory using tar.
a5889b74 2305install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
651b0150 2306 (cd include; \
b948f736 2307 tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
16db1e2d 2308# /bin/sh on some systems returns the status of the first tar,
2309# and that can lose with GNU tar which always writes a full block.
2310# So use `exit 0' to ignore its exit status.
2cfd79fe 2311
2312# Install the include directory using cpio.
a5889b74 2313install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
813fb313 2314 (cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
32e6d418 2315
35df828f 2316# Put assert.h where it won't override GNU libc's assert.h.
2317# It goes in a dir that is searched after GNU libc's headers;
2318# thus, the following conditionals are no longer needed.
2319# But it's not worth deleting them now.
2320## Don't replace the assert.h already there if it is not from GCC.
2321## This code would be simpler if it tested for -f ... && ! grep ...
2322## but supposedly the ! operator is missing in sh on some systems.
0d5bce1b 2323install-assert-h: assert.h installdirs
eb5a0caa 2324 if [ -f $(assertdir)/assert.h ]; \
2325 then \
95856242 2326 if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \
a953974c 2327 then \
eb5a0caa 2328 rm -f $(assertdir)/assert.h; \
2329 $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
04873c54 2330 chmod a-x $(assertdir)/assert.h; \
eb5a0caa 2331 else true; \
2332 fi; \
2ba284c3 2333 else \
db9a0b19 2334 rm -f $(assertdir)/assert.h; \
2335 $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
04873c54 2336 chmod a-x $(assertdir)/assert.h; \
2ba284c3 2337 fi
32e6d418 2338
c6396a0b 2339# Use this target to install the program `collect2' under the name `ld'.
0d5bce1b 2340install-collect2: collect2 installdirs
f403cbcb 2341 $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/ld$(exeext)
c6396a0b 2342# Install the driver program as $(libsubdir)/gcc for collect2.
f403cbcb 2343 $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
c6396a0b 2344
32e6d418 2345# Cancel installation by deleting the installed files.
73027c94 2346uninstall: lang.uninstall
32e6d418 2347 -rm -rf $(libsubdir)
f403cbcb 2348 -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext)
2349 -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext)
2350 -rm -rf $(bindir)/protoize$(exeext)
2351 -rm -rf $(bindir)/unprotoize$(exeext)
b541ad9d 2352 -rm -rf $(mandir)/$(GCC_INSTALL_NAME)$(manext)
2353 -rm -rf $(mandir)/$(GCC_CROSS_NAME)$(manext)
c6396a0b 2354 -rm -rf $(mandir)/cccp$(manext)
32e6d418 2355 -rm -rf $(mandir)/protoize$(manext)
2356 -rm -rf $(mandir)/unprotoize$(manext)
2357\f
2358# These exist for maintenance purposes.
2359
2360# Update the tags table.
2361TAGS: force
2362 cd $(srcdir); \
2363 mkdir temp; \
73027c94 2364 mv -f c-parse.[ch] objc-parse.c cexp.c =*.[chy] temp; \
32e6d418 2365 etags *.y *.h *.c; \
2366 mv temp/* .; \
2367 rmdir temp
2368
2369# Create the distribution tar file.
e5b63666 2370#dist: gcc-$(version).tar.gz
2371dist: gcc.xtar.gz
32e6d418 2372
e5b63666 2373gcc.xtar.gz: gcc.xtar
b89eb617 2374 gzip --best < gcc.xtar > tmp-gcc.xtar.gz
e5b63666 2375 mv tmp-gcc.xtar.gz gcc.xtar.gz
32e6d418 2376
e5b63666 2377#gcc-$(version).tar.gz: gcc-$(version).tar
2378# gzip < gcc-$(version).tar > gcc-$(version).tar.gz
32e6d418 2379
2380#gcc-$(version).tar:
6c76e6ec 2381gcc.xtar: distdir
2382# Make the distribution.
b948f736 2383 tar -chf gcc.xtar gcc-$(version)
6c76e6ec 2384
73027c94 2385# This target exists to do the initial work before the language specific
2386# stuff gets done.
0f557c81 2387distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
2388 $(srcdir)/objc-parse.y $(srcdir)/c-parse.c $(srcdir)/objc-parse.c \
2389 $(srcdir)/cexp.c
2deaa28d 2390 @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \
630c76ba 2391 then true; \
0dce1b01 2392 else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
630c76ba 2393 fi
131b361e 2394# Update the version number in README
2395 awk '$$1 " " $$2 " " $$3 == "This directory contains" \
2396 { $$6 = version; print $$0 } \
2397 $$1 " " $$2 " " $$3 != "This directory contains"' \
2398 version=$(version) README > tmp.README
2399 mv tmp.README README
c6396a0b 2400 -rm -rf gcc-$(version) tmp
32e6d418 2401# Put all the files in a temporary subdirectory
2402# which has the name that we want to have in the tar file.
c6396a0b 2403 mkdir tmp
2404 mkdir tmp/config
3bc8e4d6 2405 mkdir tmp/ginclude
4f1fd857 2406 mkdir tmp/objc
c6396a0b 2407 for file in *[0-9a-zA-Z+]; do \
131b361e 2408 ln $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
c6396a0b 2409 done
2410 cd config; \
2411 for file in *[0-9a-zA-Z+]; do \
57e88ef9 2412 if test -d $$file && test "$$file" != RCS; then \
8a32ef6f 2413 mkdir ../tmp/config/$$file; \
2414 cd $$file; \
2415 for subfile in *[0-9a-zA-Z+]; do \
2416 ln $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
2417 || cp $$subfile ../../tmp/config/$$file; \
2418 done; \
2419 cd ..; \
2420 else \
2421 ln $$file ../tmp/config >/dev/null 2>&1 \
2422 || cp $$file ../tmp/config; \
2423 fi; \
32e6d418 2424 done
3bc8e4d6 2425 cd ginclude; \
2426 for file in *[0-9a-zA-Z+]; do \
f403cbcb 2427 ln $$file ../tmp/ginclude >/dev/null 2>&1 \
2428 || cp $$file ../tmp/ginclude; \
3bc8e4d6 2429 done
4f1fd857 2430 cd objc; \
2431 for file in *[0-9a-zA-Z+]; do \
e77fd588 2432 ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
4f1fd857 2433 done
c6396a0b 2434 ln .gdbinit tmp
73027c94 2435
2436# Finish making `distdir', after the languages have done their thing.
2437distdir-finish:
c6396a0b 2438 mv tmp gcc-$(version)
3bc8e4d6 2439# Get rid of everything we don't want in the distribution. We'd want
2440# this to use Makefile.in, but it doesn't have the `lang.foo' targets
2441# expanded.
2442 cd gcc-$(version); make extraclean
32e6d418 2443
73027c94 2444distdir: distdir-start lang.distdir distdir-finish
2445
2deaa28d 2446# make diff oldversion=M.N
2447# creates a diff file between an older distribution and this one.
2448# The -P option assumes this is GNU diff.
2449diff:
6a4a0b58 2450 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \
73027c94 2451 -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c \
2452 -x TAGS \
2453 -x "gcc.??" -x "gcc.??s" -x gcc.aux -x "gcc.info*" \
2454 -x "cpp.??" -x "cpp.??s" -x cpp.aux -x "cpp.info*" \
2455 $(LANG_DIFF_EXCLUDES) \
2deaa28d 2456 gcc-$(oldversion) gcc-$(version) > diffs
2457
41f63c60 2458bootstrap: force
2459# Only build the C compiler for stage1, because that is the only one that
2460# we can guarantee will build with the native compiler, and also it is the
2461# only thing useful for building stage2.
e754efc9 2462 $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
32e6d418 2463 $(MAKE) stage1
c6396a0b 2464# This used to define ALLOCA as empty, but that would lead to bad results
2465# for a subsequent `make install' since that would not have ALLOCA empty.
2466# To prevent `make install' from compiling alloca.o and then relinking cc1
2467# because alloca.o is newer, we permit these recursive makes to compile
2468# alloca.o. Then cc1 is newer, so it won't have to be relinked.
8f90ec19 2469 $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
32e6d418 2470 $(MAKE) stage2
8f90ec19 2471 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
32e6d418 2472
2473bootstrap2: force
8f90ec19 2474 $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
32e6d418 2475 $(MAKE) stage2
8f90ec19 2476 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
32e6d418 2477
2478bootstrap3: force
8f90ec19 2479 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
32e6d418 2480
48c6936b 2481# Compare the object files in the current directory with those in the
2482# stage2 directory.
2483
639b13ee 2484# ./ avoids bug in some versions of tail.
48c6936b 2485compare: force
62268150 2486 for file in *$(objext); do \
639b13ee 2487 tail +16c ./$$file > tmp-foo1; \
77a164d8 2488 tail +16c stage2/$$file > tmp-foo2 2>/dev/null \
14ce54a4 2489 && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
48c6936b 2490 done
73027c94 2491 for dir in tmp-foo $(SUBDIRS); do \
62268150 2492 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2493 for file in $$dir/*$(objext); do \
73027c94 2494 tail +16c ./$$file > tmp-foo1; \
2495 tail +16c stage2/$$file > tmp-foo2 2>/dev/null \
14ce54a4 2496 && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
9771451c 2497 done; \
2498 fi; \
73027c94 2499 done
48c6936b 2500 -rm -f tmp-foo*
2501
2502# Similar, but compare with stage3 directory
2503compare3: force
62268150 2504 for file in *$(objext); do \
73027c94 2505 tail +16c ./$$file > tmp-foo1; \
77a164d8 2506 tail +16c stage3/$$file > tmp-foo2 2>/dev/null \
14ce54a4 2507 && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
48c6936b 2508 done
73027c94 2509 for dir in tmp-foo $(SUBDIRS); do \
62268150 2510 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2511 for file in $$dir/*$(objext); do \
73027c94 2512 tail +16c ./$$file > tmp-foo1; \
2513 tail +16c stage3/$$file > tmp-foo2 2>/dev/null \
14ce54a4 2514 && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
9771451c 2515 done; \
2516 fi; \
73027c94 2517 done
48c6936b 2518 -rm -f tmp-foo*
2519
f72bf186 2520# Compare the object files in the current directory with those in the
2521# stage2 directory. Use gnu cmp (diffutils v2.4 or later) to avoid
2522# running tail and the overhead of twice copying each object file.
2523
2524gnucompare: force
62268150 2525 for file in *$(objext); do \
f72bf186 2526 cmp --ignore-initial=16 $$file stage2/$$file || true ; \
2527 done
73027c94 2528 for dir in tmp-foo $(SUBDIRS); do \
62268150 2529 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
601520ec 2530 for file in $$dir/*$(objext); do \
73027c94 2531 cmp --ignore-initial=16 $$file stage2/$$file || true ; \
9771451c 2532 done; \
2533 fi; \
73027c94 2534 done
f72bf186 2535
2536# Similar, but compare with stage3 directory
2537gnucompare3: force
62268150 2538 for file in *$(objext); do \
f72bf186 2539 cmp --ignore-initial=16 $$file stage3/$$file || true ; \
2540 done
73027c94 2541 for dir in tmp-foo $(SUBDIRS); do \
62268150 2542 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2543 for file in $$dir/*$(objext); do \
73027c94 2544 cmp --ignore-initial=16 $$file stage3/$$file || true ; \
9771451c 2545 done; \
2546 fi; \
73027c94 2547 done
f72bf186 2548
32e6d418 2549# Copy the object files from a particular stage into a subdirectory.
73027c94 2550stage1-start:
c6396a0b 2551 -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
73027c94 2552 -for dir in . $(SUBDIRS) ; \
2553 do \
21fde8a9 2554 if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
73027c94 2555 done
32e6d418 2556 -mv $(STAGESTUFF) stage1
b541ad9d 2557# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2558# dir will work properly.
daa53736 2559 -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage1 || cp as$(exeext) stage1 ; else true ; fi
2560 -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage1 || cp ld$(exeext) stage1 ; else true ; fi
2561 -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage1 || cp collect-ld$(exeext) stage1 ; else true ; fi
32e6d418 2562 -rm -f stage1/libgcc.a
2563 -cp libgcc.a stage1
2564 -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
3efc89f0 2565 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2566 cp stage1/$${f} . ; \
2567 fi; done
73027c94 2568stage1: force stage1-start lang.stage1
32e6d418 2569
73027c94 2570stage2-start:
c6396a0b 2571 -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
73027c94 2572 -for dir in . $(SUBDIRS) ; \
2573 do \
21fde8a9 2574 if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
73027c94 2575 done
32e6d418 2576 -mv $(STAGESTUFF) stage2
b541ad9d 2577# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2578# dir will work properly.
daa53736 2579 -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage2 || cp as$(exeext) stage2 ; else true ; fi
2580 -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage2 || cp ld$(exeext) stage2 ; else true ; fi
2581 -if [ -f collect-ld ] ; then ln -s ../collect-ld$(exeext) stage2 || cp collect-ld$(exeext) stage2 ; else true ; fi
32e6d418 2582 -rm -f stage2/libgcc.a
2583 -cp libgcc.a stage2
2584 -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
3efc89f0 2585 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2586 cp stage2/$${f} . ; \
2587 fi; done
73027c94 2588stage2: force stage2-start lang.stage2
32e6d418 2589
73027c94 2590stage3-start:
2388f67d 2591 -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
73027c94 2592 -for dir in . $(SUBDIRS) ; \
2593 do \
21fde8a9 2594 if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
73027c94 2595 done
32e6d418 2596 -mv $(STAGESTUFF) stage3
b541ad9d 2597# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2598# dir will work properly.
daa53736 2599 -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage3 || cp as$(exeext) stage3 ; else true ; fi
2600 -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage3 || cp ld$(exeext) stage3 ; else true ; fi
2601 -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage3 || cp collect-ld$(exeext) stage3 ; else true ; fi
32e6d418 2602 -rm -f stage3/libgcc.a
2603 -cp libgcc.a stage3
2604 -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
3efc89f0 2605 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2606 cp stage3/$${f} . ; \
2607 fi; done
73027c94 2608stage3: force stage3-start lang.stage3
32e6d418 2609
73027c94 2610stage4-start:
2388f67d 2611 -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
73027c94 2612 -for dir in . $(SUBDIRS) ; \
2613 do \
21fde8a9 2614 if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
73027c94 2615 done
32e6d418 2616 -mv $(STAGESTUFF) stage4
b541ad9d 2617# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2618# dir will work properly.
daa53736 2619 -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage4 || cp as$(exeext) stage4 ; else true ; fi
2620 -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage4 || cp ld$(exeext) stage4 ; else true ; fi
2621 -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage4 || cp collect-ld$(exeext) stage4 ; else true ; fi
32e6d418 2622 -rm -f stage4/libgcc.a
2623 -cp libgcc.a stage4
2624 -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
3efc89f0 2625 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2626 cp stage4/$${f} . ; \
2627 fi; done
73027c94 2628stage4: force stage4-start lang.stage4
32e6d418 2629
2630# Copy just the executable files from a particular stage into a subdirectory,
2631# and delete the object files. Use this if you're just verifying a version
2632# that is pretty sure to work, and you are short of disk space.
62268150 2633risky-stage1: stage1
2634 - make clean
32e6d418 2635
62268150 2636risky-stage2: stage2
32e6d418 2637 -make clean
2638
62268150 2639risky-stage3: stage3
32e6d418 2640 -make clean
2641
62268150 2642risky-stage4: stage4
32e6d418 2643 -make clean
2644
2645#In GNU Make, ignore whether `stage*' exists.
a8514488 2646.PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap
32e6d418 2647.PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2648
2649force: