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