Tue Jul 22 14:44:00 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
[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 \
81eb5025 185 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 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 = ` \
ea6d5817 240 if [ -f $$r/gas/as.new ] ; then \
5cc73086 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
JM
250LD_FOR_TARGET = ` \
251 if [ -f $$r/ld/ld.new ] ; then \
252 echo $$r/ld/ld.new ; \
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 = ` \
ea6d5817 306 if [ -f $$r/binutils/nm.new ] ; then \
753d5049 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)" \
4c0b7ebc
DE
437 `if test x"$(LANGUAGES)" != x; then echo "LANGUAGES=$(LANGUAGES)"; fi` \
438 `if test x"$(STMP_FIXPROTO)" != x; then echo "STMP_FIXPROTO=$(STMP_FIXPROTO)"; fi` \
439 `if test x"$(LIMITS_H_TEST)" != x; then echo "LIMITS_H_TEST=$(LIMITS_H_TEST)"; fi` \
440 `if test x"$(LIBGCC1_TEST)" != x; then echo "LIBGCC1_TEST=$(LIBGCC1_TEST)"; fi` \
441 `if test x"$(LIBGCC2_CFLAGS)" != x; then echo "LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)"; fi` \
2e482734 442 `if test x"$(LIBGCC2_DEBUG_CFLAGS)" != x; then echo "LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)"; fi` \
4c0b7ebc
DE
443 `if test x"$(LIBGCC2_INCLUDES)" != x; then echo "LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)"; fi` \
444 `if test x"$(ENQUIRE)" != x; then echo "ENQUIRE=$(ENQUIRE)"; fi` \
445 `if test x"$(BOOT_CFLAGS)" != x; then echo "BOOT_CFLAGS=$(BOOT_CFLAGS)"; 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 \
79337c85
ILT
484 all-ld \
485 all-libiberty \
eebe454c
TT
486 $(start-sanitize-ide) \
487 all-libide \
488 $(end-sanitize-ide) \
79337c85
ILT
489 all-m4 \
490 all-make \
491 all-mmalloc \
492 all-opcodes \
493 all-patch \
0f8f1d33 494 all-perl \
79337c85
ILT
495 all-prms \
496 all-rcs \
497 all-readline \
275049c0 498 all-release \
79337c85
ILT
499 all-recode \
500 all-sed \
501 all-send-pr \
502 all-shellutils \
503 all-sim \
2e482734 504 all-sn \
79337c85
ILT
505 all-tar \
506 all-tcl \
507 all-texinfo \
508 all-textutils \
509 all-tgas \
510 all-time \
c446cc8b 511 all-tix \
79337c85 512 all-uudecode \
eebe454c
TT
513 $(start-sanitize-ide) \
514 all-vmake \
515 $(end-sanitize-ide) \
753d5049
SC
516 all-wdiff
517
4f0b8f27
TL
518# This is a list of the check targets for all of the modules which are
519# compiled using $(FLAGS_TO_PASS).
520#
d237841c
BC
521# The list is in two parts. The first lists those tools which
522# are tested as part of the host's native tool-chain, and not
523# tested in a cross configuration.
524NATIVE_CHECK_MODULES = \
525 check-byacc \
4f0b8f27
TL
526 check-flex
527
d237841c 528CROSS_CHECK_MODULES = \
53c403df 529 check-apache \
6a42d184 530 check-autoconf \
08168809 531 check-automake \
5db223e4 532 check-bash \
6a42d184
DZ
533 check-bfd \
534 check-binutils \
6a42d184 535 check-cvs \
97840afa 536 check-db \
6a42d184
DZ
537 check-dejagnu \
538 check-diff \
539 check-etc \
540 check-fileutils \
97840afa 541 check-findutils \
6a42d184 542 check-find \
6a42d184
DZ
543 check-gas \
544 check-gawk \
ba26181f 545 check-gnuserv \
6a42d184
DZ
546 check-gprof \
547 check-grep \
548 check-gzip \
549 check-hello \
3718029f
ILT
550 $(start-sanitize-ide) \
551 check-ilu \
552 $(end-sanitize-ide) \
6a42d184 553 check-indent \
13d7cbe2 554 check-inet \
6a42d184 555 check-ispell \
97840afa 556 check-itcl \
6a42d184
DZ
557 check-ld \
558 check-libiberty \
eebe454c
TT
559 $(start-sanitize-ide) \
560 check-libide \
561 $(end-sanitize-ide) \
6a42d184
DZ
562 check-m4 \
563 check-make \
564 check-mmcheckoc \
565 check-opcodes \
566 check-patch \
0f8f1d33 567 check-perl \
6a42d184
DZ
568 check-prms \
569 check-rcs \
570 check-readline \
571 check-recode \
572 check-sed \
573 check-send-pr \
574 check-shellutils \
2e482734 575 check-sn \
6a42d184
DZ
576 check-sim \
577 check-tar \
578 check-tcl \
579 check-texinfo \
580 check-textutils \
581 check-tgas \
582 check-time \
c446cc8b 583 check-tix \
6a42d184 584 check-uudecode \
eebe454c
TT
585 $(start-sanitize-ide) \
586 check-vmake \
587 $(end-sanitize-ide) \
6a42d184 588 check-wdiff
d237841c
BC
589
590CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
6a42d184
DZ
591
592# This is a list of the install targets for all of the modules which are
79337c85 593# compiled using $(FLAGS_TO_PASS).
27349293
ILT
594# We put install-opcodes before install-binutils because the installed
595# binutils might be on PATH, and they might need the shared opcodes
596# library.
79337c85 597INSTALL_MODULES = \
53c403df 598 install-apache \
79337c85 599 install-autoconf \
08168809 600 install-automake \
5db223e4 601 install-bash \
79337c85 602 install-bfd \
27349293 603 install-opcodes \
79337c85
ILT
604 install-binutils \
605 install-byacc \
606 install-cvs \
97840afa 607 install-db \
79337c85
ILT
608 install-dejagnu \
609 install-diff \
753d5049 610 install-dosutils \
79337c85
ILT
611 install-etc \
612 install-fileutils \
97840afa 613 install-findutils \
79337c85
ILT
614 install-find \
615 install-flex \
616 install-gas \
617 install-gawk \
ba26181f 618 install-gnuserv \
79337c85
ILT
619 install-gprof \
620 install-grep \
19b1d034 621 install-grez \
79337c85
ILT
622 install-gzip \
623 install-hello \
3718029f
ILT
624 $(start-sanitize-ide) \
625 install-ilu \
626 $(end-sanitize-ide) \
79337c85 627 install-indent \
13d7cbe2 628 install-inet \
79337c85 629 install-ispell \
97840afa 630 install-itcl \
79337c85
ILT
631 install-ld \
632 install-libiberty \
eebe454c
TT
633 $(start-sanitize-ide) \
634 install-libide \
635 $(end-sanitize-ide) \
79337c85
ILT
636 install-m4 \
637 install-make \
638 install-mmalloc \
79337c85 639 install-patch \
0f8f1d33 640 install-perl \
79337c85
ILT
641 install-prms \
642 install-rcs \
643 install-readline \
644 install-recode \
645 install-sed \
646 install-send-pr \
647 install-shellutils \
648 install-sim \
2e482734 649 install-sn \
79337c85
ILT
650 install-tar \
651 install-tcl \
652 install-texinfo \
653 install-textutils \
654 install-tgas \
655 install-time \
c446cc8b 656 install-tix \
79337c85 657 install-uudecode \
eebe454c
TT
658 $(start-sanitize-ide) \
659 install-vmake \
660 $(end-sanitize-ide) \
79337c85
ILT
661 install-wdiff
662
6a42d184 663# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
664# using $(X11_FLAGS_TO_PASS).
665ALL_X11_MODULES = \
666 all-emacs \
4d802af9 667 all-emacs19 \
04103845 668 all-gdb \
79337c85 669 all-expect \
65e21701 670 all-gash \
0f8f1d33 671 all-guile \
79337c85
ILT
672 all-tclX \
673 all-tk
674
6a42d184
DZ
675# This is a list of the check targets for all of the modules which are
676# compiled using $(X11_FLAGS_TO_PASS).
677CHECK_X11_MODULES = \
678 check-emacs \
04103845 679 check-gdb \
0f8f1d33 680 check-guile \
6a42d184 681 check-expect \
65e21701 682 check-gash \
2e482734 683 check-tclX
6a42d184 684
79337c85
ILT
685# This is a list of the install targets for all the modules which are
686# compiled using $(X11_FLAGS_TO_PASS).
687INSTALL_X11_MODULES = \
688 install-emacs \
4d802af9 689 install-emacs19 \
04103845 690 install-gdb \
0f8f1d33 691 install-guile \
79337c85 692 install-expect \
65e21701 693 install-gash \
79337c85
ILT
694 install-tclX \
695 install-tk
fca4f908 696
6a42d184 697# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
698# using $(TARGET_FLAGS_TO_PASS).
699ALL_TARGET_MODULES = \
ab1cbc67
PB
700 all-target-libio \
701 all-target-libstdc++ \
702 all-target-librx \
703 all-target-libg++ \
704 all-target-newlib \
705 all-target-winsup \
706 all-target-libgloss \
4c0b7ebc 707 all-target-libiberty \
10be59aa 708 all-target-gperf \
4c0b7ebc 709 all-target-examples
79337c85 710
ca2ce3b3
ILT
711# This is a list of the configure targets for all of the modules which
712# are compiled using the target tools.
713CONFIGURE_TARGET_MODULES = \
ab1cbc67
PB
714 configure-target-libio \
715 configure-target-libstdc++ \
716 configure-target-librx \
717 configure-target-libg++ \
718 configure-target-newlib \
719 configure-target-winsup \
720 configure-target-libgloss \
4c0b7ebc 721 configure-target-libiberty \
10be59aa 722 configure-target-gperf \
4c0b7ebc 723 configure-target-examples
ca2ce3b3 724
6a42d184
DZ
725# This is a list of the check targets for all of the modules which are
726# compiled using $(TARGET_FLAGS_TO_PASS).
727CHECK_TARGET_MODULES = \
ab1cbc67
PB
728 check-target-libio \
729 check-target-libstdc++ \
730 check-target-libg++ \
731 check-target-newlib \
732 check-target-winsup \
10be59aa
BK
733 check-target-libiberty \
734 check-target-gperf
6a42d184
DZ
735
736# This is a list of the install targets for all of the modules which are
79337c85
ILT
737# compiled using $(TARGET_FLAGS_TO_PASS).
738INSTALL_TARGET_MODULES = \
ab1cbc67
PB
739 install-target-libio \
740 install-target-libstdc++ \
741 install-target-libg++ \
742 install-target-newlib \
743 install-target-winsup \
744 install-target-libgloss \
10be59aa
BK
745 install-target-libiberty \
746 install-target-gperf
7481617f 747
7508666f
MM
748# This is a list of the targets for which we can do a clean-{target}.
749CLEAN_MODULES = \
13d7cbe2 750 clean-apache \
7508666f 751 clean-autoconf \
08168809 752 clean-automake \
5db223e4 753 clean-bash \
7508666f
MM
754 clean-bfd \
755 clean-binutils \
756 clean-byacc \
757 clean-cvs \
97840afa 758 clean-db \
7508666f
MM
759 clean-dejagnu \
760 clean-diff \
761 clean-dosutils \
762 clean-etc \
763 clean-fileutils \
97840afa 764 clean-findutils \
7508666f
MM
765 clean-find \
766 clean-flex \
767 clean-gas \
768 clean-gawk \
ba26181f 769 clean-gnuserv \
7508666f
MM
770 clean-gprof \
771 clean-grep \
772 clean-grez \
773 clean-gzip \
774 clean-hello \
3718029f
ILT
775 $(start-sanitize-ide) \
776 clean-ilu \
777 $(end-sanitize-ide) \
7508666f 778 clean-indent \
13d7cbe2 779 clean-inet \
7508666f 780 clean-ispell \
97840afa 781 clean-itcl \
7508666f
MM
782 clean-ld \
783 clean-libiberty \
eebe454c
TT
784 $(start-sanitize-ide) \
785 clean-libide \
786 $(end-sanitize-ide) \
7508666f
MM
787 clean-m4 \
788 clean-make \
789 clean-mmalloc \
790 clean-opcodes \
791 clean-patch \
792 clean-perl \
793 clean-prms \
794 clean-rcs \
795 clean-readline \
796 clean-release \
797 clean-recode \
798 clean-sed \
799 clean-send-pr \
800 clean-shellutils \
801 clean-sim \
2e482734 802 clean-sn \
7508666f
MM
803 clean-tar \
804 clean-tcl \
805 clean-texinfo \
806 clean-textutils \
807 clean-tgas \
808 clean-time \
c446cc8b 809 clean-tix \
7508666f 810 clean-uudecode \
eebe454c
TT
811 $(start-sanitize-ide) \
812 clean-vmake \
813 $(end-sanitize-ide) \
7508666f
MM
814 clean-wdiff
815
816# All of the target modules that can be cleaned
817CLEAN_TARGET_MODULES = \
818 clean-target-libio \
819 clean-target-libstdc++ \
820 clean-target-librx \
821 clean-target-libg++ \
822 clean-target-newlib \
823 clean-target-winsup \
824 clean-target-libgloss \
825 clean-target-libiberty \
10be59aa 826 clean-target-gperf \
7508666f
MM
827 clean-target-examples
828
829# All of the x11 modules that can be cleaned
830CLEAN_X11_MODULES = \
831 clean-emacs \
832 clean-emacs19 \
833 clean-gdb \
834 clean-expect \
835 clean-gash \
836 clean-guile \
837 clean-tclX \
838 clean-tk
839
79337c85 840# The first rule in the file had better be this one. Don't put any above it.
a59b94d2 841all: all.normal
79337c85
ILT
842.PHONY: all
843
844# The target built for a native build.
845.PHONY: all.normal
846all.normal: \
847 $(ALL_MODULES) \
46d0ca81 848 $(ALL_X11_MODULES) \
2e482734 849 $(ALL_TARGET_MODULES) \
79337c85
ILT
850 all-gcc
851
0ef4728f 852# Do a target for all the subdirectories. A ``make do-X'' will do a
53222cbd
RP
853# ``make X'' in all subdirectories (because, in general, there is a
854# dependency (below) of X upon do-X, a ``make X'' will also do this,
855# but it may do additional work as well).
0ef4728f
ILT
856# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
857# because it is so large that it can easily overflow the command line
858# length limit on some systems.
79337c85 859DO_X = \
79337c85
ILT
860 do-clean \
861 do-distclean \
862 do-dvi \
863 do-info \
864 do-install-info \
865 do-installcheck \
866 do-mostlyclean \
ca2ce3b3 867 do-maintainer-clean \
753d5049 868 do-TAGS
79337c85
ILT
869.PHONY: $(DO_X)
870$(DO_X):
0ef4728f 871 @target=`echo $@ | sed -e 's/^do-//'`; \
5cc73086 872 r=`pwd`; export r; \
81eb5025 873 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 874 $(SET_LIB_PATH) \
ab1cbc67 875 for i in $(SUBDIRS) -dummy-; do \
36286a3e 876 if [ -f ./$$i/Makefile ]; then \
0ef4728f 877 case $$i in \
0ef4728f 878 gcc) \
6d681784 879 for flag in $(EXTRA_GCC_FLAGS); do \
0f8f1d33 880 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
6d681784 881 done; \
0ef4728f
ILT
882 ;; \
883 *) \
6d681784 884 for flag in $(EXTRA_HOST_FLAGS); do \
0f8f1d33 885 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
6d681784 886 done; \
0ef4728f
ILT
887 ;; \
888 esac ; \
d29cd970 889 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
0ef4728f 890 if (cd ./$$i; \
6d681784 891 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
64434418 892 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
753d5049 893 "RANLIB=$${RANLIB}" \
d29cd970 894 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
6d681784 895 $${target}); \
0ef4728f
ILT
896 then true; else exit 1; fi; \
897 else true; fi; \
ec7a8792
ILT
898 done
899 @target=`echo $@ | sed -e 's/^do-//'`; \
900 r=`pwd`; export r; \
81eb5025 901 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 902 $(SET_LIB_PATH) \
ab1cbc67
PB
903 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
904 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
905 for flag in $(EXTRA_TARGET_FLAGS); do \
0f8f1d33 906 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
ab1cbc67 907 done; \
d29cd970 908 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
ab1cbc67
PB
909 if (cd $(TARGET_SUBDIR)/$$i; \
910 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
64434418 911 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
ab1cbc67 912 "RANLIB=$${RANLIB}" \
d29cd970 913 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
ab1cbc67
PB
914 $${target}); \
915 then true; else exit 1; fi; \
916 else true; fi; \
0ef4728f 917 done
fb90daeb 918
79337c85
ILT
919# Here are the targets which correspond to the do-X targets.
920
65088029 921.PHONY: info installcheck dvi install-info
ca2ce3b3
ILT
922.PHONY: clean distclean mostlyclean maintainer-clean realclean
923.PHONY: local-clean local-distclean local-maintainer-clean
0ef4728f 924info: do-info
1a14993c 925installcheck: do-installcheck
0ef4728f 926dvi: do-dvi
9a9e8e7f 927
97840afa
TT
928# Make sure makeinfo is built before we do a `make info'.
929do-info: all-texinfo
930
f35c6160 931install-info: do-install-info dir.info
81eb5025 932 s=`cd $(srcdir); pwd`; export s; \
72c09fbc
SC
933 if [ -f dir.info ] ; then \
934 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
50fbe976 935 else true ; fi
4d714963 936
0ef4728f 937local-clean:
7fed4078 938 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
3b30df82 939
0ef4728f 940local-distclean:
2e482734 941 -rm -f Makefile config.status config.cache
8c5bc3e3
ILT
942 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
943 rm -rf $(TARGET_SUBDIR); \
944 else true; fi
7fcfdcf7 945
ca2ce3b3
ILT
946local-maintainer-clean:
947 @echo "This command is intended for maintainers to use;"
948 @echo "it deletes files that may require special tools to rebuild."
949
0ef4728f
ILT
950clean: do-clean local-clean
951mostlyclean: do-mostlyclean local-clean
952distclean: do-distclean local-clean local-distclean
ca2ce3b3
ILT
953maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
954maintainer-clean: local-distclean
955realclean: maintainer-clean
0ef4728f 956
7508666f
MM
957# This rule is used to clean specific modules.
958.PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
959$(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
960 @dir=`echo $@ | sed -e 's/clean-//'`; \
961 if [ -f ./$${dir}/Makefile ] ; then \
962 r=`pwd`; export r; \
81eb5025 963 s=`cd $(srcdir); pwd`; export s; \
7508666f
MM
964 $(SET_LIB_PATH) \
965 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
966 else \
967 true; \
968 fi
969
970.PHONY: $(CLEAN_TARGET_MODULES)
971$(CLEAN_TARGET_MODULES):
972 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
062aded9 973 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
7508666f
MM
974 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
975 r=`pwd`; export r; \
81eb5025 976 s=`cd $(srcdir); pwd`; export s; \
7508666f
MM
977 $(SET_LIB_PATH) \
978 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
979 else \
980 true; \
981 fi
982
983clean-target: $(CLEAN_TARGET_MODULES)
984
65088029
ILT
985# Check target.
986
987.PHONY: check
988check: $(CHECK_MODULES) \
989 $(CHECK_TARGET_MODULES) \
990 $(CHECK_X11_MODULES) \
991 check-gcc
992
79337c85 993# Installation targets.
4d714963 994
04103845 995.PHONY: install uninstall source-vault binary-vault vault-install
98a33b6d 996install: $(INSTALL_TARGET)
b26ff9d8 997
79337c85
ILT
998uninstall:
999 @echo "the uninstall target is not supported in this tree"
1000
04103845
DE
1001source-vault:
1002 $(MAKE) -f ./release/Build-A-Release \
1003 host=$(host_alias) source-vault
1004
1005binary-vault:
1006 $(MAKE) -f ./release/Build-A-Release \
1007 host=$(host_alias) target=$(target_alias)
1008
275049c0
JK
1009vault-install:
1010 @if [ -f ./release/vault-install ] ; then \
1011 ./release/vault-install $(host_alias) $(target_alias) ; \
96bfa612
KR
1012 else \
1013 true ; \
275049c0
JK
1014 fi
1015
79337c85 1016.PHONY: install.all
06a07944
RP
1017install.all: install-no-fixedincludes
1018 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 1019 r=`pwd` ; export r ; \
b6ae0f10 1020 $(SET_LIB_PATH) \
06a07944
RP
1021 (cd ./gcc; \
1022 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1023 else \
1024 true ; \
1025 fi
5a63b336 1026
424c7ca7 1027# inet-install is used because the I*Net wants DejaGNU installed but
f2b43566 1028# not built. Similarly, gzip is built but not installed.
424c7ca7 1029inet-install:
f2b43566 1030 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
424c7ca7 1031
96bfa612 1032# install-no-fixedincludes is used because Cygnus can not distribute
79337c85
ILT
1033# the fixed header files.
1034.PHONY: install-no-fixedincludes
1035install-no-fixedincludes: \
ff290baf 1036 installdirs \
79337c85
ILT
1037 $(INSTALL_MODULES) \
1038 $(INSTALL_TARGET_MODULES) \
96bfa612 1039 $(INSTALL_X11_MODULES) \
f35c6160 1040 gcc-no-fixedincludes
d1bea4c7 1041
5cc24596 1042# Install the gcc headers files, but not the fixed include files,
79337c85
ILT
1043# which Cygnus is not allowed to distribute. This rule is very
1044# dependent on the workings of the gcc Makefile.in.
1045.PHONY: gcc-no-fixedincludes
06a07944 1046gcc-no-fixedincludes:
5cc24596
PB
1047 @if [ -f ./gcc/Makefile ]; then \
1048 rm -rf gcc/tmp-include; \
1049 mv gcc/include gcc/tmp-include 2>/dev/null; \
1050 mkdir gcc/include; \
7f9cb3b2 1051 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
753d5049 1052 touch gcc/stmp-fixinc gcc/include/fixed; \
a54e05f6 1053 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
5cc73086 1054 r=`pwd`; export r; \
81eb5025 1055 s=`cd $(srcdir); pwd` ; export s; \
b6ae0f10 1056 $(SET_LIB_PATH) \
5cc24596
PB
1057 (cd ./gcc; \
1058 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1059 rm -rf gcc/include; \
1060 mv gcc/tmp-include gcc/include 2>/dev/null; \
1061 else true; fi
dcbfc14d 1062
79337c85
ILT
1063# This rule is used to build the modules which use FLAGS_TO_PASS. To
1064# build a target all-X means to cd to X and make all.
3de70f1d 1065#
055cca84 1066# all-gui, and all-libproc are handled specially because
4d802af9
MT
1067# they are still experimental, and if they fail to build, that
1068# shouldn't stop "make all".
04103845
DE
1069.PHONY: $(ALL_MODULES) all-gui all-libproc
1070$(ALL_MODULES) all-gui all-libproc:
79337c85 1071 @dir=`echo $@ | sed -e 's/all-//'`; \
472af17f
ILT
1072 if [ -f ./$${dir}/Makefile ] ; then \
1073 r=`pwd`; export r; \
81eb5025 1074 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1075 $(SET_LIB_PATH) \
472af17f 1076 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
07362bd9 1077 else \
79337c85 1078 true; \
07362bd9
DZ
1079 fi
1080
80cbf870
ILT
1081# These rules are used to check the modules which use FLAGS_TO_PASS.
1082# To build a target check-X means to cd to X and make check. Some
1083# modules are only tested in a native toolchain.
4f0b8f27 1084
d237841c
BC
1085.PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1086$(NATIVE_CHECK_MODULES):
39cc6dae
RS
1087 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1088 dir=`echo $@ | sed -e 's/check-//'`; \
472af17f
ILT
1089 if [ -f ./$${dir}/Makefile ] ; then \
1090 r=`pwd`; export r; \
81eb5025 1091 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1092 $(SET_LIB_PATH) \
472af17f
ILT
1093 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1094 else \
1095 true; \
4f0b8f27
TL
1096 fi; \
1097 fi
1098
1099$(CROSS_CHECK_MODULES):
6a42d184
DZ
1100 @dir=`echo $@ | sed -e 's/check-//'`; \
1101 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1102 r=`pwd`; export r; \
81eb5025 1103 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1104 $(SET_LIB_PATH) \
6a42d184
DZ
1105 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1106 else \
1107 true; \
1108 fi
1109
79337c85
ILT
1110# This rule is used to install the modules which use FLAGS_TO_PASS.
1111# To build a target install-X means to cd to X and make install.
1112.PHONY: $(INSTALL_MODULES)
ff290baf 1113$(INSTALL_MODULES): installdirs
79337c85
ILT
1114 @dir=`echo $@ | sed -e 's/install-//'`; \
1115 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1116 r=`pwd`; export r; \
81eb5025 1117 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1118 $(SET_LIB_PATH) \
f35c6160 1119 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
07362bd9 1120 else \
79337c85 1121 true; \
07362bd9
DZ
1122 fi
1123
ca2ce3b3
ILT
1124# This rule is used to configure the modules which are built with the
1125# target tools.
1126.PHONY: $(CONFIGURE_TARGET_MODULES)
1127$(CONFIGURE_TARGET_MODULES):
ab1cbc67 1128 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
354a86c7 1129 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
59d3634c 1130 r=`pwd`; export r; \
f2b43566
ILT
1131 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1132 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1133 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1134 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1135 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1136 else \
1137 echo "Multilibs changed for $${dir}, reconfiguring"; \
1138 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1139 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1140 fi; \
354a86c7 1141 else \
354a86c7
MM
1142 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1143 fi; \
062aded9 1144 fi; \
354a86c7
MM
1145 fi; exit 0 # break command into two pieces
1146 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
3e288e27
SG
1147 if [ ! -d $(TARGET_SUBDIR) ]; then \
1148 true; \
1149 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
ca2ce3b3
ILT
1150 true; \
1151 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
efd7b806 1152 if [ -d $(srcdir)/$${dir} ]; then \
ab1cbc67 1153 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
efd7b806 1154 r=`pwd`; export r; \
81eb5025 1155 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1156 $(SET_LIB_PATH) \
efd7b806
SC
1157 AR="$(AR_FOR_TARGET)"; export AR; \
1158 AS="$(AS_FOR_TARGET)"; export AS; \
1159 CC="$(CC_FOR_TARGET)"; export CC; \
1160 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1161 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1162 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
b6ae0f10 1163 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
054f9ada 1164 LD="$(LD_FOR_TARGET)"; export LD; \
276c2d7d 1165 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
efd7b806
SC
1166 NM="$(NM_FOR_TARGET)"; export NM; \
1167 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
d29cd970 1168 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
19b1d034 1169 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
ab1cbc67 1170 cd $(TARGET_SUBDIR)/$${dir}; \
283a2b3d
DE
1171 case $(srcdir) in \
1172 /*) \
1173 topdir=$(srcdir) ;; \
1174 *) \
1175 case "$(TARGET_SUBDIR)" in \
1176 .) topdir="../$(srcdir)" ;; \
1177 *) topdir="../../$(srcdir)" ;; \
1178 esac ;; \
1179 esac; \
1180 if [ "$(srcdir)" = "." ] ; then \
1181 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
81eb5025 1182 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
0f8f1d33
TT
1183 if [ -f Makefile ]; then \
1184 if $(MAKE) distclean; then \
1185 true; \
1186 else \
1187 exit 1; \
1188 fi; \
1189 else \
1190 true; \
1191 fi; \
283a2b3d
DE
1192 else \
1193 exit 1; \
1194 fi; \
1195 else \
1196 true; \
1197 fi; \
1198 srcdiroption="--srcdir=."; \
1199 libsrcdir="."; \
1200 else \
1201 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
81eb5025 1202 libsrcdir="$$s/$${dir}"; \
283a2b3d
DE
1203 fi; \
1204 if [ -f $${libsrcdir}/configure ] ; then \
1205 $(SHELL) $${libsrcdir}/configure \
1206 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1207 --with-target-subdir="$(TARGET_SUBDIR)"; \
19b1d034 1208 else \
81eb5025 1209 $(SHELL) $$s/configure \
283a2b3d
DE
1210 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1211 --with-target-subdir="$(TARGET_SUBDIR)"; \
19b1d034 1212 fi; \
efd7b806
SC
1213 else \
1214 true; \
9908eb6a 1215 fi; \
ca2ce3b3
ILT
1216 else \
1217 true; \
1218 fi
1219
6a42d184
DZ
1220# This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1221# To build a target all-X means to cd to X and make all.
79337c85
ILT
1222.PHONY: $(ALL_TARGET_MODULES)
1223$(ALL_TARGET_MODULES):
ab1cbc67
PB
1224 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1225 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
5cc73086 1226 r=`pwd`; export r; \
81eb5025 1227 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1228 $(SET_LIB_PATH) \
ab1cbc67 1229 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
07362bd9 1230 else \
79337c85 1231 true; \
07362bd9
DZ
1232 fi
1233
6a42d184
DZ
1234# This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1235# To build a target install-X means to cd to X and make install.
1236.PHONY: $(CHECK_TARGET_MODULES)
1237$(CHECK_TARGET_MODULES):
136ca05d 1238 @dir=`echo $@ | sed -e 's/check-target-//'`; \
ab1cbc67 1239 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
5cc73086 1240 r=`pwd`; export r; \
81eb5025 1241 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1242 $(SET_LIB_PATH) \
ab1cbc67 1243 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
6a42d184
DZ
1244 else \
1245 true; \
1246 fi
1247
79337c85
ILT
1248# This rule is used to install the modules which use
1249# TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1250# and make install.
1251.PHONY: $(INSTALL_TARGET_MODULES)
ff290baf 1252$(INSTALL_TARGET_MODULES): installdirs
ab1cbc67
PB
1253 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1254 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
5cc73086 1255 r=`pwd`; export r; \
81eb5025 1256 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1257 $(SET_LIB_PATH) \
ab1cbc67
PB
1258 (cd $(TARGET_SUBDIR)/$${dir}; \
1259 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
07362bd9 1260 else \
79337c85 1261 true; \
07362bd9
DZ
1262 fi
1263
6a42d184 1264# This rule is used to build the modules which use X11_FLAGS_TO_PASS.
79337c85
ILT
1265# To build a target all-X means to cd to X and make all.
1266.PHONY: $(ALL_X11_MODULES)
1267$(ALL_X11_MODULES):
1268 @dir=`echo $@ | sed -e 's/all-//'`; \
1269 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1270 r=`pwd`; export r; \
81eb5025 1271 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1272 $(SET_LIB_PATH) \
79337c85
ILT
1273 (cd $${dir}; \
1274 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
07362bd9 1275 else \
79337c85 1276 true; \
07362bd9
DZ
1277 fi
1278
6a42d184
DZ
1279# This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1280# To build a target check-X means to cd to X and make all.
1281.PHONY: $(CHECK_X11_MODULES)
1282$(CHECK_X11_MODULES):
1283 @dir=`echo $@ | sed -e 's/check-//'`; \
1284 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1285 r=`pwd`; export r; \
81eb5025 1286 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1287 $(SET_LIB_PATH) \
6a42d184
DZ
1288 (cd $${dir}; \
1289 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1290 else \
1291 true; \
1292 fi
1293
1294# This rule is used to install the modules which use X11_FLAGS_TO_PASS.
79337c85
ILT
1295# To build a target install-X means to cd to X and make install.
1296.PHONY: $(INSTALL_X11_MODULES)
1297$(INSTALL_X11_MODULES):
6a42d184 1298 @dir=`echo $@ | sed -e 's/install-//'`; \
79337c85 1299 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1300 r=`pwd`; export r; \
81eb5025 1301 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1302 $(SET_LIB_PATH) \
79337c85
ILT
1303 (cd $${dir}; \
1304 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
07362bd9 1305 else \
79337c85 1306 true; \
07362bd9
DZ
1307 fi
1308
79337c85
ILT
1309# gcc is the only module which uses GCC_FLAGS_TO_PASS.
1310.PHONY: all-gcc
1311all-gcc:
1312 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 1313 r=`pwd`; export r; \
81eb5025 1314 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1315 $(SET_LIB_PATH) \
79337c85 1316 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
07362bd9 1317 else \
79337c85 1318 true; \
07362bd9
DZ
1319 fi
1320
4c0b7ebc
DE
1321.PHONY: all-bootstrap
1322all-bootstrap:
1323 @if [ -f ./gcc/Makefile ] ; then \
1324 r=`pwd`; export r; \
81eb5025 1325 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1326 $(SET_LIB_PATH) \
4c0b7ebc
DE
1327 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \
1328 else \
1329 true; \
1330 fi
1331
65088029
ILT
1332.PHONY: check-gcc
1333check-gcc:
1334 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 1335 r=`pwd`; export r; \
81eb5025 1336 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1337 $(SET_LIB_PATH) \
65088029
ILT
1338 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1339 else \
1340 true; \
1341 fi
1342
79337c85
ILT
1343.PHONY: install-gcc
1344install-gcc:
1345 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 1346 r=`pwd`; export r; \
81eb5025 1347 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1348 $(SET_LIB_PATH) \
79337c85 1349 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
07362bd9 1350 else \
79337c85 1351 true; \
07362bd9
DZ
1352 fi
1353
753d5049
SC
1354
1355# EXPERIMENTAL STUFF
1356# This rule is used to install the modules which use FLAGS_TO_PASS.
1357# To build a target install-X means to cd to X and make install.
09985c96 1358.PHONY: install-dosrel
ff290baf 1359install-dosrel: installdirs info
753d5049
SC
1360 @dir=`echo $@ | sed -e 's/install-//'`; \
1361 if [ -f ./$${dir}/Makefile ] ; then \
1362 r=`pwd`; export r; \
81eb5025 1363 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1364 $(SET_LIB_PATH) \
753d5049
SC
1365 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1366 else \
1367 true; \
1368 fi
1369
09985c96 1370install-dosrel-fake:
a987271c 1371
753d5049 1372
79337c85 1373# This is a list of inter-dependencies among modules.
53c403df 1374all-apache:
65e21701 1375all-autoconf: all-m4
08168809 1376all-automake:
5db223e4 1377all-bash:
79337c85 1378all-bfd:
dfe44004 1379all-binutils: all-libiberty all-opcodes all-bfd all-flex all-byacc
79337c85 1380all-byacc:
79337c85 1381all-cvs:
2e482734 1382all-db:
4d802af9 1383all-dejagnu: all-tcl all-expect all-tk
79337c85
ILT
1384all-diff: all-libiberty
1385all-emacs:
1d5fcc66 1386all-emacs19: all-byacc
79337c85 1387all-etc:
4c0b7ebc
DE
1388configure-target-examples: $(ALL_GCC)
1389all-target-examples: configure-target-examples
c6ba9ae0 1390all-expect: all-tcl all-tk
275049c0 1391all-fileutils: all-libiberty
97840afa 1392all-findutils:
79337c85 1393all-find:
7dcc0664 1394all-flex: all-libiberty all-byacc
79337c85 1395all-gas: all-libiberty all-opcodes all-bfd
65e21701 1396all-gash: all-tcl
79337c85 1397all-gawk:
fc3524a9 1398ALL_GCC = all-gcc
3718029f 1399all-gcc: all-byacc all-binutils all-gas all-ld
4c0b7ebc 1400all-bootstrap: all-libiberty all-byacc all-binutils all-gas all-ld
192fcb4e 1401GDB_TK = all-tk all-tcl all-itcl all-tix
01082eaf 1402all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
ba26181f 1403all-gnuserv:
10be59aa
BK
1404configure-target-gperf: $(ALL_GCC)
1405all-target-gperf: configure-target-gperf all-target-libiberty all-target-libg++
b6ae0f10 1406all-gprof: all-libiberty all-bfd all-opcodes
6214eb23 1407all-grep: all-libiberty
b6ae0f10 1408all-grez: all-libiberty all-bfd all-opcodes
ab1cbc67 1409all-gui: all-gdb all-libproc all-target-librx
0f8f1d33 1410all-guile:
79337c85
ILT
1411all-gzip: all-libiberty
1412all-hello: all-libiberty
3718029f
ILT
1413# start-sanitize-ide
1414all-ilu:
1415# end-sanitize-ide
79337c85 1416all-indent:
8d1d94b6 1417all-inet: all-tcl all-send-pr all-perl
3585593d 1418all-ispell: all-emacs19
754a6784 1419all-itcl: all-tcl all-tk
b6ae0f10 1420all-ld: all-libiberty all-bfd all-opcodes all-byacc all-flex
283a2b3d 1421configure-target-libg++: $(ALL_GCC) configure-target-librx
ab1cbc67
PB
1422all-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++
1423configure-target-libgloss: $(ALL_GCC)
283a2b3d 1424all-target-libgloss: configure-target-libgloss configure-target-newlib
ab1cbc67
PB
1425configure-target-libio: $(ALL_GCC)
1426all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
79337c85 1427all-libiberty:
eebe454c 1428# start-sanitize-ide
8d74b2fa 1429all-libide: all-tcl all-tk all-itcl all-ilu
eebe454c 1430# end-sanitize-ide
ab1cbc67
PB
1431configure-target-librx: $(ALL_GCC) configure-target-newlib
1432all-target-librx: configure-target-librx
1433configure-target-libstdc++: $(ALL_GCC)
1434all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
79337c85
ILT
1435all-m4: all-libiberty
1436all-make: all-libiberty
1437all-mmalloc:
ab1cbc67
PB
1438configure-target-newlib: $(ALL_GCC)
1439all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
b6ae0f10 1440all-opcodes: all-bfd all-libiberty
be2c65d3 1441all-patch: all-libiberty
0f8f1d33 1442all-perl:
b255ccdb 1443all-prms: all-libiberty
79337c85
ILT
1444all-rcs:
1445all-readline:
1446all-recode: all-libiberty
ac259c28
JM
1447all-sed: all-libiberty
1448all-send-pr: all-prms
79337c85 1449all-shellutils:
b6ae0f10 1450all-sim: all-libiberty all-bfd all-opcodes
0195767e 1451all-sn: all-tcl all-tk all-itcl all-db all-grep
07362bd9 1452all-tar: all-libiberty
79337c85
ILT
1453all-tcl:
1454all-tclX: all-tcl all-tk
1455all-tk: all-tcl
1456all-texinfo: all-libiberty
1457all-textutils:
b6ae0f10 1458all-tgas: all-libiberty all-bfd all-opcodes
79337c85 1459all-time:
c446cc8b 1460all-tix: all-tcl all-tk
eebe454c
TT
1461# start-sanitize-ide
1462all-vmake: all-tcl all-tk all-itcl all-libide
1463# end-sanitize-ide
79337c85 1464all-wdiff:
97840afa 1465all-target-winsup: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup
ab1cbc67 1466configure-target-winsup: configure-target-newlib
79337c85 1467all-uudecode: all-libiberty
ab1cbc67
PB
1468configure-target-libiberty: $(ALL_GCC)
1469all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
0f8f1d33
TT
1470all-target: $(ALL_TARGET_MODULES)
1471install-target: $(INSTALL_TARGET_MODULES)
07362bd9 1472
79337c85 1473### other supporting targets
07362bd9 1474
79337c85
ILT
1475MAKEDIRS= \
1476 $(prefix) \
9deb9485 1477 $(exec_prefix)
ff290baf
ILT
1478.PHONY: installdirs
1479installdirs: mkinstalldirs
fab3dd2d 1480 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
23e3e7f9 1481
79337c85
ILT
1482dir.info: do-install-info
1483 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1484 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1485 mv -f dir.info.new dir.info ; \
1486 else true ; \
72c09fbc 1487 fi
6b7e5998 1488
b1cceba2
DZ
1489dist:
1490 @echo "Building a full distribution of this tree isn't done"
1491 @echo "via 'make dist'. Check out the etc/ subdirectory"
1492
eb02fd64
RP
1493etags tags: TAGS
1494
753d5049
SC
1495# Right now this just builds TAGS in each subdirectory. emacs19 has the
1496# ability to use several tags files at once, so there is probably no need
1497# to combine them into one big TAGS file (like CVS 1.3 does). We could
1498# (if we felt like it) have this Makefile write a piece of elisp which
1499# the user could load to tell emacs19 where all the TAGS files we just
1500# built are.
1501TAGS: do-TAGS
eb02fd64 1502
eb02fd64
RP
1503# with the gnu make, this is done automatically.
1504
01ec9588 1505Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 1506 $(SHELL) ./config.status
eb02fd64 1507
11954bf1 1508#
01ec9588 1509# Support for building net releases
11954bf1 1510
01ec9588
JK
1511# Files in devo used in any net release.
1512# ChangeLog omitted because it may refer to files which are not in this
1513# distribution (perhaps it would be better to include it anyway).
d94d255d 1514DEVO_SUPPORT= README Makefile.in configure configure.in \
9823504d 1515 config.guess config.sub config move-if-change \
5f69e8bc 1516 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
08499fc2
ILT
1517 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1518 mkinstalldirs
01ec9588
JK
1519
1520# Files in devo/etc used in any net release.
1521# ChangeLog omitted because it may refer to files which are not in this
1522# distribution (perhaps it would be better to include it anyway).
f046ec67
JM
1523ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1524 make-stds.texi standards.info*
01ec9588 1525
40e16078
KR
1526# When you use `make setup-dirs' or `make taz' you should always redefine
1527# this macro.
1528SUPPORT_FILES = list-of-support-files-for-tool-in-question
40e16078 1529
a54e05f6
KR
1530.PHONY: taz
1531
484fa12d
JW
1532taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1533 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
484fa12d
JW
1534 # Take out texinfo from a few places; make simple BISON=bison line.
1535 sed -e '/^all\.normal: /s/\all-texinfo //' \
1536 -e '/^ install-texinfo /d' \
64434418 1537 -e '/^BISON = `if/,/^$$/d' \
000befdf 1538 -e '/^# BISON:/s/.*/BISON = $(DEFAULT_YACC)/' \
484fa12d
JW
1539 <Makefile.in >tmp
1540 mv -f tmp Makefile.in
65e21701 1541 #
1d5fcc66
PB
1542 $(start-sanitize-Sanitize)
1543 @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
1544 $(end-sanitize-Sanitize)
40e16078 1545 ./configure sun4
ab1cbc67
PB
1546 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1547 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
aaefc574 1548 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
6b9e3a78 1549 # Make links, and run "make diststuff" or "make info" when needed.
a54e05f6 1550 rm -rf proto-toplev ; mkdir proto-toplev
7f9cb3b2 1551 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
a54e05f6
KR
1552 for d in $$dirs ; do \
1553 if [ -d $$d ]; then \
ab1cbc67
PB
1554 if [ ! -f $$d/Makefile ] ; then true ; \
1555 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1556 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
6b9e3a78 1557 elif grep '^info:' $$d/Makefile >/dev/null ; then \
ab1cbc67 1558 (cd $$d ; $(MAKE) info ) || exit 1 ; \
6b9e3a78 1559 fi ; \
7f9cb3b2
KR
1560 if [ -d $$d/proto-$$d.dir ]; then \
1561 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1562 else \
1563 ln -s ../$$d proto-toplev/$$d ; \
1564 fi ; \
a54e05f6 1565 else ln -s ../$$d proto-toplev/$$d ; fi ; \
40e16078 1566 done
3dbe0fa2 1567 cd etc ; $(MAKE) info
5600fbd2 1568 $(MAKE) distclean
a54e05f6 1569 #
40e16078 1570 mkdir proto-toplev/etc
15408b3b
KR
1571 (cd proto-toplev/etc; \
1572 for i in $(ETC_SUPPORT); do \
40e16078 1573 ln -s ../../etc/$$i . ; \
15408b3b 1574 done)
a54e05f6 1575 #
04103845 1576 # Take out texinfo from configurable dirs
40e16078
KR
1577 rm proto-toplev/configure.in
1578 sed -e '/^host_tools=/s/texinfo //' \
40e16078 1579 <configure.in >proto-toplev/configure.in
a54e05f6 1580 #
40e16078 1581 mkdir proto-toplev/texinfo
8d190aa3
KR
1582 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1583 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
1584 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
1585 if test -r texinfo/util/tex3patch ; then \
1586 mkdir proto-toplev/texinfo/util && \
1587 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1588 else true; fi
a561909f 1589 chmod og=u `find . -print`
b5dbae28
KR
1590 $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) \
1591 VER=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`
1592
1593do-tar-gz:
1594 echo "==> Making $(TOOL)-$(VER).tar.gz"
1595 -rm -f $(TOOL)-$(VER)
1596 ln -s proto-toplev $(TOOL)-$(VER)
1597 tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
1598 $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar
40e16078 1599
484fa12d 1600TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
7f9cb3b2 1601DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
40e16078 1602
96bfa612 1603.PHONY: gas.tar.gz
2e482734 1604GAS_SUPPORT_DIRS= bfd include libiberty opcodes setup.com makefile.vms
96bfa612 1605gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
484fa12d
JW
1606 $(MAKE) -f Makefile.in taz TOOL=gas \
1607 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
40e16078 1608
7f9cb3b2 1609# The FSF "binutils" release includes gprof and ld.
96bfa612 1610.PHONY: binutils.tar.gz
2e482734 1611BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof setup.com makefile.vms
96bfa612 1612binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
484fa12d 1613 $(MAKE) -f Makefile.in taz TOOL=binutils \
2492f942 1614 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
7f9cb3b2 1615
96bfa612 1616.PHONY: gas+binutils.tar.gz
a54e05f6 1617GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
96bfa612 1618gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
484fa12d 1619 $(MAKE) -f Makefile.in taz TOOL=gas \
2492f942 1620 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
79337c85 1621
5600fbd2 1622.PHONY: libg++.tar.gz
ab1cbc67 1623LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
5600fbd2 1624libg++.tar.gz: $(DIST_SUPPORT) libg++
484fa12d
JW
1625 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1626 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
5600fbd2 1627
49dfa984
JM
1628GNATS_SUPPORT_DIRS=include libiberty send-pr
1629gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
a0bd8e18 1630 $(MAKE) -f Makefile.in taz TOOL=gnats \
49dfa984
JM
1631 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1632
1d5fcc66 1633.PHONY: gdb.tar.gz
81597186 1634GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
ca2ce3b3 1635GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1d5fcc66
PB
1636gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1637 $(MAKE) -f Makefile.in taz TOOL=gdb \
ca2ce3b3 1638 SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1d5fcc66 1639
7166a308 1640.PHONY: newlib.tar.gz
a220ba0f 1641NEWLIB_SUPPORT_DIRS=libgloss
04103845 1642# taz configures for the sun4 target which won't configure newlib.
a220ba0f
SC
1643# We need newlib configured so that the .info files are made.
1644# Unfortunately, it is not enough to just configure newlib separately:
1645# taz will build the .info files but since SUBDIRS won't contain newlib,
1646# distclean won't be run (leaving Makefile, config.status, and the tmp files
1647# used in building the .info files, eg: *.def, *.ref).
4c0b7ebc
DE
1648# The problem isn't solvable however without a lot of extra work because
1649# target libraries are built in subdir $(target_alias) which gets nuked during
1650# the make distclean. For now punt on the issue of shipping newlib info files
1651# with newlib net releases and wait for a day when some native target (sun4?)
1652# supports newlib (if only minimally).
7166a308
KR
1653newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1654 $(MAKE) -f Makefile.in taz TOOL=newlib \
1655 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
6b9e3a78 1656 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
7166a308 1657
79337c85 1658.NOEXPORT:
05992891 1659MAKEOVERRIDES=
79337c85
ILT
1660
1661# start-sanitize-chill
1662## This is ugly, but I don't want GNU make to put these variables in
1663## the environment. Older makes will see this as a set of targets
1664## with no dependencies and no actions.
1665unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1666# end-sanitize-chill
1667
eb02fd64 1668# end of Makefile.in
This page took 0.360322 seconds and 4 git commands to generate.