Polishing z8k simulator support
[deliverable/binutils-gdb.git] / Makefile.in
CommitLineData
eb02fd64 1#
131a3881 2# Makefile for directory with subdirs to build.
7fcfdcf7 3# Copyright (C) 1990, 1991, 1992 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
17# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
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
2198e4ba 27tooldir = $(libdir)
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
45
46SHELL = /bin/sh
47
378fd382 48INSTALL = cp
4d714963
RP
49INSTALL_PROGRAM = $(INSTALL)
50INSTALL_DATA = $(INSTALL)
3c8735af 51
440868a0 52AS = as
ec342d7d 53AR = ar
b5329d84 54AR_FLAGS = rc
e85e07cb 55CC = cc
f8a6ad66 56CFLAGS = -g
a50b5d9d 57$(start-sanitize-chill)
7d9f0c54
MW
58CHILLFLAGS = $(CFLAGS)
59CHILL_LIB = -lchill
60$(end-sanitize-chill)
e85e07cb 61CXX = gcc
d1bea4c7 62CXXFLAGS = -g -O
4d714963 63RANLIB = ranlib
51489233 64NM = nm
eb02fd64 65
98a33b6d 66BISON = `if [ -f $${rootme}/byacc/byacc ] ; \
06a07944 67 then echo $${rootme}/byacc/byacc ; \
378fd382 68 else echo byacc ; \
06a07944 69 fi`
2645fb0c 70
98a33b6d 71LEX = `if [ -f $${rootme}/flex/flex ] ; \
8b361a95 72 then echo $${rootme}/flex/flex ; \
2198e4ba
MT
73 else echo flex ; fi`
74
98a33b6d 75MAKEINFO = `if [ -f $${rootme}/texinfo/C/makeinfo ] ; \
77806c3e
RP
76 then echo $${rootme}/texinfo/C/makeinfo ; \
77 else echo makeinfo ; fi`
b772d75e 78
f980fcfb
JG
79
80# libraries that may need to be augmented on a system-by-system basis
81X11_LIB = -lX11
82
e85e07cb 83# compilers to use to create programs which must be run in the build
440868a0
ILT
84# environment.
85CC_FOR_BUILD = $(CC)
e85e07cb 86CXX_FOR_BUILD = $(CXX)
440868a0 87
9f73dd6a 88SUBDIRS = "this is set via configure, don't edit this"
6a3958b2
RP
89OTHERS =
90
a0f47eb7 91ALL = all.normal
b26ff9d8 92INSTALL_TARGET = install.all
fb660409
RP
93
94### for debugging
95#GCCVERBOSE=-v
96
51489233
ILT
97CC_FOR_TARGET = ` \
98 if [ -f $${rootme}/gcc/Makefile ] ; then \
31883f01 99 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
51489233 100 else \
378fd382 101 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
102 echo $(CC); \
103 else \
104 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
105 fi; \
106 fi`
107
7d9f0c54
MW
108GCC_FOR_TARGET = ` \
109 if [ -f $${rootme}/gcc/Makefile ] ; then \
110 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
111 else \
112 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
113 echo $(CC); \
114 else \
115 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
116 fi; \
117 fi`
118
119$(start-sanitize-chill)
120CHILL_FOR_TARGET = ` \
121 if [ -f $${rootme}/gcc/Makefile ] ; then \
122 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
123 else \
124 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
125 echo $(CC); \
126 else \
127 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
128 fi; \
129 fi`
130$(end-sanitize-chill)
131
d1bea4c7 132CXX_FOR_TARGET = ` \
fca4f908 133 if [ -f $${rootme}/gcc/Makefile ] ; then \
31883f01 134 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
fca4f908 135 else \
e85e07cb
ILT
136 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
137 echo $(CXX); \
fca4f908
MW
138 else \
139 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
140 fi; \
141 fi`
142
440868a0
ILT
143AS_FOR_TARGET = ` \
144 if [ -f $${rootme}/gas/Makefile ] ; then \
145 echo $${rootme}/gas/as.new ; \
146 else \
e85e07cb 147 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
440868a0
ILT
148 echo $(AS); \
149 else \
150 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
151 fi \
152 fi`
153
51489233
ILT
154AR_FOR_TARGET = ` \
155 if [ -f $${rootme}/binutils/Makefile ] ; then \
156 echo $${rootme}/binutils/ar ; \
157 else \
378fd382 158 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
159 echo $(AR); \
160 else \
161 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
162 fi \
163 fi`
164
165RANLIB_FOR_TARGET = ` \
166 if [ -f $${rootme}/binutils/Makefile ] ; then \
167 echo $${rootme}/binutils/ranlib ; \
168 else \
378fd382 169 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
170 echo $(RANLIB); \
171 else \
172 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
173 fi \
174 fi`
175
176NM_FOR_TARGET = ` \
177 if [ -f $${rootme}/binutils/Makefile ] ; then \
178 echo $${rootme}/binutils/nm ; \
179 else \
378fd382 180 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
181 echo $(NM); \
182 else \
183 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
184 fi \
185 fi`
186
187XTRAFLAGS = ` \
188 if [ -f $${rootme}/gcc/Makefile ] ; then \
9d401625
ILT
189 if [ -f $${rootme}/newlib/Makefile ] ; then \
190 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
51489233 191 else \
9d401625 192 echo -I$${rootme}/gcc/include ; \
51489233
ILT
193 fi ; \
194 else \
195 echo ; \
196 fi`
23e3e7f9 197
b1cceba2 198
eb02fd64 199#### host and target specific makefile fragments come in here.
ec342d7d 200###
eb02fd64 201
378fd382 202# Flags to pass down to sub-makes -- please keep these in alphabetical order
2198e4ba 203FLAGS_TO_PASS = \
2198e4ba
MT
204 "AR=$(AR)" \
205 "AR_FLAGS=$(AR_FLAGS)" \
d09de70e 206 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
378fd382 207 "BISON=$(BISON)" \
d1bea4c7
DZ
208 "CXXFLAGS=$(CXXFLAGS)" \
209 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
2198e4ba 210 "CC=$(CC)" \
378fd382 211 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
2198e4ba 212 "CFLAGS=$(CFLAGS)" \
7d9f0c54
MW
213$(start-sanitize-chill)\
214 "CHILLFLAGS=$(CHILLFLAGS)" \
215 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
216 "CHILL_LIB=$(CHILL_LIB)" \
e9a050f9 217$(end-sanitize-chill)\
d09de70e 218 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
2198e4ba
MT
219 "INSTALL=$(INSTALL)" \
220 "INSTALL_DATA=$(INSTALL_DATA)" \
440868a0 221 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
378fd382
DZ
222 "LDFLAGS=$(LDFLAGS)" \
223 "LEX=$(LEX)" \
224 "LOADLIBES=$(LOADLIBES)" \
225 "MAKEINFO=$(MAKEINFO)" \
226 "RANLIB=$(RANLIB)" \
d09de70e 227 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
378fd382
DZ
228 "exec_prefix=$(exec_prefix)" \
229 "prefix=$(prefix)" \
230 "tooldir=$(tooldir)"
2198e4ba 231
d1bea4c7
DZ
232# Flags that are concerned with the location of the X11 include files
233# and library files
f980fcfb 234
d1bea4c7
DZ
235X11_FLAGS_TO_PASS = \
236 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
f980fcfb
JG
237 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
238 "X11_LIB=$(X11_LIB)"
d1bea4c7 239
51489233 240# Flags to pass down to makes which are built with the target
d405f5be 241# environment (e.g. libg++, xiberty, newlib). -- keep these in alpha order please
51489233 242TARGET_FLAGS_TO_PASS = \
378fd382 243 "AR=$(AR_FOR_TARGET)" \
51489233 244 "AR_FLAGS=$(AR_FLAGS)" \
378fd382 245 "AS=$(AS_FOR_TARGET)" \
51489233 246 "BISON=$(BISON)" \
d1bea4c7
DZ
247 "CXX=$(CXX_FOR_TARGET)" \
248 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
249 "CXXFLAGS=$(CXXFLAGS)" \
378fd382
DZ
250 "CC=$(CC_FOR_TARGET)" \
251 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
252 "CFLAGS=$(CFLAGS)" \
51489233
ILT
253 "INSTALL=$(INSTALL)" \
254 "INSTALL_DATA=$(INSTALL_DATA)" \
255 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
378fd382
DZ
256 "LDFLAGS=$(LDFLAGS)" \
257 "LEX=$(LEX)" \
258 "LOADLIBES=$(LOADLIBES)" \
259 "MAKEINFO=$(MAKEINFO)" \
51489233 260 "NM=$(NM_FOR_TARGET)" \
378fd382
DZ
261 "RANLIB=$(RANLIB_FOR_TARGET)" \
262 "XTRAFLAGS=$(XTRAFLAGS)" \
263 "exec_prefix=$(exec_prefix)" \
264 "prefix=$(prefix)" \
265 "tooldir=$(tooldir)"
51489233 266
f4e414f1
ILT
267# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
268# unfortunately needs the native compiler and the target ar and
269# ranlib. Keep these in alphabetical order, please.
270GCC_FLAGS_TO_PASS = \
271 "AR=$(AR_FOR_TARGET)" \
272 "AR_FLAGS=$(AR_FLAGS)" \
273 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
274 "AS=$(AS)" \
275 "BISON=$(BISON)" \
276 "CXX=$(CXX)" \
277 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
278 "CXXFLAGS=$(CXXFLAGS)" \
279 "CC=$(CC)" \
280 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
281 "CFLAGS=$(CFLAGS)" \
282 "INSTALL=$(INSTALL)" \
283 "INSTALL_DATA=$(INSTALL_DATA)" \
284 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
285 "LDFLAGS=$(LDFLAGS)" \
286 "LEX=$(LEX)" \
287 "LOADLIBES=$(LOADLIBES)" \
288 "MAKEINFO=$(MAKEINFO)" \
289 "NM=$(NM)" \
290 "RANLIB=$(RANLIB_FOR_TARGET)" \
291 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
292 "XTRAFLAGS=$(XTRAFLAGS)" \
293 "exec_prefix=$(exec_prefix)" \
294 "prefix=$(prefix)" \
295 "tooldir=$(tooldir)"
296
fca4f908
MW
297# The first rule in the file had better be this one. Don't put any above it.
298all: $(ALL)
299
7fed4078 300.PHONY: all check dvi info install-info
f8a6ad66 301.NOEXPORT:
4d714963 302
e9b5ed59 303info check dvi:
b1cceba2 304 @rootme=`pwd` ; export rootme ; \
e9b5ed59 305 $(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
fb90daeb 306
9a9e8e7f 307install-info: install-info-dirs force
8b361a95
SEF
308 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
309 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
310 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
51489233
ILT
311 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=install-info "DODIRS=$(SUBDIRS)" subdir_do
312 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) dir.info install-dir.info
9a9e8e7f
RP
313
314install-dir.info:
8b361a95
SEF
315 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
316 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
317 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
9a9e8e7f 318 $(INSTALL_DATA) dir.info $(infodir)/dir.info
4d714963 319
b1cceba2 320all.normal: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
868ebe79 321 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
675e8ac9 322 all-gcc all-binutils all-libg++ all-readline all-sim all-gdb \
c4fb14b7 323 all-make all-rcs all-cvs all-diff all-grep \
98a33b6d 324 all-patch all-emacs all-ispell all-etc \
ffce44a0 325 all-tcl all-tk all-expect \
d405f5be
DZ
326 all-newlib \
327 $(start-sanitize-chill) \
328 all-chillrt \
329 $(end-sanitize-chill) \
330 all-gprof all-send_pr all-libm all-deja-gnu \
b1cceba2 331 all-fileutils all-find all-gawk all-sed all-shellutils \
4a2f0c79 332 all-textutils all-time all-wdiff all-uudecode
b1cceba2 333
dcbfc14d 334
dfa891fc 335all.cross: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
675e8ac9 336 all-opcodes all-bfd all-readline all-sim \
d405f5be
DZ
337 all-gdb all-binutils all-gcc all-newlib \
338 $(start-sanitize-chill) \
339 all-chillrt \
340 $(end-sanitize-chill) \
341 all-deja-gnu
4d714963 342
3b30df82
PB
343.PHONY: clean distclean mostlyclean realclean do_clean
344
345do_clean:
7fed4078 346 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
3b30df82 347
7fed4078 348clean mostlyclean: do_clean
3b30df82 349 @rootme=`pwd` ; export rootme ; \
7fed4078 350 $(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
3b30df82 351
7fed4078 352distclean realclean: do_clean
3b30df82 353 @rootme=`pwd` ; export rootme ; \
7fed4078
DZ
354 $(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
355 -rm -f Makefile config.status
7fcfdcf7 356
b1cceba2
DZ
357uninstall:
358 @echo "the uninstall target is not supported in this tree"
4d714963 359
98a33b6d 360install: $(INSTALL_TARGET)
8b361a95
SEF
361 -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
362 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
363 -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
b26ff9d8 364
06a07944
RP
365install.all: install-no-fixedincludes
366 @if [ -f ./gcc/Makefile ] ; then \
367 rootme=`pwd` ; export rootme ; \
368 (cd ./gcc; \
369 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
370 else \
371 true ; \
372 fi
5a63b336 373
dfa891fc
DZ
374install-no-fixedincludes: install-dirs gcc-no-fixedincludes \
375 install-autoconf \
376 install-bfd \
377 install-binutils \
aa06ff7e 378 install-opcodes \
dfa891fc
DZ
379 install-byacc \
380 install-cvs \
381 install-diff \
fca4f908 382 install-deja-gnu \
dfa891fc 383 install-emacs \
98a33b6d 384 install-etc \
ffce44a0 385 install-expect \
dfa891fc
DZ
386 install-flex \
387 install-gas \
388 install-gdb \
389 install-glob \
390 install-gprof \
391 install-grep \
392 install-ispell \
393 install-ld \
394 install-libg++ \
395 install-libiberty \
396 install-libm \
397 install-make \
398 install-mmalloc \
399 install-newlib \
d405f5be 400 $(start-sanitize-chill) \
bc2a2c17 401 install-chillrt \
d405f5be 402 $(end-sanitize-chill) \
dfa891fc
DZ
403 install-patch \
404 install-rcs \
405 install-readline \
406 install-send_pr \
ffce44a0
DZ
407 install-tcl \
408 install-texinfo \
d1bea4c7 409 install-tk \
675e8ac9 410 install-sim \
b1cceba2 411 install-fileutils install-find install-gawk install-m4 install-sed install-shellutils \
4a2f0c79 412 install-textutils install-time install-wdiff install-uudecode
d1bea4c7 413
5cc24596
PB
414#
415# Install the gcc headers files, but not the fixed include files,
416# which we are not allowed to distribute. This rule is very dependent
417# on the workings of the gcc Makefile.in.
418#
06a07944 419gcc-no-fixedincludes:
5cc24596
PB
420 @if [ -f ./gcc/Makefile ]; then \
421 rm -rf gcc/tmp-include; \
422 mv gcc/include gcc/tmp-include 2>/dev/null; \
423 mkdir gcc/include; \
424 touch gcc/stmp-fixincludes; \
425 rm -f gcc/stmp-headers; \
426 rootme=`pwd`; export rootme; \
427 srcroot=`cd $(srcdir); pwd` ; export srcroot; \
428 (cd ./gcc; \
429 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
430 rm -rf gcc/include; \
431 mv gcc/tmp-include gcc/include 2>/dev/null; \
432 else true; fi
dcbfc14d
DZ
433
434install.cross: install-dirs install-libiberty install-mmalloc \
aa06ff7e 435 install-binutils install-opcodes install-byacc install-flex \
dfa891fc
DZ
436 install-ld install-gas install-readline \
437 install-glob install-gdb install-mmalloc \
d405f5be
DZ
438 install-newlib \
439 $(start-sanitize-chill) \
440 install-chillrt \
441 $(end-sanitize-chill) \
442 install-gcc install-etc install-deja-gnu
fca4f908
MW
443
444### deja-gnu
445all-deja-gnu: force
446 @if [ -f ./deja-gnu/Makefile ] ; then \
447 rootme=`pwd` ; export rootme ; \
448 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) all) ; \
449 else \
450 true ; \
451 fi
452
fca4f908
MW
453install-deja-gnu: force
454 @if [ -f ./deja-gnu/Makefile ] ; then \
455 rootme=`pwd` ; export rootme ; \
456 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) install) ; \
457 else \
458 true ; \
459 fi
23e3e7f9 460
618f57a9
RP
461### autoconf
462all-autoconf: force
a5cdd8af 463 @if [ -f ./autoconf/Makefile ] ; then \
618f57a9 464 rootme=`pwd` ; export rootme ; \
a5cdd8af 465 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) all) ; \
618f57a9
RP
466 else \
467 true ; \
468 fi
469
618f57a9 470install-autoconf: force
06a07944 471 @if [ -f ./autoconf/Makefile ] ; then \
618f57a9 472 rootme=`pwd` ; export rootme ; \
98a33b6d
DZ
473 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) install) ; \
474 else \
475 true ; \
476 fi
477
478### etc
479all-etc: force
480 @if [ -f ./etc/Makefile ] ; then \
481 rootme=`pwd` ; export rootme ; \
482 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) all) ; \
483 else \
484 true ; \
485 fi
486
98a33b6d
DZ
487install-etc: force
488 @if [ -f ./etc/Makefile ] ; then \
489 rootme=`pwd` ; export rootme ; \
490 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) install) ; \
618f57a9
RP
491 else \
492 true ; \
493 fi
494
4d714963 495### libiberty
c4fb14b7 496all-libiberty: force
06a07944 497 @if [ -f ./libiberty/Makefile ] ; then \
77806c3e 498 rootme=`pwd` ; export rootme ; \
7fcfdcf7 499 (cd ./libiberty; \
2198e4ba 500 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
501 else \
502 true ; \
503 fi
4d714963 504
4d714963 505install-libiberty: force
06a07944 506 @if [ -f ./libiberty/Makefile ] ; then \
77806c3e 507 rootme=`pwd` ; export rootme ; \
7fcfdcf7 508 (cd ./libiberty; \
2198e4ba 509 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
510 else \
511 true ; \
512 fi
23e3e7f9 513
fb90daeb
ME
514### xiberty
515all-xiberty: all-gcc all-newlib
516 @if [ -f ./xiberty/Makefile ] ; then \
517 rootme=`pwd` ; export rootme ; \
518 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
519 (cd ./xiberty; \
1b9b5090 520 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
fb90daeb
ME
521 else \
522 true ; \
523 fi
524
fb90daeb
ME
525install-xiberty: force
526 @if [ -f ./xiberty/Makefile ] ; then \
527 rootme=`pwd` ; export rootme ; \
528 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
529 (cd ./xiberty; \
1b9b5090 530 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
fb90daeb
ME
531 else \
532 true ; \
533 fi
534
66cfe047 535### mmalloc
c4fb14b7 536all-mmalloc: force
06a07944 537 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
538 rootme=`pwd` ; export rootme ; \
539 (cd ./mmalloc; \
2198e4ba 540 $(MAKE) $(FLAGS_TO_PASS) all) ; \
66cfe047
SG
541 else \
542 true ; \
543 fi
66cfe047 544
66cfe047 545install-mmalloc: force
06a07944 546 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
547 rootme=`pwd` ; export rootme ; \
548 (cd ./mmalloc; \
2198e4ba 549 $(MAKE) $(FLAGS_TO_PASS) install) ; \
66cfe047
SG
550 else \
551 true ; \
552 fi
553
4d714963 554### texinfo
c4fb14b7 555all-texinfo: all-libiberty
06a07944 556 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 557 rootme=`pwd` ; export rootme ; \
7fcfdcf7 558 (cd ./texinfo; \
2198e4ba 559 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
560 else \
561 true ; \
562 fi
4d714963 563
4d714963 564install-texinfo: force
06a07944 565 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 566 rootme=`pwd` ; export rootme ; \
7fcfdcf7 567 (cd ./texinfo; \
2198e4ba 568 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
569 else \
570 true ; \
571 fi
23e3e7f9 572
4d714963 573### bfd
c4fb14b7 574all-bfd: force
06a07944 575 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 576 rootme=`pwd` ; export rootme ; \
7fcfdcf7 577 (cd ./bfd; \
2198e4ba 578 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
579 else \
580 true ; \
581 fi
4d714963 582
4d714963 583install-bfd: force
06a07944 584 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 585 rootme=`pwd` ; export rootme ; \
7fcfdcf7 586 (cd ./bfd; \
2198e4ba 587 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
588 else \
589 true ; \
590 fi
23e3e7f9 591
aa06ff7e
SC
592
593### opcodes
594all-opcodes: force
595 @if [ -f ./opcodes/Makefile ] ; then \
596 rootme=`pwd` ; export rootme ; \
a904db53 597 (cd ./opcodes; \
aa06ff7e
SC
598 $(MAKE) $(FLAGS_TO_PASS) all) ; \
599 else \
600 true ; \
601 fi
602
aa06ff7e
SC
603install-opcodes: force
604 @if [ -f ./opcodes/Makefile ] ; then \
605 rootme=`pwd` ; export rootme ; \
a904db53 606 (cd ./opcodes; \
aa06ff7e
SC
607 $(MAKE) $(FLAGS_TO_PASS) install) ; \
608 else \
609 true ; \
610 fi
611
4d714963 612### binutils
aa06ff7e 613all-binutils: all-opcodes all-libiberty all-bfd all-flex
06a07944 614 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 615 rootme=`pwd` ; export rootme ; \
7fcfdcf7 616 (cd ./binutils; \
2198e4ba 617 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
618 else \
619 true ; \
620 fi
4d714963 621
4d714963 622install-binutils: force
06a07944 623 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 624 rootme=`pwd` ; export rootme ; \
7fcfdcf7 625 (cd ./binutils; \
2198e4ba 626 $(MAKE) $(FLAGS_TO_PASS) install) ; \
7fcfdcf7
SC
627 else \
628 true ; \
629 fi
630
631### newlib
51489233 632all-newlib: all-binutils all-ld all-gas all-gcc
06a07944 633 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 634 rootme=`pwd` ; export rootme ; \
51489233 635 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 636 (cd ./newlib; \
51489233 637 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
7fcfdcf7
SC
638 else \
639 true ; \
640 fi
7fcfdcf7 641
7fcfdcf7 642install-newlib: force
06a07944 643 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 644 rootme=`pwd` ; export rootme ; \
51489233 645 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 646 (cd ./newlib; \
51489233 647 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
648 else \
649 true ; \
650 fi
23e3e7f9 651
bc2a2c17
FF
652### start-sanitize-chill
653### chillrt
9f73dd6a 654all-chillrt: all-binutils all-ld all-gas all-gcc all-newlib
bc2a2c17
FF
655 @if [ -f ./chillrt/Makefile ] ; then \
656 rootme=`pwd` ; export rootme ; \
657 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
658 (cd ./chillrt; \
659 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
660 else \
661 true ; \
662 fi
663
664install-chillrt: force
665 @if [ -f ./chillrt/Makefile ] ; then \
666 rootme=`pwd` ; export rootme ; \
667 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
668 (cd ./chillrt; \
669 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
670 else \
671 true ; \
672 fi
673### end-sanitize-chill
674
9a14a29d 675### gprof
c4fb14b7 676all-gprof: all-libiberty all-bfd
06a07944 677 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
678 rootme=`pwd` ; export rootme ; \
679 (cd ./gprof; \
680 $(MAKE) $(FLAGS_TO_PASS) all) ; \
9a14a29d
SEF
681 else \
682 true ; \
683 fi
9a14a29d 684
9a14a29d 685install-gprof: force
06a07944 686 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
687 rootme=`pwd` ; export rootme ; \
688 (cd ./gprof; \
689 $(MAKE) $(FLAGS_TO_PASS) install) ; \
9a14a29d
SEF
690 else \
691 true ; \
692 fi
693
4d714963 694### byacc
c4fb14b7 695all-byacc: force
06a07944 696 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 697 rootme=`pwd` ; export rootme ; \
7fcfdcf7 698 (cd ./byacc; \
2198e4ba 699 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
700 else \
701 true ; \
702 fi
4d714963 703
4d714963 704install-byacc: force
06a07944 705 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 706 rootme=`pwd` ; export rootme ; \
7fcfdcf7 707 (cd ./byacc; \
2198e4ba 708 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
709 else \
710 true ; \
711 fi
23e3e7f9 712
dcbfc14d 713### flex
2198e4ba 714all-flex: all-libiberty
06a07944 715 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
716 rootme=`pwd` ; export rootme ; \
717 (cd ./flex; \
2198e4ba 718 $(MAKE) $(FLAGS_TO_PASS) all) ; \
dcbfc14d
DZ
719 else \
720 true ; \
721 fi
722
dcbfc14d 723install-flex: force
06a07944 724 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
725 rootme=`pwd` ; export rootme ; \
726 (cd ./flex; \
2198e4ba 727 $(MAKE) $(FLAGS_TO_PASS) install) ; \
dcbfc14d
DZ
728 else \
729 true ; \
730 fi
4d714963 731### gcc
cb4005ff 732all-gcc: all-libiberty all-byacc all-binutils all-gas
06a07944 733 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 734 rootme=`pwd` ; export rootme ; \
f4e414f1 735 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 736 (cd ./gcc; \
f4e414f1 737 $(MAKE) $(GCC_FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
738 else \
739 true ; \
740 fi
4d714963 741
c4fb14b7 742install-gcc: force
06a07944 743 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 744 rootme=`pwd` ; export rootme ; \
f4e414f1 745 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 746 (cd ./gcc; \
f4e414f1 747 $(MAKE) $(GCC_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
748 else \
749 true ; \
750 fi
23e3e7f9 751
4d714963 752### readline
c4fb14b7 753all-readline: force
06a07944 754 @if [ -f ./readline/Makefile ] ; then \
77806c3e 755 rootme=`pwd` ; export rootme ; \
7fcfdcf7 756 (cd ./readline; \
2198e4ba 757 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
758 else \
759 true ; \
760 fi
4d714963 761
4d714963 762install-readline: force
06a07944 763 @if [ -f ./readline/Makefile ] ; then \
77806c3e 764 rootme=`pwd` ; export rootme ; \
7fcfdcf7 765 (cd ./readline; \
2198e4ba 766 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
767 else \
768 true ; \
769 fi
23e3e7f9 770
4d714963 771### glob
c4fb14b7 772all-glob: force
06a07944 773 @if [ -f ./glob/Makefile ] ; then \
77806c3e 774 rootme=`pwd` ; export rootme ; \
7fcfdcf7 775 (cd ./glob; \
2198e4ba 776 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
777 else \
778 true ; \
779 fi
4d714963 780
4d714963 781install-glob: force
06a07944 782 @if [ -f ./glob/Makefile ] ; then \
77806c3e 783 rootme=`pwd` ; export rootme ; \
7fcfdcf7 784 (cd ./glob; \
2198e4ba 785 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
786 else \
787 true ; \
788 fi
23e3e7f9 789
4d714963 790### gas
a904db53 791all-gas: all-libiberty all-opcodes all-bfd
06a07944 792 @if [ -f ./gas/Makefile ] ; then \
77806c3e 793 rootme=`pwd` ; export rootme ; \
7fcfdcf7 794 (cd ./gas; \
2198e4ba 795 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
796 else \
797 true ; \
798 fi
4d714963 799
4d714963 800install-gas: force
06a07944 801 @if [ -f ./gas/Makefile ] ; then \
77806c3e 802 rootme=`pwd` ; export rootme ; \
7fcfdcf7 803 (cd ./gas; \
2198e4ba 804 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
805 else \
806 true ; \
807 fi
23e3e7f9 808
3ad0ef37
SC
809### gas
810all-tgas: all-libiberty all-bfd
811 @if [ -f ./tgas/Makefile ] ; then \
812 rootme=`pwd` ; export rootme ; \
813 (cd ./tgas; \
814 $(MAKE) $(FLAGS_TO_PASS) all) ; \
815 else \
816 true ; \
817 fi
818
819
4d714963 820### ld
6995fe83 821all-ld: all-libiberty all-bfd all-byacc all-flex
06a07944 822 @if [ -f ./ld/Makefile ] ; then \
77806c3e 823 rootme=`pwd` ; export rootme ; \
7fcfdcf7 824 (cd ./ld; \
2198e4ba 825 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
826 else \
827 true ; \
828 fi
a0f47eb7 829
4d714963 830install-ld: force
06a07944 831 @if [ -f ./ld/Makefile ] ; then \
77806c3e 832 rootme=`pwd` ; export rootme ; \
7fcfdcf7 833 (cd ./ld; \
2198e4ba 834 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
835 else \
836 true ; \
837 fi
23e3e7f9 838
4d714963 839### gdb
a904db53 840all-gdb: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
06a07944 841 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 842 rootme=`pwd` ; export rootme ; \
7fcfdcf7 843 (cd ./gdb; \
2198e4ba 844 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
845 else \
846 true ; \
847 fi
4d714963 848
4d714963 849install-gdb: force
06a07944 850 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 851 rootme=`pwd` ; export rootme ; \
7fcfdcf7 852 (cd ./gdb; \
2198e4ba 853 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
854 else \
855 true ; \
856 fi
23e3e7f9 857
4d714963 858### make
c4fb14b7 859all-make: all-libiberty
06a07944 860 @if [ -f ./make/Makefile ] ; then \
77806c3e 861 rootme=`pwd` ; export rootme ; \
7fcfdcf7 862 (cd ./make; \
2198e4ba 863 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
864 else \
865 true ; \
866 fi
4d714963 867
4d714963 868install-make: force
06a07944 869 @if [ -f ./make/Makefile ] ; then \
77806c3e 870 rootme=`pwd` ; export rootme ; \
7fcfdcf7 871 (cd ./make; \
2198e4ba 872 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
873 else \
874 true ; \
875 fi
23e3e7f9 876
4d714963 877### diff
c4fb14b7 878all-diff: force
06a07944 879 @if [ -f ./diff/Makefile ] ; then \
77806c3e 880 rootme=`pwd` ; export rootme ; \
7fcfdcf7 881 (cd ./diff; \
2198e4ba 882 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
883 else \
884 true ; \
885 fi
4d714963 886
4d714963 887install-diff: force
06a07944 888 @if [ -f ./diff/Makefile ] ; then \
77806c3e 889 rootme=`pwd` ; export rootme ; \
7fcfdcf7 890 (cd ./diff/; \
2198e4ba 891 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
892 else \
893 true ; \
894 fi
23e3e7f9 895
4d714963 896### grep
c4fb14b7 897all-grep: force
06a07944 898 @if [ -f ./grep/Makefile ] ; then \
77806c3e 899 rootme=`pwd` ; export rootme ; \
7fcfdcf7 900 (cd ./grep; \
2198e4ba 901 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
902 else \
903 true ; \
904 fi
4d714963 905
4d714963 906install-grep: force
06a07944 907 @if [ -f ./grep/Makefile ] ; then \
77806c3e 908 rootme=`pwd` ; export rootme ; \
7fcfdcf7 909 (cd ./grep; \
2198e4ba
MT
910 $(MAKE) $(FLAGS_TO_PASS) install) ; \
911 else \
912 true ; \
913 fi
914
915### rcs
916all-rcs: force
06a07944 917 @if [ -f ./rcs/Makefile ] ; then \
2198e4ba
MT
918 rootme=`pwd` ; export rootme ; \
919 (cd ./rcs; \
920 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
921 else \
922 true ; \
923 fi
4d714963 924
c4fb14b7 925install-rcs: force
06a07944 926 @if [ -f ./rcs/Makefile ] ; then \
77806c3e 927 rootme=`pwd` ; export rootme ; \
7fcfdcf7 928 (cd ./rcs; \
2198e4ba 929 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
930 else \
931 true ; \
932 fi
23e3e7f9 933
4d714963 934### cvs
c4fb14b7 935all-cvs: force
06a07944 936 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 937 rootme=`pwd` ; export rootme ; \
7fcfdcf7 938 (cd ./cvs; \
2198e4ba 939 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
940 else \
941 true ; \
942 fi
4d714963 943
c4fb14b7 944install-cvs: force
06a07944 945 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 946 rootme=`pwd` ; export rootme ; \
7fcfdcf7 947 (cd ./cvs; \
2198e4ba 948 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
949 else \
950 true ; \
951 fi
23e3e7f9 952
7c9feeb7 953### patch
c4fb14b7 954all-patch: force
06a07944 955 @if [ -f ./patch/Makefile ] ; then \
77806c3e 956 rootme=`pwd` ; export rootme ; \
7fcfdcf7 957 (cd ./patch; \
2198e4ba 958 $(MAKE) $(FLAGS_TO_PASS) all) ; \
7c9feeb7
RP
959 else \
960 true ; \
961 fi
962
c4fb14b7 963install-patch: force
06a07944 964 @if [ -f ./patch/Makefile ] ; then \
77806c3e 965 rootme=`pwd` ; export rootme ; \
7fcfdcf7 966 (cd ./patch; \
2198e4ba 967 $(MAKE) $(FLAGS_TO_PASS) \
7c9feeb7 968 bindir=$(bindir) \
2198e4ba 969 man1dir=$(man1dir) install) ; \
7c9feeb7
RP
970 else \
971 true ; \
972 fi
973
4d714963 974### emacs
c4fb14b7 975all-emacs: force
06a07944 976 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 977 rootme=`pwd` ; export rootme ; \
7fcfdcf7 978 (cd ./emacs; \
d1bea4c7 979 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
980 else \
981 true ; \
982 fi
4d714963 983
c4fb14b7 984install-emacs: force
06a07944 985 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 986 rootme=`pwd` ; export rootme ; \
7fcfdcf7 987 (cd ./emacs; \
d1bea4c7 988 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
989 else \
990 true ; \
991 fi
23e3e7f9 992
4d714963 993### ispell
c4fb14b7 994all-ispell: all-emacs
06a07944 995 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 996 rootme=`pwd` ; export rootme ; \
7fcfdcf7 997 (cd ./ispell; \
2198e4ba 998 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
999 else \
1000 true ; \
1001 fi
4d714963 1002
c4fb14b7 1003install-ispell: force
06a07944 1004 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 1005 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1006 (cd ./ispell; \
2198e4ba 1007 $(MAKE) $(FLAGS_TO_PASS) install) ; \
079399f6
RP
1008 else \
1009 true ; \
1010 fi
23e3e7f9 1011
079b2abe 1012### send_pr
c4fb14b7 1013all-send_pr: force
06a07944 1014 @if [ -f ./send_pr/Makefile ] ; then \
079b2abe
RP
1015 rootme=`pwd` ; export rootme ; \
1016 (cd ./send_pr; \
2198e4ba 1017 $(MAKE) $(FLAGS_TO_PASS) all) ; \
079b2abe
RP
1018 else \
1019 true ; \
1020 fi
079b2abe 1021
c4fb14b7 1022install-send_pr: force
06a07944 1023 @if [ -f ./send_pr/Makefile ] ; then \
079b2abe
RP
1024 rootme=`pwd` ; export rootme ; \
1025 (cd ./send_pr; \
2198e4ba 1026 $(MAKE) $(FLAGS_TO_PASS) install) ; \
079b2abe
RP
1027 else \
1028 true ; \
1029 fi
1030
06a07944
RP
1031### libm
1032all-libm: force
98a33b6d 1033 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
1034 rootme=`pwd` ; export rootme ; \
1035 (cd ./libm; \
1b9b5090 1036 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
06a07944
RP
1037 else \
1038 true ; \
1039 fi
1040
06a07944 1041install-libm: force
98a33b6d 1042 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
1043 rootme=`pwd` ; export rootme ; \
1044 (cd ./libm; \
1b9b5090 1045 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
06a07944
RP
1046 else \
1047 true ; \
1048 fi
1049
ba8abfce 1050### libg++
9d98d2ac 1051
e85e07cb 1052all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib
06a07944 1053 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 1054 rootme=`pwd` ; export rootme ; \
51489233 1055 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 1056 (cd ./libg++; \
51489233 1057 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
ba8abfce
JG
1058 else \
1059 true ; \
1060 fi
1061
c4fb14b7 1062install-libg++: force
06a07944 1063 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 1064 rootme=`pwd` ; export rootme ; \
51489233 1065 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 1066 (cd ./libg++; \
51489233 1067 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
ba8abfce
JG
1068 else \
1069 true ; \
1070 fi
ffce44a0
DZ
1071### tcl
1072all-tcl:
1073 @if [ -f ./tcl/Makefile ] ; then \
1074 rootme=`pwd` ; export rootme ; \
1075 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1076 (cd ./tcl; \
1077 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1078 else \
1079 true ; \
1080 fi
1081
ffce44a0
DZ
1082install-tcl: force
1083 @if [ -f ./tcl/Makefile ] ; then \
1084 rootme=`pwd` ; export rootme ; \
1085 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1086 (cd ./tcl; \
1087 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1088 else \
1089 true ; \
1090 fi
1091
1092
1093### tk
1094all-tk: all-tcl
1095 @if [ -f ./tk/Makefile ] ; then \
1096 rootme=`pwd` ; export rootme ; \
1097 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1098 (cd ./tk; \
d1bea4c7 1099 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
ffce44a0
DZ
1100 else \
1101 true ; \
1102 fi
1103
ffce44a0
DZ
1104install-tk: force
1105 @if [ -f ./tk/Makefile ] ; then \
1106 rootme=`pwd` ; export rootme ; \
1107 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1108 (cd ./tk; \
d1bea4c7 1109 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
ffce44a0
DZ
1110 else \
1111 true ; \
1112 fi
1113
d1bea4c7 1114### expect
ffce44a0
DZ
1115all-expect: all-tcl
1116 @if [ -f ./expect/Makefile ] ; then \
1117 rootme=`pwd` ; export rootme ; \
1118 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1119 (cd ./expect; \
1120 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1121 else \
1122 true ; \
1123 fi
1124
ffce44a0
DZ
1125install-expect: force
1126 @if [ -f ./expect/Makefile ] ; then \
1127 rootme=`pwd` ; export rootme ; \
1128 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1129 (cd ./expect; \
1130 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1131 else \
1132 true ; \
1133 fi
1134
675e8ac9
SC
1135### sim
1136all-sim: all-bfd
1137 @if [ -f ./sim/Makefile ] ; then \
d1bea4c7 1138 rootme=`pwd` ; export rootme ; \
675e8ac9 1139 (cd ./sim; \
d1bea4c7
DZ
1140 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1141 else \
1142 true ; \
1143 fi
1144
675e8ac9
SC
1145install-sim: force
1146 @if [ -f ./sim/Makefile ] ; then \
d1bea4c7 1147 rootme=`pwd` ; export rootme ; \
675e8ac9 1148 (cd ./sim; \
b1cceba2 1149 $(MAKE) $(FLAGS_TO_PASS) install) ; \
d1bea4c7
DZ
1150 else \
1151 true ; \
1152 fi
1153
b1cceba2
DZ
1154### fileutils
1155all-fileutils: force
1156 @if [ -f ./fileutils/Makefile ] ; then \
1157 rootme=`pwd` ; export rootme ; \
1158 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1159 else \
1160 true ; \
1161 fi
1162
1163install-fileutils: force
1164 @if [ -f ./fileutils/Makefile ] ; then \
d1bea4c7 1165 rootme=`pwd` ; export rootme ; \
b1cceba2
DZ
1166 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1167 else \
1168 true ; \
1169 fi
1170
1171### find
1172all-find: force
1173 @if [ -f ./find/Makefile ] ; then \
1174 rootme=`pwd` ; export rootme ; \
1175 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1176 else \
1177 true ; \
1178 fi
1179
1180install-find: force
1181 @if [ -f ./find/Makefile ] ; then \
1182 rootme=`pwd` ; export rootme ; \
1183 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1184 else \
1185 true ; \
1186 fi
1187
1188### gawk
1189all-gawk: force
1190 @if [ -f ./gawk/Makefile ] ; then \
1191 rootme=`pwd` ; export rootme ; \
1192 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1193 else \
1194 true ; \
1195 fi
1196
1197install-gawk: force
1198 @if [ -f ./gawk/Makefile ] ; then \
1199 rootme=`pwd` ; export rootme ; \
1200 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) install) ; \
d1bea4c7
DZ
1201 else \
1202 true ; \
1203 fi
1204
b1cceba2
DZ
1205### m4
1206all-m4: all-libiberty
1207 @if [ -f ./m4/Makefile ] ; then \
1208 rootme=`pwd` ; export rootme ; \
1209 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1210 else \
1211 true ; \
1212 fi
1213
1214install-m4: force
1215 @if [ -f ./m4/Makefile ] ; then \
1216 rootme=`pwd` ; export rootme ; \
1217 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1218 else \
1219 true ; \
1220 fi
1221
1222### sed
1223all-sed: force
1224 @if [ -f ./sed/Makefile ] ; then \
1225 rootme=`pwd` ; export rootme ; \
1226 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1227 else \
1228 true ; \
1229 fi
1230
1231install-sed: force
1232 @if [ -f ./sed/Makefile ] ; then \
1233 rootme=`pwd` ; export rootme ; \
1234 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1235 else \
1236 true ; \
1237 fi
1238
1239### time
1240all-time: force
1241 @if [ -f ./time/Makefile ] ; then \
1242 rootme=`pwd` ; export rootme ; \
1243 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1244 else \
1245 true ; \
1246 fi
1247
1248install-time: force
1249 @if [ -f ./time/Makefile ] ; then \
1250 rootme=`pwd` ; export rootme ; \
1251 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1252 else \
1253 true ; \
1254 fi
1255
1256### wdiff
1257all-wdiff: force
1258 @if [ -f ./wdiff/Makefile ] ; then \
1259 rootme=`pwd` ; export rootme ; \
1260 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1261 else \
1262 true ; \
1263 fi
1264
1265install-wdiff: force
1266 @if [ -f ./wdiff/Makefile ] ; then \
1267 rootme=`pwd` ; export rootme ; \
1268 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1269 else \
1270 true ; \
1271 fi
1272
4a2f0c79
DZ
1273### uudecode
1274all-uudecode: all-libiberty
1275 @if [ -f ./uudecode/Makefile ] ; then \
1276 rootme=`pwd` ; export rootme ; \
1277 (cd ./uudecode; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1278 else \
1279 true ; \
1280 fi
1281
1282install-uudecode: force
1283 @if [ -f ./uudecode/Makefile ] ; then \
1284 rootme=`pwd` ; export rootme ; \
1285 (cd ./uudecode; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1286 else \
1287 true ; \
1288 fi
1289
b1cceba2
DZ
1290### shellutils
1291all-shellutils: force
1292 @if [ -f ./shellutils/Makefile ] ; then \
1293 rootme=`pwd` ; export rootme ; \
1294 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1295 else \
1296 true ; \
1297 fi
1298
1299install-shellutils: force
1300 @if [ -f ./shellutils/Makefile ] ; then \
1301 rootme=`pwd` ; export rootme ; \
1302 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1303 else \
1304 true ; \
1305 fi
1306
1307### textutils
1308all-textutils: force
1309 @if [ -f ./textutils/Makefile ] ; then \
1310 rootme=`pwd` ; export rootme ; \
1311 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1312 else \
1313 true ; \
1314 fi
1315
1316install-textutils: force
1317 @if [ -f ./textutils/Makefile ] ; then \
1318 rootme=`pwd` ; export rootme ; \
1319 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1320 else \
1321 true ; \
1322 fi
1323
1324
d1bea4c7 1325
4d714963 1326### other supporting targets
a0f47eb7 1327
02a7ba9a 1328subdir_do:
9f73dd6a
DZ
1329### start-sanitize-chill
1330###
1331### WARNING: THIS IS VERY UGLY AND I DID NOT DO THIS WILLINGLY
1332###
1333### if you change the code for libg++ et al, also change the
1334### code for chillrt
1335###
1336### end-sanitize-chill
1dbe4d41 1337 @for i in $(DODIRS); do \
51489233
ILT
1338 if [ -f ./$$i/localenv ] || [ -f ./$$i/Makefile ] ; then \
1339 case $$i in \
d405f5be 1340 libg++ | xiberty | newlib) \
51489233
ILT
1341 if (rootme=`pwd` ; export rootme ; \
1342 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1343 cd ./$$i ; \
1344 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1345 else exit 1 ; fi \
1346 ;; \
9f73dd6a 1347 $(start-sanitize-chill) \
d405f5be
DZ
1348 chillrt) \
1349 if (rootme=`pwd` ; export rootme ; \
1350 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1351 cd ./$$i ; \
1352 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1353 else exit 1 ; fi \
1354 ;; \
9f73dd6a 1355 $(end-sanitize-chill) \
f4e414f1
ILT
1356 gcc) \
1357 if (rootme=`pwd` ; export rootme ; \
1358 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1359 cd ./$$i ; \
1360 $(MAKE) $(GCC_FLAGS_TO_PASS) $(DO)) ; then true ; \
1361 else exit 1 ; fi \
1362 ;; \
51489233
ILT
1363 *) \
1364 if (rootme=`pwd` ; export rootme ; \
1365 cd ./$$i ; \
1366 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1367 else exit 1 ; fi \
1368 ;; \
1369 esac ; \
1370 else true ; fi ; \
a01bf1fb 1371 done
eb02fd64 1372
abc52b80
JG
1373# The "else true" stuff is for Ultrix; the shell returns the exit code
1374# of the "if" command, if no commands are run in the "then" or "else" part,
1375# causing Make to quit.
4c27527f
RP
1376
1377MAKEDIRS= \
4d714963 1378 $(prefix) \
7fcfdcf7 1379 $(exec_prefix) \
8b361a95
SEF
1380 $(tooldir)
1381
1382# $(bindir) \
1383# $(libdir) \
1384# $(includedir) \
1385# $(datadir) \
1386# $(docdir) \
1387# $(mandir) \
1388# $(man1dir) \
1389# $(man5dir)
4d714963
RP
1390
1391# $(man2dir) \
1392# $(man3dir) \
1393# $(man4dir) \
1394# $(man6dir) \
1395# $(man7dir) \
1396# $(man8dir)
4c27527f 1397
02a7ba9a 1398install-dirs:
4c27527f 1399 for i in $(MAKEDIRS) ; do \
cd49a4dc 1400 echo Making $$i... ; \
8b361a95
SEF
1401 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1402 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
06a07944
RP
1403 if [ ! -d $$i ] ; then \
1404 if mkdir $$i ; then \
1405 true ; \
1406 else \
1407 exit 1 ; \
1408 fi ; \
1409 else \
1410 true ; \
1411 fi ; \
4c27527f 1412 done
0ec776a5 1413
02a7ba9a 1414install-info-dirs:
9a9e8e7f 1415 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
c5f94070 1416
02a7ba9a 1417dir.info:
8b361a95 1418 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new
c466cfab 1419 mv -f dir.info.new dir.info
6b7e5998 1420
b1cceba2
DZ
1421dist:
1422 @echo "Building a full distribution of this tree isn't done"
1423 @echo "via 'make dist'. Check out the etc/ subdirectory"
1424
eb02fd64
RP
1425etags tags: TAGS
1426
02a7ba9a 1427TAGS:
eb02fd64
RP
1428 etags `$(MAKE) ls`
1429
1430ls:
1431 @echo Makefile
1432 @for i in $(SUBDIRS); \
1433 do \
1434 (cd $$i; \
1435 pwd=`pwd`; \
1436 wd=`basename $$pwd`; \
1437 for j in `$(MAKE) ls`; \
1438 do \
1439 echo $$wd/$$j; \
1440 done) \
1441 done
1442
3c81fef5 1443force:
eb02fd64
RP
1444
1445# with the gnu make, this is done automatically.
1446
f1eb48b6 1447Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 1448 $(SHELL) ./config.status
eb02fd64 1449
11954bf1
JG
1450#
1451# Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1452
d94d255d 1453DEVO_SUPPORT= README Makefile.in configure configure.in \
5cc24596 1454 config.guess config.sub config etc move-if-change \
fca4f908 1455 COPYING.LIB
fb90daeb 1456GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob
d94d255d 1457GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS)
11954bf1 1458
b1cceba2 1459setup-dirs: force
11954bf1
JG
1460 ./configure sun4
1461 make clean
1462 ./configure -rm sun4
905bb120 1463 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
abc52b80 1464
abc52b80
JG
1465gdb.tar.Z: setup-dirs
1466 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
1467 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1468
f980fcfb 1469make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/texinfo.tex
abc52b80
JG
1470 rm -rf proto-toplev; mkdir proto-toplev
1471 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1472 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1473 ln -s ../$$i . ; \
1474 done)
7c9feeb7
RP
1475 # Put only one copy (four hard links) of COPYING in the tar file.
1476 rm proto-toplev/bfd/COPYING
1477 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1478 rm proto-toplev/include/COPYING
1479 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1480 rm proto-toplev/readline/COPYING
1481 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
a50b5d9d
JG
1482
1483 # Take out texinfo and glob from configurable dirs
a3a063a9 1484 rm proto-toplev/configure.in
a50b5d9d
JG
1485 sed -e '/^host_tools=/s/texinfo //' \
1486 -e '/^host_libs=/s/glob //' \
1487 <configure.in >proto-toplev/configure.in
6995fe83 1488
a50b5d9d
JG
1489 # Take out texinfo from a few places; make simple BISON=bison line.
1490 rm proto-toplev/Makefile.in
1491 sed -e '/^all\.normal: /s/\all-texinfo //' \
1492 -e '/^ install-texinfo /d' \
1493 -e '\/^BISON =/,\/^$$/c\
1494 BISON = bison' \
6995fe83
SG
1495 <Makefile.in >proto-toplev/Makefile.in
1496
abc52b80 1497 mkdir proto-toplev/texinfo
a50b5d9d 1498 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
905bb120 1499 chmod og=u `find proto-toplev -print`
abc52b80
JG
1500 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1501 echo "==> Making gdb-$$VER.tar.Z"; \
1502 ln -s proto-toplev gdb-$$VER; \
1503 tar cfh - gdb-$$VER \
1504 | compress -v >gdb-$$VER.tar.Z)
1505
0ec776a5 1506
eb02fd64 1507# end of Makefile.in
This page took 0.147725 seconds and 4 git commands to generate.