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