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