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