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