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