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