* configure.host: Recognize aix4 explicitly.
[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
81597186 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
4d714963 31datadir = $(prefix)/lib
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
RP
43includedir = $(prefix)/include
44docdir = $(datadir)/doc
04103845 45GDB_NLM_DEPS =
4d714963
RP
46
47SHELL = /bin/sh
48
f35c6160 49INSTALL = $${srcroot}/install.sh -c
4d714963 50INSTALL_PROGRAM = $(INSTALL)
5cc73086 51INSTALL_DATA = $(INSTALL) -m 644
fe560b9f 52INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
3c8735af 53
09985c96 54INSTALL_DOSREL = install-dosrel-fake
a987271c 55
440868a0 56AS = as
ec342d7d 57AR = ar
b5329d84 58AR_FLAGS = rc
e85e07cb 59CC = cc
7b636683 60
66957ce4
ILT
61# Special variables passed down in EXTRA_GCC_FLAGS. They are defined
62# here so that they can be overridden by Makefile fragments.
753d5049
SC
63HOST_CC = $(CC_FOR_BUILD)
64HOST_PREFIX =
65HOST_PREFIX_1 = loser-
66
7b636683
JK
67# We don't specify -g -O because many compilers don't support -g -O,
68# and/or -O is broken in and of itself.
f8a6ad66 69CFLAGS = -g
3585593d
BK
70LIBCFLAGS = $(CFLAGS)
71CFLAGS_FOR_TARGET = $(CFLAGS)
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
51489233 89NM = nm
5cc73086
KR
90# Not plain GZIP, since gzip looks there for extra command-line options.
91GZIPPROG = gzip
eb02fd64 92
40e16078 93# BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
5cc73086
KR
94BISON = `if [ -f $$r/byacc/byacc ] ; \
95 then echo $$r/byacc/byacc ; \
378fd382 96 else echo byacc ; \
06a07944 97 fi`
2645fb0c 98
5cc73086
KR
99LEX = `if [ -f $$r/flex/flex ] ; \
100 then echo $$r/flex/flex ; \
2198e4ba
MT
101 else echo flex ; fi`
102
5cc73086
KR
103M4 = `if [ -f $$r/m4/m4 ] ; \
104 then echo $$r/m4/m4 ; \
65e21701
KR
105 else echo m4 ; fi`
106
5cc73086
KR
107MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
108 then echo $$r/texinfo/makeinfo/makeinfo ; \
77806c3e 109 else echo makeinfo ; fi`
484fa12d 110
9823504d
ILT
111# This just becomes part of the MAKEINFO definition passed down to
112# sub-makes. It lets flags be given on the command line while still
113# using the makeinfo from the object tree.
114MAKEINFOFLAGS =
b772d75e 115
5cc73086
KR
116EXPECT = `if [ -f $$r/expect/expect ] ; \
117 then echo $$r/expect/expect ; \
a54e05f6
KR
118 else echo expect ; fi`
119
120RUNTEST = `if [ -f $${srcroot}/dejagnu/runtest ] ; \
121 then echo $${srcroot}/dejagnu/runtest ; \
6a42d184
DZ
122 else echo runtest ; fi`
123
f980fcfb
JG
124
125# libraries that may need to be augmented on a system-by-system basis
126X11_LIB = -lX11
127
e85e07cb 128# compilers to use to create programs which must be run in the build
440868a0
ILT
129# environment.
130CC_FOR_BUILD = $(CC)
e85e07cb 131CXX_FOR_BUILD = $(CXX)
440868a0 132
9f73dd6a 133SUBDIRS = "this is set via configure, don't edit this"
6a3958b2
RP
134OTHERS =
135
a0f47eb7 136ALL = all.normal
f35c6160
DZ
137INSTALL_TARGET = install-dirs \
138 $(INSTALL_MODULES) \
139 $(INSTALL_TARGET_MODULES) \
140 $(INSTALL_X11_MODULES) \
753d5049 141 install-gcc \
09985c96 142 $(INSTALL_DOSREL)
753d5049 143
fb660409 144
51489233 145CC_FOR_TARGET = ` \
5cc73086 146 if [ -f $$r/gcc/Makefile ] ; then \
753d5049
SC
147 if [ -f $$r/newlib/Makefile ] ; then \
148 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
149 else \
150 echo $$r/gcc/xgcc -B$$r/gcc/; \
151 fi; \
51489233 152 else \
378fd382 153 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
154 echo $(CC); \
155 else \
ea6d5817 156 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
51489233
ILT
157 fi; \
158 fi`
159
a4e879a1 160# start-sanitize-chill
7d9f0c54 161CHILL_FOR_TARGET = ` \
5cc73086 162 if [ -f $$r/gcc/Makefile ] ; then \
04103845 163 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
7d9f0c54
MW
164 else \
165 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
166 echo $(CC); \
167 else \
ea6d5817 168 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
7d9f0c54
MW
169 fi; \
170 fi`
34b3298b 171
a4e879a1 172# end-sanitize-chill
7d9f0c54 173
d1bea4c7 174CXX_FOR_TARGET = ` \
5cc73086 175 if [ -f $$r/gcc/Makefile ] ; then \
753d5049
SC
176 if [ -f $$r/newlib/Makefile ] ; then \
177 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
178 else \
179 echo $$r/gcc/xgcc -B$$r/gcc/; \
180 fi; \
fca4f908 181 else \
e85e07cb
ILT
182 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
183 echo $(CXX); \
fca4f908 184 else \
ea6d5817 185 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
fca4f908
MW
186 fi; \
187 fi`
188
440868a0 189AS_FOR_TARGET = ` \
ea6d5817 190 if [ -f $$r/gas/as.new ] ; then \
5cc73086 191 echo $$r/gas/as.new ; \
440868a0 192 else \
e85e07cb 193 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
440868a0
ILT
194 echo $(AS); \
195 else \
ea6d5817 196 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
81246025 197 fi; \
440868a0
ILT
198 fi`
199
a220ba0f
SC
200DLLTOOL_FOR_TARGET = ` \
201 if [ -f $$r/binutils/dlltool ] ; then \
202 echo $$r/binutils/dlltool ; \
203 else \
204 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
205 echo $(DLLTOOL); \
206 else \
207 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
208 fi; \
209 fi`
210
51489233 211AR_FOR_TARGET = ` \
5cc73086
KR
212 if [ -f $$r/binutils/ar ] ; then \
213 echo $$r/binutils/ar ; \
51489233 214 else \
378fd382 215 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
216 echo $(AR); \
217 else \
ea6d5817 218 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
81246025 219 fi; \
51489233
ILT
220 fi`
221
222RANLIB_FOR_TARGET = ` \
5cc73086
KR
223 if [ -f $$r/binutils/ranlib ] ; then \
224 echo $$r/binutils/ranlib ; \
51489233 225 else \
378fd382 226 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
227 echo $(RANLIB); \
228 else \
ea6d5817 229 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
81246025 230 fi; \
51489233
ILT
231 fi`
232
233NM_FOR_TARGET = ` \
ea6d5817 234 if [ -f $$r/binutils/nm.new ] ; then \
753d5049 235 echo $$r/binutils/nm.new ; \
51489233 236 else \
378fd382 237 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
238 echo $(NM); \
239 else \
ea6d5817 240 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
81246025 241 fi; \
51489233
ILT
242 fi`
243
eb02fd64 244#### host and target specific makefile fragments come in here.
ec342d7d 245###
eb02fd64 246
0ef4728f
ILT
247# Flags to pass down to all sub-makes.
248# Please keep these in alphabetical order.
249BASE_FLAGS_TO_PASS = \
2198e4ba 250 "AR_FLAGS=$(AR_FLAGS)" \
d09de70e 251 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
0ef4728f 252 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
378fd382 253 "BISON=$(BISON)" \
378fd382 254 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
0ef4728f 255 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
2198e4ba 256 "CFLAGS=$(CFLAGS)" \
3585593d 257 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
a4e879a1 258 $(start-sanitize-chill)\
7d9f0c54
MW
259 "CHILLFLAGS=$(CHILLFLAGS)" \
260 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
261 "CHILL_LIB=$(CHILL_LIB)" \
a4e879a1 262 $(end-sanitize-chill)\
0ef4728f
ILT
263 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
264 "CXXFLAGS=$(CXXFLAGS)" \
3585593d 265 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
0ef4728f 266 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
a220ba0f 267 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
a9a2f22f 268 "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
2198e4ba
MT
269 "INSTALL=$(INSTALL)" \
270 "INSTALL_DATA=$(INSTALL_DATA)" \
440868a0 271 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
f35c6160 272 "INSTALL_XFORM=$(INSTALL_XFORM)" \
378fd382
DZ
273 "LDFLAGS=$(LDFLAGS)" \
274 "LEX=$(LEX)" \
3585593d
BK
275 "LIBCFLAGS=$(LIBCFLAGS)" \
276 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
04103845
DE
277 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
278 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
65e21701 279 "M4=$(M4)" \
9823504d 280 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
0ef4728f 281 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
04103845
DE
282 "PICFLAG=$(PICFLAG)" \
283 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
d09de70e 284 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
49dfa984 285 "SHELL=$(SHELL)" \
a54e05f6 286 "EXPECT=$(EXPECT)" \
6a42d184 287 "RUNTEST=$(RUNTEST)" \
86365152 288 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
5cc73086 289 "YACC=$(BISON)" \
378fd382
DZ
290 "exec_prefix=$(exec_prefix)" \
291 "prefix=$(prefix)" \
292 "tooldir=$(tooldir)"
2198e4ba 293
0ef4728f
ILT
294# Flags to pass down to most sub-makes, in which we're building with
295# the host environment.
6d681784 296# If any variables are added here, they must be added to do-*, below.
0ef4728f 297EXTRA_HOST_FLAGS = \
6d681784
JG
298 'AR=$(AR)' \
299 'AS=$(AS)' \
300 'CC=$(CC)' \
301 'CXX=$(CXX)' \
302 'NM=$(NM)' \
753d5049 303 'RANLIB=$(RANLIB)'
0ef4728f
ILT
304
305FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
306
d1bea4c7
DZ
307# Flags that are concerned with the location of the X11 include files
308# and library files
309X11_FLAGS_TO_PASS = \
310 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
f980fcfb
JG
311 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
312 "X11_LIB=$(X11_LIB)"
d1bea4c7 313
0ef4728f
ILT
314# Flags to pass down to makes which are built with the target environment.
315# The double $ decreases the length of the command line; the variables
316# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
6d681784 317# If any variables are added here, they must be added to do-*, below.
0ef4728f
ILT
318EXTRA_TARGET_FLAGS = \
319 'AR=$$(AR_FOR_TARGET)' \
320 'AS=$$(AS_FOR_TARGET)' \
321 'CC=$$(CC_FOR_TARGET)' \
3585593d 322 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
0ef4728f 323 'CXX=$$(CXX_FOR_TARGET)' \
3585593d 324 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
a220ba0f 325 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
3585593d
BK
326 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
327 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
0ef4728f 328 'NM=$$(NM_FOR_TARGET)' \
04103845 329 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
753d5049 330 'RANLIB=$$(RANLIB_FOR_TARGET)'
0ef4728f
ILT
331
332TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
51489233 333
f4e414f1
ILT
334# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
335# unfortunately needs the native compiler and the target ar and
0ef4728f 336# ranlib.
66957ce4
ILT
337# If any variables are added here, they must be added to do-*, below.
338# The HOST_* variables are a special case, which are used for the gcc
339# cross-building scheme.
0ef4728f
ILT
340EXTRA_GCC_FLAGS = \
341 'AR=$$(AR_FOR_TARGET)' \
6d681784
JG
342 'AS=$(AS)' \
343 'CC=$(CC)' \
344 'CXX=$(CXX)' \
a54e05f6
KR
345 'HOST_CC=$(CC_FOR_BUILD)' \
346 'HOST_PREFIX=$(HOST_PREFIX)' \
347 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
6d681784 348 'NM=$(NM)' \
753d5049 349 'RANLIB=$$(RANLIB_FOR_TARGET)'
0ef4728f 350
34b3298b 351GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
f4e414f1 352
6a42d184 353# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
354# using $(FLAGS_TO_PASS).
355ALL_MODULES = \
356 all-autoconf \
357 all-bfd \
358 all-binutils \
359 all-byacc \
360 all-cvs \
361 all-dejagnu \
362 all-diff \
ac259c28 363 all-dosutils \
79337c85
ILT
364 all-etc \
365 all-fileutils \
366 all-find \
367 all-flex \
368 all-gas \
369 all-gawk \
79337c85
ILT
370 all-gprof \
371 all-grep \
372 all-gzip \
373 all-hello \
374 all-indent \
375 all-ispell \
376 all-ld \
377 all-libiberty \
378 all-m4 \
379 all-make \
380 all-mmalloc \
381 all-opcodes \
382 all-patch \
383 all-prms \
384 all-rcs \
385 all-readline \
275049c0 386 all-release \
79337c85
ILT
387 all-recode \
388 all-sed \
389 all-send-pr \
390 all-shellutils \
391 all-sim \
392 all-tar \
393 all-tcl \
394 all-texinfo \
395 all-textutils \
396 all-tgas \
397 all-time \
398 all-uudecode \
753d5049
SC
399 all-wdiff
400
6a42d184
DZ
401# This is a list of the check targets for all of the modules which are
402# compiled using $(FLAGS_TO_PASS).
4f0b8f27
TL
403# This is a list of the check targets for all of the modules which are
404# compiled using $(FLAGS_TO_PASS).
405#
d237841c
BC
406# The list is in two parts. The first lists those tools which
407# are tested as part of the host's native tool-chain, and not
408# tested in a cross configuration.
409NATIVE_CHECK_MODULES = \
410 check-byacc \
4f0b8f27
TL
411 check-flex
412
d237841c 413CROSS_CHECK_MODULES = \
6a42d184
DZ
414 check-autoconf \
415 check-bfd \
416 check-binutils \
6a42d184
DZ
417 check-cvs \
418 check-dejagnu \
419 check-diff \
420 check-etc \
421 check-fileutils \
422 check-find \
6a42d184
DZ
423 check-gas \
424 check-gawk \
6a42d184
DZ
425 check-gprof \
426 check-grep \
427 check-gzip \
428 check-hello \
429 check-indent \
430 check-ispell \
431 check-ld \
432 check-libiberty \
433 check-m4 \
434 check-make \
435 check-mmcheckoc \
436 check-opcodes \
437 check-patch \
438 check-prms \
439 check-rcs \
440 check-readline \
441 check-recode \
442 check-sed \
443 check-send-pr \
444 check-shellutils \
445 check-sim \
446 check-tar \
447 check-tcl \
448 check-texinfo \
449 check-textutils \
450 check-tgas \
451 check-time \
452 check-uudecode \
453 check-wdiff
d237841c
BC
454
455CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
6a42d184
DZ
456
457# This is a list of the install targets for all of the modules which are
79337c85
ILT
458# compiled using $(FLAGS_TO_PASS).
459INSTALL_MODULES = \
460 install-autoconf \
461 install-bfd \
462 install-binutils \
463 install-byacc \
464 install-cvs \
465 install-dejagnu \
466 install-diff \
753d5049 467 install-dosutils \
79337c85
ILT
468 install-etc \
469 install-fileutils \
470 install-find \
471 install-flex \
472 install-gas \
473 install-gawk \
79337c85
ILT
474 install-gprof \
475 install-grep \
476 install-gzip \
477 install-hello \
478 install-indent \
479 install-ispell \
480 install-ld \
481 install-libiberty \
482 install-m4 \
483 install-make \
484 install-mmalloc \
485 install-opcodes \
486 install-patch \
487 install-prms \
488 install-rcs \
489 install-readline \
490 install-recode \
491 install-sed \
492 install-send-pr \
493 install-shellutils \
494 install-sim \
495 install-tar \
496 install-tcl \
497 install-texinfo \
498 install-textutils \
499 install-tgas \
500 install-time \
501 install-uudecode \
502 install-wdiff
503
6a42d184 504# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
505# using $(X11_FLAGS_TO_PASS).
506ALL_X11_MODULES = \
507 all-emacs \
4d802af9 508 all-emacs19 \
04103845 509 all-gdb \
79337c85 510 all-expect \
65e21701 511 all-gash \
79337c85
ILT
512 all-tclX \
513 all-tk
514
6a42d184
DZ
515# This is a list of the check targets for all of the modules which are
516# compiled using $(X11_FLAGS_TO_PASS).
517CHECK_X11_MODULES = \
518 check-emacs \
04103845 519 check-gdb \
6a42d184 520 check-expect \
65e21701 521 check-gash \
6a42d184
DZ
522 check-tclX \
523 check-tk
524
79337c85
ILT
525# This is a list of the install targets for all the modules which are
526# compiled using $(X11_FLAGS_TO_PASS).
527INSTALL_X11_MODULES = \
528 install-emacs \
4d802af9 529 install-emacs19 \
04103845 530 install-gdb \
79337c85 531 install-expect \
65e21701 532 install-gash \
79337c85
ILT
533 install-tclX \
534 install-tk
fca4f908 535
6a42d184 536# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
537# using $(TARGET_FLAGS_TO_PASS).
538ALL_TARGET_MODULES = \
539 $(start-sanitize-chill) \
540 all-chillrt \
541 $(end-sanitize-chill) \
6214eb23 542 all-libio \
4be4b991 543 all-libstdc++ \
1d5fcc66 544 all-librx \
79337c85
ILT
545 all-libg++ \
546 all-newlib \
15408b3b 547 all-libgloss \
79337c85
ILT
548 all-xiberty
549
6a42d184
DZ
550# This is a list of the check targets for all of the modules which are
551# compiled using $(TARGET_FLAGS_TO_PASS).
552CHECK_TARGET_MODULES = \
553 $(start-sanitize-chill) \
554 check-chillrt \
555 $(end-sanitize-chill) \
6214eb23 556 check-libio \
4be4b991 557 check-libstdc++ \
6a42d184
DZ
558 check-libg++ \
559 check-newlib \
560 check-xiberty
561
562# This is a list of the install targets for all of the modules which are
79337c85
ILT
563# compiled using $(TARGET_FLAGS_TO_PASS).
564INSTALL_TARGET_MODULES = \
565 $(start-sanitize-chill) \
566 install-chillrt \
567 $(end-sanitize-chill) \
6214eb23 568 install-libio \
4be4b991 569 install-libstdc++ \
79337c85
ILT
570 install-libg++ \
571 install-newlib \
15408b3b 572 install-libgloss \
79337c85 573 install-xiberty
4d714963 574
79337c85
ILT
575# This is a shell case of all modules which are compiled using
576# $(TARGET_FLAGS_TO_PASS), used in the do-X rule.
4be4b991 577TARGET_LIBS = libio | libstdc++ | librx | libg++ | newlib | xiberty
a4e879a1 578# start-sanitize-chill
4be4b991 579TARGET_LIBS = chillrt | libio | libstdc++ | librx | libg++ | newlib | xiberty
a4e879a1 580# end-sanitize-chill
7481617f 581
79337c85 582# The first rule in the file had better be this one. Don't put any above it.
a59b94d2 583all: all.normal
79337c85
ILT
584.PHONY: all
585
586# The target built for a native build.
587.PHONY: all.normal
588all.normal: \
589 $(ALL_MODULES) \
590 $(ALL_TARGET_MODULES) \
46d0ca81 591 $(ALL_X11_MODULES) \
79337c85
ILT
592 all-gcc
593
0ef4728f 594# Do a target for all the subdirectories. A ``make do-X'' will do a
53222cbd
RP
595# ``make X'' in all subdirectories (because, in general, there is a
596# dependency (below) of X upon do-X, a ``make X'' will also do this,
597# but it may do additional work as well).
0ef4728f
ILT
598# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
599# because it is so large that it can easily overflow the command line
600# length limit on some systems.
79337c85 601DO_X = \
79337c85
ILT
602 do-clean \
603 do-distclean \
604 do-dvi \
605 do-info \
606 do-install-info \
607 do-installcheck \
608 do-mostlyclean \
753d5049
SC
609 do-realclean \
610 do-TAGS
79337c85
ILT
611.PHONY: $(DO_X)
612$(DO_X):
0ef4728f 613 @target=`echo $@ | sed -e 's/^do-//'`; \
5cc73086 614 r=`pwd`; export r; \
0ef4728f
ILT
615 srcroot=`cd $(srcdir); pwd`; export srcroot; \
616 for i in $(SUBDIRS); do \
36286a3e 617 if [ -f ./$$i/Makefile ]; then \
0ef4728f
ILT
618 case $$i in \
619 $(TARGET_LIBS) ) \
6d681784
JG
620 for flag in $(EXTRA_TARGET_FLAGS); do \
621 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
622 done; \
0ef4728f
ILT
623 ;; \
624 gcc) \
6d681784
JG
625 for flag in $(EXTRA_GCC_FLAGS); do \
626 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
627 done; \
0ef4728f
ILT
628 ;; \
629 *) \
6d681784
JG
630 for flag in $(EXTRA_HOST_FLAGS); do \
631 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
632 done; \
0ef4728f
ILT
633 ;; \
634 esac ; \
753d5049 635 export AR AS CC CXX NM RANLIB; \
0ef4728f 636 if (cd ./$$i; \
6d681784
JG
637 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
638 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
753d5049 639 "RANLIB=$${RANLIB}" \
6d681784 640 $${target}); \
0ef4728f
ILT
641 then true; else exit 1; fi; \
642 else true; fi; \
643 done
fb90daeb 644
79337c85
ILT
645# Here are the targets which correspond to the do-X targets.
646
65088029 647.PHONY: info installcheck dvi install-info
79337c85 648.PHONY: clean distclean mostlyclean realclean local-clean local-distclean
0ef4728f 649info: do-info
1a14993c 650installcheck: do-installcheck
0ef4728f 651dvi: do-dvi
9a9e8e7f 652
f35c6160
DZ
653install-info: do-install-info dir.info
654 srcroot=`cd $(srcdir); pwd`; export srcroot; \
72c09fbc
SC
655 if [ -f dir.info ] ; then \
656 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
50fbe976 657 else true ; fi
4d714963 658
0ef4728f 659local-clean:
7fed4078 660 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
3b30df82 661
0ef4728f 662local-distclean:
7fed4078 663 -rm -f Makefile config.status
7fcfdcf7 664
0ef4728f
ILT
665clean: do-clean local-clean
666mostlyclean: do-mostlyclean local-clean
667distclean: do-distclean local-clean local-distclean
668realclean: do-realclean local-clean local-distclean
669
65088029
ILT
670# Check target.
671
672.PHONY: check
673check: $(CHECK_MODULES) \
674 $(CHECK_TARGET_MODULES) \
675 $(CHECK_X11_MODULES) \
676 check-gcc
677
79337c85 678# Installation targets.
4d714963 679
04103845 680.PHONY: install uninstall source-vault binary-vault vault-install
98a33b6d 681install: $(INSTALL_TARGET)
b26ff9d8 682
79337c85
ILT
683uninstall:
684 @echo "the uninstall target is not supported in this tree"
685
04103845
DE
686source-vault:
687 $(MAKE) -f ./release/Build-A-Release \
688 host=$(host_alias) source-vault
689
690binary-vault:
691 $(MAKE) -f ./release/Build-A-Release \
692 host=$(host_alias) target=$(target_alias)
693
275049c0
JK
694vault-install:
695 @if [ -f ./release/vault-install ] ; then \
696 ./release/vault-install $(host_alias) $(target_alias) ; \
96bfa612
KR
697 else \
698 true ; \
275049c0
JK
699 fi
700
79337c85 701.PHONY: install.all
06a07944
RP
702install.all: install-no-fixedincludes
703 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 704 r=`pwd` ; export r ; \
06a07944
RP
705 (cd ./gcc; \
706 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
707 else \
708 true ; \
709 fi
5a63b336 710
96bfa612 711# install-no-fixedincludes is used because Cygnus can not distribute
79337c85
ILT
712# the fixed header files.
713.PHONY: install-no-fixedincludes
714install-no-fixedincludes: \
715 install-dirs \
79337c85
ILT
716 $(INSTALL_MODULES) \
717 $(INSTALL_TARGET_MODULES) \
96bfa612 718 $(INSTALL_X11_MODULES) \
f35c6160 719 gcc-no-fixedincludes
d1bea4c7 720
5cc24596 721# Install the gcc headers files, but not the fixed include files,
79337c85
ILT
722# which Cygnus is not allowed to distribute. This rule is very
723# dependent on the workings of the gcc Makefile.in.
724.PHONY: gcc-no-fixedincludes
06a07944 725gcc-no-fixedincludes:
5cc24596
PB
726 @if [ -f ./gcc/Makefile ]; then \
727 rm -rf gcc/tmp-include; \
728 mv gcc/include gcc/tmp-include 2>/dev/null; \
729 mkdir gcc/include; \
7f9cb3b2 730 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
753d5049 731 touch gcc/stmp-fixinc gcc/include/fixed; \
a54e05f6 732 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
5cc73086 733 r=`pwd`; export r; \
5cc24596
PB
734 srcroot=`cd $(srcdir); pwd` ; export srcroot; \
735 (cd ./gcc; \
736 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
737 rm -rf gcc/include; \
738 mv gcc/tmp-include gcc/include 2>/dev/null; \
739 else true; fi
dcbfc14d 740
79337c85
ILT
741# This rule is used to build the modules which use FLAGS_TO_PASS. To
742# build a target all-X means to cd to X and make all.
3de70f1d 743#
055cca84 744# all-gui, and all-libproc are handled specially because
4d802af9
MT
745# they are still experimental, and if they fail to build, that
746# shouldn't stop "make all".
04103845
DE
747.PHONY: $(ALL_MODULES) all-gui all-libproc
748$(ALL_MODULES) all-gui all-libproc:
79337c85 749 @dir=`echo $@ | sed -e 's/all-//'`; \
472af17f
ILT
750 if [ -f ./$${dir}/Makefile ] ; then \
751 r=`pwd`; export r; \
752 srcroot=`cd $(srcdir); pwd`; export srcroot; \
753 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
07362bd9 754 else \
79337c85 755 true; \
07362bd9
DZ
756 fi
757
80cbf870
ILT
758# These rules are used to check the modules which use FLAGS_TO_PASS.
759# To build a target check-X means to cd to X and make check. Some
760# modules are only tested in a native toolchain.
4f0b8f27 761
d237841c
BC
762.PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
763$(NATIVE_CHECK_MODULES):
39cc6dae
RS
764 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
765 dir=`echo $@ | sed -e 's/check-//'`; \
472af17f
ILT
766 if [ -f ./$${dir}/Makefile ] ; then \
767 r=`pwd`; export r; \
768 srcroot=`cd $(srcdir); pwd`; export srcroot; \
769 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
770 else \
771 true; \
4f0b8f27
TL
772 fi; \
773 fi
774
775$(CROSS_CHECK_MODULES):
6a42d184
DZ
776 @dir=`echo $@ | sed -e 's/check-//'`; \
777 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 778 r=`pwd`; export r; \
6a42d184
DZ
779 srcroot=`cd $(srcdir); pwd`; export srcroot; \
780 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
781 else \
782 true; \
783 fi
784
79337c85
ILT
785# This rule is used to install the modules which use FLAGS_TO_PASS.
786# To build a target install-X means to cd to X and make install.
787.PHONY: $(INSTALL_MODULES)
788$(INSTALL_MODULES): install-dirs
789 @dir=`echo $@ | sed -e 's/install-//'`; \
790 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 791 r=`pwd`; export r; \
79337c85 792 srcroot=`cd $(srcdir); pwd`; export srcroot; \
f35c6160 793 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
07362bd9 794 else \
79337c85 795 true; \
07362bd9
DZ
796 fi
797
6a42d184
DZ
798# This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
799# To build a target all-X means to cd to X and make all.
79337c85
ILT
800.PHONY: $(ALL_TARGET_MODULES)
801$(ALL_TARGET_MODULES):
802 @dir=`echo $@ | sed -e 's/all-//'`; \
803 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 804 r=`pwd`; export r; \
79337c85
ILT
805 srcroot=`cd $(srcdir); pwd`; export srcroot; \
806 (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
07362bd9 807 else \
79337c85 808 true; \
07362bd9
DZ
809 fi
810
6a42d184
DZ
811# This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
812# To build a target install-X means to cd to X and make install.
813.PHONY: $(CHECK_TARGET_MODULES)
814$(CHECK_TARGET_MODULES):
815 @dir=`echo $@ | sed -e 's/check-//'`; \
816 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 817 r=`pwd`; export r; \
6a42d184
DZ
818 srcroot=`cd $(srcdir); pwd`; export srcroot; \
819 (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) check); \
820 else \
821 true; \
822 fi
823
79337c85
ILT
824# This rule is used to install the modules which use
825# TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
826# and make install.
827.PHONY: $(INSTALL_TARGET_MODULES)
828$(INSTALL_TARGET_MODULES): install-dirs
829 @dir=`echo $@ | sed -e 's/install-//'`; \
830 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 831 r=`pwd`; export r; \
79337c85
ILT
832 srcroot=`cd $(srcdir); pwd`; export srcroot; \
833 (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
07362bd9 834 else \
79337c85 835 true; \
07362bd9
DZ
836 fi
837
6a42d184 838# This rule is used to build the modules which use X11_FLAGS_TO_PASS.
79337c85
ILT
839# To build a target all-X means to cd to X and make all.
840.PHONY: $(ALL_X11_MODULES)
841$(ALL_X11_MODULES):
842 @dir=`echo $@ | sed -e 's/all-//'`; \
843 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 844 r=`pwd`; export r; \
79337c85
ILT
845 srcroot=`cd $(srcdir); pwd`; export srcroot; \
846 (cd $${dir}; \
847 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
07362bd9 848 else \
79337c85 849 true; \
07362bd9
DZ
850 fi
851
6a42d184
DZ
852# This rule is used to check the modules which use X11_FLAGS_TO_PASS.
853# To build a target check-X means to cd to X and make all.
854.PHONY: $(CHECK_X11_MODULES)
855$(CHECK_X11_MODULES):
856 @dir=`echo $@ | sed -e 's/check-//'`; \
857 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 858 r=`pwd`; export r; \
6a42d184
DZ
859 srcroot=`cd $(srcdir); pwd`; export srcroot; \
860 (cd $${dir}; \
861 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
862 else \
863 true; \
864 fi
865
866# This rule is used to install the modules which use X11_FLAGS_TO_PASS.
79337c85
ILT
867# To build a target install-X means to cd to X and make install.
868.PHONY: $(INSTALL_X11_MODULES)
869$(INSTALL_X11_MODULES):
6a42d184 870 @dir=`echo $@ | sed -e 's/install-//'`; \
79337c85 871 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 872 r=`pwd`; export r; \
79337c85
ILT
873 srcroot=`cd $(srcdir); pwd`; export srcroot; \
874 (cd $${dir}; \
875 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
07362bd9 876 else \
79337c85 877 true; \
07362bd9
DZ
878 fi
879
79337c85
ILT
880# gcc is the only module which uses GCC_FLAGS_TO_PASS.
881.PHONY: all-gcc
882all-gcc:
883 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 884 r=`pwd`; export r; \
79337c85
ILT
885 srcroot=`cd $(srcdir); pwd`; export srcroot; \
886 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
07362bd9 887 else \
79337c85 888 true; \
07362bd9
DZ
889 fi
890
65088029
ILT
891.PHONY: check-gcc
892check-gcc:
893 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 894 r=`pwd`; export r; \
65088029
ILT
895 srcroot=`cd $(srcdir); pwd`; export srcroot; \
896 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
897 else \
898 true; \
899 fi
900
79337c85
ILT
901.PHONY: install-gcc
902install-gcc:
903 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 904 r=`pwd`; export r; \
79337c85
ILT
905 srcroot=`cd $(srcdir); pwd`; export srcroot; \
906 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
07362bd9 907 else \
79337c85 908 true; \
07362bd9
DZ
909 fi
910
753d5049
SC
911
912# EXPERIMENTAL STUFF
913# This rule is used to install the modules which use FLAGS_TO_PASS.
914# To build a target install-X means to cd to X and make install.
09985c96
SC
915.PHONY: install-dosrel
916install-dosrel: install-dirs info
753d5049
SC
917 @dir=`echo $@ | sed -e 's/install-//'`; \
918 if [ -f ./$${dir}/Makefile ] ; then \
919 r=`pwd`; export r; \
920 srcroot=`cd $(srcdir); pwd`; export srcroot; \
921 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
922 else \
923 true; \
924 fi
925
09985c96 926install-dosrel-fake:
a987271c 927
753d5049 928
79337c85 929# This is a list of inter-dependencies among modules.
65e21701 930all-autoconf: all-m4
79337c85 931all-bfd:
dfe44004 932all-binutils: all-libiberty all-opcodes all-bfd all-flex all-byacc
79337c85
ILT
933all-byacc:
934# start-sanitize-chill
935all-chillrt: all-binutils all-gas all-gcc all-newlib
936# end-sanitize-chill
937all-cvs:
4d802af9 938all-dejagnu: all-tcl all-expect all-tk
79337c85
ILT
939all-diff: all-libiberty
940all-emacs:
1d5fcc66 941all-emacs19: all-byacc
79337c85 942all-etc:
c6ba9ae0 943all-expect: all-tcl all-tk
275049c0 944all-fileutils: all-libiberty
79337c85 945all-find:
7dcc0664 946all-flex: all-libiberty all-byacc
79337c85 947all-gas: all-libiberty all-opcodes all-bfd
65e21701 948all-gash: all-tcl
79337c85 949all-gawk:
04103845
DE
950all-gcc: all-libiberty all-byacc all-binutils all-gas all-ld
951all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim $(gdbnlmrequirements)
79337c85 952all-gprof: all-libiberty all-bfd
6214eb23 953all-grep: all-libiberty
4d802af9 954all-gui: all-gdb all-libproc all-librx
79337c85
ILT
955all-gzip: all-libiberty
956all-hello: all-libiberty
957all-indent:
3585593d 958all-ispell: all-emacs19
79337c85 959all-ld: all-libiberty all-bfd all-byacc all-flex
04103845 960all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib all-libio all-librx all-libstdc++
ea6d5817 961all-libio: all-gas all-ld all-gcc all-xiberty all-newlib
79337c85 962all-libiberty:
ea6d5817 963all-libstdc++: all-gas all-ld all-gcc all-xiberty all-newlib all-libio
79337c85
ILT
964all-m4: all-libiberty
965all-make: all-libiberty
966all-mmalloc:
ea6d5817 967all-newlib: all-binutils all-gas all-gcc
275049c0 968all-opcodes: all-bfd
79337c85 969all-patch:
b255ccdb 970all-prms: all-libiberty
79337c85
ILT
971all-rcs:
972all-readline:
973all-recode: all-libiberty
ac259c28
JM
974all-sed: all-libiberty
975all-send-pr: all-prms
79337c85
ILT
976all-shellutils:
977all-sim: all-libiberty all-bfd
07362bd9 978all-tar: all-libiberty
79337c85
ILT
979all-tcl:
980all-tclX: all-tcl all-tk
981all-tk: all-tcl
982all-texinfo: all-libiberty
983all-textutils:
984all-tgas: all-libiberty all-bfd
985all-time:
986all-wdiff:
987all-uudecode: all-libiberty
055cca84 988all-xiberty: all-gcc all-ld all-newlib
07362bd9 989
79337c85 990### other supporting targets
07362bd9 991
79337c85
ILT
992MAKEDIRS= \
993 $(prefix) \
994 $(exec_prefix) \
995 $(tooldir)
fca4f908 996
79337c85
ILT
997.PHONY: install-dirs
998install-dirs:
999 @for i in $(MAKEDIRS) ; do \
1000 echo Making $$i... ; \
62cd4a20 1001 parent=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \
79337c85
ILT
1002 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
1003 if [ ! -d $$i ] ; then \
1004 if mkdir $$i ; then \
1005 true ; \
1006 else \
1007 exit 1 ; \
1008 fi ; \
1009 else \
1010 true ; \
1011 fi ; \
1012 done
23e3e7f9 1013
618f57a9 1014
79337c85
ILT
1015dir.info: do-install-info
1016 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1017 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1018 mv -f dir.info.new dir.info ; \
1019 else true ; \
72c09fbc 1020 fi
6b7e5998 1021
b1cceba2
DZ
1022dist:
1023 @echo "Building a full distribution of this tree isn't done"
1024 @echo "via 'make dist'. Check out the etc/ subdirectory"
1025
eb02fd64
RP
1026etags tags: TAGS
1027
753d5049
SC
1028# Right now this just builds TAGS in each subdirectory. emacs19 has the
1029# ability to use several tags files at once, so there is probably no need
1030# to combine them into one big TAGS file (like CVS 1.3 does). We could
1031# (if we felt like it) have this Makefile write a piece of elisp which
1032# the user could load to tell emacs19 where all the TAGS files we just
1033# built are.
1034TAGS: do-TAGS
eb02fd64 1035
eb02fd64
RP
1036# with the gnu make, this is done automatically.
1037
01ec9588 1038Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 1039 $(SHELL) ./config.status
eb02fd64 1040
11954bf1 1041#
01ec9588 1042# Support for building net releases
11954bf1 1043
01ec9588
JK
1044# Files in devo used in any net release.
1045# ChangeLog omitted because it may refer to files which are not in this
1046# distribution (perhaps it would be better to include it anyway).
d94d255d 1047DEVO_SUPPORT= README Makefile.in configure configure.in \
9823504d 1048 config.guess config.sub config move-if-change \
81597186 1049 mpw-README mpw-build.in mpw-config.in mpw-configure \
2492f942 1050 COPYING COPYING.LIB install.sh
01ec9588
JK
1051
1052# Files in devo/etc used in any net release.
1053# ChangeLog omitted because it may refer to files which are not in this
1054# distribution (perhaps it would be better to include it anyway).
6d681784 1055ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \
275049c0 1056 configure.texi standards.texi make-stds.texi
15408b3b 1057ETC_SUPPORT_PFX=configure.info standards.info cfg-paper.info
01ec9588 1058
40e16078
KR
1059# When you use `make setup-dirs' or `make taz' you should always redefine
1060# this macro.
1061SUPPORT_FILES = list-of-support-files-for-tool-in-question
7f9cb3b2 1062# Directories that might want `make diststuff' run.
7166a308 1063DISTSTUFFDIRS= ld gprof gdb libg++ binutils gnats gas
65e21701
KR
1064# Files where "byacc" (Cygnus version) should be changed to "bison -y" (FSF).
1065DISTBISONFILES= binutils/Makefile.in gas/Makefile.in gdb/Makefile.in
ea18081d 1066# Directories where "info" should be built.
15408b3b 1067DISTDOCDIRS= ld gprof binutils gas bfd libg++ libio gdb gnats send-pr etc
40e16078 1068
a54e05f6
KR
1069.PHONY: taz
1070
484fa12d
JW
1071taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1072 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1073 # Make sure "diststuff" files get built properly.
65e21701
KR
1074 for f in $(DISTBISONFILES) ; do \
1075 if [ -r $$f ]; then \
7b636683 1076 sed '/^BISON *=.*$$/s/.*/BISON = bison -y/' <$$f >tmp ; \
65e21701
KR
1077 mv -f tmp $$f ; \
1078 else true; fi ; \
1079 done
484fa12d
JW
1080 # Take out texinfo from a few places; make simple BISON=bison line.
1081 sed -e '/^all\.normal: /s/\all-texinfo //' \
1082 -e '/^ install-texinfo /d' \
1083 -e '/^BISON = /,/^$$/d' \
1084 -e '/^# BISON:/s/.*/BISON = bison -y/' \
1085 <Makefile.in >tmp
1086 mv -f tmp Makefile.in
65e21701 1087 #
1d5fcc66
PB
1088 $(start-sanitize-Sanitize)
1089 @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
1090 $(end-sanitize-Sanitize)
40e16078 1091 ./configure sun4
484fa12d
JW
1092 # Doc files don't change; include them in distribution.
1093 for f in $(DISTDOCDIRS) ; do \
1094 if [ -r $$f/Makefile ]; then \
ea18081d 1095 (cd $$f ; $(MAKE) info) || exit 1 ; \
484fa12d
JW
1096 else true ; fi ; \
1097 done
7f9cb3b2 1098 # Make links, and run "make diststuff" when needed.
a54e05f6
KR
1099 # The `echo' for setting `p' is to convert all whitespace to spaces.
1100 # Then the `case' further below should tell whether $$d is in
7f9cb3b2 1101 # DISTSTUFFDIRS.
a54e05f6 1102 rm -rf proto-toplev ; mkdir proto-toplev
7f9cb3b2
KR
1103 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1104 p=" `echo $(DISTSTUFFDIRS)` " ; \
a54e05f6
KR
1105 for d in $$dirs ; do \
1106 if [ -d $$d ]; then \
7f9cb3b2
KR
1107 case " $$p " in \
1108 *" $$d "*) \
04103845 1109 (cd $$d ; $(MAKE) diststuff ) || exit 1 ;; \
a54e05f6 1110 esac ; \
7f9cb3b2
KR
1111 if [ -d $$d/proto-$$d.dir ]; then \
1112 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1113 else \
1114 ln -s ../$$d proto-toplev/$$d ; \
1115 fi ; \
a54e05f6 1116 else ln -s ../$$d proto-toplev/$$d ; fi ; \
40e16078 1117 done
5600fbd2 1118 $(MAKE) distclean
a54e05f6 1119 #
40e16078 1120 mkdir proto-toplev/etc
15408b3b
KR
1121 (cd proto-toplev/etc; \
1122 for i in $(ETC_SUPPORT); do \
40e16078 1123 ln -s ../../etc/$$i . ; \
15408b3b
KR
1124 done ; \
1125 for i in $(ETC_SUPPORT_PFX); do \
1126 ln -s ../../etc/$$i* . ; \
1127 done)
a54e05f6 1128 #
04103845 1129 # Take out texinfo from configurable dirs
40e16078
KR
1130 rm proto-toplev/configure.in
1131 sed -e '/^host_tools=/s/texinfo //' \
40e16078 1132 <configure.in >proto-toplev/configure.in
a54e05f6 1133 #
40e16078
KR
1134 mkdir proto-toplev/texinfo
1135 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
7f9cb3b2 1136 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
484fa12d 1137 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
40e16078 1138 ln -s ../../texinfo/tex3patch proto-toplev/texinfo/
a561909f 1139 chmod og=u `find . -print`
7f9cb3b2 1140 (VER=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1d2bb445 1141 echo "==> Making $(TOOL)-$$VER.tar.gz"; \
a59b94d2 1142 rm -f $(TOOL)-$$VER; ln -s proto-toplev $(TOOL)-$$VER; \
40e16078 1143 tar cfh - $(TOOL)-$$VER \
5cc73086 1144 | $(GZIPPROG) -v -9 >$(TOOL)-$$VER.tar.gz )
40e16078 1145
484fa12d 1146TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
7f9cb3b2 1147DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
40e16078 1148
96bfa612 1149.PHONY: gas.tar.gz
7f9cb3b2 1150GAS_SUPPORT_DIRS= bfd include libiberty opcodes
96bfa612 1151gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
484fa12d
JW
1152 $(MAKE) -f Makefile.in taz TOOL=gas \
1153 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
40e16078 1154
7f9cb3b2 1155# The FSF "binutils" release includes gprof and ld.
96bfa612 1156.PHONY: binutils.tar.gz
4be4b991 1157BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof
96bfa612 1158binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
484fa12d 1159 $(MAKE) -f Makefile.in taz TOOL=binutils \
2492f942 1160 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
7f9cb3b2 1161
96bfa612 1162.PHONY: gas+binutils.tar.gz
a54e05f6 1163GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
96bfa612 1164gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
484fa12d 1165 $(MAKE) -f Makefile.in taz TOOL=gas \
2492f942 1166 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
79337c85 1167
5600fbd2 1168.PHONY: libg++.tar.gz
ea6d5817 1169LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty xiberty
5600fbd2 1170libg++.tar.gz: $(DIST_SUPPORT) libg++
484fa12d
JW
1171 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1172 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
5600fbd2 1173
49dfa984
JM
1174GNATS_SUPPORT_DIRS=include libiberty send-pr
1175gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
a0bd8e18 1176 $(MAKE) -f Makefile.in taz TOOL=gnats \
49dfa984
JM
1177 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1178
1d5fcc66 1179.PHONY: gdb.tar.gz
81597186 1180GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
1d5fcc66
PB
1181gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1182 $(MAKE) -f Makefile.in taz TOOL=gdb \
1183 SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
1184
7166a308 1185.PHONY: newlib.tar.gz
a220ba0f 1186NEWLIB_SUPPORT_DIRS=libgloss
04103845 1187# taz configures for the sun4 target which won't configure newlib.
a220ba0f
SC
1188# We need newlib configured so that the .info files are made.
1189# Unfortunately, it is not enough to just configure newlib separately:
1190# taz will build the .info files but since SUBDIRS won't contain newlib,
1191# distclean won't be run (leaving Makefile, config.status, and the tmp files
1192# used in building the .info files, eg: *.def, *.ref).
1193# Compensate here by configuring newlib for a simple (no multilib support)
1194# cross target (sparc64), building the info files, and doing make distclean
1195# ourselves.
7166a308 1196newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
04103845
DE
1197 rootme=`pwd` ; \
1198 cd newlib && ../configure --srcdir $$rootme/newlib \
1199 --host sun4 --target sparc64-elf
a220ba0f
SC
1200 cd newlib ; make info
1201 cd newlib ; make distclean
7166a308
KR
1202 $(MAKE) -f Makefile.in taz TOOL=newlib \
1203 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1204 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" \
1205 DISTDOCDIRS="$(DISTDOCDIRS) newlib"
1206
79337c85
ILT
1207.NOEXPORT:
1208MAKEOVERRIDES=
1209
1210# start-sanitize-chill
1211## This is ugly, but I don't want GNU make to put these variables in
1212## the environment. Older makes will see this as a set of targets
1213## with no dependencies and no actions.
1214unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1215# end-sanitize-chill
1216
eb02fd64 1217# end of Makefile.in
This page took 0.248871 seconds and 4 git commands to generate.