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