]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/Makefile.in
entered into RCS
[thirdparty/gcc.git] / gcc / Makefile.in
CommitLineData
79d8453e
RS
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,
2e494f70 22# uninstall, TAGS, mostlyclean, clean, distclean, realclean,
79d8453e
RS
23# stage1, stage2, stage3, stage4.
24
2e494f70
RS
25# Suppress smart makes who think they know how to automake Yacc files
26.y.c:
27
79d8453e
RS
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
2e494f70 90# Version of ar to use when compiling libgcc1.a.
79d8453e
RS
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
20bd0ab1
RS
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
79d8453e
RS
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
2e494f70
RS
134# Directory in which to put host dependent programs and libraries
135exec_prefix = $(prefix)
79d8453e 136# Directory in which to put the executable for the command `gcc'
2e494f70 137bindir = $(exec_prefix)/bin
79d8453e 138# Directory in which to put the directories used by the compiler.
2e494f70 139libdir = $(exec_prefix)/lib
79d8453e 140# Directory in which the compiler finds executables, libraries, etc.
2e494f70 141libsubdir = $(libdir)/gcc-lib/$(target)/$(version)
79d8453e
RS
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.
2e494f70
RS
158# The value may be empty; that means to do absolutely nothing
159# with or for libgcc1.a.
79d8453e
RS
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
2e494f70
RS
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.
79d8453e
RS
180# The rules for compiling them should be in the t-* file for the machine.
181EXTRA_PARTS =
182
2e494f70
RS
183# List of extra object files that should be compiled and linked with
184# compiler proper (cc1, cc1obj, cc1plus).
185EXTRA_OBJS =
186
47547081
RS
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
79d8453e
RS
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.
47547081 217GCC_PARTS=$(GCC_PASSES) libgcc.a $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
79d8453e
RS
218
219# Change this to empty to prevent installing limits.h.
2e494f70 220# Actually, this currently has no effect,
79d8453e 221# and if that causes no problems, it can be deleted.
2e494f70 222# Otherwise, it must be replaced so as to control
79d8453e
RS
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)
2e494f70 240HOST_CLIB=$(CLIB)
79d8453e
RS
241HOST_LDFLAGS=$(LDFLAGS)
242HOST_CPPFLAGS=$(ALL_CPPFLAGS)
2e494f70
RS
243HOST_ALLOCA=$(ALLOCA)
244HOST_MALLOC=$(MALLOC)
245HOST_OBSTACK=$(OBSTACK)
79d8453e
RS
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).
2e494f70 259all: all.indirect
79d8453e
RS
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
2e494f70
RS
266all.indirect: $(ALL)
267
79d8453e
RS
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.
2e494f70
RS
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 `
79d8453e
RS
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.
2e494f70 290HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC)
79d8453e
RS
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.
2e494f70
RS
298HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC) \
299 $(HOST_CLIB)
79d8453e
RS
300
301HOST_RTL = $(HOST_PREFIX)rtl.o
302HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
d3614a37 303HOST_PRINT = $(HOST_PREFIX)print-rtl.o
79d8453e
RS
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 \
47547081
RS
344 rtl.o print-rtl.o rtlanal.o emit-rtl.o \
345 dbxout.o sdbout.o dwarfout.o xcoffout.o \
79d8453e
RS
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 \
47547081 350 insn-attrtab.o aux-output.o getpwd.o $(EXTRA_OBJS)
79d8453e
RS
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 \
363 stamp-attr stamp-attrtab \
364 genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
365 genattrtab genattr \
47547081 366 $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp \
9c0022f6 367 cc1plus cc1obj enquire protoize unprotoize specs collect2 $(USE_COLLECT2)
79d8453e
RS
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 \
feb69c20 389 va-spur.h va-m88k.h va-i960.h proto.h
79d8453e
RS
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
47547081 409Makefile: $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/version.c \
79d8453e
RS
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.
415all.cross: native gcc-cross
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.
2e494f70 421rest.encap: libgcc.a float.h $(EXTRA_PARTS)
79d8453e
RS
422# This is what is made with the host's compiler
423# whether making a cross compiler or not.
47547081 424native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
79d8453e
RS
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
2e494f70
RS
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.
79d8453e 436config.status:
2e494f70
RS
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
79d8453e
RS
443
444compilations: ${OBJS}
445
446gcc: gcc.o version.o $(LIBDEPS)
447 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gccnew gcc.o version.o $(LIBS)
448# Go via `gccnew' to avoid `file busy' if $(CC) is `gcc'.
449 mv -f gccnew gcc
450# Dump a specs file to make -B./ read these specs over installed ones
451 ./gcc -dumpspecs > specs
452
453# We do want to create an executable named `gcc', so we can use it to
454# compile libgcc2.a.
455# Also create gcc-cross, so that install-common will install properly.
456gcc-cross: gcc
457 cp gcc gcc-cross
458
459cc1:$(P) $(C_OBJS) $(OBJS) $(LIBDEPS)
460 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(LIBS)
461
462cc1plus:$(P) $(CPLUS_OBJS) $(OBJS) $(LIBDEPS)
463 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(OBJS) $(LIBS)
464
465cc1obj:$(P) $(OBJC_OBJS) $(OBJS) $(LIBDEPS)
466 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1obj $(OBJC_OBJS) $(OBJS) $(LIBS)
467
468float.h: enquire
469 -./enquire -f > tmp-float.h
470 mv tmp-float.h float.h
471
472# Used to compile enquire with standard cc, but have forgotten why.
473# Let's try with GCC.
474enquire: enquire.o $(GCC_PARTS)
475 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
476enquire.o: $(srcdir)/enquire.c $(GCC_PASSES)
9c4614c3 477 -if [ "$(srcdir)" != "." ]; then rm -f enquire.c; else true; fi
79d8453e 478 -cp $(srcdir)/enquire.c . > /dev/null 2>&1
2e494f70
RS
479# Breaking this line caused a problem with one version of GNU make.
480 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c enquire.c
79d8453e
RS
481\f
482# Build libgcc.a.
483# This is done in two parts because some functions, in libgcc1.c,
484# must be compiled with something other than gcc,
485# while the rest, in libgcc2.c, must be compiled with gcc.
486# That means we can't do libgcc2.c until after gcc, cc1, etc.
487
488# Use this as value of LIBGCC1 to cause conversion to GNU library format.
489# LIBCONVERT should put its output in libgcc1.conv.
490libgcc1.conv: libgcc1.a
491 $(LIBCONVERT) libgcc1.a libgcc1.conv
492
493# Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
494# Make an empty file instead.
495libgcc1.null: $(CROSS_TOOLS) $(GCC_PASSES)
496 echo "__foo () {}" > dummy.c
497 $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
498 $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy.o
499 rm -f dummy.o dummy.c
500
501# Compile the library of arithmetic subroutines with the native compiler.
502# Don't compile it with gcc!
503# (That would cause most arithmetic functions to call themselves.)
504libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
505 -rm -f tmplibgcc1.a
506# Actually build it in tmplibgcc1.a, then rename at end,
507# so that libgcc1.a itself remains nonexistent if compilation is aborted.
508# -e causes any failing command to make this rule fail.
509# -e doesn't work in certain shells, so we test $$? as well.
510 set -e; \
511 for name in $(LIB1FUNCS); \
512 do \
513 echo $${name}; \
514 rm -f $${name}.o; \
515 $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
516 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
517 mv libgcc1.o $${name}.o; \
518 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}.o; \
519 rm -f $${name}.o; \
520 done
521# Some shells crash when a loop has no items.
522# So make sure there is always at least one--`..'.
523# Then ignore it.
524# We don't use -e here because there are if statements
525# that should not make the command give up when the if condition is false.
526# Instead, we test for failure after each command where it matters.
2e494f70 527 -for file in .. $(LIB1FUNCS_EXTRA); \
79d8453e
RS
528 do \
529 if [ x$${file} != x.. ]; then \
530 name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
531 echo $${name}; \
532 if [ $${name}.asm = $${file} ]; then \
533 cp $${file} $${name}.s; file=$${name}.s; \
534 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
535 else true; fi; \
536 $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
537 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
538 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}.o; \
539 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
540 rm -f $${name}.[so]; \
541 else true; \
542 fi; \
543 done
544 mv tmplibgcc1.a libgcc1.a
545
546# Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
547# But recompiling cc1 should not force recompilation of libgcc2.a.
548# If you want to force recompilation, delete libgcc2.a.
549# Depend on install-cross-tools to make sure we set up properly
550# to run the assembler before we try compiling anything.
551# install-cross-tools does nothing if not cross compiling.
552libgcc2.ready: $(GCC_PASSES) $(CROSS_TOOLS)
553 -if [ -f libgcc2.ready ] ; then \
554 true; \
555 else \
556 touch libgcc2.ready; \
557 fi
558
559libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
560 longlong.h gbl-ctors.h config.status
561# Actually build it in tmplibgcc2.a, then rename at end,
562# so that libgcc2.a itself remains nonexistent if compilation is aborted.
563 -rm -f tmplibgcc2.a
564# -e causes any failing command to make this rule fail.
565# -e doesn't work in certain shells, so we test $$? as well.
566 set -e; \
567 for name in $(LIB2FUNCS); \
568 do \
569 echo $${name}; \
2e494f70 570 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
79d8453e
RS
571 $(srcdir)/libgcc2.c -o $${name}.o; \
572 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
573 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}.o; \
574 rm -f $${name}.o; \
575 done
576# Some shells crash when a loop has no items.
577# So make sure there is always at least one--`..'.
578# Then ignore it.
579# We don't use -e here because there are if statements
580# that should not make the command give up when the if condition is false.
581# Instead, we test for failure after each command where it matters.
2e494f70 582 -for file in .. $(LIB2FUNCS_EXTRA); \
79d8453e
RS
583 do \
584 if [ x$${file} != x.. ]; then \
585 name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
586 echo $${name}; \
587 if [ $${name}.asm = $${file} ]; then \
588 cp $${file} $${name}.s; file=$${name}.s; \
589 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
590 else true; fi; \
2e494f70 591 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
79d8453e
RS
592 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
593 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}.o; \
594 rm -f $${name}.[so]; \
595 else true; \
596 fi; \
597 done
598 mv tmplibgcc2.a libgcc2.a
599# These lines were deleted from above the mv command
600# because ranlibing libgcc.a itself should suffice.
601# -if [ x${HPUX_GAS} = x ] ; then \
602# if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi \
603# else true; fi
604
605# Combine the various libraries into a single library, libgcc.a.
606libgcc.a: $(LIBGCC1) $(LIBGCC2)
607 -rm -rf tmplibgcc.a libgcc.a tmpcopy
608 mkdir tmpcopy
2e494f70
RS
609 -if [ x$(LIBGCC1) != x ]; \
610 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
611 else true; \
612 fi
79d8453e
RS
613 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
614 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o)
615 rm -rf tmpcopy
616 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
617# Actually build it in tmplibgcc.a, then rename at end,
618# so that libgcc.a itself remains nonexistent if compilation is aborted.
619 mv tmplibgcc.a libgcc.a
620
621
622# Compile two additional files that are linked with every program
623# linked using GCC on system V, for the sake of C++ constructors.
624crtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
625 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_BEGIN \
2e494f70 626 -finhibit-size-directive -g0 -c $(srcdir)/crtstuff.c -o crtbegin.o
79d8453e
RS
627
628crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
629 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_END \
2e494f70 630 -finhibit-size-directive -g0 -c $(srcdir)/crtstuff.c -o crtend.o
79d8453e
RS
631\f
632# Compiling object files from source files.
633
634# Note that dependencies on obstack.h are not written
635# because that file is not part of GCC.
636# Dependencies on gvarargs.h are not written
637# because all that file does, when not compiling with GCC,
638# is include the system varargs.h.
639
640# C language specific files.
641
642c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h input.h flags.h
643 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c
644$(srcdir)/c-parse.c $(srcdir)/c-parse.h: $(srcdir)/c-parse.y
645 cd $(srcdir); $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
646
647c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
648c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
649c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
650c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h c-parse.h \
651 input.h flags.h
652c-aux-info.o : c-aux-info.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
653c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
654
655# C++ language specific files.
656
657cp-parse.o : $(srcdir)/cp-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
658 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
659 `echo $(srcdir)/cp-parse.c | sed 's,^\./,,'`
660
661$(srcdir)/cp-parse.c $(srcdir)/cp-parse.h : $(srcdir)/cp-parse.y
2e0b13db 662 @echo expect 30 shift/reduce conflicts and 14 reduce/reduce conflicts
79d8453e
RS
663 cd $(srcdir); $(BISON) $(BISONFLAGS) -d -o cp-parse.c cp-parse.y
664
665cp-spew.o : cp-spew.c $(CONFIG_H) $(CPLUS_TREE_H) \
666 $(srcdir)/cp-parse.h flags.h
667cp-lex.o : cp-lex.c $(CONFIG_H) $(CPLUS_TREE_H) \
668 $(srcdir)/cp-parse.h $(srcdir)/cp-input.c flags.h
669cp-decl.o : cp-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
670 cp-lex.h cp-decl.h stack.h
671cp-decl2.o : cp-decl2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
672 cp-lex.h cp-decl.h
673cp-type2.o : cp-type2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
674cp-typeck.o : cp-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
675cp-class.o : cp-class.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h \
676 cp-class.h flags.h
677cp-call.o : cp-call.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h cp-class.h \
678 flags.h
679cp-init.o : cp-init.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
680cp-method.o : cp-method.c $(CONFIG_H) $(CPLUS_TREE_H)
681cp-cvt.o : cp-cvt.c $(CONFIG_H) $(CPLUS_TREE_H)
682cp-search.o : cp-search.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
683cp-tree.o : cp-tree.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
684cp-ptree.o : cp-ptree.c $(CONFIG_H) $(CPLUS_TREE_H)
685cp-gc.o : cp-gc.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
686cp-except.o : cp-except.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
687cp-expr.o : cp-expr.c $(CONFIG_H) $(CPLUS_TREE_H) $(RTL_H) flags.h \
688 expr.h insn-codes.h
689cp-edsel.o : cp-edsel.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
690cp-xref.o : cp-xref.c $(CONFIG_H) $(CPLUS_TREE_H)
691cp-pt.o : cp-pt.c $(CONFIG_H) $(CPLUS_TREE_H) cp-decl.h cp-parse.h
692
47547081
RS
693# To make a configuration always use collect2, set USE_COLLECT2 to ld.
694ld: collect2
695 rm -f ld
696 ln collect2 ld
697
79d8453e
RS
698collect2 : collect2.o version.o $(LIBDEPS)
699 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o collect2 collect2.o version.o $(LIBS)
700
701collect2.o : collect2.c $(CONFIG_H) gstab.h
47547081
RS
702 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
703 -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
704 -DSTANDARD_BIN_PREFIX=\"$(bindir)/\" \
705 -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
706 -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
707 -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
79d8453e
RS
708
709# Objectionable C language specific files.
710
711objc-parse.o : $(srcdir)/objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
712 c-tree.h input.h flags.h objc-actions.h
713 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/objc-parse.c
714$(srcdir)/objc-parse.c : $(srcdir)/objc-parse.y
715 cd $(srcdir); $(BISON) $(BISONFLAGS) objc-parse.y -o objc-parse.c
716
717objc-actions.o : objc-actions.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h \
718 flags.h objc-actions.h
719
720# A file used by all variants of C.
721
722c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
723
724# Language-independent files.
725
726gcc.o: gcc.c $(CONFIG_H) gvarargs.h obstack.h
727 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
728 -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
2e494f70 729 -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
79d8453e
RS
730 -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
731 -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
732
733dumpvers: dumpvers.c
734
735version.o: version.c
736obstack.o: obstack.c
737
738tree.o : tree.c $(CONFIG_H) $(TREE_H) gvarargs.h flags.h function.h
739print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
740stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h
741fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h
2e494f70 742toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h \
47547081
RS
743 insn-attr.h xcoffout.h
744 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
745 $(MAYBE_USE_COLLECT2) -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
79d8453e
RS
746
747rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
748
749print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
750rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
751
9c4614c3 752varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h defaults.h \
47547081 753 insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h
79d8453e
RS
754function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
755 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
756 recog.h output.h
757stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
758 insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h recog.h
759expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h function.h \
760 insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h typeclass.h
761calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
762 insn-flags.h
763expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
764 insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
765explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
766 insn-config.h expr.h recog.h insn-flags.h insn-codes.h
767optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
768 insn-flags.h insn-config.h insn-codes.h expr.h recog.h
769dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
47547081 770 insn-config.h reload.h gstab.h xcoffout.h
79d8453e
RS
771sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \
772 insn-config.h reload.h
773dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
774 insn-config.h reload.h output.h
47547081 775xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
79d8453e
RS
776emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) flags.h gvarargs.h function.h \
777 regs.h insn-config.h insn-codes.h real.h expr.h
2e494f70 778getpwd.o : getpwd.c $(CONFIG_H)
79d8453e
RS
779
780integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
781 insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h
782
783jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
784 insn-config.h insn-flags.h insn-codes.h expr.h real.h
785stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
786
787cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
788 insn-config.h recog.h
789loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
790 insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
791unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
792 integrate.h regs.h flags.h expr.h loop.h
793flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
794 basic-block.h regs.h hard-reg-set.h output.h
795combine.o : combine.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h \
796 insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
797 basic-block.h recog.h real.h
798regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
799 basic-block.h regs.h insn-config.h recog.h
800local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
801 regs.h hard-reg-set.h insn-config.h recog.h output.h
802global-alloc.o : global-alloc.c $(CONFIG_H) $(RTL_H) flags.h \
803 basic-block.h regs.h hard-reg-set.h insn-config.h output.h
804
805reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \
806 reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
807reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h expr.h \
808 reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
809 basic-block.h recog.h output.h
810caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
811 regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h
812reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
813 basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
814 flags.h output.h
815sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
816 flags.h insn-config.h insn-attr.h
817final.o : final.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h regs.h \
818 recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
47547081 819 hard-reg-set.h insn-codes.h gstab.h xcoffout.h
79d8453e
RS
820recog.o : recog.c $(CONFIG_H) $(RTL_H) \
821 regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
822 insn-flags.h insn-codes.h real.h
823reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
824 regs.h hard-reg-set.h flags.h insn-config.h
dcfedcd0 825
79d8453e
RS
826aux-output.o : aux-output.c $(CONFIG_H) \
827 $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
828 insn-flags.h output.h insn-attr.h insn-codes.h
829
830# Normally this target is not used; but it is used if you
831# define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
832# from the GNU Emacs distribution.
833# Note some machines won't allow $(CC) without -S on this source file.
834alloca.o: alloca.c
835# sed is used to strip the comments from the assembler output.
836 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
837 `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
838 $(ALLOCA_FINISH)
47547081 839 -rm alloca.s
79d8453e
RS
840\f
841# Generate header and source files from the machine description,
842# and compile them.
843
844.PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
845 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
846 insn-attr.h insn-attrtab.c
847
848# The following pair of rules has this effect:
849# genconfig is run only if the md has changed since genconfig was last run;
850# but the file insn-config.h is touched only when its contents actually change.
851
852# Each of the other insn-* files is handled by a similar pair of rules.
853
854# Each of the insn-*.[ch] rules has a semicolon at the end,
855# for otherwise the system Make on SunOS 4.1 never tries
856# to recompile insn-*.o.
857
858insn-config.h: stamp-config ;
859stamp-config : md genconfig $(srcdir)/move-if-change
860 ./genconfig md > tmp-config.h
861 $(srcdir)/move-if-change tmp-config.h insn-config.h
862 touch stamp-config
863
864insn-flags.h: stamp-flags ;
865stamp-flags : md genflags $(srcdir)/move-if-change
866 ./genflags md > tmp-flags.h
867 $(srcdir)/move-if-change tmp-flags.h insn-flags.h
868 touch stamp-flags
869
870insn-codes.h: stamp-codes ;
871stamp-codes : md gencodes $(srcdir)/move-if-change
872 ./gencodes md > tmp-codes.h
873 $(srcdir)/move-if-change tmp-codes.h insn-codes.h
874 touch stamp-codes
875
876insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
877 insn-config.h insn-flags.h insn-codes.h
878 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
879
880insn-emit.c: stamp-emit ;
881stamp-emit : md genemit $(srcdir)/move-if-change
882 ./genemit md > tmp-emit.c
883 $(srcdir)/move-if-change tmp-emit.c insn-emit.c
884 touch stamp-emit
885
886insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \
887 real.h output.h flags.h
888 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
889
890insn-recog.c: stamp-recog ;
891stamp-recog : md genrecog $(srcdir)/move-if-change
892 ./genrecog md > tmp-recog.c
893 $(srcdir)/move-if-change tmp-recog.c insn-recog.c
894 touch stamp-recog
895
896insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
897 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
898
899insn-extract.c: stamp-extract ;
900stamp-extract : md genextract $(srcdir)/move-if-change
901 ./genextract md > tmp-extract.c
902 $(srcdir)/move-if-change tmp-extract.c insn-extract.c
903 touch stamp-extract
904
905insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
906 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
907
908insn-peep.c: stamp-peep ;
909stamp-peep : md genpeep $(srcdir)/move-if-change
910 ./genpeep md > tmp-peep.c
911 $(srcdir)/move-if-change tmp-peep.c insn-peep.c
912 touch stamp-peep
913
914insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
915 insn-attr.h insn-config.h
916 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
917
918insn-attr.h: stamp-attr ;
919stamp-attr : md genattr $(srcdir)/move-if-change
920 ./genattr md > tmp-attr.h
921 $(srcdir)/move-if-change tmp-attr.h insn-attr.h
922 touch stamp-attr
923
924insn-attrtab.c: stamp-attrtab ;
925stamp-attrtab : md genattrtab $(srcdir)/move-if-change
20bd0ab1
RS
926 if cmp -s $(PREMADE_ATTRTAB_MD) md; \
927 then \
928 echo Using $(PREMADE_ATTRTAB); \
2e0b13db 929 cp $(PREMADE_ATTRTAB) tmp-attrtab.c; \
20bd0ab1
RS
930 else \
931 ./genattrtab md > tmp-attrtab.c; \
932 fi
79d8453e
RS
933 $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
934 touch stamp-attrtab
935
936insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
937 hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
938 insn-codes.h
939 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
940
941insn-output.c: stamp-output ;
942stamp-output : md genoutput $(srcdir)/move-if-change
943 ./genoutput md > tmp-output.c
944 $(srcdir)/move-if-change tmp-output.c insn-output.c
945 touch stamp-output
946\f
947# Compile the programs that generate insn-* from the machine description.
948# They are compiled with $(HOST_CC), and associated libraries,
949# since they need to run on this machine
950# even if GCC is being compiled to run on some other machine.
951
952# $(CONFIG_H) is omitted from the deps of the gen*.o
953# because these programs don't really depend on anything
954# about the target machine. They do depend on config.h itself,
955# since that describes the host machine.
956
957genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS)
958 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genconfig \
959 genconfig.o $(HOST_RTL) $(HOST_LIBS)
960
961genconfig.o : genconfig.c $(RTL_H) config.h
962 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
963
964genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS)
965 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genflags \
966 genflags.o $(HOST_RTL) $(HOST_LIBS)
967
968genflags.o : genflags.c $(RTL_H) config.h
969 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
970
971gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS)
972 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gencodes \
973 gencodes.o $(HOST_RTL) $(HOST_LIBS)
974
975gencodes.o : gencodes.c $(RTL_H) config.h
976 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
977
978genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
979 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genemit \
980 genemit.o $(HOST_RTL) $(HOST_LIBS)
981
982genemit.o : genemit.c $(RTL_H) config.h
983 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
984
985genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
986 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genrecog \
987 genrecog.o $(HOST_RTL) $(HOST_LIBS)
988
989genrecog.o : genrecog.c $(RTL_H) config.h
990 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
991
992genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS)
993 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genextract \
994 genextract.o $(HOST_RTL) $(HOST_LIBS)
995
9d85be6f 996genextract.o : genextract.c $(RTL_H) config.h insn-config.h
79d8453e
RS
997 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
998
999genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS)
1000 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genpeep \
1001 genpeep.o $(HOST_RTL) $(HOST_LIBS)
1002
1003genpeep.o : genpeep.c $(RTL_H) config.h
1004 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
1005
1006genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS)
1007 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattr \
1008 genattr.o $(HOST_RTL) $(HOST_LIBS)
1009
1010genattr.o : genattr.c $(RTL_H) config.h
1011 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
1012
d3614a37 1013genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
79d8453e 1014 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattrtab \
d3614a37 1015 genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
79d8453e
RS
1016
1017genattrtab.o : genattrtab.c $(RTL_H) config.h insn-config.h
1018 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
1019
1020genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS)
1021 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genoutput \
1022 genoutput.o $(HOST_RTL) $(HOST_LIBS)
1023
1024genoutput.o : genoutput.c $(RTL_H) config.h
1025 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
1026\f
1027# Compile the libraries to be used by gen*.
1028# If we are not cross-building, gen* use the same .o's that cc1 will use,
1029# and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1030# with the rules for rtl.o, alloca.o, etc.
1031$(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H)
1032 rm -f $(HOST_PREFIX)rtl.c
1033 cp $(srcdir)/rtl.c $(HOST_PREFIX)rtl.c
1034 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
1035
d3614a37
RS
1036$(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H)
1037 rm -f $(HOST_PREFIX)print-rtl.c
1038 cp $(srcdir)/print-rtl.c $(HOST_PREFIX)print-rtl.c
1039 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c
1040
79d8453e
RS
1041$(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
1042 rm -f $(HOST_PREFIX)rtlanal.c
1043 cp $(srcdir)/rtlanal.c $(HOST_PREFIX)rtlanal.c
1044 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
1045
1046$(HOST_PREFIX_1)alloca.o: alloca.c
1047 rm -f $(HOST_PREFIX)alloca.c
1048 cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
1049 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
1050
1051$(HOST_PREFIX_1)obstack.o: obstack.c
1052 rm -f $(HOST_PREFIX)obstack.c
1053 cp $(srcdir)/obstack.c $(HOST_PREFIX)obstack.c
1054 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
1055
1056$(HOST_PREFIX_1)malloc.o: malloc.c
1057 rm -f $(HOST_PREFIX)malloc.c
1058 cp $(srcdir)/malloc.c $(HOST_PREFIX)malloc.c
1059 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
1060
1061# This satisfies the dependency that we get if you cross-compile a compiler
1062# that does not need to compile alloca, malloc or whatever.
1063$(HOST_PREFIX_1):
1064 touch $(HOST_PREFIX_1)
1065\f
1066# Remake cpp and protoize.
1067
1068# Making the preprocessor
1069cpp: cccp
1070 -rm -f cpp
1071 ln cccp cpp
1072cccp: cccp.o cexp.o version.o $(LIBDEPS)
1073 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
1074cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
1075 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
1076$(srcdir)/cexp.c: $(srcdir)/cexp.y
1077 cd $(srcdir); $(BISON) -o cexp.c cexp.y
1078cccp.o: cccp.c $(CONFIG_H) pcp.h version.c
1079# The reason we use $(libdir)/g++-include rather than using libsubdir
1080# is for compatibility with the current version of libg++.
1081 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2e494f70
RS
1082 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1083 -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
79d8453e 1084 -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \
2e494f70 1085 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
79d8453e
RS
1086 -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1087
1088proto: config.status protoize unprotoize SYSCALLS.c.X protoize.1 unprotoize.1
1089
2e494f70 1090protoize: protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
79d8453e 1091 $(CC) $(ALL_CFLAGS) $(LDFLAGS) \
2e494f70 1092 protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) -o $@
2e0b13db
RS
1093protoize.o: stamp-proto ;
1094
1095unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
1096 $(CC) $(ALL_CFLAGS) $(LDFLAGS) \
1097 unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) -o $@
1098unprotoize.o: stamp-proto ;
1099
1100stamp-proto: $(srcdir)/protoize.c getopt.h $(CONFIG_H)
1101 touch stamp-proto
79d8453e
RS
1102 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1103 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
2e494f70 1104 -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
79d8453e
RS
1105 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1106 -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \
1107 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
2e0b13db
RS
1108 -DUNPROTOIZE $(srcdir)/protoize.c
1109 mv protoize.o unprotoize.o
79d8453e
RS
1110 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1111 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
2e494f70 1112 -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
79d8453e
RS
1113 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1114 -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \
1115 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
2e0b13db 1116 $(srcdir)/protoize.c
79d8453e
RS
1117
1118getopt.o: $(srcdir)/getopt.c getopt.h
1119 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
1120getopt1.o: $(srcdir)/getopt1.c getopt.h
1121 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c
1122
1123protoize.1: $(srcdir)/proto-man ./cpp
1124 ./cpp -traditional $(srcdir)/proto-man \
1125 | grep -v '^#' \
2e494f70
RS
1126 | awk 'NF > 0 {print}' > tmp-proto.1
1127 mv tmp-proto.1 protoize.1
79d8453e
RS
1128
1129unprotoize.1: $(srcdir)/proto-man ./cpp
1130 ./cpp -traditional -DUNPRO $(srcdir)/proto-man \
1131 | grep -v '^#' \
2e494f70
RS
1132 | awk 'NF > 0 {print}' > tmp-unproto.1
1133 mv tmp-unproto.1 unprotoize.1
1134
79d8453e 1135# This info describes the target machine, so compile with GCC just built.
47547081
RS
1136SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES)
1137 -rm -f SYSCALLS.c
1138 cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
79d8453e 1139 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
47547081
RS
1140 -aux-info $@ -S -o /dev/null SYSCALLS.c
1141 -rm -f SYSCALLS.c
9c0022f6
RS
1142
1143test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
d3614a37
RS
1144 -rm -f tmp-proto.*
1145 cp $(srcdir)/protoize.c tmp-proto.c
1146 chmod u+w tmp-proto.c
9c0022f6
RS
1147 ./protoize -N -B ./ -c "-B./ -Wall -Wwrite-strings $(CFLAGS) \
1148 $(INCLUDES) \
1149 -DGCC_INCLUDE_DIR=0 \
1150 -DGPLUSPLUS_INCLUDE_DIR=0 \
1151 -DCROSS_INCLUDE_DIR=0 \
d3614a37 1152 -DSTD_PROTO_DIR=0" tmp-proto.c
9c0022f6 1153 @echo Expect 324 lines of differences.
d3614a37 1154 diff $(srcdir)/protoize.c tmp-proto.c | wc -l
9c0022f6
RS
1155 ./unprotoize -N -c "-B./ -Wall -Wwrite-strings $(CFLAGS) \
1156 $(INCLUDES) \
1157 -DGCC_INCLUDE_DIR=0 \
1158 -DGPLUSPLUS_INCLUDE_DIR=0 \
1159 -DCROSS_INCLUDE_DIR=0 \
d3614a37 1160 -DSTD_PROTO_DIR=0" tmp-proto.c
9c0022f6 1161 @echo Expect zero differences.
d3614a37
RS
1162 diff $(srcdir)/protoize.c tmp-proto.c | cat
1163 -rm -f tmp-proto.*
79d8453e
RS
1164\f
1165# Remake the info files.
1166
47547081 1167doc: $(srcdir)/cpp.info $(srcdir)/gcc.info
79d8453e
RS
1168
1169$(srcdir)/cpp.info: $(srcdir)/cpp.texi
1170 makeinfo `echo $(srcdir)/cpp.texi | sed 's,^\./,,'`
1171
47547081
RS
1172#$(srcdir)/gplus.info: $(srcdir)/gplus.texi
1173# makeinfo `echo $(srcdir)/gplus.texi | sed 's,^\./,,'`
79d8453e
RS
1174
1175$(srcdir)/gcc.info: $(srcdir)/gcc.texi
1176 makeinfo `echo $(srcdir)/gcc.texi | sed 's,^\./,,'`
1177\f
1178# Deletion of files made during compilation.
1179# There are four levels of this:
47547081 1180# `mostlyclean', `clean', `distclean' and `realclean'.
79d8453e 1181# `mostlyclean' is useful while working on a particular type of machine.
2e494f70 1182# It deletes most, but not all, of the files made by compilation.
79d8453e 1183# It does not delete libgcc.a or its parts, so it won't have to be recompiled.
2e494f70 1184# `clean' deletes everything made by running `make all'.
47547081 1185# `distclean' also deletes the files made by config.
79d8453e
RS
1186# `realclean' also deletes everything that could be regenerated automatically.
1187
47547081 1188
79d8453e
RS
1189mostlyclean:
1190 -rm -f $(STAGESTUFF)
1191# Delete the temporary source copies for cross compilation.
1192 -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
1193 -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
1194 -rm -f $(HOST_PREFIX_1)obstack.c
1195# Delete the temp files made in the course of building libgcc.a.
2e494f70 1196 -rm -f tmplibgcc* tmpcopy
79d8453e
RS
1197 for name in $(LIB1FUNCS); do rm -f $${name}.c; done
1198# Delete other temporary files.
2e494f70 1199 -rm -f tmp-float.h tmp-*proto.1 tmp-gcc.xtar.Z tmp-limits.h gccnew
d3614a37 1200 -rm -f tmp-foo1 tmp-foo2 tmp-proto.c
79d8453e
RS
1201# Delete the stamp files.
1202 -rm -f stamp-* tmp-*
2e494f70 1203# Delete debugging dump files.
79d8453e 1204 -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
2e494f70
RS
1205 -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack
1206# Delete some files made during installation.
1207 -rm -f specs float.h enquire SYSCALLS.c SYSCALLS.c.X
47547081 1208 -rm -f collect collect2 ld mips-tfile mips-tdump alloca.s
2e494f70
RS
1209# Delete unwanted output files from TeX.
1210 -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
47547081
RS
1211# Delete sorted indices we don't actually use.
1212 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
2e494f70
RS
1213# Delete core dumps.
1214 -rm -f core
79d8453e 1215
47547081
RS
1216# Delete all files made by compilation
1217# that don't exist in the distribution.
79d8453e 1218clean: mostlyclean
20bd0ab1
RS
1219# It may not be quite desirable to delete unprotoize.c here,
1220# but the spec for `make clean' requires it.
1221# Using unprotoize.c is not quite right in the first place,
1222# but what better way is there?
1223 -rm -f libgcc.a libgcc1.a libgcc2.a libgcc2.ready unprotoize.c
2e0b13db 1224 -rm *.dvi
79d8453e 1225
47547081
RS
1226# Delete all files that users would normally create
1227# while building and installing GCC.
2e494f70 1228distclean: clean
79d8453e 1229 -rm -f tm.h aux-output.c config.h md config.status tconfig.h
2e0b13db 1230 -rm -f Makefile *.oaux
47547081 1231 -rm -fr stage1 stage2 stage3 stage4
2e494f70
RS
1232
1233# Delete anything likely to be found in the source directory
1234# that shouldn't be in the distribution.
1235extraclean: distclean
47547081
RS
1236 -rm -rf =* #* *~* config/=* config/#* config/*~*
1237 -rm -f *.dvi *.oaux patch* config/patch* *.orig *.rej *.d *.Z *.tar
2e494f70 1238 -rm -f *.s *.s[0-9] *.i
79d8453e
RS
1239
1240# Get rid of every file that's generated from some other file.
1241# Most of these files ARE PRESENT in the GCC distribution.
2e494f70 1242realclean: distclean
79d8453e
RS
1243 -rm -f cp-parse.c cp-parse.h cp-parse.output
1244 -rm -f objc-parse.c objc-parse.output
1245 -rm -f protoize.1 unprotoize.1
1246 -rm -f c-parse.c c-parse.h c-parse.output
1247 -rm -f cexp.c cexp.output TAGS
2e494f70
RS
1248 -rm -f cpp.info* cpp.??s cpp.*aux
1249 -rm -f gcc.info* gcc.??s gcc.*aux
1250 -rm -f gplus.info* gplus.??s gplus.*aux
79d8453e
RS
1251\f
1252# Entry points `install' and `uninstall'.
1253# Also temporarily `install-fixincludes' could replace `install-headers'.
2e494f70 1254# Also use `install-collect2' to install collect2 when the config files don't.
79d8453e
RS
1255
1256install: $(INSTALL_TARGET)
1257
1258# Copy the files of native compiler into directories where they will be run.
1259install-native: install-common install-libgcc $(INSTALL_HEADERS) \
2e494f70 1260 install-man
79d8453e
RS
1261
1262# Copy the files of cross compiler into directories where they will be run.
1263install-cross: install-common install-common-headers \
1264 install-man install-cross-tools install-libgcc
1265
1266# Install the tools, libraries and header files for the target machine
1267# where cross-compilation will look for them.
1268# Use tooldir to find them.
1269install-cross-tools: install-dir
1270# The first if makes this a no-op except for a cross compiler.
1271# The /. after the dirname causes test to follow symlinks.
1272# Before making a link or an indirection script,
1273# we verify the desired file does not already exist.
1274# If a symlink does exist, then making a symlink would certainly fail,
1275# leading us to overwrite the real file through the symlink.
1276 -if [ -f gcc-cross ] ; \
1277 then \
1278 if [ -d $(tooldir)/. ] ; \
1279 then \
1280 for file in as ld ar ranlib; do \
1281 if [ -f $(libsubdir)/$$file ] ; \
1282 then true; \
1283 else \
1284 $(SYMLINK) $(tooldir)/bin/$$file $(libsubdir)/$$file \
1285 || (echo "#!/bin/sh"; echo $(tooldir)/bin/$$file "$$@") > $(libsubdir)/$$file; \
1286 fi; \
1287 done; \
1288 for file in $(tooldir)/lib/*; do \
1289 if [ -f $$file ] ; \
1290 then \
1291 if [ -f $(libsubdir)/`basename $$file` ] ; \
1292 then true; \
1293 else \
1294 $(SYMLINK) $$file $(libsubdir)/`basename $$file` \
1295 || $(INSTALL_DATA) $$file $(libsubdir)/`basename $$file`; \
1296 fi; \
1297 else true; \
1298 fi; \
1299 done; \
1300 if [ -d $(tooldir)/include/. ] ; then \
1301 $(SYMLINK) $(tooldir)/include $(libsubdir)/sys-include \
1302 || (if [ -d $(libsubdir)/sys-include ] ; then true ; else mkdir $(libsubdir)/sys-include ; fi; \
1303 cd $(tooldir)/include; tar cf - . | (cd $(libsubdir)/sys-include; tar xpf -)); \
1304 else true; fi; \
1305 else true; \
1306 fi; \
1307 else true; \
1308 fi;
1309
1310# Run this on the target machine
1311# to finish installation of cross compiler.
1312install-cross-rest: install-float-h-cross
1313
1314# Install float.h for cross compiler.
1315# Run this on the target machine!
1316install-float-h-cross:
1317 if [ -f enquire ] ; then true; else false; done
1318 -./enquire -f > float.h
1319 -rm -f $(libsubdir)/include/float.h
1320 $(INSTALL_DATA) float.h $(libsubdir)/include/float.h
1321 chmod a-x $(libsubdir)/include/float.h
1322
1323# Create the installation directory.
1324install-dir:
935e11b0
TW
1325 -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi
1326 -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; fi
1327 -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; fi
1328 -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; fi
1329 -if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; fi
1330 -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
79d8453e
RS
1331# We don't use mkdir -p to create the parents of mandir,
1332# because some systems don't support it.
1333# Instead, we use this technique to create the immediate parent of mandir.
935e11b0 1334 -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
79d8453e
RS
1335 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
1336 -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; fi
1337
1338# Install the compiler executables built during cross compilation.
1339install-common: native install-dir
1340 for file in $(COMPILERS); do \
1341 if [ -f $$file ] ; then \
1342 rm -f $(libsubdir)/$$file; \
1343 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
1344 else true; \
1345 fi; \
1346 done
47547081 1347 for file in $(EXTRA_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
79d8453e
RS
1348 if [ x"$$file" != x.. ]; then \
1349 rm -f $(libsubdir)/$$file; \
1350 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
1351 else true; fi; \
1352 done
1353 -rm -f $(libsubdir)/specs
1354 $(INSTALL_DATA) specs $(libsubdir)/specs
1355# Install the driver program as gcc-$(target)
1356# and also as either gcc (if native) or $(tooldir)/bin/gcc.
1357 -if [ -f gcc-cross ] ; then \
2e494f70 1358 $(INSTALL_PROGRAM) gcc-cross $(bindir)/gcc-$(target); \
79d8453e
RS
1359 if [ -d $(tooldir)/bin/. ] ; then \
1360 rm -f $(tooldir)/bin/gcc; \
1361 $(INSTALL_PROGRAM) gcc-cross $(tooldir)/bin/gcc; \
79d8453e
RS
1362 else true; fi; \
1363 else \
1364 rm -f $(bindir)/gcc; \
1365 $(INSTALL_PROGRAM) gcc $(bindir)/gcc; \
1366 rm -f $(bindir)/gcc-$(target)-1; \
1367 ln $(bindir)/gcc $(bindir)/gcc-$(target)-1; \
1368 mv $(bindir)/gcc-$(target)-1 $(bindir)/gcc-$(target); \
1369 fi
1370 $(INSTALL_PROGRAM) $(srcdir)/c++ $(bindir)/c++
1371 $(INSTALL_PROGRAM) $(srcdir)/g++ $(bindir)/g++
1372 -rm -f $(libsubdir)/cpp
1373 $(INSTALL_PROGRAM) cpp $(libsubdir)/cpp
1374
1375# Install protoize.
1376install-proto: proto install-dir
1377 -rm -f $(bindir)/protoize
1378 $(INSTALL_PROGRAM) protoize $(bindir)/protoize
1379 -rm -f $(bindir)/unprotoize
1380 $(INSTALL_PROGRAM) unprotoize $(bindir)/unprotoize
1381 -rm -f $(libsubdir)/SYSCALLS.c.X
1382 $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X
1383 chmod a-x $(libsubdir)/SYSCALLS.c.X
1384
1385# Install the man pages.
2e494f70
RS
1386install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 \
1387 protoize.1 unprotoize.1 $(srcdir)/g++.1
79d8453e 1388 -rm -f $(mandir)/gcc$(manext)
2e0b13db
RS
1389 -$(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/gcc$(manext)
1390 -chmod a-x $(mandir)/gcc$(manext)
2e494f70 1391 -rm -f $(mandir)/cccp$(manext)
2e0b13db
RS
1392 -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
1393 -chmod a-x $(mandir)/cccp$(manext)
79d8453e 1394 -rm -f $(mandir)/protoize$(manext)
2e0b13db
RS
1395 -$(INSTALL_DATA) protoize.1 $(mandir)/protoize$(manext)
1396 -chmod a-x $(mandir)/protoize$(manext)
79d8453e 1397 -rm -f $(mandir)/unprotoize$(manext)
2e0b13db
RS
1398 -$(INSTALL_DATA) unprotoize.1 $(mandir)/unprotoize$(manext)
1399 -chmod a-x $(mandir)/unprotoize$(manext)
2e494f70 1400 -rm -f $(mandir)/g++$(manext)
2e0b13db
RS
1401 -$(INSTALL_DATA) $(srcdir)/g++.1 $(mandir)/g++$(manext)
1402 -chmod a-x $(mandir)/g++$(manext)
79d8453e
RS
1403
1404# Install the library.
1405install-libgcc: libgcc.a
1406 -if [ -f libgcc.a ] ; then \
1407 rm -f $(libsubdir)/libgcc.a; \
1408 $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
1409 if $(RANLIB_TEST) ; then \
1410 (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
1411 chmod a-x $(libsubdir)/libgcc.a; \
1412 else true; fi
1413
1414# Install all the header files for native compiler.
1415install-headers: install-common-headers install-float-h install-limits-h
1416
1417# Install float.h for native compiler.
1418install-float-h: float.h
1419 -rm -f $(libsubdir)/include/float.h
1420 $(INSTALL_DATA) float.h $(libsubdir)/include/float.h
1421 chmod a-x $(libsubdir)/include/float.h
1422
1423# Install limits.h, optionally inheriting from the standard system version.
1424install-limits-h: limits.h limitx.h
1425 -rm -f $(libsubdir)/include/limits.h tmp-limits.h
1426 if [ -f /usr/include/limits.h ] ; then \
1427 cat $(srcdir)/limitx.h $(srcdir)/limits.h > tmp-limits.h; \
1428 else \
1429 cat $(srcdir)/limits.h > tmp-limits.h; \
1430 fi
1431 $(INSTALL_DATA) tmp-limits.h $(libsubdir)/include/limits.h
1432 chmod a-x $(libsubdir)/include/limits.h
1433 rm tmp-limits.h
1434
1435# Install the fixed headers that are the same for all machines.
1436install-common-headers: install-dir $(USER_H) gvarargs.h gstdarg.h gstddef.h
935e11b0 1437 -if [ -d $(libsubdir)/include ] ; then true ; else mkdir $(libsubdir)/include ; fi
79d8453e
RS
1438 -chmod ugo+rx $(libsubdir)/include
1439# Must compute $(libsubdir) before the cd; the awk script won't work after.
1440 shelllibsubdir=$(libsubdir); \
1441 cd $(srcdir); \
1442 for file in $(USER_H); do \
1443 rm -f $$shelllibsubdir/include/`basename $$file`; \
1444 $(INSTALL_DATA) `basename $$file` $$shelllibsubdir/include/`basename $$file`; \
1445 chmod a-x $$shelllibsubdir/include/`basename $$file`; \
1446 done
1447 -rm -f $(libsubdir)/include/varargs.h
1448 $(INSTALL_DATA) $(srcdir)/gvarargs.h $(libsubdir)/include/varargs.h
1449 chmod a-x $(libsubdir)/include/varargs.h
1450 -rm -f $(libsubdir)/include/stdarg.h
1451 $(INSTALL_DATA) $(srcdir)/gstdarg.h $(libsubdir)/include/stdarg.h
1452 chmod a-x $(libsubdir)/include/stdarg.h
1453 -rm -f $(libsubdir)/include/stddef.h
1454 $(INSTALL_DATA) $(srcdir)/gstddef.h $(libsubdir)/include/stddef.h
1455 chmod a-x $(libsubdir)/include/stddef.h
2e494f70
RS
1456# Copy byteorder.h into the object file directory
1457# so that fixinc.svr4 can get at it if necessary.
1458# If the dirs are the same, this won't do anything.
9c0022f6 1459# Delete file first in case it is read-only
9c4614c3
TW
1460 -if [ "$(srcdir)" != "." ]; then rm -f byteorder.h; else true; fi
1461 -cp $(srcdir)/byteorder.h . > /dev/null 2>&1
79d8453e
RS
1462
1463# $(libsubdir)/include:
935e11b0 1464# -if [ -d $(libsubdir)/include ] ; then true ; else mkdir $(libsubdir)/include ; fi
79d8453e
RS
1465# -chmod ugo+rx $(libsubdir)/include
1466
1467# This appears not to work. It isn't clear how to fix it.
2e494f70
RS
1468# $(libsubdir)/include/README: $(libsubdir)/include $(srcdir)/$(FIXINCLUDES)
1469# LIB=$(libsubdir)/include $(srcdir)/$(FIXINCLUDES)
79d8453e
RS
1470# $(INSTALL_DATA) $(srcdir)/fixincludes-README $@
1471# chmod a-x $@
1472
1473# Run fixincludes in the proper directory.
1474install-fixincludes: install-headers
1475 rm -rf $(libsubdir)/tmp
1476 mkdir $(libsubdir)/tmp
1477# Move aside the headers that come from GCC; delete all else.
2e494f70
RS
1478# The sed command gets just the last file name component;
1479# this is necessary because VPATH could add a dirname.
1480# Using basename would be simpler, but some systems don't have it.
1481 cd $(libsubdir)/include; \
1482 for file in $(INSTALLED_H); do \
1483 realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
1484 mv $$realfile ../tmp; \
1485 done; \
1486 rm -rf *
79d8453e
RS
1487# Install fixed copies of system files.
1488 $(srcdir)/$(FIXINCLUDES) $(libsubdir)/include
1489# Bring back gcc's header files.
1490 cd $(libsubdir)/include; mv ../tmp/* .; rmdir ../tmp
1491# Install the README
1492 $(INSTALL_DATA) $(srcdir)/README-fixinc $(libsubdir)/include/README
1493 chmod a-x $(libsubdir)/include/README
1494
2e494f70
RS
1495# Use this target to install the program `collect2' under the name `ld'.
1496install-collect2: collect2
1497 $(INSTALL_PROGRAM) collect2 $(libsubdir)/ld
1498# Install the driver program as $(libsubdir)/gcc for collect2.
1499 -if [ -f gcc-cross ] ; then \
1500 $(INSTALL_PROGRAM) gcc-cross $(libsubdir)/gcc; \
1501 else \
1502 $(INSTALL_PROGRAM) gcc $(libsubdir)/gcc; \
1503 fi
1504
79d8453e
RS
1505# Cancel installation by deleting the installed files.
1506uninstall:
1507 -rm -rf $(libsubdir)
1508 -rm -rf $(bindir)/gcc
79d8453e
RS
1509 -rm -rf $(bindir)/protoize
1510 -rm -rf $(bindir)/unprotoize
1511 -rm -rf $(mandir)/gcc$(manext)
2e494f70 1512 -rm -rf $(mandir)/cccp$(manext)
79d8453e
RS
1513 -rm -rf $(mandir)/protoize$(manext)
1514 -rm -rf $(mandir)/unprotoize$(manext)
1515\f
1516# These exist for maintenance purposes.
1517
1518# Update the tags table.
1519TAGS: force
1520 cd $(srcdir); \
1521 mkdir temp; \
1522 mv -f c-parse.c c-parse.h cp-parse.c cp-parse.h objc-parse.c cexp.c temp; \
1523 etags *.y *.h *.c; \
1524 mv temp/* .; \
1525 rmdir temp
1526
1527# Create the distribution tar file.
1528#dist: gcc-$(version).tar.Z
1529dist: gcc.xtar.Z
1530
2e494f70 1531gcc.xtar.Z: gcc.xtar
79d8453e
RS
1532 compress < gcc.xtar > tmp-gcc.xtar.Z
1533 mv tmp-gcc.xtar.Z gcc.xtar.Z
1534
1535#gcc-$(version).tar.Z: gcc-$(version).tar
1536# compress < gcc-$(version).tar > gcc-$(version).tar.Z
1537
1538#gcc-$(version).tar:
2e0b13db 1539gcc.xtar: doc
2e494f70 1540 -rm -rf gcc-$(version) tmp
79d8453e
RS
1541# Put all the files in a temporary subdirectory
1542# which has the name that we want to have in the tar file.
2e494f70
RS
1543 mkdir tmp
1544 mkdir tmp/config
1545 for file in *[0-9a-zA-Z+]; do \
1546 ln $$file tmp || cp $$file tmp; \
1547 done
1548 cd config; \
1549 for file in *[0-9a-zA-Z+]; do \
1550 ln $$file ../tmp/config || cp $$file ../tmp/config; \
79d8453e 1551 done
2e494f70
RS
1552 ln .gdbinit tmp
1553 mv tmp gcc-$(version)
79d8453e 1554# Get rid of everything we don't want in the distribution.
2e494f70 1555 cd gcc-$(version); make -f Makefile.in extraclean
79d8453e
RS
1556# Make the distribution.
1557 tar chf gcc.xtar gcc-$(version)
1558# Get rid of the temporary directory.
1559 rm -rf gcc-$(version)
47547081
RS
1560# Update the version number in README
1561 awk '$$1 " " $$2 " " $$3 == "This directory contains" \
1562 { $$6 = version; print $$0 } \
1563 $$1 " " $$2 " " $$3 != "This directory contains"' \
1564 version=$(version) README > tmp.README
1565 mv tmp.README README
79d8453e
RS
1566
1567# do make -f ../gcc/Makefile maketest DIR=../gcc
1568# in the intended test directory to make it a suitable test directory.
1569# THIS IS OBSOLETE; use the -srcdir operand in configure instead.
1570maketest:
1571 ln -s $(DIR)/*.[chy] .
1572 ln -s $(DIR)/configure .
1573 ln -s $(DIR)/*.def .
1574 -rm -f =*
1575 ln -s $(DIR)/.gdbinit .
1576 ln -s $(DIR)/$(FIXINCLUDES) .
1577 -ln -s $(DIR)/bison.simple .
1578 ln -s $(DIR)/config .
1579 ln -s $(DIR)/move-if-change .
1580# The then and else were swapped to avoid a problem on Ultrix.
1581 if [ ! -f Makefile ] ; then ln -s $(DIR)/Makefile .; else false; fi
1582 -rm tm.h aux-output.c config.h md
1583 make clean
1584# You must then run config to set up for compilation.
9c4614c3
TW
1585bootstrap: force
1586# Only build the C compiler for stage1, because that is the only one that
1587# we can guarantee will build with the native compiler, and also it is the
1588# only thing useful for building stage2.
1589 $(MAKE) LANGUAGES=c
79d8453e 1590 $(MAKE) stage1
2e494f70
RS
1591# This used to define ALLOCA as empty, but that would lead to bad results
1592# for a subsequent `make install' since that would not have ALLOCA empty.
1593# To prevent `make install' from compiling alloca.o and then relinking cc1
1594# because alloca.o is newer, we permit these recursive makes to compile
1595# alloca.o. Then cc1 is newer, so it won't have to be relinked.
1596 $(MAKE) CC="stage1/gcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
79d8453e 1597 $(MAKE) stage2
2e494f70 1598 $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
79d8453e
RS
1599
1600bootstrap2: force
2e494f70 1601 $(MAKE) CC="stage1/gcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
79d8453e 1602 $(MAKE) stage2
2e494f70 1603 $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
79d8453e
RS
1604
1605bootstrap3: force
2e494f70 1606 $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
79d8453e 1607
dcfedcd0
RK
1608# Compare the object files in the current directory with those in the
1609# stage2 directory.
1610
1611compare: force
1612 for file in *.o; do \
9d85be6f
RK
1613 tail +10c $$file > tmp-foo1; \
1614 tail +10c stage2/$$file > tmp-foo2; \
1615 cmp tmp-foo1 tmp-foo2 || echo $$file differs; \
dcfedcd0
RK
1616 done
1617 -rm -f tmp-foo*
1618
1619# Similar, but compare with stage3 directory
1620compare3: force
1621 for file in *.o; do \
9d85be6f
RK
1622 tail +10c $$file > tmp-foo1; \
1623 tail +10c stage3/$$file > tmp-foo2; \
1624 cmp tmp-foo1 tmp-foo2 || echo $$file differs; \
dcfedcd0
RK
1625 done
1626 -rm -f tmp-foo*
1627
79d8453e
RS
1628# Copy the object files from a particular stage into a subdirectory.
1629stage1: force
2e494f70 1630 -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
79d8453e
RS
1631 -mv $(STAGESTUFF) stage1
1632 -rm -f stage1/libgcc.a
1633 -cp libgcc.a stage1
1634 -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
1635
1636stage2: force
2e494f70 1637 -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
79d8453e
RS
1638 -mv $(STAGESTUFF) stage2
1639 -rm -f stage2/libgcc.a
1640 -cp libgcc.a stage2
1641 -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
1642
1643stage3: force
935e11b0 1644 -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
79d8453e
RS
1645 -mv $(STAGESTUFF) stage3
1646 -rm -f stage3/libgcc.a
1647 -cp libgcc.a stage3
1648 -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
1649
1650stage4: force
935e11b0 1651 -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
79d8453e
RS
1652 -mv $(STAGESTUFF) stage4
1653 -rm -f stage4/libgcc.a
1654 -cp libgcc.a stage4
1655 -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
1656
1657# Copy just the executable files from a particular stage into a subdirectory,
1658# and delete the object files. Use this if you're just verifying a version
1659# that is pretty sure to work, and you are short of disk space.
1660risky-stage1: force
935e11b0 1661 -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
79d8453e
RS
1662 -mv cc1 cpp cccp gcc stage1
1663 -rm -f stage1/libgcc.a
1664 -cp libgcc.a stage1 && $(RANLIB) stage1/libgcc.a
1665 -make clean
1666
1667risky-stage2: force
935e11b0 1668 -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
79d8453e
RS
1669 -mv cc1 cpp cccp gcc stage2
1670 -rm -f stage2/libgcc.a
1671 -cp libgcc.a stage2 && $(RANLIB) stage2/libgcc.a
1672 -make clean
1673
1674risky-stage3: force
935e11b0 1675 -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
79d8453e
RS
1676 -mv cc1 cpp cccp gcc stage3
1677 -rm -f stage3/libgcc.a
1678 -cp libgcc.a stage3 && $(RANLIB) stage3/libgcc.a
1679 -make clean
1680
1681risky-stage4: force
935e11b0 1682 -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
79d8453e
RS
1683 -mv cc1 cpp cccp gcc stage4
1684 -rm -f stage4/libgcc.a
1685 -cp libgcc.a stage4 && $(RANLIB) stage4/libgcc.a
1686 -make clean
1687
1688#In GNU Make, ignore whether `stage*' exists.
1689.PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
1690.PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
1691
1692force: