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