file syslex.c was initially added on branch binutils-2_10-branch.
[binutils.git] / Makefile.in
blobf1acbd07f5c8e3099fdeed489baf66b9f536d710
2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
4 # Free Software Foundation
6 # This file 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 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 srcdir = .
23 prefix = /usr/local
24 exec_prefix = $(prefix)
26 bindir=${exec_prefix}/bin
27 sbindir=${exec_prefix}/sbin
28 libexecdir=${exec_prefix}/libexec
29 datadir=${prefix}/share
30 sysconfdir=${prefix}/etc
31 sharedstatedir=${prefix}/com
32 localstatedir=${prefix}/var
33 libdir=${exec_prefix}/lib
34 includedir=${prefix}/include
35 oldincludedir=/usr/include
36 infodir=${prefix}/info
37 mandir=${prefix}/man
38 gxx_include_dir=${includedir}/g++
40 tooldir = $(exec_prefix)/$(target)
42 program_transform_name =
44 man1dir = $(mandir)/man1
45 man2dir = $(mandir)/man2
46 man3dir = $(mandir)/man3
47 man4dir = $(mandir)/man4
48 man5dir = $(mandir)/man5
49 man6dir = $(mandir)/man6
50 man7dir = $(mandir)/man7
51 man8dir = $(mandir)/man8
52 man9dir = $(mandir)/man9
53 infodir = $(prefix)/info
54 includedir = $(prefix)/include
55 # Directory in which the compiler finds executables, libraries, etc.
56 libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
57 GDB_NLM_DEPS =
59 SHELL = /bin/sh
61 # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
62 # cygwin host.
63 INSTALL_PROGRAM_ARGS =
65 INSTALL = $(SHELL) $$s/install-sh -c
66 INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS)
67 INSTALL_SCRIPT = $(INSTALL)
68 INSTALL_DATA = $(INSTALL) -m 644
70 INSTALL_DOSREL = install-dosrel-fake
72 AS = as
73 AR = ar
74 AR_FLAGS = rc
75 CC = cc
77 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
78 # here so that they can be overridden by Makefile fragments.
79 HOST_CC = $(CC_FOR_BUILD)
80 HOST_PREFIX =
81 HOST_PREFIX_1 = loser-
83 # These flag values are normally overridden by the configure script.
84 CFLAGS = -g
85 CXXFLAGS = -g -O2
87 LDFLAGS =
88 LIBCFLAGS = $(CFLAGS)
89 CFLAGS_FOR_TARGET = $(CFLAGS)
90 LDFLAGS_FOR_TARGET =
91 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
92 PICFLAG =
93 PICFLAG_FOR_TARGET =
95 CHILLFLAGS = $(CFLAGS)
96 CHILL_LIB = -lchill
97 CXX = c++
99 # Use -O2 to stress test the compiler.
100 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -fexceptions
101 CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
102 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates -fexceptions
104 RANLIB = ranlib
106 DLLTOOL = dlltool
107 WINDRES = windres
109 NM = nm
111 LD = ld
113 BZIPPROG = bzip2
114 MD5PROG = md5sum
116 # These values are substituted by configure.
117 DEFAULT_YACC = yacc
118 DEFAULT_LEX = lex
119 DEFAULT_M4 = m4
121 BISON = `if [ -f $$r/bison/bison ] ; then \
122 echo $$r/bison/bison -L $$s/bison/ ; \
123 else \
124 echo bison ; \
127 YACC = `if [ -f $$r/bison/bison ] ; then \
128 echo $$r/bison/bison -y -L $$s/bison/ ; \
129 elif [ -f $$r/byacc/byacc ] ; then \
130 echo $$r/byacc/byacc ; \
131 else \
132 echo ${DEFAULT_YACC} ; \
135 LEX = `if [ -f $$r/flex/flex ] ; \
136 then echo $$r/flex/flex ; \
137 else echo ${DEFAULT_LEX} ; fi`
139 M4 = `if [ -f $$r/m4/m4 ] ; \
140 then echo $$r/m4/m4 ; \
141 else echo ${DEFAULT_M4} ; fi`
143 MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
144 then echo $$r/texinfo/makeinfo/makeinfo ; \
145 else echo makeinfo ; fi`
147 # This just becomes part of the MAKEINFO definition passed down to
148 # sub-makes. It lets flags be given on the command line while still
149 # using the makeinfo from the object tree.
150 MAKEINFOFLAGS =
152 EXPECT = `if [ -f $$r/expect/expect ] ; \
153 then echo $$r/expect/expect ; \
154 else echo expect ; fi`
156 RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
157 then echo $$s/dejagnu/runtest ; \
158 else echo runtest ; fi`
161 # compilers to use to create programs which must be run in the build
162 # environment.
163 CC_FOR_BUILD = $(CC)
164 CXX_FOR_BUILD = $(CXX)
166 SUBDIRS = "this is set via configure, don't edit this"
167 OTHERS =
169 # This is set by the configure script to the list of directories which
170 # should be built using the target tools.
173 TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib libio librx libstdc++ libg++ winsup opcodes bsp libstub cygmon
175 # Target libraries are put under this directory:
176 # Changed by configure to $(target_alias) if cross.
177 TARGET_SUBDIR = .
179 # This is set by the configure script to the arguments passed to configure.
180 CONFIG_ARGUMENTS =
182 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
183 # was used.
184 SET_LIB_PATH =
186 # This is the name of the environment variable used for the path to
187 # the libraries. This may be changed by configure.in.
188 RPATH_ENVVAR = LD_LIBRARY_PATH
190 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
191 REALLY_SET_LIB_PATH = \
192 if [ x"$$$(RPATH_ENVVAR)" != x ]; then \
193 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \
194 else \
195 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes; \
196 fi; \
197 export $(RPATH_ENVVAR);
199 ALL = all.normal
200 INSTALL_TARGET = installdirs \
201 install-gcc \
202 $(INSTALL_MODULES) \
203 $(INSTALL_TARGET_MODULES) \
204 $(INSTALL_X11_MODULES) \
205 $(INSTALL_DOSREL)
207 INSTALL_TARGET_CROSS = installdirs \
208 install-gcc-cross \
209 $(INSTALL_MODULES) \
210 $(INSTALL_TARGET_MODULES) \
211 $(INSTALL_X11_MODULES) \
212 $(INSTALL_DOSREL)
214 CC_FOR_TARGET = ` \
215 if [ -f $$r/gcc/xgcc ] ; then \
216 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
217 case "$(target_canonical)" in \
218 i[3456]86-*-cygwin*) \
219 echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/winsup/cygwin/include -idirafter $$s/winsup/w32api/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \
220 ;; \
221 *) \
222 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
223 ;; \
224 esac \
225 else \
226 echo $$r/gcc/xgcc -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -B$$r/gcc/ -isystem $(build_tooldir)/include; \
227 fi; \
228 else \
229 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
230 echo $(CC); \
231 else \
232 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
233 fi; \
236 # If CC_FOR_TARGET is not overriden on the command line, then this
237 # variable is passed down to the gcc Makefile, where it is used to
238 # build libgcc2.a. We define it here so that it can itself be
239 # overridden on the command line.
240 GCC_FOR_TARGET = $$r/gcc/xgcc -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -B$$r/gcc/ -I$(build_tooldir)/include
242 CHILL_FOR_TARGET = ` \
243 if [ -f $$r/gcc/xgcc ] ; then \
244 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
245 else \
246 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
247 echo $(CC); \
248 else \
249 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
250 fi; \
253 CXX_FOR_TARGET = ` \
254 if [ -f $$r/gcc/xgcc ] ; then \
255 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
256 case "$(target_canonical)" in \
257 i[3456]86-*-cygwin*) \
258 echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/cygwin/include -idirafter $$s/winsup/w32api/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \
259 ;; \
260 *) \
261 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
262 ;; \
263 esac \
264 else \
265 echo $$r/gcc/g++ -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -B$$r/gcc/ -I$(build_tooldir)/include; \
266 fi; \
267 else \
268 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
269 echo $(CXX); \
270 else \
271 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
272 fi; \
275 AS_FOR_TARGET = ` \
276 if [ -f $$r/gas/as-new ] ; then \
277 echo $$r/gas/as-new ; \
278 else \
279 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
280 echo $(AS); \
281 else \
282 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
283 fi; \
286 LD_FOR_TARGET = ` \
287 if [ -f $$r/ld/ld-new ] ; then \
288 echo $$r/ld/ld-new ; \
289 else \
290 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
291 echo $(LD); \
292 else \
293 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
294 fi; \
297 DLLTOOL_FOR_TARGET = ` \
298 if [ -f $$r/binutils/dlltool ] ; then \
299 echo $$r/binutils/dlltool ; \
300 else \
301 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
302 echo $(DLLTOOL); \
303 else \
304 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
305 fi; \
308 WINDRES_FOR_TARGET = ` \
309 if [ -f $$r/binutils/windres ] ; then \
310 echo $$r/binutils/windres ; \
311 else \
312 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
313 echo $(WINDRES); \
314 else \
315 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
316 fi; \
319 AR_FOR_TARGET = ` \
320 if [ -f $$r/binutils/ar ] ; then \
321 echo $$r/binutils/ar ; \
322 else \
323 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
324 echo $(AR); \
325 else \
326 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
327 fi; \
330 RANLIB_FOR_TARGET = ` \
331 if [ -f $$r/binutils/ranlib ] ; then \
332 echo $$r/binutils/ranlib ; \
333 else \
334 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
335 echo $(RANLIB); \
336 else \
337 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
338 fi; \
341 NM_FOR_TARGET = ` \
342 if [ -f $$r/binutils/nm-new ] ; then \
343 echo $$r/binutils/nm-new ; \
344 else \
345 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
346 echo $(NM); \
347 else \
348 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
349 fi; \
352 # The first rule in the file had better be this one. Don't put any above it.
353 # This lives here to allow makefile fragments to contain dependencies.
354 all: all.normal
355 .PHONY: all
357 # These can be overridden by config/mt-*.
358 # The _TARGET_ is because they're specified in mt-foo.
359 # The _HOST_ is because they're programs that run on the host.
360 EXTRA_TARGET_HOST_ALL_MODULES =
361 EXTRA_TARGET_HOST_INSTALL_MODULES =
362 EXTRA_TARGET_HOST_CHECK_MODULES =
364 #### host and target specific makefile fragments come in here.
367 # Flags to pass down to all sub-makes.
368 # Please keep these in alphabetical order.
369 BASE_FLAGS_TO_PASS = \
370 "AR_FLAGS=$(AR_FLAGS)" \
371 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
372 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
373 "BISON=$(BISON)" \
374 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
375 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
376 "CFLAGS=$(CFLAGS)" \
377 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
378 "CHILLFLAGS=$(CHILLFLAGS)" \
379 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
380 "CHILL_LIB=$(CHILL_LIB)" \
381 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
382 "CXXFLAGS=$(CXXFLAGS)" \
383 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
384 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
385 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
386 "INSTALL=$(INSTALL)" \
387 "INSTALL_DATA=$(INSTALL_DATA)" \
388 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
389 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
390 "LDFLAGS=$(LDFLAGS)" \
391 "LEX=$(LEX)" \
392 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
393 "LIBCFLAGS=$(LIBCFLAGS)" \
394 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
395 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
396 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
397 "M4=$(M4)" \
398 "MAKE=$(MAKE)" \
399 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
400 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
401 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
402 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
403 "SHELL=$(SHELL)" \
404 "EXPECT=$(EXPECT)" \
405 "RUNTEST=$(RUNTEST)" \
406 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
407 "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
408 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
409 "YACC=$(YACC)" \
410 "bindir=$(bindir)" \
411 "datadir=$(datadir)" \
412 "exec_prefix=$(exec_prefix)" \
413 "includedir=$(includedir)" \
414 "infodir=$(infodir)" \
415 "libdir=$(libdir)" \
416 "libexecdir=$(libexecdir)" \
417 "lispdir=$(lispdir)" \
418 "localstatedir=$(localstatedir)" \
419 "mandir=$(mandir)" \
420 "oldincludedir=$(oldincludedir)" \
421 "prefix=$(prefix)" \
422 "sbindir=$(sbindir)" \
423 "sharedstatedir=$(sharedstatedir)" \
424 "sysconfdir=$(sysconfdir)" \
425 "tooldir=$(tooldir)" \
426 "gxx_include_dir=$(gxx_include_dir)" \
427 "gcc_version=$(gcc_version)" \
428 "gcc_version_trigger=$(gcc_version_trigger)" \
429 "target_alias=$(target_alias)" \
430 "libsubdir=$(libsubdir)"
432 # Flags to pass down to most sub-makes, in which we're building with
433 # the host environment.
434 # If any variables are added here, they must be added to do-*, below.
435 EXTRA_HOST_FLAGS = \
436 'AR=$(AR)' \
437 'AS=$(AS)' \
438 'CC=$(CC)' \
439 'CXX=$(CXX)' \
440 'DLLTOOL=$(DLLTOOL)' \
441 'LD=$(LD)' \
442 'NM=$(NM)' \
443 'RANLIB=$(RANLIB)' \
444 'WINDRES=$(WINDRES)'
446 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
448 # Flags that are concerned with the location of the X11 include files
449 # and library files
451 # NOTE: until the top-level is getting the values via autoconf, it only
452 # causes problems to have this top-level Makefile overriding the autoconf-set
453 # values in child directories. Only variables that don't conflict with
454 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
456 X11_FLAGS_TO_PASS = \
457 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
458 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
460 # Flags to pass down to makes which are built with the target environment.
461 # The double $ decreases the length of the command line; the variables
462 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
463 # If any variables are added here, they must be added to do-*, below.
464 EXTRA_TARGET_FLAGS = \
465 'AR=$$(AR_FOR_TARGET)' \
466 'AS=$$(AS_FOR_TARGET)' \
467 'CC=$$(CC_FOR_TARGET)' \
468 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
469 'CXX=$$(CXX_FOR_TARGET)' \
470 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
471 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
472 'LD=$$(LD_FOR_TARGET)' \
473 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
474 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
475 'NM=$$(NM_FOR_TARGET)' \
476 'RANLIB=$$(RANLIB_FOR_TARGET)' \
477 'WINDRES=$$(WINDRES_FOR_TARGET)'
479 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
481 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
482 # unfortunately needs the native compiler and the target ar and
483 # ranlib.
484 # If any variables are added here, they must be added to do-*, below.
485 # The HOST_* variables are a special case, which are used for the gcc
486 # cross-building scheme.
487 EXTRA_GCC_FLAGS = \
488 'AR=$(AR)' \
489 'AS=$(AS)' \
490 'CC=$(CC)' \
491 'CXX=$(CXX)' \
492 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
493 'HOST_CC=$(CC_FOR_BUILD)' \
494 'HOST_PREFIX=$(HOST_PREFIX)' \
495 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
496 'NM=$(NM)' \
497 'RANLIB=$(RANLIB)' \
498 'WINDRES=$$(WINDRES_FOR_TARGET)' \
499 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
500 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
501 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
502 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
503 "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
504 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
505 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
506 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
507 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
508 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
510 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
512 # This is a list of the targets for all of the modules which are compiled
513 # using $(FLAGS_TO_PASS).
514 ALL_MODULES = \
515 all-apache \
516 all-ash \
517 all-autoconf \
518 all-automake \
519 all-bash \
520 all-bfd \
521 all-binutils \
522 all-bison \
523 all-byacc \
524 all-bzip2 \
525 all-cvssrc \
526 all-db \
527 all-dejagnu \
528 all-diff \
529 all-dosutils \
530 all-etc \
531 all-fileutils \
532 all-findutils \
533 all-find \
534 all-flex \
535 all-gas \
536 all-gawk \
537 all-gettext \
538 all-gnuserv \
539 all-gprof \
540 all-grep \
541 all-grez \
542 all-gzip \
543 all-hello \
544 all-indent \
545 all-inet \
546 all-intl \
547 all-ispell \
548 all-itcl \
549 all-ld \
550 all-libgui \
551 all-libiberty \
552 all-libtool \
553 all-m4 \
554 all-make \
555 all-mmalloc \
556 all-opcodes \
557 all-patch \
558 all-perl \
559 all-prms \
560 all-rcs \
561 all-readline \
562 all-release \
563 all-recode \
564 all-sed \
565 all-send-pr \
566 all-shellutils \
567 all-sim \
568 all-tar \
569 all-tcl \
570 all-tcl8.1 \
571 all-texinfo \
572 all-textutils \
573 all-tgas \
574 all-time \
575 all-uudecode \
576 all-wdiff \
577 all-zip \
578 $(EXTRA_TARGET_HOST_ALL_MODULES)
580 # This is a list of the check targets for all of the modules which are
581 # compiled using $(FLAGS_TO_PASS).
583 # The list is in two parts. The first lists those tools which
584 # are tested as part of the host's native tool-chain, and not
585 # tested in a cross configuration.
586 NATIVE_CHECK_MODULES = \
587 check-bison \
588 check-byacc \
589 check-flex \
590 check-zip
592 CROSS_CHECK_MODULES = \
593 check-apache \
594 check-ash \
595 check-autoconf \
596 check-automake \
597 check-bash \
598 check-bfd \
599 check-binutils \
600 check-bzip2 \
601 check-cvssrc \
602 check-db \
603 check-dejagnu \
604 check-diff \
605 check-etc \
606 check-fileutils \
607 check-findutils \
608 check-find \
609 check-gas \
610 check-gawk \
611 check-gettext \
612 check-gnuserv \
613 check-gprof \
614 check-grep \
615 check-gzip \
616 check-hello \
617 check-indent \
618 check-inet \
619 check-intl \
620 check-ispell \
621 check-itcl \
622 check-ld \
623 check-libgui \
624 check-libiberty \
625 check-libtool \
626 check-m4 \
627 check-make \
628 check-mmcheckoc \
629 check-opcodes \
630 check-patch \
631 check-perl \
632 check-prms \
633 check-rcs \
634 check-readline \
635 check-recode \
636 check-sed \
637 check-send-pr \
638 check-shellutils \
639 check-sim \
640 check-tar \
641 check-tcl \
642 check-texinfo \
643 check-textutils \
644 check-tgas \
645 check-time \
646 check-uudecode \
647 check-wdiff \
648 $(EXTRA_TARGET_HOST_CHECK_MODULES)
650 CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
652 # This is a list of the install targets for all of the modules which are
653 # compiled using $(FLAGS_TO_PASS).
654 # We put install-opcodes before install-binutils because the installed
655 # binutils might be on PATH, and they might need the shared opcodes
656 # library.
657 # We put install-tcl before install-itcl because itcl wants to run a
658 # program on installation which uses the Tcl libraries.
659 INSTALL_MODULES = \
660 install-apache \
661 install-ash \
662 install-autoconf \
663 install-automake \
664 install-bash \
665 install-bfd \
666 install-bzip2 \
667 install-opcodes \
668 install-binutils \
669 install-bison \
670 install-byacc \
671 install-cvssrc \
672 install-db \
673 install-dejagnu \
674 install-diff \
675 install-dosutils \
676 install-etc \
677 install-fileutils \
678 install-findutils \
679 install-find \
680 install-flex \
681 install-gas \
682 install-gawk \
683 install-gettext \
684 install-gnuserv \
685 install-gprof \
686 install-grep \
687 install-grez \
688 install-gzip \
689 install-hello \
690 install-indent \
691 install-inet \
692 install-intl \
693 install-ispell \
694 install-tcl \
695 install-tcl8.1 \
696 install-itcl \
697 install-ld \
698 install-libgui \
699 install-libiberty \
700 install-libtool \
701 install-m4 \
702 install-make \
703 install-mmalloc \
704 install-patch \
705 install-perl \
706 install-prms \
707 install-rcs \
708 install-readline \
709 install-recode \
710 install-sed \
711 install-send-pr \
712 install-shellutils \
713 install-sim \
714 install-tar \
715 install-texinfo \
716 install-textutils \
717 install-tgas \
718 install-time \
719 install-uudecode \
720 install-wdiff \
721 install-zip \
722 $(EXTRA_TARGET_HOST_INSTALL_MODULES)
724 # This is a list of the targets for all of the modules which are compiled
725 # using $(X11_FLAGS_TO_PASS).
726 ALL_X11_MODULES = \
727 all-emacs \
728 all-emacs19 \
729 all-gdb \
730 all-expect \
731 all-gash \
732 all-guile \
733 all-tclX \
734 all-tk \
735 all-tk8.1 \
736 all-tix
738 # This is a list of the check targets for all of the modules which are
739 # compiled using $(X11_FLAGS_TO_PASS).
740 CHECK_X11_MODULES = \
741 check-emacs \
742 check-gdb \
743 check-guile \
744 check-expect \
745 check-gash \
746 check-tclX \
747 check-tk \
748 check-tix
750 # This is a list of the install targets for all the modules which are
751 # compiled using $(X11_FLAGS_TO_PASS).
752 INSTALL_X11_MODULES = \
753 install-emacs \
754 install-emacs19 \
755 install-gdb \
756 install-guile \
757 install-expect \
758 install-gash \
759 install-tclX \
760 install-tk \
761 install-tk8.1 \
762 install-tix
764 # This is a list of the targets for all of the modules which are compiled
765 # using $(TARGET_FLAGS_TO_PASS).
766 ALL_TARGET_MODULES = \
767 all-target-libio \
768 all-target-libstdc++ \
769 all-target-librx \
770 all-target-libg++ \
771 all-target-newlib \
772 all-target-libtermcap \
773 all-target-winsup \
774 all-target-libgloss \
775 all-target-libiberty \
776 all-target-gperf \
777 all-target-examples \
778 all-target-libstub \
779 all-target-bsp \
780 all-target-cygmon
782 # This is a list of the configure targets for all of the modules which
783 # are compiled using the target tools.
784 CONFIGURE_TARGET_MODULES = \
785 configure-target-libio \
786 configure-target-libstdc++ \
787 configure-target-librx \
788 configure-target-libg++ \
789 configure-target-newlib \
790 configure-target-libtermcap \
791 configure-target-winsup \
792 configure-target-libgloss \
793 configure-target-libiberty \
794 configure-target-gperf \
795 configure-target-examples \
796 configure-target-libstub \
797 configure-target-bsp \
798 configure-target-cygmon
800 # This is a list of the check targets for all of the modules which are
801 # compiled using $(TARGET_FLAGS_TO_PASS).
802 CHECK_TARGET_MODULES = \
803 check-target-libio \
804 check-target-libstdc++ \
805 check-target-libg++ \
806 check-target-newlib \
807 check-target-winsup \
808 check-target-libiberty \
809 check-target-gperf
811 # This is a list of the install targets for all of the modules which are
812 # compiled using $(TARGET_FLAGS_TO_PASS).
813 INSTALL_TARGET_MODULES = \
814 install-target-libio \
815 install-target-libstdc++ \
816 install-target-libg++ \
817 install-target-newlib \
818 install-target-libtermcap \
819 install-target-winsup \
820 install-target-libgloss \
821 install-target-libiberty \
822 install-target-bsp \
823 install-target-gperf
825 # This is a list of the targets for which we can do a clean-{target}.
826 CLEAN_MODULES = \
827 clean-apache \
828 clean-ash \
829 clean-autoconf \
830 clean-automake \
831 clean-bash \
832 clean-bfd \
833 clean-binutils \
834 clean-bison \
835 clean-byacc \
836 clean-bzip2 \
837 clean-cvssrc \
838 clean-db \
839 clean-dejagnu \
840 clean-diff \
841 clean-dosutils \
842 clean-etc \
843 clean-fileutils \
844 clean-findutils \
845 clean-find \
846 clean-flex \
847 clean-gas \
848 clean-gawk \
849 clean-gettext \
850 clean-gnuserv \
851 clean-gprof \
852 clean-grep \
853 clean-grez \
854 clean-gzip \
855 clean-hello \
856 clean-indent \
857 clean-inet \
858 clean-intl \
859 clean-ispell \
860 clean-itcl \
861 clean-ld \
862 clean-libgui \
863 clean-libiberty \
864 clean-libtool \
865 clean-m4 \
866 clean-make \
867 clean-mmalloc \
868 clean-opcodes \
869 clean-patch \
870 clean-perl \
871 clean-prms \
872 clean-rcs \
873 clean-readline \
874 clean-release \
875 clean-recode \
876 clean-sed \
877 clean-send-pr \
878 clean-shellutils \
879 clean-sim \
880 clean-tar \
881 clean-tcl \
882 clean-texinfo \
883 clean-textutils \
884 clean-tgas \
885 clean-time \
886 clean-uudecode \
887 clean-wdiff \
888 clean-zip
890 # All of the target modules that can be cleaned
891 CLEAN_TARGET_MODULES = \
892 clean-target-libio \
893 clean-target-libstdc++ \
894 clean-target-librx \
895 clean-target-libg++ \
896 clean-target-newlib \
897 clean-target-winsup \
898 clean-target-libgloss \
899 clean-target-libiberty \
900 clean-target-gperf \
901 clean-target-examples \
902 clean-target-libstub \
903 clean-target-bsp \
904 clean-target-cygmon
906 # All of the x11 modules that can be cleaned
907 CLEAN_X11_MODULES = \
908 clean-emacs \
909 clean-emacs19 \
910 clean-gdb \
911 clean-expect \
912 clean-gash \
913 clean-guile \
914 clean-tclX \
915 clean-tk \
916 clean-tix
918 # The target built for a native build.
919 .PHONY: all.normal
920 all.normal: \
921 $(ALL_MODULES) \
922 $(ALL_X11_MODULES) \
923 $(ALL_TARGET_MODULES) \
924 all-gcc
926 # Do a target for all the subdirectories. A ``make do-X'' will do a
927 # ``make X'' in all subdirectories (because, in general, there is a
928 # dependency (below) of X upon do-X, a ``make X'' will also do this,
929 # but it may do additional work as well).
930 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
931 # because it is so large that it can easily overflow the command line
932 # length limit on some systems.
933 DO_X = \
934 do-clean \
935 do-distclean \
936 do-dvi \
937 do-info \
938 do-install-info \
939 do-installcheck \
940 do-mostlyclean \
941 do-maintainer-clean \
942 do-TAGS
943 .PHONY: $(DO_X)
944 $(DO_X):
945 @target=`echo $@ | sed -e 's/^do-//'`; \
946 r=`pwd`; export r; \
947 s=`cd $(srcdir); pwd`; export s; \
948 $(SET_LIB_PATH) \
949 for i in $(SUBDIRS) -dummy-; do \
950 if [ -f ./$$i/Makefile ]; then \
951 case $$i in \
952 gcc) \
953 for flag in $(EXTRA_GCC_FLAGS); do \
954 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
955 done; \
956 ;; \
957 *) \
958 for flag in $(EXTRA_HOST_FLAGS); do \
959 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
960 done; \
961 ;; \
962 esac ; \
963 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
964 if (cd ./$$i; \
965 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
966 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
967 "RANLIB=$${RANLIB}" \
968 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
969 $${target}); \
970 then true; else exit 1; fi; \
971 else true; fi; \
972 done
973 @target=`echo $@ | sed -e 's/^do-//'`; \
974 r=`pwd`; export r; \
975 s=`cd $(srcdir); pwd`; export s; \
976 $(SET_LIB_PATH) \
977 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
978 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
979 for flag in $(EXTRA_TARGET_FLAGS); do \
980 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
981 done; \
982 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
983 if (cd $(TARGET_SUBDIR)/$$i; \
984 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
985 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
986 "RANLIB=$${RANLIB}" \
987 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
988 $${target}); \
989 then true; else exit 1; fi; \
990 else true; fi; \
991 done
993 # Here are the targets which correspond to the do-X targets.
995 .PHONY: info installcheck dvi install-info
996 .PHONY: clean distclean mostlyclean maintainer-clean realclean
997 .PHONY: local-clean local-distclean local-maintainer-clean
998 info: do-info
999 installcheck: do-installcheck
1000 dvi: do-dvi
1002 # Make sure makeinfo is built before we do a `make info'.
1003 do-info: all-texinfo
1005 install-info: do-install-info dir.info
1006 s=`cd $(srcdir); pwd`; export s; \
1007 if [ -f dir.info ] ; then \
1008 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
1009 else true ; fi
1011 local-clean:
1012 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
1014 local-distclean:
1015 -rm -f Makefile config.status config.cache mh-frag mt-frag
1016 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
1017 rm -rf $(TARGET_SUBDIR); \
1018 else true; fi
1020 local-maintainer-clean:
1021 @echo "This command is intended for maintainers to use;"
1022 @echo "it deletes files that may require special tools to rebuild."
1024 clean: do-clean local-clean
1025 mostlyclean: do-mostlyclean local-clean
1026 distclean: do-distclean local-clean local-distclean
1027 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
1028 maintainer-clean: local-distclean
1029 realclean: maintainer-clean
1031 # This rule is used to clean specific modules.
1032 .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
1033 $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
1034 @dir=`echo $@ | sed -e 's/clean-//'`; \
1035 if [ -f ./$${dir}/Makefile ] ; then \
1036 r=`pwd`; export r; \
1037 s=`cd $(srcdir); pwd`; export s; \
1038 $(SET_LIB_PATH) \
1039 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
1040 else \
1041 true; \
1044 .PHONY: $(CLEAN_TARGET_MODULES)
1045 $(CLEAN_TARGET_MODULES):
1046 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
1047 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1048 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1049 r=`pwd`; export r; \
1050 s=`cd $(srcdir); pwd`; export s; \
1051 $(SET_LIB_PATH) \
1052 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
1053 else \
1054 true; \
1057 clean-target: $(CLEAN_TARGET_MODULES)
1059 # Check target.
1061 .PHONY: check
1062 check: $(CHECK_MODULES) \
1063 $(CHECK_TARGET_MODULES) \
1064 $(CHECK_X11_MODULES) \
1065 check-gcc
1067 # Automated reporting of test results.
1069 warning.log: build.log
1070 $(srcdir)/contrib/warn_summary build.log > $@
1072 mail-report.log:
1073 if test x'$(BOOT_CFLAGS)' != x''; then \
1074 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1075 fi; \
1076 $(srcdir)/contrib/test_summary -t >$@
1077 chmod +x $@
1078 echo If you really want to send e-mail, run ./$@ now
1080 mail-report-with-warnings.log: warning.log
1081 if test x'$(BOOT_CFLAGS)' != x''; then \
1082 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1083 fi; \
1084 $(srcdir)/contrib/test_summary -t -i warning.log >$@
1085 chmod +x $@
1086 echo If you really want to send e-mail, run ./$@ now
1088 # Installation targets.
1090 .PHONY: install install-cross uninstall source-vault binary-vault vault-install
1091 install: $(INSTALL_TARGET)
1092 install-cross: $(INSTALL_TARGET_CROSS)
1094 uninstall:
1095 @echo "the uninstall target is not supported in this tree"
1097 source-vault:
1098 $(MAKE) -f ./release/Build-A-Release \
1099 host=$(host_alias) source-vault
1101 binary-vault:
1102 $(MAKE) -f ./release/Build-A-Release \
1103 host=$(host_alias) target=$(target_alias)
1105 vault-install:
1106 @if [ -f ./release/vault-install ] ; then \
1107 ./release/vault-install $(host_alias) $(target_alias) ; \
1108 else \
1109 true ; \
1112 .PHONY: install.all
1113 install.all: install-no-fixedincludes
1114 @if [ -f ./gcc/Makefile ] ; then \
1115 r=`pwd` ; export r ; \
1116 $(SET_LIB_PATH) \
1117 (cd ./gcc; \
1118 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1119 else \
1120 true ; \
1123 # inet-install is used because the I*Net wants DejaGNU installed but
1124 # not built. Similarly, gzip is built but not installed.
1125 inet-install:
1126 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1128 # install-no-fixedincludes is used because Cygnus can not distribute
1129 # the fixed header files.
1130 .PHONY: install-no-fixedincludes
1131 install-no-fixedincludes: \
1132 installdirs \
1133 $(INSTALL_MODULES) \
1134 $(INSTALL_TARGET_MODULES) \
1135 $(INSTALL_X11_MODULES) \
1136 gcc-no-fixedincludes
1138 # Install the gcc headers files, but not the fixed include files,
1139 # which Cygnus is not allowed to distribute. This rule is very
1140 # dependent on the workings of the gcc Makefile.in.
1141 .PHONY: gcc-no-fixedincludes
1142 gcc-no-fixedincludes:
1143 @if [ -f ./gcc/Makefile ]; then \
1144 rm -rf gcc/tmp-include; \
1145 mv gcc/include gcc/tmp-include 2>/dev/null; \
1146 mkdir gcc/include; \
1147 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1148 touch gcc/stmp-fixinc gcc/include/fixed; \
1149 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
1150 r=`pwd`; export r; \
1151 s=`cd $(srcdir); pwd` ; export s; \
1152 $(SET_LIB_PATH) \
1153 (cd ./gcc; \
1154 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1155 rm -rf gcc/include; \
1156 mv gcc/tmp-include gcc/include 2>/dev/null; \
1157 else true; fi
1160 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1161 # build a target all-X means to cd to X and make all.
1163 # all-gui, and all-libproc are handled specially because
1164 # they are still experimental, and if they fail to build, that
1165 # shouldn't stop "make all".
1166 .PHONY: $(ALL_MODULES) all-gui all-libproc
1167 $(ALL_MODULES) all-gui all-libproc:
1168 @dir=`echo $@ | sed -e 's/all-//'`; \
1169 if [ -f ./$${dir}/Makefile ] ; then \
1170 r=`pwd`; export r; \
1171 s=`cd $(srcdir); pwd`; export s; \
1172 $(SET_LIB_PATH) \
1173 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1174 else \
1175 true; \
1178 # These rules are used to check the modules which use FLAGS_TO_PASS.
1179 # To build a target check-X means to cd to X and make check. Some
1180 # modules are only tested in a native toolchain.
1182 .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1183 $(NATIVE_CHECK_MODULES):
1184 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1185 dir=`echo $@ | sed -e 's/check-//'`; \
1186 if [ -f ./$${dir}/Makefile ] ; then \
1187 r=`pwd`; export r; \
1188 s=`cd $(srcdir); pwd`; export s; \
1189 $(SET_LIB_PATH) \
1190 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1191 else \
1192 true; \
1193 fi; \
1196 $(CROSS_CHECK_MODULES):
1197 @dir=`echo $@ | sed -e 's/check-//'`; \
1198 if [ -f ./$${dir}/Makefile ] ; then \
1199 r=`pwd`; export r; \
1200 s=`cd $(srcdir); pwd`; export s; \
1201 $(SET_LIB_PATH) \
1202 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1203 else \
1204 true; \
1207 # This rule is used to install the modules which use FLAGS_TO_PASS.
1208 # To build a target install-X means to cd to X and make install.
1209 .PHONY: $(INSTALL_MODULES)
1210 $(INSTALL_MODULES): installdirs
1211 @dir=`echo $@ | sed -e 's/install-//'`; \
1212 if [ -f ./$${dir}/Makefile ] ; then \
1213 r=`pwd`; export r; \
1214 s=`cd $(srcdir); pwd`; export s; \
1215 $(SET_LIB_PATH) \
1216 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1217 else \
1218 true; \
1221 # This rule is used to configure the modules which are built with the
1222 # target tools.
1223 .PHONY: $(CONFIGURE_TARGET_MODULES)
1224 $(CONFIGURE_TARGET_MODULES):
1225 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1226 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
1227 r=`pwd`; export r; \
1228 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1229 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1230 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1231 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1232 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1233 else \
1234 echo "Multilibs changed for $${dir}, reconfiguring"; \
1235 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1236 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1237 fi; \
1238 else \
1239 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1240 fi; \
1241 fi; \
1242 fi; exit 0 # break command into two pieces
1243 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1244 if [ ! -d $(TARGET_SUBDIR) ]; then \
1245 true; \
1246 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1247 true; \
1248 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1249 if [ -d $(srcdir)/$${dir} ]; then \
1250 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
1251 r=`pwd`; export r; \
1252 s=`cd $(srcdir); pwd`; export s; \
1253 $(SET_LIB_PATH) \
1254 AR="$(AR_FOR_TARGET)"; export AR; \
1255 AS="$(AS_FOR_TARGET)"; export AS; \
1256 CC="$(CC_FOR_TARGET)"; export CC; \
1257 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1258 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1259 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1260 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1261 LD="$(LD_FOR_TARGET)"; export LD; \
1262 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1263 NM="$(NM_FOR_TARGET)"; export NM; \
1264 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1265 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1266 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
1267 cd $(TARGET_SUBDIR)/$${dir}; \
1268 case $(srcdir) in \
1269 /*) \
1270 topdir=$(srcdir) ;; \
1271 *) \
1272 case "$(TARGET_SUBDIR)" in \
1273 .) topdir="../$(srcdir)" ;; \
1274 *) topdir="../../$(srcdir)" ;; \
1275 esac ;; \
1276 esac; \
1277 if [ "$(srcdir)" = "." ] ; then \
1278 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1279 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1280 if [ -f Makefile ]; then \
1281 if $(MAKE) distclean; then \
1282 true; \
1283 else \
1284 exit 1; \
1285 fi; \
1286 else \
1287 true; \
1288 fi; \
1289 else \
1290 exit 1; \
1291 fi; \
1292 else \
1293 true; \
1294 fi; \
1295 srcdiroption="--srcdir=."; \
1296 libsrcdir="."; \
1297 else \
1298 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1299 libsrcdir="$$s/$${dir}"; \
1300 fi; \
1301 if [ -f $${libsrcdir}/configure ] ; then \
1302 rm -f no-such-file skip-this-dir; \
1303 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
1304 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1305 --with-target-subdir="$(TARGET_SUBDIR)"; \
1306 else \
1307 rm -f no-such-file skip-this-dir; \
1308 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
1309 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1310 --with-target-subdir="$(TARGET_SUBDIR)"; \
1311 fi; \
1312 if [ -f skip-this-dir ] ; then \
1313 sh skip-this-dir; \
1314 rm -f skip-this-dir; \
1315 cd ..; rmdir $${dir} || true; \
1316 else \
1317 true; \
1318 fi; \
1319 else \
1320 true; \
1321 fi; \
1322 else \
1323 true; \
1326 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1327 # To build a target all-X means to cd to X and make all.
1328 .PHONY: $(ALL_TARGET_MODULES)
1329 $(ALL_TARGET_MODULES):
1330 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1331 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1332 r=`pwd`; export r; \
1333 s=`cd $(srcdir); pwd`; export s; \
1334 $(SET_LIB_PATH) \
1335 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1336 else \
1337 true; \
1340 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1341 # To build a target install-X means to cd to X and make install.
1342 .PHONY: $(CHECK_TARGET_MODULES)
1343 $(CHECK_TARGET_MODULES):
1344 @dir=`echo $@ | sed -e 's/check-target-//'`; \
1345 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1346 r=`pwd`; export r; \
1347 s=`cd $(srcdir); pwd`; export s; \
1348 $(SET_LIB_PATH) \
1349 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
1350 else \
1351 true; \
1354 # This rule is used to install the modules which use
1355 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1356 # and make install.
1357 .PHONY: $(INSTALL_TARGET_MODULES)
1358 $(INSTALL_TARGET_MODULES): installdirs
1359 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1360 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1361 r=`pwd`; export r; \
1362 s=`cd $(srcdir); pwd`; export s; \
1363 $(SET_LIB_PATH) \
1364 (cd $(TARGET_SUBDIR)/$${dir}; \
1365 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1366 else \
1367 true; \
1370 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1371 # To build a target all-X means to cd to X and make all.
1372 .PHONY: $(ALL_X11_MODULES)
1373 $(ALL_X11_MODULES):
1374 @dir=`echo $@ | sed -e 's/all-//'`; \
1375 if [ -f ./$${dir}/Makefile ] ; then \
1376 r=`pwd`; export r; \
1377 s=`cd $(srcdir); pwd`; export s; \
1378 $(SET_LIB_PATH) \
1379 (cd $${dir}; \
1380 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1381 else \
1382 true; \
1385 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1386 # To build a target check-X means to cd to X and make all.
1387 .PHONY: $(CHECK_X11_MODULES)
1388 $(CHECK_X11_MODULES):
1389 @dir=`echo $@ | sed -e 's/check-//'`; \
1390 if [ -f ./$${dir}/Makefile ] ; then \
1391 r=`pwd`; export r; \
1392 s=`cd $(srcdir); pwd`; export s; \
1393 $(SET_LIB_PATH) \
1394 (cd $${dir}; \
1395 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1396 else \
1397 true; \
1400 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1401 # To build a target install-X means to cd to X and make install.
1402 .PHONY: $(INSTALL_X11_MODULES)
1403 $(INSTALL_X11_MODULES): installdirs
1404 @dir=`echo $@ | sed -e 's/install-//'`; \
1405 if [ -f ./$${dir}/Makefile ] ; then \
1406 r=`pwd`; export r; \
1407 s=`cd $(srcdir); pwd`; export s; \
1408 $(SET_LIB_PATH) \
1409 (cd $${dir}; \
1410 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1411 else \
1412 true; \
1415 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1416 .PHONY: all-gcc
1417 all-gcc:
1418 @if [ -f ./gcc/Makefile ] ; then \
1419 r=`pwd`; export r; \
1420 s=`cd $(srcdir); pwd`; export s; \
1421 $(SET_LIB_PATH) \
1422 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1423 else \
1424 true; \
1427 # Building GCC uses some tools for rebuilding "source" files
1428 # like texinfo, bison/byacc, etc. So we must depend on those.
1430 # While building GCC, it may be necessary to run various target
1431 # programs like the assembler, linker, etc. So we depend on
1432 # those too.
1434 # In theory, on an SMP all those dependencies can be resolved
1435 # in parallel.
1437 .PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
1438 bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1439 @r=`pwd`; export r; \
1440 s=`cd $(srcdir); pwd`; export s; \
1441 $(SET_LIB_PATH) \
1442 echo "Bootstrapping the compiler"; \
1443 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $@
1444 @r=`pwd`; export r; \
1445 s=`cd $(srcdir); pwd`; export s; \
1446 case "$@" in \
1447 *bootstrap4-lean ) \
1448 msg="Comparing stage3 and stage4 of the compiler"; \
1449 compare=compare3-lean ;; \
1450 *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \
1451 compare=compare3 ;; \
1452 *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \
1453 compare=compare-lean ;; \
1454 * ) msg="Comparing stage2 and stage3 of the compiler"; \
1455 compare=compare ;; \
1456 esac; \
1457 $(SET_LIB_PATH) \
1458 echo "$$msg"; \
1459 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
1460 @r=`pwd`; export r; \
1461 s=`cd $(srcdir); pwd` ; export s; \
1462 $(SET_LIB_PATH) \
1463 echo "Building runtime libraries"; \
1464 $(MAKE) $(BASE_FLAGS_TO_PASS) all
1466 .PHONY: cross
1467 cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1468 @r=`pwd`; export r; \
1469 s=`cd $(srcdir); pwd`; export s; \
1470 $(SET_LIB_PATH) \
1471 echo "Building the C and C++ compiler"; \
1472 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
1473 @r=`pwd`; export r; \
1474 s=`cd $(srcdir); pwd` ; export s; \
1475 $(SET_LIB_PATH) \
1476 echo "Building runtime libraries"; \
1477 $(MAKE) $(BASE_FLAGS_TO_PASS) all LANGUAGES="c c++"
1479 .PHONY: check-gcc
1480 check-gcc:
1481 @if [ -f ./gcc/Makefile ] ; then \
1482 r=`pwd`; export r; \
1483 s=`cd $(srcdir); pwd`; export s; \
1484 $(SET_LIB_PATH) \
1485 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1486 else \
1487 true; \
1490 .PHONY: install-gcc
1491 install-gcc:
1492 @if [ -f ./gcc/Makefile ] ; then \
1493 r=`pwd`; export r; \
1494 s=`cd $(srcdir); pwd`; export s; \
1495 $(SET_LIB_PATH) \
1496 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1497 else \
1498 true; \
1501 .PHONY: install-gcc-cross
1502 install-gcc-cross:
1503 @if [ -f ./gcc/Makefile ] ; then \
1504 r=`pwd`; export r; \
1505 s=`cd $(srcdir); pwd`; export s; \
1506 $(SET_LIB_PATH) \
1507 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \
1508 else \
1509 true; \
1511 # EXPERIMENTAL STUFF
1512 # This rule is used to install the modules which use FLAGS_TO_PASS.
1513 # To build a target install-X means to cd to X and make install.
1514 .PHONY: install-dosrel
1515 install-dosrel: installdirs info
1516 @dir=`echo $@ | sed -e 's/install-//'`; \
1517 if [ -f ./$${dir}/Makefile ] ; then \
1518 r=`pwd`; export r; \
1519 s=`cd $(srcdir); pwd`; export s; \
1520 $(SET_LIB_PATH) \
1521 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1522 else \
1523 true; \
1526 install-dosrel-fake:
1529 # This is a list of inter-dependencies among modules.
1530 all-apache:
1531 all-ash:
1532 all-autoconf: all-m4 all-texinfo
1533 all-automake: all-m4 all-texinfo
1534 all-bash:
1535 all-bfd: all-libiberty all-intl
1536 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
1537 all-bison: all-texinfo
1538 configure-target-bsp: $(ALL_GCC)
1539 all-target-bsp: configure-target-bsp all-gcc all-binutils all-target-newlib
1540 all-byacc:
1541 all-bzip2:
1542 all-cvssrc:
1543 configure-target-cygmon: $(ALL_GCC)
1544 all-target-cygmon: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-libstub all-target-bsp
1545 all-db:
1546 all-dejagnu: all-tcl all-expect all-tk
1547 all-diff: all-libiberty
1548 all-emacs:
1549 all-emacs19: all-bison all-byacc
1550 all-etc:
1551 configure-target-examples: $(ALL_GCC)
1552 all-target-examples: configure-target-examples
1553 all-expect: all-tcl all-tk
1554 all-fileutils: all-libiberty
1555 all-findutils:
1556 all-find:
1557 all-flex: all-libiberty all-bison all-byacc
1558 all-gas: all-libiberty all-opcodes all-bfd all-intl
1559 all-gash: all-tcl
1560 all-gawk:
1561 ALL_GCC = all-gcc
1562 all-gcc: all-bison all-byacc all-binutils all-gas all-ld
1563 all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1564 GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui
1565 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1566 all-gettext:
1567 all-gnuserv:
1568 configure-target-gperf: $(ALL_GCC)
1569 all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++
1570 all-gprof: all-libiberty all-bfd all-opcodes all-intl
1571 all-grez: all-libiberty all-bfd all-opcodes
1572 all-gui: all-gdb all-libproc all-target-librx
1573 all-guile:
1574 all-gzip: all-libiberty
1575 all-hello: all-libiberty
1576 all-indent:
1577 all-inet: all-tcl all-send-pr all-perl
1578 all-intl:
1579 all-ispell: all-emacs19
1580 all-itcl: all-tcl all-tk all-tcl8.1 all-tk8.1
1581 all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
1582 configure-target-libg++: $(ALL_GCC) configure-target-librx
1583 all-target-libg++: configure-target-libg++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc++
1584 configure-target-libgloss: $(ALL_GCC)
1585 all-target-libgloss: configure-target-libgloss configure-target-newlib
1586 configure-target-libio: $(ALL_GCC)
1587 all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1588 check-target-libio:
1589 all-libgui: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl
1590 all-libiberty:
1591 configure-target-librx: $(ALL_GCC) configure-target-newlib
1592 all-target-librx: configure-target-librx
1593 configure-target-libstdc++: $(ALL_GCC)
1594 all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1595 configure-target-libstub: $(ALL_GCC)
1596 all-target-libstub: configure-target-libstub
1597 all-libtool:
1598 all-m4: all-libiberty
1599 all-make: all-libiberty
1600 all-mmalloc:
1601 configure-target-newlib: $(ALL_GCC)
1602 configure-target-libtermcap: $(ALL_GCC)
1603 all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
1604 all-target-libtermcap: configure-target-libtermcap all-binutils all-gas all-gcc
1605 all-opcodes: all-bfd all-libiberty
1606 all-patch: all-libiberty
1607 all-perl:
1608 all-prms: all-libiberty
1609 all-rcs:
1610 all-readline:
1611 all-recode: all-libiberty
1612 all-sed: all-libiberty
1613 all-send-pr: all-prms
1614 all-shellutils:
1615 all-sim: all-libiberty all-bfd all-opcodes all-readline
1616 all-tar: all-libiberty
1617 all-tcl:
1618 all-tcl8.1:
1619 all-tclX: all-tcl all-tk
1620 all-tk: all-tcl
1621 all-tk8.1: all-tcl8.1
1622 all-texinfo: all-libiberty
1623 all-textutils:
1624 all-tgas: all-libiberty all-bfd all-opcodes
1625 all-time:
1626 all-tix: all-tcl all-tk all-tcl8.1 all-tk8.1
1627 all-wdiff:
1628 all-target-winsup: all-target-newlib all-target-libiberty all-target-libtermcap configure-target-winsup
1629 configure-target-winsup: configure-target-newlib
1630 all-uudecode: all-libiberty
1631 all-zip:
1632 configure-target-libiberty: $(ALL_GCC) configure-target-newlib
1633 all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
1634 all-target: $(ALL_TARGET_MODULES)
1635 install-target: $(INSTALL_TARGET_MODULES)
1636 install-gdb: install-tcl install-tk install-itcl install-tix install-libgui
1637 ### other supporting targets
1639 MAKEDIRS= \
1640 $(prefix) \
1641 $(exec_prefix)
1642 .PHONY: installdirs
1643 installdirs: mkinstalldirs
1644 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
1646 dir.info: do-install-info
1647 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1648 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1649 mv -f dir.info.new dir.info ; \
1650 else true ; \
1653 dist:
1654 @echo "Building a full distribution of this tree isn't done"
1655 @echo "via 'make dist'. Check out the etc/ subdirectory"
1657 etags tags: TAGS
1659 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1660 # ability to use several tags files at once, so there is probably no need
1661 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1662 # (if we felt like it) have this Makefile write a piece of elisp which
1663 # the user could load to tell emacs19 where all the TAGS files we just
1664 # built are.
1665 TAGS: do-TAGS
1667 # with the gnu make, this is done automatically.
1669 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
1670 $(SHELL) ./config.status
1673 # Support for building net releases
1675 # Files in devo used in any net release.
1676 # ChangeLog omitted because it may refer to files which are not in this
1677 # distribution (perhaps it would be better to include it anyway).
1678 DEVO_SUPPORT= README Makefile.in configure configure.in \
1679 config.guess config.if config.sub config move-if-change \
1680 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1681 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1682 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1684 # Files in devo/etc used in any net release.
1685 # ChangeLog omitted because it may refer to files which are not in this
1686 # distribution (perhaps it would be better to include it anyway).
1687 ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1688 make-stds.texi standards.info*
1690 # When you use `make setup-dirs' or `make taz' you should always redefine
1691 # this macro.
1692 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1694 # NOTE: No double quotes in the below. It is used within shell script
1695 # as VER="$(VER)"
1696 VER = ` if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
1697 sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
1698 else \
1699 sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
1701 PACKAGE = $(TOOL)
1703 .PHONY: taz
1704 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
1705 $(MAKE) -f Makefile.in do-proto-toplev \
1706 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1707 MD5PROG="$(MD5PROG)" \
1708 SUPPORT_FILES="$(SUPPORT_FILES)"
1709 $(MAKE) -f Makefile.in do-md5sum \
1710 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1711 MD5PROG="$(MD5PROG)" \
1712 SUPPORT_FILES="$(SUPPORT_FILES)"
1713 $(MAKE) -f Makefile.in do-tar-bz2 \
1714 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1715 MD5PROG="$(MD5PROG)" \
1716 SUPPORT_FILES="$(SUPPORT_FILES)"
1718 .PHONY: gdb-taz
1719 gdb-taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
1720 $(MAKE) -f Makefile.in do-proto-toplev \
1721 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1722 MD5PROG="$(MD5PROG)" \
1723 SUPPORT_FILES="$(SUPPORT_FILES)"
1724 $(MAKE) -f Makefile.in do-md5sum \
1725 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1726 MD5PROG="$(MD5PROG)" \
1727 SUPPORT_FILES="$(SUPPORT_FILES)"
1728 $(MAKE) -f Makefile.in do-djunpack \
1729 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1730 MD5PROG="$(MD5PROG)" \
1731 SUPPORT_FILES="$(SUPPORT_FILES)"
1732 $(MAKE) -f Makefile.in do-tar-bz2 \
1733 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1734 MD5PROG="$(MD5PROG)" \
1735 SUPPORT_FILES="$(SUPPORT_FILES)"
1737 .PHONY: do-proto-toplev
1738 do-proto-toplev: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
1739 echo "==> Making $(PACKAGE)-$(VER)/"
1740 # Take out texinfo from a few places.
1741 sed -e '/^all\.normal: /s/\all-texinfo //' \
1742 -e '/^ install-texinfo /d' \
1743 <Makefile.in >tmp
1744 mv -f tmp Makefile.in
1746 ./configure sun4
1747 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1748 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
1749 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
1750 # Make links, and run "make diststuff" or "make info" when needed.
1751 rm -rf proto-toplev ; mkdir proto-toplev
1752 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1753 for d in $$dirs ; do \
1754 if [ -d $$d ]; then \
1755 if [ ! -f $$d/Makefile ] ; then true ; \
1756 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1757 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
1758 elif grep '^info:' $$d/Makefile >/dev/null ; then \
1759 (cd $$d ; $(MAKE) info ) || exit 1 ; \
1760 fi ; \
1761 if [ -d $$d/proto-$$d.dir ]; then \
1762 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1763 else \
1764 ln -s ../$$d proto-toplev/$$d ; \
1765 fi ; \
1766 else ln -s ../$$d proto-toplev/$$d ; fi ; \
1767 done
1768 cd etc ; $(MAKE) info
1769 $(MAKE) distclean
1771 mkdir proto-toplev/etc
1772 (cd proto-toplev/etc; \
1773 for i in $(ETC_SUPPORT); do \
1774 ln -s ../../etc/$$i . ; \
1775 done)
1777 # Take out texinfo from configurable dirs
1778 rm proto-toplev/configure.in
1779 sed -e '/^host_tools=/s/texinfo //' \
1780 <configure.in >proto-toplev/configure.in
1782 mkdir proto-toplev/texinfo
1783 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1784 if test -r texinfo/util/tex3patch ; then \
1785 mkdir proto-toplev/texinfo/util && \
1786 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1787 else true; fi
1788 chmod -R og=u . || chmod og=u `find . -print`
1790 -rm -f $(PACKAGE)-$(VER)
1791 ln -s proto-toplev $(PACKAGE)-$(VER)
1793 .PHONY: do-tar-bz2
1794 do-tar-bz2:
1795 echo "==> Making $(PACKAGE)-$(VER).tar.bz2"
1796 -rm -f $(PACKAGE)-$(VER).tar.bz2
1797 find $(PACKAGE)-$(VER) -follow -name CVS -prune -o -type f -print \
1798 | tar cTfh - $(PACKAGE)-$(VER).tar
1799 $(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar
1801 .PHONY: do-md5sum
1802 do-md5sum:
1803 echo "==> Adding md5 checksum to top-level directory"
1804 cd proto-toplev && find * -follow -name CVS -prune -o -type f -print \
1805 | xargs $(MD5PROG) > ../md5.sum
1806 mv md5.sum proto-toplev
1808 .PHONY: do-djunpack
1809 do-djunpack:
1810 echo "==> Adding updated djunpack.bat to top-level directory"
1811 echo - 's /gdb-[0-9\.]*/gdb-'"$(VER)"'/'
1812 sed < djunpack.bat > djunpack.new \
1813 -e 's/gdb-[0-9][0-9\.]*/gdb-'"$(VER)"'/'
1814 mv djunpack.new djunpack.bat
1815 -rm -f proto-toplev/djunpack.bat
1816 ln -s ../djunpack.bat proto-toplev/djunpack.bat
1818 TEXINFO_SUPPORT= texinfo/texinfo.tex
1819 DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
1821 .PHONY: gas.tar.bz2
1822 GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms mkdep
1823 gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
1824 $(MAKE) -f Makefile.in taz TOOL=gas \
1825 MD5PROG="$(MD5PROG)" \
1826 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1828 # The FSF "binutils" release includes gprof and ld.
1829 .PHONY: binutils.tar.bz2
1830 BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms mkdep
1831 binutils.tar.bz2: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
1832 $(MAKE) -f Makefile.in taz TOOL=binutils \
1833 MD5PROG="$(MD5PROG)" \
1834 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)"
1836 .PHONY: gas+binutils.tar.bz2
1837 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
1838 gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
1839 $(MAKE) -f Makefile.in taz TOOL=gas \
1840 MD5PROG="$(MD5PROG)" \
1841 SUPPORT_FILES="$(GASB_SUPPORT_DIRS)"
1843 .PHONY: libg++.tar.bz2
1844 LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
1845 libg++.tar.bz2: $(DIST_SUPPORT) libg++
1846 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1847 MD5PROG="$(MD5PROG)" \
1848 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
1850 GNATS_SUPPORT_DIRS=include libiberty send-pr
1851 gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
1852 $(MAKE) -f Makefile.in taz TOOL=gnats \
1853 MD5PROG="$(MD5PROG)" \
1854 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1856 .PHONY: gdb.tar.bz2
1857 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl
1858 gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1859 $(MAKE) -f Makefile.in gdb-taz TOOL=gdb \
1860 MD5PROG="$(MD5PROG)" \
1861 SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
1863 .PHONY: dejagnu.tar.bz2
1864 DEJAGNU_SUPPORT_DIRS= tcl expect libiberty
1865 dejagnu.tar.bz2: $(DIST_SUPPORT) $(DEJAGNU_SUPPORT_DIRS) dejagnu
1866 $(MAKE) -f Makefile.in taz TOOL=dejagnu \
1867 MD5PROG="$(MD5PROG)" \
1868 SUPPORT_FILES="$(DEJAGNU_SUPPORT_DIRS)"
1870 .PHONY: gdb+dejagnu.tar.bz2
1871 GDBD_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl expect dejagnu
1872 gdb+dejagnu.tar.bz2: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb
1873 $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=gdb+dejagnu \
1874 MD5PROG="$(MD5PROG)" \
1875 SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)"
1877 .PHONY: insight.tar.bz2
1878 INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl tix libgui
1879 insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1880 $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=insight \
1881 MD5PROG="$(MD5PROG)" \
1882 SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)"
1884 .PHONY: insight+dejagnu.tar.bz2
1885 INSIGHTD_SUPPORT_DIRS= $(INSIGHT_SUPPORT_DIRS) expect dejagnu
1886 insight+dejagnu.tar.bz2: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb
1887 $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE="insight+dejagnu" \
1888 MD5PROG="$(MD5PROG)" \
1889 SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)"
1891 .PHONY: newlib.tar.bz2
1892 NEWLIB_SUPPORT_DIRS=libgloss
1893 # taz configures for the sun4 target which won't configure newlib.
1894 # We need newlib configured so that the .info files are made.
1895 # Unfortunately, it is not enough to just configure newlib separately:
1896 # taz will build the .info files but since SUBDIRS won't contain newlib,
1897 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1898 # used in building the .info files, eg: *.def, *.ref).
1899 # The problem isn't solvable however without a lot of extra work because
1900 # target libraries are built in subdir $(target_alias) which gets nuked during
1901 # the make distclean. For now punt on the issue of shipping newlib info files
1902 # with newlib net releases and wait for a day when some native target (sun4?)
1903 # supports newlib (if only minimally).
1904 newlib.tar.bz2: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1905 $(MAKE) -f Makefile.in taz TOOL=newlib \
1906 MD5PROG="$(MD5PROG)" \
1907 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1908 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1910 .NOEXPORT:
1911 MAKEOVERRIDES=
1913 # end of Makefile.in