]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/Makefile.in
*** empty log message ***
[thirdparty/gcc.git] / gcc / Makefile.in
CommitLineData
32e6d418 1# Makefile for GNU C compiler.
2# Copyright (C) 1987, 1988, 1990, 1991 Free Software Foundation, Inc.
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
18#the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19
20# The targets for external use include:
21# all, doc, proto, install, install-cross, install-cross-rest,
c6396a0b 22# uninstall, TAGS, mostlyclean, clean, distclean, realclean,
32e6d418 23# stage1, stage2, stage3, stage4.
24
c6396a0b 25# Suppress smart makes who think they know how to automake Yacc files
26.y.c:
27
32e6d418 28.NOEXPORT: # This tells GNU Make version 3
29 # not to put all the variables in the environment.
30
31# Variables that exist for you to override.
32# See below for how to change them for certain systems.
33
34# Selection of languages to be made.
35LANGUAGES = c c++ objective-c proto
36
37ALLOCA =
38ALLOCA_FLAGS = -S -Demacs
39ALLOCA_FINISH = as -o alloca.o alloca.s
40
41# Various ways of specifying flags for compilations:
42# CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
43# BOOT_CFLAGS is the value of CFLAGS to pass
44# to the stage2 and stage3 compilations
45# XCFLAGS is used for most compilations but not when using the GCC just built.
46XCFLAGS =
47CFLAGS = -g
48BOOT_CFLAGS = -O $(CFLAGS)
49# These exists to be overridden by the x-* and t-* files, respectively.
50X_CFLAGS =
51T_CFLAGS =
52
53X_CPPFLAGS =
54T_CPPFLAGS =
55
56CC = cc
57BISON = bison
58BISONFLAGS =
59AR = ar
60OLDAR_FLAGS = qc
61AR_FLAGS = rc
62SHELL = /bin/sh
63# on sysV, define this as cp.
64INSTALL = install -c
65# These permit overriding just for certain files.
66INSTALL_PROGRAM = $(INSTALL)
67INSTALL_DATA = $(INSTALL)
68SYMLINK = ln -s
69
70# Define this as & to perform parallel make on a Sequent.
71# Note that this has some bugs, and it seems currently necessary
72# to compile all the gen* files first by hand to avoid erroneous results.
73P =
74
75# How to invoke ranlib.
76RANLIB = ranlib
77# Test to use to see whether ranlib exists on the system.
78RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
79
80# Compiler to use for compiling libgcc1.a.
81# OLDCC should not be the GNU C compiler,
82# since that would compile typical libgcc1.a functions such as mulsi3
83# into infinite recursions.
84OLDCC = cc
85
86# CFLAGS for use with OLDCC, for compiling libgcc1.a.
87# NOTE: -O does not work on some Unix systems!
88CCLIBFLAGS = -O
89
c6396a0b 90# Version of ar to use when compiling libgcc1.a.
32e6d418 91OLDAR = ar
92
93# The GCC to use for compiling libgcc2.a. Usually the one we just built.
94# Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
95GCC_FOR_TARGET = ./gcc
96
97# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
98# It omits XCFLAGS, and specifies -B./.
99GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -B./
100
101# Special flags for compiling enquire.
102# We disable optimization to make floating point more reliable.
103ENQUIRE_CFLAGS = -DNO_SC -DNO_MEM -DNO_STDDEF -O0
104ENQUIRE_LDFLAGS = $(LDFLAGS)
105
106# Tools to use when building a cross-compiler.
107# These are used because `configure' appends `cross-make'
108# to the makefile when making a cross-compiler.
109
110TARGET_TOOLPREFIX = $(tooldir)/bin/
111AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
112AR_FOR_TARGET_FLAGS = rc
113RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
114RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
115CROSS_TOOLS =
116
8bd8ea06 117# There may be a premade insn-attrtab.c for this machine.
118# (You could rebuild it with genattrtab as usual, but it takes a long time.)
119# PREMADE_ATTRTAB is the file name of the file to use.
120# PREMADE_ATTRTAB_MD is the md file it corresponds to.
121PREMADE_ATTRTAB_MD = Makefile # Guaranteed not to cmp equal to md.
122PREMADE_ATTRTAB =
123
32e6d418 124target= ... `configure' substitutes actual target name here.
125xmake_file= ... `configure' substitutes actual x- file name here.
126tmake_file= ... `configure' substitutes actual t- file name here.
127version=`awk '{printf "%s", substr ($$4, 2, length ($$4) - 3); }' $(srcdir)/version.c`
128
129# Directory where sources are, from where we are.
130srcdir = .
131# Common prefix for installation directories.
132# NOTE: This directory must exist when you start installation.
133prefix = /usr/local
c6396a0b 134# Directory in which to put host dependent programs and libraries
135exec_prefix = $(prefix)
32e6d418 136# Directory in which to put the executable for the command `gcc'
c6396a0b 137bindir = $(exec_prefix)/bin
32e6d418 138# Directory in which to put the directories used by the compiler.
c6396a0b 139libdir = $(exec_prefix)/lib
32e6d418 140# Directory in which the compiler finds executables, libraries, etc.
c6396a0b 141libsubdir = $(libdir)/gcc-lib/$(target)/$(version)
32e6d418 142# Extension (if any) to put in installed man-page filename.
143manext = .1
144# Directory in which to put man pages.
145mandir = $(prefix)/man/man1
146# Directory in which to find other cross-compilation tools and headers.
147# Used in install-cross.
148tooldir = $(prefix)/$(target)
149
150# Additional system libraries to link with.
151CLIB=
152
153# Change this to a null string if obstacks are installed in the
154# system library.
155OBSTACK=obstack.o
156
157# Specify the rule for actually making libgcc1.a.
c6396a0b 158# The value may be empty; that means to do absolutely nothing
159# with or for libgcc1.a.
32e6d418 160LIBGCC1 = libgcc1.a
161
162# Specify the rule for actually making libgcc2.a.
163LIBGCC2 = libgcc2.a
164
165# Options to use when compiling libgcc2.a.
166# -g1 causes output of debug info only for file-scope entities.
167# we use this here because that should be enough, and also
168# so that -g1 will be tested.
169LIBGCC2_CFLAGS = -O2 $(GCC_CFLAGS) -g1
170
171# List of extra executables that should be compiled for this target machine
172# that are used for compiling from source code to object code.
173# The rules for compiling them should be in the t-* file for the machine.
174EXTRA_PASSES =
175
c6396a0b 176# Like EXTRA_PASSES, but these are used when linking.
177EXTRA_PROGRAMS =
178
179# List of extra object files that should be compiled for this target machine.
32e6d418 180# The rules for compiling them should be in the t-* file for the machine.
181EXTRA_PARTS =
182
c6396a0b 183# List of extra object files that should be compiled and linked with
184# compiler proper (cc1, cc1obj, cc1plus).
185EXTRA_OBJS =
186
79f818d0 187# Set this to `ld' to enable use of collect2.
188# USE_COLLECT2 =
189# It is convenient for configure to add the assignment at the beginning,
190# so don't override it here.
191
32e6d418 192# List of extra C and assembler files to add to libgcc1.a.
193# Assembler files should have names ending in `.asm'.
194LIB1FUNCS_EXTRA =
195
196# List of extra C and assembler files to add to libgcc2.a.
197# Assembler files should have names ending in `.asm'.
198LIB2FUNCS_EXTRA =
199
200# Program to convert libraries.
201LIBCONVERT =
202
203# Control whether header files are installed.
204# We will change this to install-fixincludes eventually.
205# It would be useful for people to try this now.
206INSTALL_HEADERS=install-headers
207
208# Select which version of fixincludes to use (I.E. regular versus SVR4)
209FIXINCLUDES=fixincludes
210
211# List of things which should already be built whenever we try to use gcc
212# to compile anything (without linking).
213GCC_PASSES=gcc cc1 cpp $(EXTRA_PASSES)
214
215# List of things which should already be built whenever we try to use gcc
216# to link anything.
79f818d0 217GCC_PARTS=$(GCC_PASSES) libgcc.a $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
32e6d418 218
219# Change this to empty to prevent installing limits.h.
c6396a0b 220# Actually, this currently has no effect,
32e6d418 221# and if that causes no problems, it can be deleted.
c6396a0b 222# Otherwise, it must be replaced so as to control
32e6d418 223# the actions of install-limits-h.
224LIMITS_H = limits.h
225
226# Directory to link to, when using the target `maketest'.
227DIR = ../gcc
228
229# Flags to use when cross-building GCC.
230# Prefix to apply to names of object files when using them
231# to run on the machine we are compiling on.
232HOST_PREFIX=
233# Prefix to apply to names of object files when compiling them
234# to run on the machine we are compiling on.
235# The default for this variable is chosen to keep these rules
236# out of the way of the other rules for compiling the same source files.
237HOST_PREFIX_1=loser-
238HOST_CC=$(CC)
239HOST_CFLAGS=$(ALL_CFLAGS)
c6396a0b 240HOST_CLIB=$(CLIB)
32e6d418 241HOST_LDFLAGS=$(LDFLAGS)
242HOST_CPPFLAGS=$(ALL_CPPFLAGS)
c6396a0b 243HOST_ALLOCA=$(ALLOCA)
244HOST_MALLOC=$(MALLOC)
245HOST_OBSTACK=$(OBSTACK)
32e6d418 246
247# Choose the real default target.
248ALL=all.internal
249
250# Choose the real install target.
251INSTALL_TARGET=install-native
252
253# End of variables for you to override.
254
255# Definition of `all' is here so that new rules inserted by sed
256# do not specify the default target.
257# The real definition is under `all.internal' (for native compilers)
258# or `all.cross' (for cross compilers).
c6396a0b 259all: all.indirect
32e6d418 260
261# sed inserts variable overrides after the following line.
262####
263\f
264# Now figure out from those variables how to compile and link.
265
c6396a0b 266all.indirect: $(ALL)
267
32e6d418 268INTERNAL_CFLAGS = $(CROSS)
269
270# This is the variable actually used when we compile.
271ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)
272
273# Likewise.
274ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
275
276# Even if ALLOCA is set, don't use it if compiling with GCC.
c6396a0b 277USE_ALLOCA= ` case "${CC}" in "${OLDCC}") echo ${ALLOCA} ;; esac `
278USE_HOST_ALLOCA= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
279USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
280USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
32e6d418 281
282# Dependency on obstack, alloca, malloc or whatever library facilities
283# are not installed in the system libraries.
284# We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
285LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
286
287# Likewise, for use in the tools that must run on this machine
288# even if we are cross-building GCC.
289# We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
c6396a0b 290HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC)
32e6d418 291
292# How to link with both our special library facilities
293# and the system's installed libraries.
294LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(CLIB)
295
296# Likewise, for use in the tools that must run on this machine
297# even if we are cross-building GCC.
c6396a0b 298HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC) \
299 $(HOST_CLIB)
32e6d418 300
301HOST_RTL = $(HOST_PREFIX)rtl.o
302HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
262d46de 303HOST_PRINT = $(HOST_PREFIX)print-rtl.o
32e6d418 304
305# Specify the directories to be searched for header files.
306# Both . and srcdir are used, in that order,
307# so that tm.h and config.h will be found in the compilation
308# subdirectory rather than in the source directory.
309INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
310SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config
311
312# Always use -I$(srcdir)/config when compiling.
313.c.o:
314 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
315
316# This tells GNU make version 3 not to export all the variables
317# defined in this file into the environment.
318.NOEXPORT:
319\f
320# Lists of files for various purposes.
321
322# A list of all the language-specific executables.
323COMPILERS = cc1 cc1plus cc1obj
324
325# Language-specific object files for C.
326C_OBJS = c-parse.o c-lang.o \
327 c-lex.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o
328
329# Language-specific object files for Objectionable C.
330OBJC_OBJS = objc-parse.o objc-actions.o \
331 c-lex.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o
332
333# Language-specific object files for C++.
334CPLUS_OBJS = cp-parse.o cp-decl.o cp-decl2.o \
335 cp-typeck.o cp-type2.o cp-tree.o cp-ptree.o \
336 cp-cvt.o cp-search.o cp-lex.o cp-gc.o cp-call.o \
337 cp-class.o cp-init.o cp-method.o cp-except.o \
338 cp-expr.o cp-pt.o cp-edsel.o cp-xref.o \
339 $(CPLUS_INPUT) cp-spew.o c-common.o
340
341# Language-independent object files.
342OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
343 function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
79f818d0 344 rtl.o print-rtl.o rtlanal.o emit-rtl.o \
345 dbxout.o sdbout.o dwarfout.o xcoffout.o \
32e6d418 346 integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
347 regclass.o local-alloc.o global-alloc.o reload.o reload1.o caller-save.o \
348 insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
349 insn-recog.o insn-extract.o insn-output.o insn-emit.o \
79f818d0 350 insn-attrtab.o aux-output.o getpwd.o $(EXTRA_OBJS)
32e6d418 351
352# GEN files are listed separately, so they can be built before doing parallel
353# makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load
354# them before rtl.o is compiled.
355GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
356
357# Files to be copied away after each stage in building.
358STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
359 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
360 insn-attr.h insn-attrtab.c \
361 stamp-flags stamp-config stamp-codes \
362 stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
d7330690 363 stamp-attr stamp-attrtab stamp-proto \
32e6d418 364 genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
365 genattrtab genattr \
79f818d0 366 $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp \
0b20f012 367 cc1plus cc1obj enquire protoize unprotoize specs collect2 $(USE_COLLECT2)
32e6d418 368
369# Members of libgcc1.a.
370LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
371 _lshrsi3 _lshlsi3 _ashrsi3 _ashlsi3 \
372 _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
373 _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
374 _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
375 _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
376 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
377
378# Library members defined in libgcc2.c.
379LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
380 _lshrdi3 _lshldi3 _ashldi3 _ashrdi3 \
381 _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
382 _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
383 _varargs _eprintf _builtin_new _builtin_New _builtin_del \
384 _bb _shtab _clear_cache _trampoline __main _exit
385
386# Header files that are made available under the same name
387# to programs compiled with gcc.
388USER_H = assert.h va-hp800.h va-i860.h va-mips.h va-pyr.h va-sparc.h \
bd4d34d4 389 va-spur.h va-m88k.h va-i960.h proto.h
32e6d418 390
391# All the header files that are installed for users from GCC itself.
392INSTALLED_H = float.h stddef.h stdarg.h varargs.h $(USER_H) limits.h
393
394# The files that "belong" in CONFIG_H are deliberately omitted
395# because having them there would not be useful in actual practice.
396# All they would do is cause complete recompilation every time
397# one of the machine description files is edited.
398# That may or may not be what one wants to do.
399# If it is, rm *.o is an easy way to do it.
400# CONFIG_H = config.h tm.h
401CONFIG_H =
402RTL_H = rtl.h rtl.def machmode.h machmode.def
403TREE_H = tree.h real.h tree.def machmode.h machmode.def
404CPLUS_TREE_H = $(TREE_H) cp-tree.h cp-tree.def
405\f
406# Avoid a lot of time thinking about remaking Makefile.in and *.def.
407.SUFFIXES: .in .def
408
79f818d0 409Makefile: $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/version.c \
32e6d418 410 $(srcdir)/config/$(xmake_file) $(srcdir)/config/$(tmake_file)
411 sh config.status
412
413all.internal: start.encap rest.encap
414# This is what to compile if making a cross-compiler.
d7330690 415all.cross: native gcc-cross cross-test
32e6d418 416# This is what must be made before installing GCC and converting libraries.
417start.encap: native gcc $(LIBGCC1_TARGET)
418# Use this to make a GCC that will be used only to recompile GCC.
419for-bootstrap: start.encap libgcc.a
420# These can't be made, with COFF encapsulation, until after GCC can run.
c6396a0b 421rest.encap: libgcc.a float.h $(EXTRA_PARTS)
32e6d418 422# This is what is made with the host's compiler
423# whether making a cross compiler or not.
79f818d0 424native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
32e6d418 425
426# Define the names for selecting languages in LANGUAGES.
427C c: cc1
428C++ c++: cc1plus
429OBJC objc: cc1obj
430OBJECTIVE-C objective-c: cc1obj
431PROTO: proto
432
c6396a0b 433# Really, really stupid make features, such as SUN's KEEP_STATE, may force
434# a target to build even if it is up-to-date. So we must verify that
435# config.status does not exist before failing.
32e6d418 436config.status:
c6396a0b 437 @if [ ! -f config.status ] ; then \
438 echo You must configure gcc. Look at the INSTALL file for details.; \
439 false; \
440 else \
441 true; \
442 fi
32e6d418 443
d7330690 444# Verify that it works to compile and link cross-test.
445# If it does, then there are sufficient replacements for libgcc1.a.
446cross-test: cross-test.o native gcc-cross
447 $(GCC_FOR_TARGET) $(GCC_CFLAGS) cross-test.o -o $@
448cross-test.o: cross-test.c native gcc-cross
449 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/cross-test.c
450
32e6d418 451compilations: ${OBJS}
452
453gcc: gcc.o version.o $(LIBDEPS)
454 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gccnew gcc.o version.o $(LIBS)
455# Go via `gccnew' to avoid `file busy' if $(CC) is `gcc'.
456 mv -f gccnew gcc
457# Dump a specs file to make -B./ read these specs over installed ones
458 ./gcc -dumpspecs > specs
459
460# We do want to create an executable named `gcc', so we can use it to
461# compile libgcc2.a.
462# Also create gcc-cross, so that install-common will install properly.
463gcc-cross: gcc
464 cp gcc gcc-cross
465
466cc1:$(P) $(C_OBJS) $(OBJS) $(LIBDEPS)
467 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(LIBS)
468
469cc1plus:$(P) $(CPLUS_OBJS) $(OBJS) $(LIBDEPS)
470 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(OBJS) $(LIBS)
471
472cc1obj:$(P) $(OBJC_OBJS) $(OBJS) $(LIBDEPS)
473 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1obj $(OBJC_OBJS) $(OBJS) $(LIBS)
474
475float.h: enquire
476 -./enquire -f > tmp-float.h
477 mv tmp-float.h float.h
478
479# Used to compile enquire with standard cc, but have forgotten why.
480# Let's try with GCC.
481enquire: enquire.o $(GCC_PARTS)
482 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
483enquire.o: $(srcdir)/enquire.c $(GCC_PASSES)
41f63c60 484 -if [ "$(srcdir)" != "." ]; then rm -f enquire.c; else true; fi
32e6d418 485 -cp $(srcdir)/enquire.c . > /dev/null 2>&1
c6396a0b 486# Breaking this line caused a problem with one version of GNU make.
487 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c enquire.c
32e6d418 488\f
489# Build libgcc.a.
490# This is done in two parts because some functions, in libgcc1.c,
491# must be compiled with something other than gcc,
492# while the rest, in libgcc2.c, must be compiled with gcc.
493# That means we can't do libgcc2.c until after gcc, cc1, etc.
494
495# Use this as value of LIBGCC1 to cause conversion to GNU library format.
496# LIBCONVERT should put its output in libgcc1.conv.
497libgcc1.conv: libgcc1.a
498 $(LIBCONVERT) libgcc1.a libgcc1.conv
499
500# Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
501# Make an empty file instead.
502libgcc1.null: $(CROSS_TOOLS) $(GCC_PASSES)
503 echo "__foo () {}" > dummy.c
504 $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
505 $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy.o
506 rm -f dummy.o dummy.c
507
508# Compile the library of arithmetic subroutines with the native compiler.
509# Don't compile it with gcc!
510# (That would cause most arithmetic functions to call themselves.)
511libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
512 -rm -f tmplibgcc1.a
513# Actually build it in tmplibgcc1.a, then rename at end,
514# so that libgcc1.a itself remains nonexistent if compilation is aborted.
515# -e causes any failing command to make this rule fail.
516# -e doesn't work in certain shells, so we test $$? as well.
517 set -e; \
518 for name in $(LIB1FUNCS); \
519 do \
520 echo $${name}; \
521 rm -f $${name}.o; \
522 $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
523 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
524 mv libgcc1.o $${name}.o; \
525 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}.o; \
526 rm -f $${name}.o; \
527 done
528# Some shells crash when a loop has no items.
529# So make sure there is always at least one--`..'.
530# Then ignore it.
531# We don't use -e here because there are if statements
532# that should not make the command give up when the if condition is false.
533# Instead, we test for failure after each command where it matters.
c6396a0b 534 -for file in .. $(LIB1FUNCS_EXTRA); \
32e6d418 535 do \
536 if [ x$${file} != x.. ]; then \
537 name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
538 echo $${name}; \
539 if [ $${name}.asm = $${file} ]; then \
540 cp $${file} $${name}.s; file=$${name}.s; \
541 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
542 else true; fi; \
543 $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
544 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
545 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}.o; \
546 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
547 rm -f $${name}.[so]; \
548 else true; \
549 fi; \
550 done
551 mv tmplibgcc1.a libgcc1.a
552
553# Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
554# But recompiling cc1 should not force recompilation of libgcc2.a.
555# If you want to force recompilation, delete libgcc2.a.
556# Depend on install-cross-tools to make sure we set up properly
557# to run the assembler before we try compiling anything.
558# install-cross-tools does nothing if not cross compiling.
559libgcc2.ready: $(GCC_PASSES) $(CROSS_TOOLS)
560 -if [ -f libgcc2.ready ] ; then \
561 true; \
562 else \
563 touch libgcc2.ready; \
564 fi
565
566libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
567 longlong.h gbl-ctors.h config.status
568# Actually build it in tmplibgcc2.a, then rename at end,
569# so that libgcc2.a itself remains nonexistent if compilation is aborted.
570 -rm -f tmplibgcc2.a
571# -e causes any failing command to make this rule fail.
572# -e doesn't work in certain shells, so we test $$? as well.
573 set -e; \
574 for name in $(LIB2FUNCS); \
575 do \
576 echo $${name}; \
c6396a0b 577 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
32e6d418 578 $(srcdir)/libgcc2.c -o $${name}.o; \
579 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
580 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}.o; \
581 rm -f $${name}.o; \
582 done
583# Some shells crash when a loop has no items.
584# So make sure there is always at least one--`..'.
585# Then ignore it.
586# We don't use -e here because there are if statements
587# that should not make the command give up when the if condition is false.
588# Instead, we test for failure after each command where it matters.
c6396a0b 589 -for file in .. $(LIB2FUNCS_EXTRA); \
32e6d418 590 do \
591 if [ x$${file} != x.. ]; then \
592 name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
593 echo $${name}; \
594 if [ $${name}.asm = $${file} ]; then \
595 cp $${file} $${name}.s; file=$${name}.s; \
596 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
597 else true; fi; \
c6396a0b 598 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
32e6d418 599 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
600 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}.o; \
601 rm -f $${name}.[so]; \
602 else true; \
603 fi; \
604 done
605 mv tmplibgcc2.a libgcc2.a
606# These lines were deleted from above the mv command
607# because ranlibing libgcc.a itself should suffice.
608# -if [ x${HPUX_GAS} = x ] ; then \
609# if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi \
610# else true; fi
611
612# Combine the various libraries into a single library, libgcc.a.
613libgcc.a: $(LIBGCC1) $(LIBGCC2)
614 -rm -rf tmplibgcc.a libgcc.a tmpcopy
615 mkdir tmpcopy
c6396a0b 616 -if [ x$(LIBGCC1) != x ]; \
617 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
618 else true; \
619 fi
32e6d418 620 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
621 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o)
622 rm -rf tmpcopy
623 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
624# Actually build it in tmplibgcc.a, then rename at end,
625# so that libgcc.a itself remains nonexistent if compilation is aborted.
626 mv tmplibgcc.a libgcc.a
627
628
629# Compile two additional files that are linked with every program
630# linked using GCC on system V, for the sake of C++ constructors.
631crtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
632 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_BEGIN \
c6396a0b 633 -finhibit-size-directive -g0 -c $(srcdir)/crtstuff.c -o crtbegin.o
32e6d418 634
635crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
636 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_END \
c6396a0b 637 -finhibit-size-directive -g0 -c $(srcdir)/crtstuff.c -o crtend.o
32e6d418 638\f
639# Compiling object files from source files.
640
641# Note that dependencies on obstack.h are not written
642# because that file is not part of GCC.
643# Dependencies on gvarargs.h are not written
644# because all that file does, when not compiling with GCC,
645# is include the system varargs.h.
646
647# C language specific files.
648
649c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h input.h flags.h
650 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c
651$(srcdir)/c-parse.c $(srcdir)/c-parse.h: $(srcdir)/c-parse.y
652 cd $(srcdir); $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
653
654c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
655c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
656c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
657c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h c-parse.h \
658 input.h flags.h
659c-aux-info.o : c-aux-info.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
660c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
661
662# C++ language specific files.
663
664cp-parse.o : $(srcdir)/cp-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
665 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
666 `echo $(srcdir)/cp-parse.c | sed 's,^\./,,'`
667
668$(srcdir)/cp-parse.c $(srcdir)/cp-parse.h : $(srcdir)/cp-parse.y
ab866dde 669 @echo expect 30 shift/reduce conflicts and 14 reduce/reduce conflicts
32e6d418 670 cd $(srcdir); $(BISON) $(BISONFLAGS) -d -o cp-parse.c cp-parse.y
671
672cp-spew.o : cp-spew.c $(CONFIG_H) $(CPLUS_TREE_H) \
673 $(srcdir)/cp-parse.h flags.h
674cp-lex.o : cp-lex.c $(CONFIG_H) $(CPLUS_TREE_H) \
675 $(srcdir)/cp-parse.h $(srcdir)/cp-input.c flags.h
676cp-decl.o : cp-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
677 cp-lex.h cp-decl.h stack.h
678cp-decl2.o : cp-decl2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
679 cp-lex.h cp-decl.h
680cp-type2.o : cp-type2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
681cp-typeck.o : cp-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
682cp-class.o : cp-class.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h \
683 cp-class.h flags.h
684cp-call.o : cp-call.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h cp-class.h \
685 flags.h
686cp-init.o : cp-init.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
687cp-method.o : cp-method.c $(CONFIG_H) $(CPLUS_TREE_H)
688cp-cvt.o : cp-cvt.c $(CONFIG_H) $(CPLUS_TREE_H)
689cp-search.o : cp-search.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
690cp-tree.o : cp-tree.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
691cp-ptree.o : cp-ptree.c $(CONFIG_H) $(CPLUS_TREE_H)
692cp-gc.o : cp-gc.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
693cp-except.o : cp-except.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
694cp-expr.o : cp-expr.c $(CONFIG_H) $(CPLUS_TREE_H) $(RTL_H) flags.h \
695 expr.h insn-codes.h
696cp-edsel.o : cp-edsel.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
697cp-xref.o : cp-xref.c $(CONFIG_H) $(CPLUS_TREE_H)
698cp-pt.o : cp-pt.c $(CONFIG_H) $(CPLUS_TREE_H) cp-decl.h cp-parse.h
699
79f818d0 700# To make a configuration always use collect2, set USE_COLLECT2 to ld.
701ld: collect2
702 rm -f ld
703 ln collect2 ld
704
32e6d418 705collect2 : collect2.o version.o $(LIBDEPS)
706 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o collect2 collect2.o version.o $(LIBS)
707
708collect2.o : collect2.c $(CONFIG_H) gstab.h
79f818d0 709 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
710 -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
711 -DSTANDARD_BIN_PREFIX=\"$(bindir)/\" \
712 -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
713 -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
714 -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
32e6d418 715
716# Objectionable C language specific files.
717
718objc-parse.o : $(srcdir)/objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
719 c-tree.h input.h flags.h objc-actions.h
720 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/objc-parse.c
721$(srcdir)/objc-parse.c : $(srcdir)/objc-parse.y
722 cd $(srcdir); $(BISON) $(BISONFLAGS) objc-parse.y -o objc-parse.c
723
724objc-actions.o : objc-actions.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h \
725 flags.h objc-actions.h
726
727# A file used by all variants of C.
728
729c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
730
731# Language-independent files.
732
733gcc.o: gcc.c $(CONFIG_H) gvarargs.h obstack.h
734 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
735 -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
c6396a0b 736 -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
32e6d418 737 -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
738 -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
739
740dumpvers: dumpvers.c
741
742version.o: version.c
743obstack.o: obstack.c
744
745tree.o : tree.c $(CONFIG_H) $(TREE_H) gvarargs.h flags.h function.h
746print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
747stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h
748fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h
c6396a0b 749toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h \
79f818d0 750 insn-attr.h xcoffout.h
751 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
752 $(MAYBE_USE_COLLECT2) -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
32e6d418 753
754rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
755
756print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
757rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
758
41f63c60 759varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h defaults.h \
79f818d0 760 insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h
32e6d418 761function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
762 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
763 recog.h output.h
764stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
765 insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h recog.h
766expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h function.h \
767 insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h typeclass.h
768calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
769 insn-flags.h
770expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
771 insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
772explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
773 insn-config.h expr.h recog.h insn-flags.h insn-codes.h
774optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
775 insn-flags.h insn-config.h insn-codes.h expr.h recog.h
776dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
79f818d0 777 insn-config.h reload.h gstab.h xcoffout.h
32e6d418 778sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \
779 insn-config.h reload.h
780dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
781 insn-config.h reload.h output.h
79f818d0 782xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
32e6d418 783emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) flags.h gvarargs.h function.h \
784 regs.h insn-config.h insn-codes.h real.h expr.h
c6396a0b 785getpwd.o : getpwd.c $(CONFIG_H)
32e6d418 786
787integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
788 insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h
789
790jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
791 insn-config.h insn-flags.h insn-codes.h expr.h real.h
792stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
793
794cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
795 insn-config.h recog.h
796loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
797 insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
798unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
799 integrate.h regs.h flags.h expr.h loop.h
800flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
801 basic-block.h regs.h hard-reg-set.h output.h
802combine.o : combine.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h \
803 insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
804 basic-block.h recog.h real.h
805regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
806 basic-block.h regs.h insn-config.h recog.h
807local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
808 regs.h hard-reg-set.h insn-config.h recog.h output.h
809global-alloc.o : global-alloc.c $(CONFIG_H) $(RTL_H) flags.h \
810 basic-block.h regs.h hard-reg-set.h insn-config.h output.h
811
812reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \
813 reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
814reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h expr.h \
815 reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
816 basic-block.h recog.h output.h
817caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
818 regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h
819reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
820 basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
821 flags.h output.h
822sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
823 flags.h insn-config.h insn-attr.h
824final.o : final.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h regs.h \
825 recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
79f818d0 826 hard-reg-set.h insn-codes.h gstab.h xcoffout.h
32e6d418 827recog.o : recog.c $(CONFIG_H) $(RTL_H) \
828 regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
829 insn-flags.h insn-codes.h real.h
830reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
831 regs.h hard-reg-set.h flags.h insn-config.h
48c6936b 832
32e6d418 833aux-output.o : aux-output.c $(CONFIG_H) \
834 $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
835 insn-flags.h output.h insn-attr.h insn-codes.h
836
837# Normally this target is not used; but it is used if you
838# define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
839# from the GNU Emacs distribution.
840# Note some machines won't allow $(CC) without -S on this source file.
841alloca.o: alloca.c
842# sed is used to strip the comments from the assembler output.
843 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
844 `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
845 $(ALLOCA_FINISH)
79f818d0 846 -rm alloca.s
32e6d418 847\f
848# Generate header and source files from the machine description,
849# and compile them.
850
851.PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
852 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
853 insn-attr.h insn-attrtab.c
854
855# The following pair of rules has this effect:
856# genconfig is run only if the md has changed since genconfig was last run;
857# but the file insn-config.h is touched only when its contents actually change.
858
859# Each of the other insn-* files is handled by a similar pair of rules.
860
861# Each of the insn-*.[ch] rules has a semicolon at the end,
862# for otherwise the system Make on SunOS 4.1 never tries
863# to recompile insn-*.o.
864
865insn-config.h: stamp-config ;
866stamp-config : md genconfig $(srcdir)/move-if-change
867 ./genconfig md > tmp-config.h
868 $(srcdir)/move-if-change tmp-config.h insn-config.h
869 touch stamp-config
870
871insn-flags.h: stamp-flags ;
872stamp-flags : md genflags $(srcdir)/move-if-change
873 ./genflags md > tmp-flags.h
874 $(srcdir)/move-if-change tmp-flags.h insn-flags.h
875 touch stamp-flags
876
877insn-codes.h: stamp-codes ;
878stamp-codes : md gencodes $(srcdir)/move-if-change
879 ./gencodes md > tmp-codes.h
880 $(srcdir)/move-if-change tmp-codes.h insn-codes.h
881 touch stamp-codes
882
883insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
884 insn-config.h insn-flags.h insn-codes.h
885 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
886
887insn-emit.c: stamp-emit ;
888stamp-emit : md genemit $(srcdir)/move-if-change
889 ./genemit md > tmp-emit.c
890 $(srcdir)/move-if-change tmp-emit.c insn-emit.c
891 touch stamp-emit
892
893insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \
894 real.h output.h flags.h
895 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
896
897insn-recog.c: stamp-recog ;
898stamp-recog : md genrecog $(srcdir)/move-if-change
899 ./genrecog md > tmp-recog.c
900 $(srcdir)/move-if-change tmp-recog.c insn-recog.c
901 touch stamp-recog
902
903insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
904 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
905
906insn-extract.c: stamp-extract ;
907stamp-extract : md genextract $(srcdir)/move-if-change
908 ./genextract md > tmp-extract.c
909 $(srcdir)/move-if-change tmp-extract.c insn-extract.c
910 touch stamp-extract
911
912insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
913 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
914
915insn-peep.c: stamp-peep ;
916stamp-peep : md genpeep $(srcdir)/move-if-change
917 ./genpeep md > tmp-peep.c
918 $(srcdir)/move-if-change tmp-peep.c insn-peep.c
919 touch stamp-peep
920
921insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
922 insn-attr.h insn-config.h
923 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
924
925insn-attr.h: stamp-attr ;
926stamp-attr : md genattr $(srcdir)/move-if-change
927 ./genattr md > tmp-attr.h
928 $(srcdir)/move-if-change tmp-attr.h insn-attr.h
929 touch stamp-attr
930
931insn-attrtab.c: stamp-attrtab ;
932stamp-attrtab : md genattrtab $(srcdir)/move-if-change
8bd8ea06 933 if cmp -s $(PREMADE_ATTRTAB_MD) md; \
934 then \
935 echo Using $(PREMADE_ATTRTAB); \
ab866dde 936 cp $(PREMADE_ATTRTAB) tmp-attrtab.c; \
8bd8ea06 937 else \
938 ./genattrtab md > tmp-attrtab.c; \
939 fi
32e6d418 940 $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
941 touch stamp-attrtab
942
943insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
944 hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
945 insn-codes.h
946 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
947
948insn-output.c: stamp-output ;
949stamp-output : md genoutput $(srcdir)/move-if-change
950 ./genoutput md > tmp-output.c
951 $(srcdir)/move-if-change tmp-output.c insn-output.c
952 touch stamp-output
953\f
954# Compile the programs that generate insn-* from the machine description.
955# They are compiled with $(HOST_CC), and associated libraries,
956# since they need to run on this machine
957# even if GCC is being compiled to run on some other machine.
958
959# $(CONFIG_H) is omitted from the deps of the gen*.o
960# because these programs don't really depend on anything
961# about the target machine. They do depend on config.h itself,
962# since that describes the host machine.
963
964genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS)
965 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genconfig \
966 genconfig.o $(HOST_RTL) $(HOST_LIBS)
967
968genconfig.o : genconfig.c $(RTL_H) config.h
969 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
970
971genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS)
972 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genflags \
973 genflags.o $(HOST_RTL) $(HOST_LIBS)
974
975genflags.o : genflags.c $(RTL_H) config.h
976 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
977
978gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS)
979 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gencodes \
980 gencodes.o $(HOST_RTL) $(HOST_LIBS)
981
982gencodes.o : gencodes.c $(RTL_H) config.h
983 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
984
985genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
986 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genemit \
987 genemit.o $(HOST_RTL) $(HOST_LIBS)
988
989genemit.o : genemit.c $(RTL_H) config.h
990 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
991
992genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
993 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genrecog \
994 genrecog.o $(HOST_RTL) $(HOST_LIBS)
995
996genrecog.o : genrecog.c $(RTL_H) config.h
997 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
998
999genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS)
1000 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genextract \
1001 genextract.o $(HOST_RTL) $(HOST_LIBS)
1002
f4d0a7c3 1003genextract.o : genextract.c $(RTL_H) config.h insn-config.h
32e6d418 1004 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
1005
1006genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS)
1007 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genpeep \
1008 genpeep.o $(HOST_RTL) $(HOST_LIBS)
1009
1010genpeep.o : genpeep.c $(RTL_H) config.h
1011 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
1012
1013genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS)
1014 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattr \
1015 genattr.o $(HOST_RTL) $(HOST_LIBS)
1016
1017genattr.o : genattr.c $(RTL_H) config.h
1018 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
1019
262d46de 1020genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
32e6d418 1021 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattrtab \
262d46de 1022 genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
32e6d418 1023
1024genattrtab.o : genattrtab.c $(RTL_H) config.h insn-config.h
1025 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
1026
1027genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS)
1028 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genoutput \
1029 genoutput.o $(HOST_RTL) $(HOST_LIBS)
1030
1031genoutput.o : genoutput.c $(RTL_H) config.h
1032 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
1033\f
1034# Compile the libraries to be used by gen*.
1035# If we are not cross-building, gen* use the same .o's that cc1 will use,
1036# and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1037# with the rules for rtl.o, alloca.o, etc.
1038$(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H)
1039 rm -f $(HOST_PREFIX)rtl.c
1040 cp $(srcdir)/rtl.c $(HOST_PREFIX)rtl.c
1041 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
1042
262d46de 1043$(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H)
1044 rm -f $(HOST_PREFIX)print-rtl.c
1045 cp $(srcdir)/print-rtl.c $(HOST_PREFIX)print-rtl.c
1046 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c
1047
32e6d418 1048$(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
1049 rm -f $(HOST_PREFIX)rtlanal.c
1050 cp $(srcdir)/rtlanal.c $(HOST_PREFIX)rtlanal.c
1051 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
1052
1053$(HOST_PREFIX_1)alloca.o: alloca.c
1054 rm -f $(HOST_PREFIX)alloca.c
1055 cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
1056 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
1057
1058$(HOST_PREFIX_1)obstack.o: obstack.c
1059 rm -f $(HOST_PREFIX)obstack.c
1060 cp $(srcdir)/obstack.c $(HOST_PREFIX)obstack.c
1061 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
1062
1063$(HOST_PREFIX_1)malloc.o: malloc.c
1064 rm -f $(HOST_PREFIX)malloc.c
1065 cp $(srcdir)/malloc.c $(HOST_PREFIX)malloc.c
1066 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
1067
1068# This satisfies the dependency that we get if you cross-compile a compiler
1069# that does not need to compile alloca, malloc or whatever.
1070$(HOST_PREFIX_1):
1071 touch $(HOST_PREFIX_1)
1072\f
1073# Remake cpp and protoize.
1074
1075# Making the preprocessor
1076cpp: cccp
1077 -rm -f cpp
1078 ln cccp cpp
1079cccp: cccp.o cexp.o version.o $(LIBDEPS)
1080 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
1081cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
1082 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
1083$(srcdir)/cexp.c: $(srcdir)/cexp.y
1084 cd $(srcdir); $(BISON) -o cexp.c cexp.y
1085cccp.o: cccp.c $(CONFIG_H) pcp.h version.c
1086# The reason we use $(libdir)/g++-include rather than using libsubdir
1087# is for compatibility with the current version of libg++.
1088 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
c6396a0b 1089 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1090 -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
32e6d418 1091 -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \
c6396a0b 1092 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
32e6d418 1093 -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1094
1095proto: config.status protoize unprotoize SYSCALLS.c.X protoize.1 unprotoize.1
1096
c6396a0b 1097protoize: protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
32e6d418 1098 $(CC) $(ALL_CFLAGS) $(LDFLAGS) \
c6396a0b 1099 protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) -o $@
ab866dde 1100protoize.o: stamp-proto ;
1101
1102unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
1103 $(CC) $(ALL_CFLAGS) $(LDFLAGS) \
1104 unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) -o $@
1105unprotoize.o: stamp-proto ;
1106
1107stamp-proto: $(srcdir)/protoize.c getopt.h $(CONFIG_H)
1108 touch stamp-proto
32e6d418 1109 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1110 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
c6396a0b 1111 -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
32e6d418 1112 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1113 -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \
1114 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
ab866dde 1115 -DUNPROTOIZE $(srcdir)/protoize.c
1116 mv protoize.o unprotoize.o
32e6d418 1117 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1118 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
c6396a0b 1119 -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
32e6d418 1120 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1121 -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \
1122 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
ab866dde 1123 $(srcdir)/protoize.c
32e6d418 1124
1125getopt.o: $(srcdir)/getopt.c getopt.h
1126 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
1127getopt1.o: $(srcdir)/getopt1.c getopt.h
1128 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c
1129
1130protoize.1: $(srcdir)/proto-man ./cpp
1131 ./cpp -traditional $(srcdir)/proto-man \
1132 | grep -v '^#' \
c6396a0b 1133 | awk 'NF > 0 {print}' > tmp-proto.1
1134 mv tmp-proto.1 protoize.1
32e6d418 1135
1136unprotoize.1: $(srcdir)/proto-man ./cpp
1137 ./cpp -traditional -DUNPRO $(srcdir)/proto-man \
1138 | grep -v '^#' \
c6396a0b 1139 | awk 'NF > 0 {print}' > tmp-unproto.1
1140 mv tmp-unproto.1 unprotoize.1
1141
32e6d418 1142# This info describes the target machine, so compile with GCC just built.
79f818d0 1143SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES)
1144 -rm -f SYSCALLS.c
1145 cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
32e6d418 1146 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
79f818d0 1147 -aux-info $@ -S -o /dev/null SYSCALLS.c
1148 -rm -f SYSCALLS.c
0b20f012 1149
1150test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
c548e550 1151 -rm -f tmp-proto.[cso]
262d46de 1152 cp $(srcdir)/protoize.c tmp-proto.c
1153 chmod u+w tmp-proto.c
c548e550 1154 ./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \
1155 $(CFLAGS) $(INCLUDES) \
0b20f012 1156 -DGCC_INCLUDE_DIR=0 \
1157 -DGPLUSPLUS_INCLUDE_DIR=0 \
1158 -DCROSS_INCLUDE_DIR=0 \
262d46de 1159 -DSTD_PROTO_DIR=0" tmp-proto.c
c548e550 1160 @echo '**********' Expect 402 lines of differences.
1161 -diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff
1162 -wc -l tmp-proto.diff
1163 ./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \
1164 $(CFLAGS) $(INCLUDES) \
0b20f012 1165 -DGCC_INCLUDE_DIR=0 \
1166 -DGPLUSPLUS_INCLUDE_DIR=0 \
1167 -DCROSS_INCLUDE_DIR=0 \
262d46de 1168 -DSTD_PROTO_DIR=0" tmp-proto.c
0b20f012 1169 @echo Expect zero differences.
262d46de 1170 diff $(srcdir)/protoize.c tmp-proto.c | cat
c548e550 1171 -rm -f tmp-proto.[cso]
32e6d418 1172\f
1173# Remake the info files.
1174
79f818d0 1175doc: $(srcdir)/cpp.info $(srcdir)/gcc.info
32e6d418 1176
1177$(srcdir)/cpp.info: $(srcdir)/cpp.texi
1178 makeinfo `echo $(srcdir)/cpp.texi | sed 's,^\./,,'`
1179
79f818d0 1180#$(srcdir)/gplus.info: $(srcdir)/gplus.texi
1181# makeinfo `echo $(srcdir)/gplus.texi | sed 's,^\./,,'`
32e6d418 1182
1183$(srcdir)/gcc.info: $(srcdir)/gcc.texi
1184 makeinfo `echo $(srcdir)/gcc.texi | sed 's,^\./,,'`
1185\f
1186# Deletion of files made during compilation.
1187# There are four levels of this:
79f818d0 1188# `mostlyclean', `clean', `distclean' and `realclean'.
32e6d418 1189# `mostlyclean' is useful while working on a particular type of machine.
c6396a0b 1190# It deletes most, but not all, of the files made by compilation.
32e6d418 1191# It does not delete libgcc.a or its parts, so it won't have to be recompiled.
c6396a0b 1192# `clean' deletes everything made by running `make all'.
79f818d0 1193# `distclean' also deletes the files made by config.
32e6d418 1194# `realclean' also deletes everything that could be regenerated automatically.
1195
79f818d0 1196
32e6d418 1197mostlyclean:
1198 -rm -f $(STAGESTUFF)
1199# Delete the temporary source copies for cross compilation.
1200 -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
1201 -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
1202 -rm -f $(HOST_PREFIX_1)obstack.c
1203# Delete the temp files made in the course of building libgcc.a.
c6396a0b 1204 -rm -f tmplibgcc* tmpcopy
32e6d418 1205 for name in $(LIB1FUNCS); do rm -f $${name}.c; done
1206# Delete other temporary files.
c548e550 1207 -rm -f tmp-float.h tmp-gcc.xtar.Z tmp-limits.h gccnew
1208 -rm -f tmp-foo1 tmp-foo2 tmp-proto.*
32e6d418 1209# Delete the stamp files.
1210 -rm -f stamp-* tmp-*
c6396a0b 1211# Delete debugging dump files.
32e6d418 1212 -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
c6396a0b 1213 -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack
1214# Delete some files made during installation.
1215 -rm -f specs float.h enquire SYSCALLS.c SYSCALLS.c.X
79f818d0 1216 -rm -f collect collect2 ld mips-tfile mips-tdump alloca.s
c6396a0b 1217# Delete unwanted output files from TeX.
1218 -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
79f818d0 1219# Delete sorted indices we don't actually use.
1220 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
c6396a0b 1221# Delete core dumps.
1222 -rm -f core
32e6d418 1223
79f818d0 1224# Delete all files made by compilation
1225# that don't exist in the distribution.
32e6d418 1226clean: mostlyclean
8bd8ea06 1227# It may not be quite desirable to delete unprotoize.c here,
1228# but the spec for `make clean' requires it.
1229# Using unprotoize.c is not quite right in the first place,
1230# but what better way is there?
1231 -rm -f libgcc.a libgcc1.a libgcc2.a libgcc2.ready unprotoize.c
d7330690 1232 -rm -f *.dvi
32e6d418 1233
79f818d0 1234# Delete all files that users would normally create
1235# while building and installing GCC.
c6396a0b 1236distclean: clean
32e6d418 1237 -rm -f tm.h aux-output.c config.h md config.status tconfig.h
ab866dde 1238 -rm -f Makefile *.oaux
79f818d0 1239 -rm -fr stage1 stage2 stage3 stage4
c6396a0b 1240
1241# Delete anything likely to be found in the source directory
1242# that shouldn't be in the distribution.
1243extraclean: distclean
79f818d0 1244 -rm -rf =* #* *~* config/=* config/#* config/*~*
1245 -rm -f *.dvi *.oaux patch* config/patch* *.orig *.rej *.d *.Z *.tar
c6396a0b 1246 -rm -f *.s *.s[0-9] *.i
32e6d418 1247
1248# Get rid of every file that's generated from some other file.
1249# Most of these files ARE PRESENT in the GCC distribution.
c6396a0b 1250realclean: distclean
32e6d418 1251 -rm -f cp-parse.c cp-parse.h cp-parse.output
1252 -rm -f objc-parse.c objc-parse.output
1253 -rm -f protoize.1 unprotoize.1
1254 -rm -f c-parse.c c-parse.h c-parse.output
1255 -rm -f cexp.c cexp.output TAGS
c6396a0b 1256 -rm -f cpp.info* cpp.??s cpp.*aux
1257 -rm -f gcc.info* gcc.??s gcc.*aux
1258 -rm -f gplus.info* gplus.??s gplus.*aux
32e6d418 1259\f
1260# Entry points `install' and `uninstall'.
1261# Also temporarily `install-fixincludes' could replace `install-headers'.
c6396a0b 1262# Also use `install-collect2' to install collect2 when the config files don't.
32e6d418 1263
1264install: $(INSTALL_TARGET)
1265
1266# Copy the files of native compiler into directories where they will be run.
1267install-native: install-common install-libgcc $(INSTALL_HEADERS) \
c6396a0b 1268 install-man
32e6d418 1269
1270# Copy the files of cross compiler into directories where they will be run.
1271install-cross: install-common install-common-headers \
1272 install-man install-cross-tools install-libgcc
1273
1274# Install the tools, libraries and header files for the target machine
1275# where cross-compilation will look for them.
1276# Use tooldir to find them.
1277install-cross-tools: install-dir
1278# The first if makes this a no-op except for a cross compiler.
1279# The /. after the dirname causes test to follow symlinks.
1280# Before making a link or an indirection script,
1281# we verify the desired file does not already exist.
1282# If a symlink does exist, then making a symlink would certainly fail,
1283# leading us to overwrite the real file through the symlink.
1284 -if [ -f gcc-cross ] ; \
1285 then \
1286 if [ -d $(tooldir)/. ] ; \
1287 then \
1288 for file in as ld ar ranlib; do \
1289 if [ -f $(libsubdir)/$$file ] ; \
1290 then true; \
1291 else \
1292 $(SYMLINK) $(tooldir)/bin/$$file $(libsubdir)/$$file \
1293 || (echo "#!/bin/sh"; echo $(tooldir)/bin/$$file "$$@") > $(libsubdir)/$$file; \
1294 fi; \
1295 done; \
1296 for file in $(tooldir)/lib/*; do \
1297 if [ -f $$file ] ; \
1298 then \
1299 if [ -f $(libsubdir)/`basename $$file` ] ; \
1300 then true; \
1301 else \
1302 $(SYMLINK) $$file $(libsubdir)/`basename $$file` \
1303 || $(INSTALL_DATA) $$file $(libsubdir)/`basename $$file`; \
1304 fi; \
1305 else true; \
1306 fi; \
1307 done; \
1308 if [ -d $(tooldir)/include/. ] ; then \
1309 $(SYMLINK) $(tooldir)/include $(libsubdir)/sys-include \
1310 || (if [ -d $(libsubdir)/sys-include ] ; then true ; else mkdir $(libsubdir)/sys-include ; fi; \
1311 cd $(tooldir)/include; tar cf - . | (cd $(libsubdir)/sys-include; tar xpf -)); \
1312 else true; fi; \
1313 else true; \
1314 fi; \
1315 else true; \
1316 fi;
1317
1318# Run this on the target machine
1319# to finish installation of cross compiler.
1320install-cross-rest: install-float-h-cross
1321
1322# Install float.h for cross compiler.
1323# Run this on the target machine!
1324install-float-h-cross:
1325 if [ -f enquire ] ; then true; else false; done
1326 -./enquire -f > float.h
1327 -rm -f $(libsubdir)/include/float.h
1328 $(INSTALL_DATA) float.h $(libsubdir)/include/float.h
1329 chmod a-x $(libsubdir)/include/float.h
1330
1331# Create the installation directory.
1332install-dir:
2388f67d 1333 -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi
1334 -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; fi
1335 -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; fi
1336 -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; fi
1337 -if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; fi
1338 -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
32e6d418 1339# We don't use mkdir -p to create the parents of mandir,
1340# because some systems don't support it.
1341# Instead, we use this technique to create the immediate parent of mandir.
2388f67d 1342 -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
32e6d418 1343 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
1344 -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; fi
1345
1346# Install the compiler executables built during cross compilation.
1347install-common: native install-dir
1348 for file in $(COMPILERS); do \
1349 if [ -f $$file ] ; then \
1350 rm -f $(libsubdir)/$$file; \
1351 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
1352 else true; \
1353 fi; \
1354 done
79f818d0 1355 for file in $(EXTRA_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
32e6d418 1356 if [ x"$$file" != x.. ]; then \
1357 rm -f $(libsubdir)/$$file; \
1358 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
1359 else true; fi; \
1360 done
1361 -rm -f $(libsubdir)/specs
1362 $(INSTALL_DATA) specs $(libsubdir)/specs
1363# Install the driver program as gcc-$(target)
1364# and also as either gcc (if native) or $(tooldir)/bin/gcc.
1365 -if [ -f gcc-cross ] ; then \
c6396a0b 1366 $(INSTALL_PROGRAM) gcc-cross $(bindir)/gcc-$(target); \
32e6d418 1367 if [ -d $(tooldir)/bin/. ] ; then \
1368 rm -f $(tooldir)/bin/gcc; \
1369 $(INSTALL_PROGRAM) gcc-cross $(tooldir)/bin/gcc; \
32e6d418 1370 else true; fi; \
1371 else \
1372 rm -f $(bindir)/gcc; \
1373 $(INSTALL_PROGRAM) gcc $(bindir)/gcc; \
1374 rm -f $(bindir)/gcc-$(target)-1; \
1375 ln $(bindir)/gcc $(bindir)/gcc-$(target)-1; \
1376 mv $(bindir)/gcc-$(target)-1 $(bindir)/gcc-$(target); \
1377 fi
c548e550 1378 -rm -f $(bindir)/c++
32e6d418 1379 $(INSTALL_PROGRAM) $(srcdir)/c++ $(bindir)/c++
c548e550 1380 -rm -f $(bindir)/g++
32e6d418 1381 $(INSTALL_PROGRAM) $(srcdir)/g++ $(bindir)/g++
1382 -rm -f $(libsubdir)/cpp
1383 $(INSTALL_PROGRAM) cpp $(libsubdir)/cpp
1384
1385# Install protoize.
1386install-proto: proto install-dir
1387 -rm -f $(bindir)/protoize
1388 $(INSTALL_PROGRAM) protoize $(bindir)/protoize
1389 -rm -f $(bindir)/unprotoize
1390 $(INSTALL_PROGRAM) unprotoize $(bindir)/unprotoize
1391 -rm -f $(libsubdir)/SYSCALLS.c.X
1392 $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X
1393 chmod a-x $(libsubdir)/SYSCALLS.c.X
1394
1395# Install the man pages.
c6396a0b 1396install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 \
1397 protoize.1 unprotoize.1 $(srcdir)/g++.1
32e6d418 1398 -rm -f $(mandir)/gcc$(manext)
ab866dde 1399 -$(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/gcc$(manext)
1400 -chmod a-x $(mandir)/gcc$(manext)
c6396a0b 1401 -rm -f $(mandir)/cccp$(manext)
ab866dde 1402 -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
1403 -chmod a-x $(mandir)/cccp$(manext)
32e6d418 1404 -rm -f $(mandir)/protoize$(manext)
ab866dde 1405 -$(INSTALL_DATA) protoize.1 $(mandir)/protoize$(manext)
1406 -chmod a-x $(mandir)/protoize$(manext)
32e6d418 1407 -rm -f $(mandir)/unprotoize$(manext)
ab866dde 1408 -$(INSTALL_DATA) unprotoize.1 $(mandir)/unprotoize$(manext)
1409 -chmod a-x $(mandir)/unprotoize$(manext)
c6396a0b 1410 -rm -f $(mandir)/g++$(manext)
ab866dde 1411 -$(INSTALL_DATA) $(srcdir)/g++.1 $(mandir)/g++$(manext)
1412 -chmod a-x $(mandir)/g++$(manext)
32e6d418 1413
1414# Install the library.
1415install-libgcc: libgcc.a
1416 -if [ -f libgcc.a ] ; then \
1417 rm -f $(libsubdir)/libgcc.a; \
1418 $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
1419 if $(RANLIB_TEST) ; then \
1420 (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
1421 chmod a-x $(libsubdir)/libgcc.a; \
1422 else true; fi
1423
1424# Install all the header files for native compiler.
1425install-headers: install-common-headers install-float-h install-limits-h
1426
1427# Install float.h for native compiler.
1428install-float-h: float.h
1429 -rm -f $(libsubdir)/include/float.h
1430 $(INSTALL_DATA) float.h $(libsubdir)/include/float.h
1431 chmod a-x $(libsubdir)/include/float.h
1432
1433# Install limits.h, optionally inheriting from the standard system version.
1434install-limits-h: limits.h limitx.h
1435 -rm -f $(libsubdir)/include/limits.h tmp-limits.h
1436 if [ -f /usr/include/limits.h ] ; then \
1437 cat $(srcdir)/limitx.h $(srcdir)/limits.h > tmp-limits.h; \
1438 else \
1439 cat $(srcdir)/limits.h > tmp-limits.h; \
1440 fi
1441 $(INSTALL_DATA) tmp-limits.h $(libsubdir)/include/limits.h
1442 chmod a-x $(libsubdir)/include/limits.h
1443 rm tmp-limits.h
1444
1445# Install the fixed headers that are the same for all machines.
1446install-common-headers: install-dir $(USER_H) gvarargs.h gstdarg.h gstddef.h
2388f67d 1447 -if [ -d $(libsubdir)/include ] ; then true ; else mkdir $(libsubdir)/include ; fi
32e6d418 1448 -chmod ugo+rx $(libsubdir)/include
1449# Must compute $(libsubdir) before the cd; the awk script won't work after.
1450 shelllibsubdir=$(libsubdir); \
1451 cd $(srcdir); \
1452 for file in $(USER_H); do \
1453 rm -f $$shelllibsubdir/include/`basename $$file`; \
1454 $(INSTALL_DATA) `basename $$file` $$shelllibsubdir/include/`basename $$file`; \
1455 chmod a-x $$shelllibsubdir/include/`basename $$file`; \
1456 done
1457 -rm -f $(libsubdir)/include/varargs.h
1458 $(INSTALL_DATA) $(srcdir)/gvarargs.h $(libsubdir)/include/varargs.h
1459 chmod a-x $(libsubdir)/include/varargs.h
1460 -rm -f $(libsubdir)/include/stdarg.h
1461 $(INSTALL_DATA) $(srcdir)/gstdarg.h $(libsubdir)/include/stdarg.h
1462 chmod a-x $(libsubdir)/include/stdarg.h
1463 -rm -f $(libsubdir)/include/stddef.h
1464 $(INSTALL_DATA) $(srcdir)/gstddef.h $(libsubdir)/include/stddef.h
1465 chmod a-x $(libsubdir)/include/stddef.h
c6396a0b 1466# Copy byteorder.h into the object file directory
1467# so that fixinc.svr4 can get at it if necessary.
1468# If the dirs are the same, this won't do anything.
0b20f012 1469# Delete file first in case it is read-only
41f63c60 1470 -if [ "$(srcdir)" != "." ]; then rm -f byteorder.h; else true; fi
1471 -cp $(srcdir)/byteorder.h . > /dev/null 2>&1
32e6d418 1472
1473# $(libsubdir)/include:
2388f67d 1474# -if [ -d $(libsubdir)/include ] ; then true ; else mkdir $(libsubdir)/include ; fi
32e6d418 1475# -chmod ugo+rx $(libsubdir)/include
1476
1477# This appears not to work. It isn't clear how to fix it.
c6396a0b 1478# $(libsubdir)/include/README: $(libsubdir)/include $(srcdir)/$(FIXINCLUDES)
1479# LIB=$(libsubdir)/include $(srcdir)/$(FIXINCLUDES)
32e6d418 1480# $(INSTALL_DATA) $(srcdir)/fixincludes-README $@
1481# chmod a-x $@
1482
1483# Run fixincludes in the proper directory.
1484install-fixincludes: install-headers
1485 rm -rf $(libsubdir)/tmp
1486 mkdir $(libsubdir)/tmp
1487# Move aside the headers that come from GCC; delete all else.
c6396a0b 1488# The sed command gets just the last file name component;
1489# this is necessary because VPATH could add a dirname.
1490# Using basename would be simpler, but some systems don't have it.
1491 cd $(libsubdir)/include; \
1492 for file in $(INSTALLED_H); do \
1493 realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
1494 mv $$realfile ../tmp; \
1495 done; \
1496 rm -rf *
32e6d418 1497# Install fixed copies of system files.
1498 $(srcdir)/$(FIXINCLUDES) $(libsubdir)/include
1499# Bring back gcc's header files.
1500 cd $(libsubdir)/include; mv ../tmp/* .; rmdir ../tmp
1501# Install the README
1502 $(INSTALL_DATA) $(srcdir)/README-fixinc $(libsubdir)/include/README
1503 chmod a-x $(libsubdir)/include/README
1504
c6396a0b 1505# Use this target to install the program `collect2' under the name `ld'.
1506install-collect2: collect2
1507 $(INSTALL_PROGRAM) collect2 $(libsubdir)/ld
1508# Install the driver program as $(libsubdir)/gcc for collect2.
1509 -if [ -f gcc-cross ] ; then \
1510 $(INSTALL_PROGRAM) gcc-cross $(libsubdir)/gcc; \
1511 else \
1512 $(INSTALL_PROGRAM) gcc $(libsubdir)/gcc; \
1513 fi
1514
32e6d418 1515# Cancel installation by deleting the installed files.
1516uninstall:
1517 -rm -rf $(libsubdir)
1518 -rm -rf $(bindir)/gcc
32e6d418 1519 -rm -rf $(bindir)/protoize
1520 -rm -rf $(bindir)/unprotoize
1521 -rm -rf $(mandir)/gcc$(manext)
c6396a0b 1522 -rm -rf $(mandir)/cccp$(manext)
32e6d418 1523 -rm -rf $(mandir)/protoize$(manext)
1524 -rm -rf $(mandir)/unprotoize$(manext)
1525\f
1526# These exist for maintenance purposes.
1527
1528# Update the tags table.
1529TAGS: force
1530 cd $(srcdir); \
1531 mkdir temp; \
1532 mv -f c-parse.c c-parse.h cp-parse.c cp-parse.h objc-parse.c cexp.c temp; \
1533 etags *.y *.h *.c; \
1534 mv temp/* .; \
1535 rmdir temp
1536
1537# Create the distribution tar file.
1538#dist: gcc-$(version).tar.Z
1539dist: gcc.xtar.Z
1540
c6396a0b 1541gcc.xtar.Z: gcc.xtar
32e6d418 1542 compress < gcc.xtar > tmp-gcc.xtar.Z
1543 mv tmp-gcc.xtar.Z gcc.xtar.Z
1544
1545#gcc-$(version).tar.Z: gcc-$(version).tar
1546# compress < gcc-$(version).tar > gcc-$(version).tar.Z
1547
1548#gcc-$(version).tar:
ab866dde 1549gcc.xtar: doc
c6396a0b 1550 -rm -rf gcc-$(version) tmp
32e6d418 1551# Put all the files in a temporary subdirectory
1552# which has the name that we want to have in the tar file.
c6396a0b 1553 mkdir tmp
1554 mkdir tmp/config
1555 for file in *[0-9a-zA-Z+]; do \
1556 ln $$file tmp || cp $$file tmp; \
1557 done
1558 cd config; \
1559 for file in *[0-9a-zA-Z+]; do \
1560 ln $$file ../tmp/config || cp $$file ../tmp/config; \
32e6d418 1561 done
c6396a0b 1562 ln .gdbinit tmp
1563 mv tmp gcc-$(version)
32e6d418 1564# Get rid of everything we don't want in the distribution.
c6396a0b 1565 cd gcc-$(version); make -f Makefile.in extraclean
32e6d418 1566# Make the distribution.
1567 tar chf gcc.xtar gcc-$(version)
1568# Get rid of the temporary directory.
1569 rm -rf gcc-$(version)
79f818d0 1570# Update the version number in README
1571 awk '$$1 " " $$2 " " $$3 == "This directory contains" \
1572 { $$6 = version; print $$0 } \
1573 $$1 " " $$2 " " $$3 != "This directory contains"' \
1574 version=$(version) README > tmp.README
1575 mv tmp.README README
32e6d418 1576
1577# do make -f ../gcc/Makefile maketest DIR=../gcc
1578# in the intended test directory to make it a suitable test directory.
1579# THIS IS OBSOLETE; use the -srcdir operand in configure instead.
1580maketest:
1581 ln -s $(DIR)/*.[chy] .
1582 ln -s $(DIR)/configure .
1583 ln -s $(DIR)/*.def .
1584 -rm -f =*
1585 ln -s $(DIR)/.gdbinit .
1586 ln -s $(DIR)/$(FIXINCLUDES) .
1587 -ln -s $(DIR)/bison.simple .
1588 ln -s $(DIR)/config .
1589 ln -s $(DIR)/move-if-change .
1590# The then and else were swapped to avoid a problem on Ultrix.
1591 if [ ! -f Makefile ] ; then ln -s $(DIR)/Makefile .; else false; fi
1592 -rm tm.h aux-output.c config.h md
1593 make clean
1594# You must then run config to set up for compilation.
41f63c60 1595bootstrap: force
1596# Only build the C compiler for stage1, because that is the only one that
1597# we can guarantee will build with the native compiler, and also it is the
1598# only thing useful for building stage2.
1599 $(MAKE) LANGUAGES=c
32e6d418 1600 $(MAKE) stage1
c6396a0b 1601# This used to define ALLOCA as empty, but that would lead to bad results
1602# for a subsequent `make install' since that would not have ALLOCA empty.
1603# To prevent `make install' from compiling alloca.o and then relinking cc1
1604# because alloca.o is newer, we permit these recursive makes to compile
1605# alloca.o. Then cc1 is newer, so it won't have to be relinked.
1606 $(MAKE) CC="stage1/gcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
32e6d418 1607 $(MAKE) stage2
c6396a0b 1608 $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
32e6d418 1609
1610bootstrap2: force
c6396a0b 1611 $(MAKE) CC="stage1/gcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
32e6d418 1612 $(MAKE) stage2
c6396a0b 1613 $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
32e6d418 1614
1615bootstrap3: force
c6396a0b 1616 $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
32e6d418 1617
48c6936b 1618# Compare the object files in the current directory with those in the
1619# stage2 directory.
1620
1621compare: force
1622 for file in *.o; do \
f4d0a7c3 1623 tail +10c $$file > tmp-foo1; \
1624 tail +10c stage2/$$file > tmp-foo2; \
1625 cmp tmp-foo1 tmp-foo2 || echo $$file differs; \
48c6936b 1626 done
1627 -rm -f tmp-foo*
1628
1629# Similar, but compare with stage3 directory
1630compare3: force
1631 for file in *.o; do \
f4d0a7c3 1632 tail +10c $$file > tmp-foo1; \
1633 tail +10c stage3/$$file > tmp-foo2; \
1634 cmp tmp-foo1 tmp-foo2 || echo $$file differs; \
48c6936b 1635 done
1636 -rm -f tmp-foo*
1637
32e6d418 1638# Copy the object files from a particular stage into a subdirectory.
1639stage1: force
c6396a0b 1640 -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
32e6d418 1641 -mv $(STAGESTUFF) stage1
1642 -rm -f stage1/libgcc.a
1643 -cp libgcc.a stage1
1644 -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
1645
1646stage2: force
c6396a0b 1647 -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
32e6d418 1648 -mv $(STAGESTUFF) stage2
1649 -rm -f stage2/libgcc.a
1650 -cp libgcc.a stage2
1651 -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
1652
1653stage3: force
2388f67d 1654 -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
32e6d418 1655 -mv $(STAGESTUFF) stage3
1656 -rm -f stage3/libgcc.a
1657 -cp libgcc.a stage3
1658 -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
1659
1660stage4: force
2388f67d 1661 -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
32e6d418 1662 -mv $(STAGESTUFF) stage4
1663 -rm -f stage4/libgcc.a
1664 -cp libgcc.a stage4
1665 -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
1666
1667# Copy just the executable files from a particular stage into a subdirectory,
1668# and delete the object files. Use this if you're just verifying a version
1669# that is pretty sure to work, and you are short of disk space.
1670risky-stage1: force
2388f67d 1671 -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
32e6d418 1672 -mv cc1 cpp cccp gcc stage1
1673 -rm -f stage1/libgcc.a
1674 -cp libgcc.a stage1 && $(RANLIB) stage1/libgcc.a
1675 -make clean
1676
1677risky-stage2: force
2388f67d 1678 -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
32e6d418 1679 -mv cc1 cpp cccp gcc stage2
1680 -rm -f stage2/libgcc.a
1681 -cp libgcc.a stage2 && $(RANLIB) stage2/libgcc.a
1682 -make clean
1683
1684risky-stage3: force
2388f67d 1685 -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
32e6d418 1686 -mv cc1 cpp cccp gcc stage3
1687 -rm -f stage3/libgcc.a
1688 -cp libgcc.a stage3 && $(RANLIB) stage3/libgcc.a
1689 -make clean
1690
1691risky-stage4: force
2388f67d 1692 -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
32e6d418 1693 -mv cc1 cpp cccp gcc stage4
1694 -rm -f stage4/libgcc.a
1695 -cp libgcc.a stage4 && $(RANLIB) stage4/libgcc.a
1696 -make clean
1697
1698#In GNU Make, ignore whether `stage*' exists.
1699.PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
1700.PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
1701
1702force: