* infrun.c (wait_for_inferior): Mark registers as invalid when
[deliverable/binutils-gdb.git] / Makefile.in
CommitLineData
eb02fd64 1#
131a3881 2# Makefile for directory with subdirs to build.
2e482734 3# Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation
eb02fd64 4#
4dfe09da
RP
5# This file is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
8c222f6e 17# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4dfe09da 18#
f149eb99 19
eb02fd64 20srcdir = .
28f3b094 21
4d714963 22prefix = /usr/local
eb02fd64 23
7fcfdcf7
SC
24exec_prefix = $(prefix)
25bindir = $(exec_prefix)/bin
26libdir = $(exec_prefix)/lib
a54e05f6 27tooldir = $(exec_prefix)/$(target)
7fcfdcf7 28
51489233
ILT
29program_transform_name =
30
d92eef0c 31datadir = $(prefix)/share
7fcfdcf7 32mandir = $(prefix)/man
4d714963
RP
33man1dir = $(mandir)/man1
34man2dir = $(mandir)/man2
35man3dir = $(mandir)/man3
36man4dir = $(mandir)/man4
37man5dir = $(mandir)/man5
38man6dir = $(mandir)/man6
39man7dir = $(mandir)/man7
40man8dir = $(mandir)/man8
41man9dir = $(mandir)/man9
7fcfdcf7 42infodir = $(prefix)/info
4d714963 43includedir = $(prefix)/include
04103845 44GDB_NLM_DEPS =
4d714963
RP
45
46SHELL = /bin/sh
47
64434418 48INSTALL = $(SHELL) $$s/install-sh -c
4d714963 49INSTALL_PROGRAM = $(INSTALL)
5cc73086 50INSTALL_DATA = $(INSTALL) -m 644
3c8735af 51
09985c96 52INSTALL_DOSREL = install-dosrel-fake
a987271c 53
440868a0 54AS = as
ec342d7d 55AR = ar
b5329d84 56AR_FLAGS = rc
e85e07cb 57CC = cc
7b636683 58
66957ce4
ILT
59# Special variables passed down in EXTRA_GCC_FLAGS. They are defined
60# here so that they can be overridden by Makefile fragments.
753d5049
SC
61HOST_CC = $(CC_FOR_BUILD)
62HOST_PREFIX =
63HOST_PREFIX_1 = loser-
64
572728c6 65# These flag values are normally overridden by the configure script.
f8a6ad66 66CFLAGS = -g
572728c6
ILT
67CXXFLAGS = -g -O2
68
3585593d
BK
69LIBCFLAGS = $(CFLAGS)
70CFLAGS_FOR_TARGET = $(CFLAGS)
276c2d7d 71LDFLAGS_FOR_TARGET =
3585593d 72LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
04103845
DE
73PICFLAG =
74PICFLAG_FOR_TARGET =
7b636683 75
a4e879a1 76# start-sanitize-chill
7d9f0c54
MW
77CHILLFLAGS = $(CFLAGS)
78CHILL_LIB = -lchill
a4e879a1 79# end-sanitize-chill
2cf00a36 80CXX = c++
7b636683 81
1d5fcc66 82# Use -O2 to stress test the compiler.
864a5888 83LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
3585593d 84CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
2f64ef77 85LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
7b636683 86
4d714963 87RANLIB = ranlib
b6ae0f10
ILT
88
89DLLTOOL = dlltool
90
51489233 91NM = nm
64434418
ILT
92
93LD = ld
94
5cc73086
KR
95# Not plain GZIP, since gzip looks there for extra command-line options.
96GZIPPROG = gzip
eb02fd64 97
aaefc574
JM
98# These values are substituted by configure.
99DEFAULT_YACC = yacc
100DEFAULT_LEX = lex
101
40e16078 102# BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
5cc73086
KR
103BISON = `if [ -f $$r/byacc/byacc ] ; \
104 then echo $$r/byacc/byacc ; \
aaefc574 105 else echo ${DEFAULT_YACC} ; \
06a07944 106 fi`
2645fb0c 107
5cc73086
KR
108LEX = `if [ -f $$r/flex/flex ] ; \
109 then echo $$r/flex/flex ; \
aaefc574 110 else echo ${DEFAULT_LEX} ; fi`
2198e4ba 111
5cc73086
KR
112M4 = `if [ -f $$r/m4/m4 ] ; \
113 then echo $$r/m4/m4 ; \
65e21701
KR
114 else echo m4 ; fi`
115
97840afa 116MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
5cc73086 117 then echo $$r/texinfo/makeinfo/makeinfo ; \
77806c3e 118 else echo makeinfo ; fi`
484fa12d 119
9823504d
ILT
120# This just becomes part of the MAKEINFO definition passed down to
121# sub-makes. It lets flags be given on the command line while still
122# using the makeinfo from the object tree.
123MAKEINFOFLAGS =
b772d75e 124
5cc73086
KR
125EXPECT = `if [ -f $$r/expect/expect ] ; \
126 then echo $$r/expect/expect ; \
a54e05f6
KR
127 else echo expect ; fi`
128
81eb5025
ILT
129RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
130 then echo $$s/dejagnu/runtest ; \
6a42d184
DZ
131 else echo runtest ; fi`
132
f980fcfb 133
e85e07cb 134# compilers to use to create programs which must be run in the build
440868a0
ILT
135# environment.
136CC_FOR_BUILD = $(CC)
e85e07cb 137CXX_FOR_BUILD = $(CXX)
440868a0 138
9f73dd6a 139SUBDIRS = "this is set via configure, don't edit this"
6a3958b2
RP
140OTHERS =
141
ca2ce3b3
ILT
142# This is set by the configure script to the list of directories which
143# should be built using the target tools.
ab1cbc67 144TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup
ca2ce3b3 145
e66eb658 146# Target libraries are put under this directory:
d92eef0c
JM
147# Changed by configure to $(target_alias) if cross.
148TARGET_SUBDIR = .
e66eb658 149
ca2ce3b3
ILT
150# This is set by the configure script to the arguments passed to configure.
151CONFIG_ARGUMENTS =
152
b6ae0f10
ILT
153# This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
154# was used.
155SET_LIB_PATH =
156
157# This is the name of the environment variable used for the path to
158# the libraries. This may be changed by configure.in.
159RPATH_ENVVAR = LD_LIBRARY_PATH
160
161# configure.in sets SET_LIB_PATH to this if --enable-shared was used.
162REALLY_SET_LIB_PATH = \
163 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \
164 export $(RPATH_ENVVAR);
165
a0f47eb7 166ALL = all.normal
ff290baf 167INSTALL_TARGET = installdirs \
f35c6160
DZ
168 $(INSTALL_MODULES) \
169 $(INSTALL_TARGET_MODULES) \
170 $(INSTALL_X11_MODULES) \
753d5049 171 install-gcc \
09985c96 172 $(INSTALL_DOSREL)
753d5049 173
fb660409 174
51489233 175CC_FOR_TARGET = ` \
72ce05e8 176 if [ -f $$r/gcc/xgcc ] ; then \
e66eb658 177 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
d5a8bfde 178 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
81eb5025 179 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
d5a8bfde 180 else \
81eb5025 181 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
d5a8bfde 182 fi; \
753d5049
SC
183 else \
184 echo $$r/gcc/xgcc -B$$r/gcc/; \
185 fi; \
51489233 186 else \
378fd382 187 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
188 echo $(CC); \
189 else \
ea6d5817 190 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
51489233
ILT
191 fi; \
192 fi`
193
72ce05e8
ILT
194# If CC_FOR_TARGET is not overriden on the command line, then this
195# variable is passed down to the gcc Makefile, where it is used to
196# build libgcc2.a. We define it here so that it can itself be
197# overridden on the command line.
198GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/
199
a4e879a1 200# start-sanitize-chill
7d9f0c54 201CHILL_FOR_TARGET = ` \
72ce05e8 202 if [ -f $$r/gcc/xgcc ] ; then \
04103845 203 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
7d9f0c54
MW
204 else \
205 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
206 echo $(CC); \
207 else \
ea6d5817 208 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
7d9f0c54
MW
209 fi; \
210 fi`
34b3298b 211
a4e879a1 212# end-sanitize-chill
7d9f0c54 213
d1bea4c7 214CXX_FOR_TARGET = ` \
72ce05e8 215 if [ -f $$r/gcc/xgcc ] ; then \
e66eb658 216 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
d5a8bfde 217 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
81eb5025 218 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
d5a8bfde 219 else \
81eb5025 220 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
d5a8bfde 221 fi; \
753d5049
SC
222 else \
223 echo $$r/gcc/xgcc -B$$r/gcc/; \
224 fi; \
fca4f908 225 else \
e85e07cb
ILT
226 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
227 echo $(CXX); \
fca4f908 228 else \
2cf00a36 229 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
fca4f908
MW
230 fi; \
231 fi`
232
440868a0 233AS_FOR_TARGET = ` \
ea6d5817 234 if [ -f $$r/gas/as.new ] ; then \
5cc73086 235 echo $$r/gas/as.new ; \
440868a0 236 else \
e85e07cb 237 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
440868a0
ILT
238 echo $(AS); \
239 else \
ea6d5817 240 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
81246025 241 fi; \
440868a0
ILT
242 fi`
243
054f9ada
JM
244LD_FOR_TARGET = ` \
245 if [ -f $$r/ld/ld.new ] ; then \
246 echo $$r/ld/ld.new ; \
247 else \
248 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
249 echo $(LD); \
250 else \
251 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
252 fi; \
253 fi`
254
a220ba0f
SC
255DLLTOOL_FOR_TARGET = ` \
256 if [ -f $$r/binutils/dlltool ] ; then \
257 echo $$r/binutils/dlltool ; \
258 else \
259 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
260 echo $(DLLTOOL); \
261 else \
262 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
263 fi; \
264 fi`
265
51489233 266AR_FOR_TARGET = ` \
5cc73086
KR
267 if [ -f $$r/binutils/ar ] ; then \
268 echo $$r/binutils/ar ; \
51489233 269 else \
378fd382 270 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
271 echo $(AR); \
272 else \
ea6d5817 273 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
81246025 274 fi; \
51489233
ILT
275 fi`
276
277RANLIB_FOR_TARGET = ` \
5cc73086
KR
278 if [ -f $$r/binutils/ranlib ] ; then \
279 echo $$r/binutils/ranlib ; \
51489233 280 else \
378fd382 281 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
282 echo $(RANLIB); \
283 else \
ea6d5817 284 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
81246025 285 fi; \
51489233
ILT
286 fi`
287
288NM_FOR_TARGET = ` \
ea6d5817 289 if [ -f $$r/binutils/nm.new ] ; then \
753d5049 290 echo $$r/binutils/nm.new ; \
51489233 291 else \
378fd382 292 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
293 echo $(NM); \
294 else \
ea6d5817 295 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
81246025 296 fi; \
51489233
ILT
297 fi`
298
eb02fd64 299#### host and target specific makefile fragments come in here.
ec342d7d 300###
eb02fd64 301
0ef4728f
ILT
302# Flags to pass down to all sub-makes.
303# Please keep these in alphabetical order.
304BASE_FLAGS_TO_PASS = \
2198e4ba 305 "AR_FLAGS=$(AR_FLAGS)" \
d09de70e 306 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
0ef4728f 307 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
378fd382 308 "BISON=$(BISON)" \
378fd382 309 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
0ef4728f 310 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
2198e4ba 311 "CFLAGS=$(CFLAGS)" \
3585593d 312 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
a4e879a1 313 $(start-sanitize-chill)\
7d9f0c54
MW
314 "CHILLFLAGS=$(CHILLFLAGS)" \
315 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
316 "CHILL_LIB=$(CHILL_LIB)" \
a4e879a1 317 $(end-sanitize-chill)\
0ef4728f
ILT
318 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
319 "CXXFLAGS=$(CXXFLAGS)" \
3585593d 320 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
0ef4728f 321 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
a220ba0f 322 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
2198e4ba
MT
323 "INSTALL=$(INSTALL)" \
324 "INSTALL_DATA=$(INSTALL_DATA)" \
440868a0 325 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
378fd382
DZ
326 "LDFLAGS=$(LDFLAGS)" \
327 "LEX=$(LEX)" \
054f9ada 328 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
3585593d
BK
329 "LIBCFLAGS=$(LIBCFLAGS)" \
330 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
04103845
DE
331 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
332 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
65e21701 333 "M4=$(M4)" \
eb40ca93 334 "MAKE=$(MAKE)" \
9823504d 335 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
0ef4728f 336 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
04103845
DE
337 "PICFLAG=$(PICFLAG)" \
338 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
d09de70e 339 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
49dfa984 340 "SHELL=$(SHELL)" \
a54e05f6 341 "EXPECT=$(EXPECT)" \
6a42d184 342 "RUNTEST=$(RUNTEST)" \
86365152 343 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
5cc73086 344 "YACC=$(BISON)" \
378fd382
DZ
345 "exec_prefix=$(exec_prefix)" \
346 "prefix=$(prefix)" \
347 "tooldir=$(tooldir)"
2198e4ba 348
0ef4728f
ILT
349# Flags to pass down to most sub-makes, in which we're building with
350# the host environment.
6d681784 351# If any variables are added here, they must be added to do-*, below.
0ef4728f 352EXTRA_HOST_FLAGS = \
6d681784
JG
353 'AR=$(AR)' \
354 'AS=$(AS)' \
355 'CC=$(CC)' \
356 'CXX=$(CXX)' \
b6ae0f10 357 'DLLTOOL=$(DLLTOOL)' \
64434418 358 'LD=$(LD)' \
6d681784 359 'NM=$(NM)' \
b6ae0f10
ILT
360 'RANLIB=$(RANLIB)'
361
0ef4728f 362
97840afa 363FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
0ef4728f 364
d1bea4c7
DZ
365# Flags that are concerned with the location of the X11 include files
366# and library files
054f9ada
JM
367#
368# NOTE: until the top-level is getting the values via autoconf, it only
369# causes problems to have this top-level Makefile overriding the autoconf-set
370# values in child directories. Only variables that don't conflict with
371# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
372#
d1bea4c7 373X11_FLAGS_TO_PASS = \
054f9ada
JM
374 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
375 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
d1bea4c7 376
0ef4728f
ILT
377# Flags to pass down to makes which are built with the target environment.
378# The double $ decreases the length of the command line; the variables
379# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
6d681784 380# If any variables are added here, they must be added to do-*, below.
0ef4728f
ILT
381EXTRA_TARGET_FLAGS = \
382 'AR=$$(AR_FOR_TARGET)' \
383 'AS=$$(AS_FOR_TARGET)' \
384 'CC=$$(CC_FOR_TARGET)' \
3585593d 385 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
0ef4728f 386 'CXX=$$(CXX_FOR_TARGET)' \
3585593d 387 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
a220ba0f 388 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
054f9ada 389 'LD=$$(LD_FOR_TARGET)' \
3585593d
BK
390 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
391 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
0ef4728f 392 'NM=$$(NM_FOR_TARGET)' \
04103845 393 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
753d5049 394 'RANLIB=$$(RANLIB_FOR_TARGET)'
0ef4728f
ILT
395
396TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
51489233 397
f4e414f1
ILT
398# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
399# unfortunately needs the native compiler and the target ar and
0ef4728f 400# ranlib.
66957ce4
ILT
401# If any variables are added here, they must be added to do-*, below.
402# The HOST_* variables are a special case, which are used for the gcc
403# cross-building scheme.
0ef4728f
ILT
404EXTRA_GCC_FLAGS = \
405 'AR=$$(AR_FOR_TARGET)' \
6d681784
JG
406 'AS=$(AS)' \
407 'CC=$(CC)' \
408 'CXX=$(CXX)' \
b6ae0f10 409 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
a54e05f6
KR
410 'HOST_CC=$(CC_FOR_BUILD)' \
411 'HOST_PREFIX=$(HOST_PREFIX)' \
412 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
6d681784 413 'NM=$(NM)' \
4c0b7ebc 414 'RANLIB=$$(RANLIB_FOR_TARGET)' \
97840afa 415 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
4c0b7ebc
DE
416 `if test x"$(LANGUAGES)" != x; then echo "LANGUAGES=$(LANGUAGES)"; fi` \
417 `if test x"$(STMP_FIXPROTO)" != x; then echo "STMP_FIXPROTO=$(STMP_FIXPROTO)"; fi` \
418 `if test x"$(LIMITS_H_TEST)" != x; then echo "LIMITS_H_TEST=$(LIMITS_H_TEST)"; fi` \
419 `if test x"$(LIBGCC1_TEST)" != x; then echo "LIBGCC1_TEST=$(LIBGCC1_TEST)"; fi` \
420 `if test x"$(LIBGCC2_CFLAGS)" != x; then echo "LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)"; fi` \
2e482734 421 `if test x"$(LIBGCC2_DEBUG_CFLAGS)" != x; then echo "LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)"; fi` \
4c0b7ebc
DE
422 `if test x"$(LIBGCC2_INCLUDES)" != x; then echo "LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)"; fi` \
423 `if test x"$(ENQUIRE)" != x; then echo "ENQUIRE=$(ENQUIRE)"; fi` \
424 `if test x"$(BOOT_CFLAGS)" != x; then echo "BOOT_CFLAGS=$(BOOT_CFLAGS)"; fi`
0ef4728f 425
34b3298b 426GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
f4e414f1 427
6a42d184 428# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
429# using $(FLAGS_TO_PASS).
430ALL_MODULES = \
53c403df 431 all-apache \
79337c85 432 all-autoconf \
08168809 433 all-automake \
5db223e4 434 all-bash \
79337c85
ILT
435 all-bfd \
436 all-binutils \
437 all-byacc \
438 all-cvs \
97840afa 439 all-db \
79337c85
ILT
440 all-dejagnu \
441 all-diff \
ac259c28 442 all-dosutils \
79337c85
ILT
443 all-etc \
444 all-fileutils \
97840afa 445 all-findutils \
79337c85
ILT
446 all-find \
447 all-flex \
448 all-gas \
449 all-gawk \
ba26181f 450 all-gnuserv \
79337c85
ILT
451 all-gprof \
452 all-grep \
19b1d034 453 all-grez \
79337c85
ILT
454 all-gzip \
455 all-hello \
3718029f
ILT
456 $(start-sanitize-ide) \
457 all-ilu \
458 $(end-sanitize-ide) \
79337c85 459 all-indent \
13d7cbe2 460 all-inet \
79337c85 461 all-ispell \
97840afa 462 all-itcl \
79337c85
ILT
463 all-ld \
464 all-libiberty \
eebe454c
TT
465 $(start-sanitize-ide) \
466 all-libide \
467 $(end-sanitize-ide) \
79337c85
ILT
468 all-m4 \
469 all-make \
470 all-mmalloc \
471 all-opcodes \
472 all-patch \
0f8f1d33 473 all-perl \
79337c85
ILT
474 all-prms \
475 all-rcs \
476 all-readline \
275049c0 477 all-release \
79337c85
ILT
478 all-recode \
479 all-sed \
480 all-send-pr \
481 all-shellutils \
482 all-sim \
2e482734 483 all-sn \
79337c85
ILT
484 all-tar \
485 all-tcl \
486 all-texinfo \
487 all-textutils \
488 all-tgas \
489 all-time \
490 all-uudecode \
eebe454c
TT
491 $(start-sanitize-ide) \
492 all-vmake \
493 $(end-sanitize-ide) \
753d5049
SC
494 all-wdiff
495
4f0b8f27
TL
496# This is a list of the check targets for all of the modules which are
497# compiled using $(FLAGS_TO_PASS).
498#
d237841c
BC
499# The list is in two parts. The first lists those tools which
500# are tested as part of the host's native tool-chain, and not
501# tested in a cross configuration.
502NATIVE_CHECK_MODULES = \
503 check-byacc \
4f0b8f27
TL
504 check-flex
505
d237841c 506CROSS_CHECK_MODULES = \
53c403df 507 check-apache \
6a42d184 508 check-autoconf \
08168809 509 check-automake \
5db223e4 510 check-bash \
6a42d184
DZ
511 check-bfd \
512 check-binutils \
6a42d184 513 check-cvs \
97840afa 514 check-db \
6a42d184
DZ
515 check-dejagnu \
516 check-diff \
517 check-etc \
518 check-fileutils \
97840afa 519 check-findutils \
6a42d184 520 check-find \
6a42d184
DZ
521 check-gas \
522 check-gawk \
ba26181f 523 check-gnuserv \
6a42d184
DZ
524 check-gprof \
525 check-grep \
526 check-gzip \
527 check-hello \
3718029f
ILT
528 $(start-sanitize-ide) \
529 check-ilu \
530 $(end-sanitize-ide) \
6a42d184 531 check-indent \
13d7cbe2 532 check-inet \
6a42d184 533 check-ispell \
97840afa 534 check-itcl \
6a42d184
DZ
535 check-ld \
536 check-libiberty \
eebe454c
TT
537 $(start-sanitize-ide) \
538 check-libide \
539 $(end-sanitize-ide) \
6a42d184
DZ
540 check-m4 \
541 check-make \
542 check-mmcheckoc \
543 check-opcodes \
544 check-patch \
0f8f1d33 545 check-perl \
6a42d184
DZ
546 check-prms \
547 check-rcs \
548 check-readline \
549 check-recode \
550 check-sed \
551 check-send-pr \
552 check-shellutils \
2e482734 553 check-sn \
6a42d184
DZ
554 check-sim \
555 check-tar \
556 check-tcl \
557 check-texinfo \
558 check-textutils \
559 check-tgas \
560 check-time \
561 check-uudecode \
eebe454c
TT
562 $(start-sanitize-ide) \
563 check-vmake \
564 $(end-sanitize-ide) \
6a42d184 565 check-wdiff
d237841c
BC
566
567CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
6a42d184
DZ
568
569# This is a list of the install targets for all of the modules which are
79337c85 570# compiled using $(FLAGS_TO_PASS).
27349293
ILT
571# We put install-opcodes before install-binutils because the installed
572# binutils might be on PATH, and they might need the shared opcodes
573# library.
79337c85 574INSTALL_MODULES = \
53c403df 575 install-apache \
79337c85 576 install-autoconf \
08168809 577 install-automake \
5db223e4 578 install-bash \
79337c85 579 install-bfd \
27349293 580 install-opcodes \
79337c85
ILT
581 install-binutils \
582 install-byacc \
583 install-cvs \
97840afa 584 install-db \
79337c85
ILT
585 install-dejagnu \
586 install-diff \
753d5049 587 install-dosutils \
79337c85
ILT
588 install-etc \
589 install-fileutils \
97840afa 590 install-findutils \
79337c85
ILT
591 install-find \
592 install-flex \
593 install-gas \
594 install-gawk \
ba26181f 595 install-gnuserv \
79337c85
ILT
596 install-gprof \
597 install-grep \
19b1d034 598 install-grez \
79337c85
ILT
599 install-gzip \
600 install-hello \
3718029f
ILT
601 $(start-sanitize-ide) \
602 install-ilu \
603 $(end-sanitize-ide) \
79337c85 604 install-indent \
13d7cbe2 605 install-inet \
79337c85 606 install-ispell \
97840afa 607 install-itcl \
79337c85
ILT
608 install-ld \
609 install-libiberty \
eebe454c
TT
610 $(start-sanitize-ide) \
611 install-libide \
612 $(end-sanitize-ide) \
79337c85
ILT
613 install-m4 \
614 install-make \
615 install-mmalloc \
79337c85 616 install-patch \
0f8f1d33 617 install-perl \
79337c85
ILT
618 install-prms \
619 install-rcs \
620 install-readline \
621 install-recode \
622 install-sed \
623 install-send-pr \
624 install-shellutils \
625 install-sim \
2e482734 626 install-sn \
79337c85
ILT
627 install-tar \
628 install-tcl \
629 install-texinfo \
630 install-textutils \
631 install-tgas \
632 install-time \
633 install-uudecode \
eebe454c
TT
634 $(start-sanitize-ide) \
635 install-vmake \
636 $(end-sanitize-ide) \
79337c85
ILT
637 install-wdiff
638
6a42d184 639# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
640# using $(X11_FLAGS_TO_PASS).
641ALL_X11_MODULES = \
642 all-emacs \
4d802af9 643 all-emacs19 \
04103845 644 all-gdb \
79337c85 645 all-expect \
65e21701 646 all-gash \
0f8f1d33 647 all-guile \
79337c85
ILT
648 all-tclX \
649 all-tk
650
6a42d184
DZ
651# This is a list of the check targets for all of the modules which are
652# compiled using $(X11_FLAGS_TO_PASS).
653CHECK_X11_MODULES = \
654 check-emacs \
04103845 655 check-gdb \
0f8f1d33 656 check-guile \
6a42d184 657 check-expect \
65e21701 658 check-gash \
2e482734 659 check-tclX
6a42d184 660
79337c85
ILT
661# This is a list of the install targets for all the modules which are
662# compiled using $(X11_FLAGS_TO_PASS).
663INSTALL_X11_MODULES = \
664 install-emacs \
4d802af9 665 install-emacs19 \
04103845 666 install-gdb \
0f8f1d33 667 install-guile \
79337c85 668 install-expect \
65e21701 669 install-gash \
79337c85
ILT
670 install-tclX \
671 install-tk
fca4f908 672
6a42d184 673# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
674# using $(TARGET_FLAGS_TO_PASS).
675ALL_TARGET_MODULES = \
ab1cbc67
PB
676 all-target-libio \
677 all-target-libstdc++ \
678 all-target-librx \
679 all-target-libg++ \
680 all-target-newlib \
681 all-target-winsup \
682 all-target-libgloss \
4c0b7ebc
DE
683 all-target-libiberty \
684 all-target-examples
79337c85 685
ca2ce3b3
ILT
686# This is a list of the configure targets for all of the modules which
687# are compiled using the target tools.
688CONFIGURE_TARGET_MODULES = \
ab1cbc67
PB
689 configure-target-libio \
690 configure-target-libstdc++ \
691 configure-target-librx \
692 configure-target-libg++ \
693 configure-target-newlib \
694 configure-target-winsup \
695 configure-target-libgloss \
4c0b7ebc
DE
696 configure-target-libiberty \
697 configure-target-examples
ca2ce3b3 698
6a42d184
DZ
699# This is a list of the check targets for all of the modules which are
700# compiled using $(TARGET_FLAGS_TO_PASS).
701CHECK_TARGET_MODULES = \
ab1cbc67
PB
702 check-target-libio \
703 check-target-libstdc++ \
704 check-target-libg++ \
705 check-target-newlib \
706 check-target-winsup \
707 check-target-libiberty
6a42d184
DZ
708
709# This is a list of the install targets for all of the modules which are
79337c85
ILT
710# compiled using $(TARGET_FLAGS_TO_PASS).
711INSTALL_TARGET_MODULES = \
ab1cbc67
PB
712 install-target-libio \
713 install-target-libstdc++ \
714 install-target-libg++ \
715 install-target-newlib \
716 install-target-winsup \
717 install-target-libgloss \
718 install-target-libiberty
7481617f 719
7508666f
MM
720# This is a list of the targets for which we can do a clean-{target}.
721CLEAN_MODULES = \
13d7cbe2 722 clean-apache \
7508666f 723 clean-autoconf \
08168809 724 clean-automake \
5db223e4 725 clean-bash \
7508666f
MM
726 clean-bfd \
727 clean-binutils \
728 clean-byacc \
729 clean-cvs \
97840afa 730 clean-db \
7508666f
MM
731 clean-dejagnu \
732 clean-diff \
733 clean-dosutils \
734 clean-etc \
735 clean-fileutils \
97840afa 736 clean-findutils \
7508666f
MM
737 clean-find \
738 clean-flex \
739 clean-gas \
740 clean-gawk \
ba26181f 741 clean-gnuserv \
7508666f
MM
742 clean-gprof \
743 clean-grep \
744 clean-grez \
745 clean-gzip \
746 clean-hello \
3718029f
ILT
747 $(start-sanitize-ide) \
748 clean-ilu \
749 $(end-sanitize-ide) \
7508666f 750 clean-indent \
13d7cbe2 751 clean-inet \
7508666f 752 clean-ispell \
97840afa 753 clean-itcl \
7508666f
MM
754 clean-ld \
755 clean-libiberty \
eebe454c
TT
756 $(start-sanitize-ide) \
757 clean-libide \
758 $(end-sanitize-ide) \
7508666f
MM
759 clean-m4 \
760 clean-make \
761 clean-mmalloc \
762 clean-opcodes \
763 clean-patch \
764 clean-perl \
765 clean-prms \
766 clean-rcs \
767 clean-readline \
768 clean-release \
769 clean-recode \
770 clean-sed \
771 clean-send-pr \
772 clean-shellutils \
773 clean-sim \
2e482734 774 clean-sn \
7508666f
MM
775 clean-tar \
776 clean-tcl \
777 clean-texinfo \
778 clean-textutils \
779 clean-tgas \
780 clean-time \
781 clean-uudecode \
eebe454c
TT
782 $(start-sanitize-ide) \
783 clean-vmake \
784 $(end-sanitize-ide) \
7508666f
MM
785 clean-wdiff
786
787# All of the target modules that can be cleaned
788CLEAN_TARGET_MODULES = \
789 clean-target-libio \
790 clean-target-libstdc++ \
791 clean-target-librx \
792 clean-target-libg++ \
793 clean-target-newlib \
794 clean-target-winsup \
795 clean-target-libgloss \
796 clean-target-libiberty \
797 clean-target-examples
798
799# All of the x11 modules that can be cleaned
800CLEAN_X11_MODULES = \
801 clean-emacs \
802 clean-emacs19 \
803 clean-gdb \
804 clean-expect \
805 clean-gash \
806 clean-guile \
807 clean-tclX \
808 clean-tk
809
79337c85 810# The first rule in the file had better be this one. Don't put any above it.
a59b94d2 811all: all.normal
79337c85
ILT
812.PHONY: all
813
814# The target built for a native build.
815.PHONY: all.normal
816all.normal: \
817 $(ALL_MODULES) \
46d0ca81 818 $(ALL_X11_MODULES) \
2e482734 819 $(ALL_TARGET_MODULES) \
79337c85
ILT
820 all-gcc
821
0ef4728f 822# Do a target for all the subdirectories. A ``make do-X'' will do a
53222cbd
RP
823# ``make X'' in all subdirectories (because, in general, there is a
824# dependency (below) of X upon do-X, a ``make X'' will also do this,
825# but it may do additional work as well).
0ef4728f
ILT
826# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
827# because it is so large that it can easily overflow the command line
828# length limit on some systems.
79337c85 829DO_X = \
79337c85
ILT
830 do-clean \
831 do-distclean \
832 do-dvi \
833 do-info \
834 do-install-info \
835 do-installcheck \
836 do-mostlyclean \
ca2ce3b3 837 do-maintainer-clean \
753d5049 838 do-TAGS
79337c85
ILT
839.PHONY: $(DO_X)
840$(DO_X):
0ef4728f 841 @target=`echo $@ | sed -e 's/^do-//'`; \
5cc73086 842 r=`pwd`; export r; \
81eb5025 843 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 844 $(SET_LIB_PATH) \
ab1cbc67 845 for i in $(SUBDIRS) -dummy-; do \
36286a3e 846 if [ -f ./$$i/Makefile ]; then \
0ef4728f 847 case $$i in \
0ef4728f 848 gcc) \
6d681784 849 for flag in $(EXTRA_GCC_FLAGS); do \
0f8f1d33 850 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
6d681784 851 done; \
0ef4728f
ILT
852 ;; \
853 *) \
6d681784 854 for flag in $(EXTRA_HOST_FLAGS); do \
0f8f1d33 855 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
6d681784 856 done; \
0ef4728f
ILT
857 ;; \
858 esac ; \
64434418 859 export AR AS CC CXX LD NM RANLIB DLLTOOL; \
0ef4728f 860 if (cd ./$$i; \
6d681784 861 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
64434418 862 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
753d5049 863 "RANLIB=$${RANLIB}" \
b6ae0f10 864 "DLLTOOL=$${DLLTOOL}" \
6d681784 865 $${target}); \
0ef4728f
ILT
866 then true; else exit 1; fi; \
867 else true; fi; \
ec7a8792
ILT
868 done
869 @target=`echo $@ | sed -e 's/^do-//'`; \
870 r=`pwd`; export r; \
81eb5025 871 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 872 $(SET_LIB_PATH) \
ab1cbc67
PB
873 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
874 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
875 for flag in $(EXTRA_TARGET_FLAGS); do \
0f8f1d33 876 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
ab1cbc67 877 done; \
64434418 878 export AR AS CC CXX LD NM RANLIB DLLTOOL; \
ab1cbc67
PB
879 if (cd $(TARGET_SUBDIR)/$$i; \
880 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
64434418 881 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
ab1cbc67 882 "RANLIB=$${RANLIB}" \
b6ae0f10 883 "DLLTOOL=$${DLLTOOL}" \
ab1cbc67
PB
884 $${target}); \
885 then true; else exit 1; fi; \
886 else true; fi; \
0ef4728f 887 done
fb90daeb 888
79337c85
ILT
889# Here are the targets which correspond to the do-X targets.
890
65088029 891.PHONY: info installcheck dvi install-info
ca2ce3b3
ILT
892.PHONY: clean distclean mostlyclean maintainer-clean realclean
893.PHONY: local-clean local-distclean local-maintainer-clean
0ef4728f 894info: do-info
1a14993c 895installcheck: do-installcheck
0ef4728f 896dvi: do-dvi
9a9e8e7f 897
97840afa
TT
898# Make sure makeinfo is built before we do a `make info'.
899do-info: all-texinfo
900
f35c6160 901install-info: do-install-info dir.info
81eb5025 902 s=`cd $(srcdir); pwd`; export s; \
72c09fbc
SC
903 if [ -f dir.info ] ; then \
904 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
50fbe976 905 else true ; fi
4d714963 906
0ef4728f 907local-clean:
7fed4078 908 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
3b30df82 909
0ef4728f 910local-distclean:
2e482734 911 -rm -f Makefile config.status config.cache
8c5bc3e3
ILT
912 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
913 rm -rf $(TARGET_SUBDIR); \
914 else true; fi
7fcfdcf7 915
ca2ce3b3
ILT
916local-maintainer-clean:
917 @echo "This command is intended for maintainers to use;"
918 @echo "it deletes files that may require special tools to rebuild."
919
0ef4728f
ILT
920clean: do-clean local-clean
921mostlyclean: do-mostlyclean local-clean
922distclean: do-distclean local-clean local-distclean
ca2ce3b3
ILT
923maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
924maintainer-clean: local-distclean
925realclean: maintainer-clean
0ef4728f 926
7508666f
MM
927# This rule is used to clean specific modules.
928.PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
929$(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
930 @dir=`echo $@ | sed -e 's/clean-//'`; \
931 if [ -f ./$${dir}/Makefile ] ; then \
932 r=`pwd`; export r; \
81eb5025 933 s=`cd $(srcdir); pwd`; export s; \
7508666f
MM
934 $(SET_LIB_PATH) \
935 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
936 else \
937 true; \
938 fi
939
940.PHONY: $(CLEAN_TARGET_MODULES)
941$(CLEAN_TARGET_MODULES):
942 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
062aded9 943 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
7508666f
MM
944 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
945 r=`pwd`; export r; \
81eb5025 946 s=`cd $(srcdir); pwd`; export s; \
7508666f
MM
947 $(SET_LIB_PATH) \
948 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
949 else \
950 true; \
951 fi
952
953clean-target: $(CLEAN_TARGET_MODULES)
954
65088029
ILT
955# Check target.
956
957.PHONY: check
958check: $(CHECK_MODULES) \
959 $(CHECK_TARGET_MODULES) \
960 $(CHECK_X11_MODULES) \
961 check-gcc
962
79337c85 963# Installation targets.
4d714963 964
04103845 965.PHONY: install uninstall source-vault binary-vault vault-install
98a33b6d 966install: $(INSTALL_TARGET)
b26ff9d8 967
79337c85
ILT
968uninstall:
969 @echo "the uninstall target is not supported in this tree"
970
04103845
DE
971source-vault:
972 $(MAKE) -f ./release/Build-A-Release \
973 host=$(host_alias) source-vault
974
975binary-vault:
976 $(MAKE) -f ./release/Build-A-Release \
977 host=$(host_alias) target=$(target_alias)
978
275049c0
JK
979vault-install:
980 @if [ -f ./release/vault-install ] ; then \
981 ./release/vault-install $(host_alias) $(target_alias) ; \
96bfa612
KR
982 else \
983 true ; \
275049c0
JK
984 fi
985
79337c85 986.PHONY: install.all
06a07944
RP
987install.all: install-no-fixedincludes
988 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 989 r=`pwd` ; export r ; \
b6ae0f10 990 $(SET_LIB_PATH) \
06a07944
RP
991 (cd ./gcc; \
992 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
993 else \
994 true ; \
995 fi
5a63b336 996
424c7ca7 997# inet-install is used because the I*Net wants DejaGNU installed but
f2b43566 998# not built. Similarly, gzip is built but not installed.
424c7ca7 999inet-install:
f2b43566 1000 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
424c7ca7 1001
96bfa612 1002# install-no-fixedincludes is used because Cygnus can not distribute
79337c85
ILT
1003# the fixed header files.
1004.PHONY: install-no-fixedincludes
1005install-no-fixedincludes: \
ff290baf 1006 installdirs \
79337c85
ILT
1007 $(INSTALL_MODULES) \
1008 $(INSTALL_TARGET_MODULES) \
96bfa612 1009 $(INSTALL_X11_MODULES) \
f35c6160 1010 gcc-no-fixedincludes
d1bea4c7 1011
5cc24596 1012# Install the gcc headers files, but not the fixed include files,
79337c85
ILT
1013# which Cygnus is not allowed to distribute. This rule is very
1014# dependent on the workings of the gcc Makefile.in.
1015.PHONY: gcc-no-fixedincludes
06a07944 1016gcc-no-fixedincludes:
5cc24596
PB
1017 @if [ -f ./gcc/Makefile ]; then \
1018 rm -rf gcc/tmp-include; \
1019 mv gcc/include gcc/tmp-include 2>/dev/null; \
1020 mkdir gcc/include; \
7f9cb3b2 1021 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
753d5049 1022 touch gcc/stmp-fixinc gcc/include/fixed; \
a54e05f6 1023 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
5cc73086 1024 r=`pwd`; export r; \
81eb5025 1025 s=`cd $(srcdir); pwd` ; export s; \
b6ae0f10 1026 $(SET_LIB_PATH) \
5cc24596
PB
1027 (cd ./gcc; \
1028 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1029 rm -rf gcc/include; \
1030 mv gcc/tmp-include gcc/include 2>/dev/null; \
1031 else true; fi
dcbfc14d 1032
79337c85
ILT
1033# This rule is used to build the modules which use FLAGS_TO_PASS. To
1034# build a target all-X means to cd to X and make all.
3de70f1d 1035#
055cca84 1036# all-gui, and all-libproc are handled specially because
4d802af9
MT
1037# they are still experimental, and if they fail to build, that
1038# shouldn't stop "make all".
04103845
DE
1039.PHONY: $(ALL_MODULES) all-gui all-libproc
1040$(ALL_MODULES) all-gui all-libproc:
79337c85 1041 @dir=`echo $@ | sed -e 's/all-//'`; \
472af17f
ILT
1042 if [ -f ./$${dir}/Makefile ] ; then \
1043 r=`pwd`; export r; \
81eb5025 1044 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1045 $(SET_LIB_PATH) \
472af17f 1046 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
07362bd9 1047 else \
79337c85 1048 true; \
07362bd9
DZ
1049 fi
1050
80cbf870
ILT
1051# These rules are used to check the modules which use FLAGS_TO_PASS.
1052# To build a target check-X means to cd to X and make check. Some
1053# modules are only tested in a native toolchain.
4f0b8f27 1054
d237841c
BC
1055.PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1056$(NATIVE_CHECK_MODULES):
39cc6dae
RS
1057 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1058 dir=`echo $@ | sed -e 's/check-//'`; \
472af17f
ILT
1059 if [ -f ./$${dir}/Makefile ] ; then \
1060 r=`pwd`; export r; \
81eb5025 1061 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1062 $(SET_LIB_PATH) \
472af17f
ILT
1063 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1064 else \
1065 true; \
4f0b8f27
TL
1066 fi; \
1067 fi
1068
1069$(CROSS_CHECK_MODULES):
6a42d184
DZ
1070 @dir=`echo $@ | sed -e 's/check-//'`; \
1071 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1072 r=`pwd`; export r; \
81eb5025 1073 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1074 $(SET_LIB_PATH) \
6a42d184
DZ
1075 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1076 else \
1077 true; \
1078 fi
1079
79337c85
ILT
1080# This rule is used to install the modules which use FLAGS_TO_PASS.
1081# To build a target install-X means to cd to X and make install.
1082.PHONY: $(INSTALL_MODULES)
ff290baf 1083$(INSTALL_MODULES): installdirs
79337c85
ILT
1084 @dir=`echo $@ | sed -e 's/install-//'`; \
1085 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1086 r=`pwd`; export r; \
81eb5025 1087 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1088 $(SET_LIB_PATH) \
f35c6160 1089 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
07362bd9 1090 else \
79337c85 1091 true; \
07362bd9
DZ
1092 fi
1093
ca2ce3b3
ILT
1094# This rule is used to configure the modules which are built with the
1095# target tools.
1096.PHONY: $(CONFIGURE_TARGET_MODULES)
1097$(CONFIGURE_TARGET_MODULES):
ab1cbc67 1098 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
354a86c7 1099 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
59d3634c 1100 r=`pwd`; export r; \
f2b43566
ILT
1101 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1102 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1103 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1104 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1105 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1106 else \
1107 echo "Multilibs changed for $${dir}, reconfiguring"; \
1108 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1109 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1110 fi; \
354a86c7 1111 else \
354a86c7
MM
1112 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1113 fi; \
062aded9 1114 fi; \
354a86c7
MM
1115 fi; exit 0 # break command into two pieces
1116 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
3e288e27
SG
1117 if [ ! -d $(TARGET_SUBDIR) ]; then \
1118 true; \
1119 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
ca2ce3b3
ILT
1120 true; \
1121 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
efd7b806 1122 if [ -d $(srcdir)/$${dir} ]; then \
ab1cbc67 1123 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
efd7b806 1124 r=`pwd`; export r; \
81eb5025 1125 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1126 $(SET_LIB_PATH) \
efd7b806
SC
1127 AR="$(AR_FOR_TARGET)"; export AR; \
1128 AS="$(AS_FOR_TARGET)"; export AS; \
1129 CC="$(CC_FOR_TARGET)"; export CC; \
1130 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1131 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1132 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
b6ae0f10 1133 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
054f9ada 1134 LD="$(LD_FOR_TARGET)"; export LD; \
276c2d7d 1135 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
efd7b806
SC
1136 NM="$(NM_FOR_TARGET)"; export NM; \
1137 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
19b1d034 1138 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
ab1cbc67 1139 cd $(TARGET_SUBDIR)/$${dir}; \
283a2b3d
DE
1140 case $(srcdir) in \
1141 /*) \
1142 topdir=$(srcdir) ;; \
1143 *) \
1144 case "$(TARGET_SUBDIR)" in \
1145 .) topdir="../$(srcdir)" ;; \
1146 *) topdir="../../$(srcdir)" ;; \
1147 esac ;; \
1148 esac; \
1149 if [ "$(srcdir)" = "." ] ; then \
1150 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
81eb5025 1151 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
0f8f1d33
TT
1152 if [ -f Makefile ]; then \
1153 if $(MAKE) distclean; then \
1154 true; \
1155 else \
1156 exit 1; \
1157 fi; \
1158 else \
1159 true; \
1160 fi; \
283a2b3d
DE
1161 else \
1162 exit 1; \
1163 fi; \
1164 else \
1165 true; \
1166 fi; \
1167 srcdiroption="--srcdir=."; \
1168 libsrcdir="."; \
1169 else \
1170 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
81eb5025 1171 libsrcdir="$$s/$${dir}"; \
283a2b3d
DE
1172 fi; \
1173 if [ -f $${libsrcdir}/configure ] ; then \
1174 $(SHELL) $${libsrcdir}/configure \
1175 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1176 --with-target-subdir="$(TARGET_SUBDIR)"; \
19b1d034 1177 else \
81eb5025 1178 $(SHELL) $$s/configure \
283a2b3d
DE
1179 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1180 --with-target-subdir="$(TARGET_SUBDIR)"; \
19b1d034 1181 fi; \
efd7b806
SC
1182 else \
1183 true; \
9908eb6a 1184 fi; \
ca2ce3b3
ILT
1185 else \
1186 true; \
1187 fi
1188
6a42d184
DZ
1189# This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1190# To build a target all-X means to cd to X and make all.
79337c85
ILT
1191.PHONY: $(ALL_TARGET_MODULES)
1192$(ALL_TARGET_MODULES):
ab1cbc67
PB
1193 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1194 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
5cc73086 1195 r=`pwd`; export r; \
81eb5025 1196 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1197 $(SET_LIB_PATH) \
ab1cbc67 1198 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
07362bd9 1199 else \
79337c85 1200 true; \
07362bd9
DZ
1201 fi
1202
6a42d184
DZ
1203# This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1204# To build a target install-X means to cd to X and make install.
1205.PHONY: $(CHECK_TARGET_MODULES)
1206$(CHECK_TARGET_MODULES):
136ca05d 1207 @dir=`echo $@ | sed -e 's/check-target-//'`; \
ab1cbc67 1208 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
5cc73086 1209 r=`pwd`; export r; \
81eb5025 1210 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1211 $(SET_LIB_PATH) \
ab1cbc67 1212 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
6a42d184
DZ
1213 else \
1214 true; \
1215 fi
1216
79337c85
ILT
1217# This rule is used to install the modules which use
1218# TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1219# and make install.
1220.PHONY: $(INSTALL_TARGET_MODULES)
ff290baf 1221$(INSTALL_TARGET_MODULES): installdirs
ab1cbc67
PB
1222 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1223 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
5cc73086 1224 r=`pwd`; export r; \
81eb5025 1225 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1226 $(SET_LIB_PATH) \
ab1cbc67
PB
1227 (cd $(TARGET_SUBDIR)/$${dir}; \
1228 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
07362bd9 1229 else \
79337c85 1230 true; \
07362bd9
DZ
1231 fi
1232
6a42d184 1233# This rule is used to build the modules which use X11_FLAGS_TO_PASS.
79337c85
ILT
1234# To build a target all-X means to cd to X and make all.
1235.PHONY: $(ALL_X11_MODULES)
1236$(ALL_X11_MODULES):
1237 @dir=`echo $@ | sed -e 's/all-//'`; \
1238 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1239 r=`pwd`; export r; \
81eb5025 1240 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1241 $(SET_LIB_PATH) \
79337c85
ILT
1242 (cd $${dir}; \
1243 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
07362bd9 1244 else \
79337c85 1245 true; \
07362bd9
DZ
1246 fi
1247
6a42d184
DZ
1248# This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1249# To build a target check-X means to cd to X and make all.
1250.PHONY: $(CHECK_X11_MODULES)
1251$(CHECK_X11_MODULES):
1252 @dir=`echo $@ | sed -e 's/check-//'`; \
1253 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1254 r=`pwd`; export r; \
81eb5025 1255 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1256 $(SET_LIB_PATH) \
6a42d184
DZ
1257 (cd $${dir}; \
1258 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1259 else \
1260 true; \
1261 fi
1262
1263# This rule is used to install the modules which use X11_FLAGS_TO_PASS.
79337c85
ILT
1264# To build a target install-X means to cd to X and make install.
1265.PHONY: $(INSTALL_X11_MODULES)
1266$(INSTALL_X11_MODULES):
6a42d184 1267 @dir=`echo $@ | sed -e 's/install-//'`; \
79337c85 1268 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1269 r=`pwd`; export r; \
81eb5025 1270 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1271 $(SET_LIB_PATH) \
79337c85
ILT
1272 (cd $${dir}; \
1273 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
07362bd9 1274 else \
79337c85 1275 true; \
07362bd9
DZ
1276 fi
1277
79337c85
ILT
1278# gcc is the only module which uses GCC_FLAGS_TO_PASS.
1279.PHONY: all-gcc
1280all-gcc:
1281 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 1282 r=`pwd`; export r; \
81eb5025 1283 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1284 $(SET_LIB_PATH) \
79337c85 1285 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
07362bd9 1286 else \
79337c85 1287 true; \
07362bd9
DZ
1288 fi
1289
4c0b7ebc
DE
1290.PHONY: all-bootstrap
1291all-bootstrap:
1292 @if [ -f ./gcc/Makefile ] ; then \
1293 r=`pwd`; export r; \
81eb5025 1294 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1295 $(SET_LIB_PATH) \
4c0b7ebc
DE
1296 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \
1297 else \
1298 true; \
1299 fi
1300
65088029
ILT
1301.PHONY: check-gcc
1302check-gcc:
1303 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 1304 r=`pwd`; export r; \
81eb5025 1305 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1306 $(SET_LIB_PATH) \
65088029
ILT
1307 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1308 else \
1309 true; \
1310 fi
1311
79337c85
ILT
1312.PHONY: install-gcc
1313install-gcc:
1314 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 1315 r=`pwd`; export r; \
81eb5025 1316 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1317 $(SET_LIB_PATH) \
79337c85 1318 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
07362bd9 1319 else \
79337c85 1320 true; \
07362bd9
DZ
1321 fi
1322
753d5049
SC
1323
1324# EXPERIMENTAL STUFF
1325# This rule is used to install the modules which use FLAGS_TO_PASS.
1326# To build a target install-X means to cd to X and make install.
09985c96 1327.PHONY: install-dosrel
ff290baf 1328install-dosrel: installdirs info
753d5049
SC
1329 @dir=`echo $@ | sed -e 's/install-//'`; \
1330 if [ -f ./$${dir}/Makefile ] ; then \
1331 r=`pwd`; export r; \
81eb5025 1332 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1333 $(SET_LIB_PATH) \
753d5049
SC
1334 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1335 else \
1336 true; \
1337 fi
1338
09985c96 1339install-dosrel-fake:
a987271c 1340
753d5049 1341
79337c85 1342# This is a list of inter-dependencies among modules.
53c403df 1343all-apache:
65e21701 1344all-autoconf: all-m4
08168809 1345all-automake:
5db223e4 1346all-bash:
79337c85 1347all-bfd:
dfe44004 1348all-binutils: all-libiberty all-opcodes all-bfd all-flex all-byacc
79337c85 1349all-byacc:
79337c85 1350all-cvs:
2e482734 1351all-db:
4d802af9 1352all-dejagnu: all-tcl all-expect all-tk
79337c85
ILT
1353all-diff: all-libiberty
1354all-emacs:
1d5fcc66 1355all-emacs19: all-byacc
79337c85 1356all-etc:
4c0b7ebc
DE
1357configure-target-examples: $(ALL_GCC)
1358all-target-examples: configure-target-examples
c6ba9ae0 1359all-expect: all-tcl all-tk
275049c0 1360all-fileutils: all-libiberty
97840afa 1361all-findutils:
79337c85 1362all-find:
7dcc0664 1363all-flex: all-libiberty all-byacc
79337c85 1364all-gas: all-libiberty all-opcodes all-bfd
65e21701 1365all-gash: all-tcl
79337c85 1366all-gawk:
fc3524a9 1367ALL_GCC = all-gcc
3718029f 1368all-gcc: all-byacc all-binutils all-gas all-ld
4c0b7ebc 1369all-bootstrap: all-libiberty all-byacc all-binutils all-gas all-ld
01082eaf
MM
1370GDB_TK = all-tk all-tcl
1371all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
ba26181f 1372all-gnuserv:
b6ae0f10 1373all-gprof: all-libiberty all-bfd all-opcodes
6214eb23 1374all-grep: all-libiberty
b6ae0f10 1375all-grez: all-libiberty all-bfd all-opcodes
ab1cbc67 1376all-gui: all-gdb all-libproc all-target-librx
0f8f1d33 1377all-guile:
79337c85
ILT
1378all-gzip: all-libiberty
1379all-hello: all-libiberty
3718029f
ILT
1380# start-sanitize-ide
1381all-ilu:
1382# end-sanitize-ide
79337c85 1383all-indent:
8d1d94b6 1384all-inet: all-tcl all-send-pr all-perl
3585593d 1385all-ispell: all-emacs19
754a6784 1386all-itcl: all-tcl all-tk
b6ae0f10 1387all-ld: all-libiberty all-bfd all-opcodes all-byacc all-flex
283a2b3d 1388configure-target-libg++: $(ALL_GCC) configure-target-librx
ab1cbc67
PB
1389all-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++
1390configure-target-libgloss: $(ALL_GCC)
283a2b3d 1391all-target-libgloss: configure-target-libgloss configure-target-newlib
ab1cbc67
PB
1392configure-target-libio: $(ALL_GCC)
1393all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
79337c85 1394all-libiberty:
eebe454c 1395# start-sanitize-ide
8d74b2fa 1396all-libide: all-tcl all-tk all-itcl all-ilu
eebe454c 1397# end-sanitize-ide
ab1cbc67
PB
1398configure-target-librx: $(ALL_GCC) configure-target-newlib
1399all-target-librx: configure-target-librx
1400configure-target-libstdc++: $(ALL_GCC)
1401all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
79337c85
ILT
1402all-m4: all-libiberty
1403all-make: all-libiberty
1404all-mmalloc:
ab1cbc67
PB
1405configure-target-newlib: $(ALL_GCC)
1406all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
b6ae0f10 1407all-opcodes: all-bfd all-libiberty
be2c65d3 1408all-patch: all-libiberty
0f8f1d33 1409all-perl:
b255ccdb 1410all-prms: all-libiberty
79337c85
ILT
1411all-rcs:
1412all-readline:
1413all-recode: all-libiberty
ac259c28
JM
1414all-sed: all-libiberty
1415all-send-pr: all-prms
79337c85 1416all-shellutils:
b6ae0f10 1417all-sim: all-libiberty all-bfd all-opcodes
2e482734 1418all-sn: all-tcl all-tk all-itcl all-db
07362bd9 1419all-tar: all-libiberty
79337c85
ILT
1420all-tcl:
1421all-tclX: all-tcl all-tk
1422all-tk: all-tcl
1423all-texinfo: all-libiberty
1424all-textutils:
b6ae0f10 1425all-tgas: all-libiberty all-bfd all-opcodes
79337c85 1426all-time:
eebe454c
TT
1427# start-sanitize-ide
1428all-vmake: all-tcl all-tk all-itcl all-libide
1429# end-sanitize-ide
79337c85 1430all-wdiff:
97840afa 1431all-target-winsup: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup
ab1cbc67 1432configure-target-winsup: configure-target-newlib
79337c85 1433all-uudecode: all-libiberty
ab1cbc67
PB
1434configure-target-libiberty: $(ALL_GCC)
1435all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
0f8f1d33
TT
1436all-target: $(ALL_TARGET_MODULES)
1437install-target: $(INSTALL_TARGET_MODULES)
07362bd9 1438
79337c85 1439### other supporting targets
07362bd9 1440
79337c85
ILT
1441MAKEDIRS= \
1442 $(prefix) \
9deb9485 1443 $(exec_prefix)
ff290baf
ILT
1444.PHONY: installdirs
1445installdirs: mkinstalldirs
fab3dd2d 1446 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
23e3e7f9 1447
79337c85
ILT
1448dir.info: do-install-info
1449 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1450 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1451 mv -f dir.info.new dir.info ; \
1452 else true ; \
72c09fbc 1453 fi
6b7e5998 1454
b1cceba2
DZ
1455dist:
1456 @echo "Building a full distribution of this tree isn't done"
1457 @echo "via 'make dist'. Check out the etc/ subdirectory"
1458
eb02fd64
RP
1459etags tags: TAGS
1460
753d5049
SC
1461# Right now this just builds TAGS in each subdirectory. emacs19 has the
1462# ability to use several tags files at once, so there is probably no need
1463# to combine them into one big TAGS file (like CVS 1.3 does). We could
1464# (if we felt like it) have this Makefile write a piece of elisp which
1465# the user could load to tell emacs19 where all the TAGS files we just
1466# built are.
1467TAGS: do-TAGS
eb02fd64 1468
eb02fd64
RP
1469# with the gnu make, this is done automatically.
1470
01ec9588 1471Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 1472 $(SHELL) ./config.status
eb02fd64 1473
11954bf1 1474#
01ec9588 1475# Support for building net releases
11954bf1 1476
01ec9588
JK
1477# Files in devo used in any net release.
1478# ChangeLog omitted because it may refer to files which are not in this
1479# distribution (perhaps it would be better to include it anyway).
d94d255d 1480DEVO_SUPPORT= README Makefile.in configure configure.in \
9823504d 1481 config.guess config.sub config move-if-change \
5f69e8bc 1482 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
08499fc2
ILT
1483 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1484 mkinstalldirs
01ec9588
JK
1485
1486# Files in devo/etc used in any net release.
1487# ChangeLog omitted because it may refer to files which are not in this
1488# distribution (perhaps it would be better to include it anyway).
f046ec67
JM
1489ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1490 make-stds.texi standards.info*
01ec9588 1491
40e16078
KR
1492# When you use `make setup-dirs' or `make taz' you should always redefine
1493# this macro.
1494SUPPORT_FILES = list-of-support-files-for-tool-in-question
40e16078 1495
a54e05f6
KR
1496.PHONY: taz
1497
484fa12d
JW
1498taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1499 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
484fa12d
JW
1500 # Take out texinfo from a few places; make simple BISON=bison line.
1501 sed -e '/^all\.normal: /s/\all-texinfo //' \
1502 -e '/^ install-texinfo /d' \
64434418 1503 -e '/^BISON = `if/,/^$$/d' \
000befdf 1504 -e '/^# BISON:/s/.*/BISON = $(DEFAULT_YACC)/' \
484fa12d
JW
1505 <Makefile.in >tmp
1506 mv -f tmp Makefile.in
65e21701 1507 #
1d5fcc66
PB
1508 $(start-sanitize-Sanitize)
1509 @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
1510 $(end-sanitize-Sanitize)
40e16078 1511 ./configure sun4
ab1cbc67
PB
1512 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1513 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
aaefc574 1514 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
6b9e3a78 1515 # Make links, and run "make diststuff" or "make info" when needed.
a54e05f6 1516 rm -rf proto-toplev ; mkdir proto-toplev
7f9cb3b2 1517 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
a54e05f6
KR
1518 for d in $$dirs ; do \
1519 if [ -d $$d ]; then \
ab1cbc67
PB
1520 if [ ! -f $$d/Makefile ] ; then true ; \
1521 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1522 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
6b9e3a78 1523 elif grep '^info:' $$d/Makefile >/dev/null ; then \
ab1cbc67 1524 (cd $$d ; $(MAKE) info ) || exit 1 ; \
6b9e3a78 1525 fi ; \
7f9cb3b2
KR
1526 if [ -d $$d/proto-$$d.dir ]; then \
1527 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1528 else \
1529 ln -s ../$$d proto-toplev/$$d ; \
1530 fi ; \
a54e05f6 1531 else ln -s ../$$d proto-toplev/$$d ; fi ; \
40e16078 1532 done
3dbe0fa2 1533 cd etc ; $(MAKE) info
5600fbd2 1534 $(MAKE) distclean
a54e05f6 1535 #
40e16078 1536 mkdir proto-toplev/etc
15408b3b
KR
1537 (cd proto-toplev/etc; \
1538 for i in $(ETC_SUPPORT); do \
40e16078 1539 ln -s ../../etc/$$i . ; \
15408b3b 1540 done)
a54e05f6 1541 #
04103845 1542 # Take out texinfo from configurable dirs
40e16078
KR
1543 rm proto-toplev/configure.in
1544 sed -e '/^host_tools=/s/texinfo //' \
40e16078 1545 <configure.in >proto-toplev/configure.in
a54e05f6 1546 #
40e16078 1547 mkdir proto-toplev/texinfo
8d190aa3
KR
1548 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1549 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
1550 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
1551 if test -r texinfo/util/tex3patch ; then \
1552 mkdir proto-toplev/texinfo/util && \
1553 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1554 else true; fi
a561909f 1555 chmod og=u `find . -print`
b5dbae28
KR
1556 $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) \
1557 VER=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`
1558
1559do-tar-gz:
1560 echo "==> Making $(TOOL)-$(VER).tar.gz"
1561 -rm -f $(TOOL)-$(VER)
1562 ln -s proto-toplev $(TOOL)-$(VER)
1563 tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
1564 $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar
40e16078 1565
484fa12d 1566TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
7f9cb3b2 1567DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
40e16078 1568
96bfa612 1569.PHONY: gas.tar.gz
2e482734 1570GAS_SUPPORT_DIRS= bfd include libiberty opcodes setup.com makefile.vms
96bfa612 1571gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
484fa12d
JW
1572 $(MAKE) -f Makefile.in taz TOOL=gas \
1573 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
40e16078 1574
7f9cb3b2 1575# The FSF "binutils" release includes gprof and ld.
96bfa612 1576.PHONY: binutils.tar.gz
2e482734 1577BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof setup.com makefile.vms
96bfa612 1578binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
484fa12d 1579 $(MAKE) -f Makefile.in taz TOOL=binutils \
2492f942 1580 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
7f9cb3b2 1581
96bfa612 1582.PHONY: gas+binutils.tar.gz
a54e05f6 1583GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
96bfa612 1584gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
484fa12d 1585 $(MAKE) -f Makefile.in taz TOOL=gas \
2492f942 1586 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
79337c85 1587
5600fbd2 1588.PHONY: libg++.tar.gz
ab1cbc67 1589LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
5600fbd2 1590libg++.tar.gz: $(DIST_SUPPORT) libg++
484fa12d
JW
1591 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1592 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
5600fbd2 1593
49dfa984
JM
1594GNATS_SUPPORT_DIRS=include libiberty send-pr
1595gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
a0bd8e18 1596 $(MAKE) -f Makefile.in taz TOOL=gnats \
49dfa984
JM
1597 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1598
1d5fcc66 1599.PHONY: gdb.tar.gz
81597186 1600GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
ca2ce3b3 1601GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1d5fcc66
PB
1602gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1603 $(MAKE) -f Makefile.in taz TOOL=gdb \
ca2ce3b3 1604 SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1d5fcc66 1605
7166a308 1606.PHONY: newlib.tar.gz
a220ba0f 1607NEWLIB_SUPPORT_DIRS=libgloss
04103845 1608# taz configures for the sun4 target which won't configure newlib.
a220ba0f
SC
1609# We need newlib configured so that the .info files are made.
1610# Unfortunately, it is not enough to just configure newlib separately:
1611# taz will build the .info files but since SUBDIRS won't contain newlib,
1612# distclean won't be run (leaving Makefile, config.status, and the tmp files
1613# used in building the .info files, eg: *.def, *.ref).
4c0b7ebc
DE
1614# The problem isn't solvable however without a lot of extra work because
1615# target libraries are built in subdir $(target_alias) which gets nuked during
1616# the make distclean. For now punt on the issue of shipping newlib info files
1617# with newlib net releases and wait for a day when some native target (sun4?)
1618# supports newlib (if only minimally).
7166a308
KR
1619newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1620 $(MAKE) -f Makefile.in taz TOOL=newlib \
1621 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
6b9e3a78 1622 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
7166a308 1623
79337c85 1624.NOEXPORT:
05992891 1625MAKEOVERRIDES=
79337c85
ILT
1626
1627# start-sanitize-chill
1628## This is ugly, but I don't want GNU make to put these variables in
1629## the environment. Older makes will see this as a set of targets
1630## with no dependencies and no actions.
1631unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1632# end-sanitize-chill
1633
eb02fd64 1634# end of Makefile.in
This page took 0.487439 seconds and 4 git commands to generate.