updated dates, add support for building with native (SunPRO) C on Solaris2
[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 \
5dca5185 322 all-gcc all-binutils all-libg++ all-readline all-z8ksim all-h8300sim 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 \
d405f5be
DZ
336 all-opcodes all-z8ksim all-h8300sim all-bfd all-readline \
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 \
b1cceba2 410 install-z8ksim \
5dca5185 411 install-h8300sim \
b1cceba2 412 install-fileutils install-find install-gawk install-m4 install-sed install-shellutils \
4a2f0c79 413 install-textutils install-time install-wdiff install-uudecode
d1bea4c7 414
5cc24596
PB
415#
416# Install the gcc headers files, but not the fixed include files,
417# which we are not allowed to distribute. This rule is very dependent
418# on the workings of the gcc Makefile.in.
419#
06a07944 420gcc-no-fixedincludes:
5cc24596
PB
421 @if [ -f ./gcc/Makefile ]; then \
422 rm -rf gcc/tmp-include; \
423 mv gcc/include gcc/tmp-include 2>/dev/null; \
424 mkdir gcc/include; \
425 touch gcc/stmp-fixincludes; \
426 rm -f gcc/stmp-headers; \
427 rootme=`pwd`; export rootme; \
428 srcroot=`cd $(srcdir); pwd` ; export srcroot; \
429 (cd ./gcc; \
430 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
431 rm -rf gcc/include; \
432 mv gcc/tmp-include gcc/include 2>/dev/null; \
433 else true; fi
dcbfc14d
DZ
434
435install.cross: install-dirs install-libiberty install-mmalloc \
aa06ff7e 436 install-binutils install-opcodes install-byacc install-flex \
dfa891fc
DZ
437 install-ld install-gas install-readline \
438 install-glob install-gdb install-mmalloc \
d405f5be
DZ
439 install-newlib \
440 $(start-sanitize-chill) \
441 install-chillrt \
442 $(end-sanitize-chill) \
443 install-gcc install-etc install-deja-gnu
fca4f908
MW
444
445### deja-gnu
446all-deja-gnu: force
447 @if [ -f ./deja-gnu/Makefile ] ; then \
448 rootme=`pwd` ; export rootme ; \
449 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) all) ; \
450 else \
451 true ; \
452 fi
453
fca4f908
MW
454install-deja-gnu: force
455 @if [ -f ./deja-gnu/Makefile ] ; then \
456 rootme=`pwd` ; export rootme ; \
457 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) install) ; \
458 else \
459 true ; \
460 fi
23e3e7f9 461
618f57a9
RP
462### autoconf
463all-autoconf: force
a5cdd8af 464 @if [ -f ./autoconf/Makefile ] ; then \
618f57a9 465 rootme=`pwd` ; export rootme ; \
a5cdd8af 466 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) all) ; \
618f57a9
RP
467 else \
468 true ; \
469 fi
470
618f57a9 471install-autoconf: force
06a07944 472 @if [ -f ./autoconf/Makefile ] ; then \
618f57a9 473 rootme=`pwd` ; export rootme ; \
98a33b6d
DZ
474 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) install) ; \
475 else \
476 true ; \
477 fi
478
479### etc
480all-etc: force
481 @if [ -f ./etc/Makefile ] ; then \
482 rootme=`pwd` ; export rootme ; \
483 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) all) ; \
484 else \
485 true ; \
486 fi
487
98a33b6d
DZ
488install-etc: force
489 @if [ -f ./etc/Makefile ] ; then \
490 rootme=`pwd` ; export rootme ; \
491 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) install) ; \
618f57a9
RP
492 else \
493 true ; \
494 fi
495
4d714963 496### libiberty
c4fb14b7 497all-libiberty: force
06a07944 498 @if [ -f ./libiberty/Makefile ] ; then \
77806c3e 499 rootme=`pwd` ; export rootme ; \
7fcfdcf7 500 (cd ./libiberty; \
2198e4ba 501 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
502 else \
503 true ; \
504 fi
4d714963 505
4d714963 506install-libiberty: force
06a07944 507 @if [ -f ./libiberty/Makefile ] ; then \
77806c3e 508 rootme=`pwd` ; export rootme ; \
7fcfdcf7 509 (cd ./libiberty; \
2198e4ba 510 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
511 else \
512 true ; \
513 fi
23e3e7f9 514
fb90daeb
ME
515### xiberty
516all-xiberty: all-gcc all-newlib
517 @if [ -f ./xiberty/Makefile ] ; then \
518 rootme=`pwd` ; export rootme ; \
519 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
520 (cd ./xiberty; \
1b9b5090 521 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
fb90daeb
ME
522 else \
523 true ; \
524 fi
525
fb90daeb
ME
526install-xiberty: force
527 @if [ -f ./xiberty/Makefile ] ; then \
528 rootme=`pwd` ; export rootme ; \
529 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
530 (cd ./xiberty; \
1b9b5090 531 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
fb90daeb
ME
532 else \
533 true ; \
534 fi
535
66cfe047 536### mmalloc
c4fb14b7 537all-mmalloc: force
06a07944 538 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
539 rootme=`pwd` ; export rootme ; \
540 (cd ./mmalloc; \
2198e4ba 541 $(MAKE) $(FLAGS_TO_PASS) all) ; \
66cfe047
SG
542 else \
543 true ; \
544 fi
66cfe047 545
66cfe047 546install-mmalloc: force
06a07944 547 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
548 rootme=`pwd` ; export rootme ; \
549 (cd ./mmalloc; \
2198e4ba 550 $(MAKE) $(FLAGS_TO_PASS) install) ; \
66cfe047
SG
551 else \
552 true ; \
553 fi
554
4d714963 555### texinfo
c4fb14b7 556all-texinfo: all-libiberty
06a07944 557 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 558 rootme=`pwd` ; export rootme ; \
7fcfdcf7 559 (cd ./texinfo; \
2198e4ba 560 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
561 else \
562 true ; \
563 fi
4d714963 564
4d714963 565install-texinfo: force
06a07944 566 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 567 rootme=`pwd` ; export rootme ; \
7fcfdcf7 568 (cd ./texinfo; \
2198e4ba 569 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
570 else \
571 true ; \
572 fi
23e3e7f9 573
4d714963 574### bfd
c4fb14b7 575all-bfd: force
06a07944 576 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 577 rootme=`pwd` ; export rootme ; \
7fcfdcf7 578 (cd ./bfd; \
2198e4ba 579 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
580 else \
581 true ; \
582 fi
4d714963 583
4d714963 584install-bfd: force
06a07944 585 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 586 rootme=`pwd` ; export rootme ; \
7fcfdcf7 587 (cd ./bfd; \
2198e4ba 588 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
589 else \
590 true ; \
591 fi
23e3e7f9 592
aa06ff7e
SC
593
594### opcodes
595all-opcodes: force
596 @if [ -f ./opcodes/Makefile ] ; then \
597 rootme=`pwd` ; export rootme ; \
a904db53 598 (cd ./opcodes; \
aa06ff7e
SC
599 $(MAKE) $(FLAGS_TO_PASS) all) ; \
600 else \
601 true ; \
602 fi
603
aa06ff7e
SC
604install-opcodes: force
605 @if [ -f ./opcodes/Makefile ] ; then \
606 rootme=`pwd` ; export rootme ; \
a904db53 607 (cd ./opcodes; \
aa06ff7e
SC
608 $(MAKE) $(FLAGS_TO_PASS) install) ; \
609 else \
610 true ; \
611 fi
612
4d714963 613### binutils
aa06ff7e 614all-binutils: all-opcodes all-libiberty all-bfd all-flex
06a07944 615 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 616 rootme=`pwd` ; export rootme ; \
7fcfdcf7 617 (cd ./binutils; \
2198e4ba 618 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
619 else \
620 true ; \
621 fi
4d714963 622
4d714963 623install-binutils: force
06a07944 624 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 625 rootme=`pwd` ; export rootme ; \
7fcfdcf7 626 (cd ./binutils; \
2198e4ba 627 $(MAKE) $(FLAGS_TO_PASS) install) ; \
7fcfdcf7
SC
628 else \
629 true ; \
630 fi
631
632### newlib
51489233 633all-newlib: all-binutils all-ld all-gas all-gcc
06a07944 634 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 635 rootme=`pwd` ; export rootme ; \
51489233 636 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 637 (cd ./newlib; \
51489233 638 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
7fcfdcf7
SC
639 else \
640 true ; \
641 fi
7fcfdcf7 642
7fcfdcf7 643install-newlib: force
06a07944 644 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 645 rootme=`pwd` ; export rootme ; \
51489233 646 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 647 (cd ./newlib; \
51489233 648 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
649 else \
650 true ; \
651 fi
23e3e7f9 652
bc2a2c17
FF
653### start-sanitize-chill
654### chillrt
9f73dd6a 655all-chillrt: all-binutils all-ld all-gas all-gcc all-newlib
bc2a2c17
FF
656 @if [ -f ./chillrt/Makefile ] ; then \
657 rootme=`pwd` ; export rootme ; \
658 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
659 (cd ./chillrt; \
660 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
661 else \
662 true ; \
663 fi
664
665install-chillrt: force
666 @if [ -f ./chillrt/Makefile ] ; then \
667 rootme=`pwd` ; export rootme ; \
668 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
669 (cd ./chillrt; \
670 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
671 else \
672 true ; \
673 fi
674### end-sanitize-chill
675
9a14a29d 676### gprof
c4fb14b7 677all-gprof: all-libiberty all-bfd
06a07944 678 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
679 rootme=`pwd` ; export rootme ; \
680 (cd ./gprof; \
681 $(MAKE) $(FLAGS_TO_PASS) all) ; \
9a14a29d
SEF
682 else \
683 true ; \
684 fi
9a14a29d 685
9a14a29d 686install-gprof: force
06a07944 687 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
688 rootme=`pwd` ; export rootme ; \
689 (cd ./gprof; \
690 $(MAKE) $(FLAGS_TO_PASS) install) ; \
9a14a29d
SEF
691 else \
692 true ; \
693 fi
694
4d714963 695### byacc
c4fb14b7 696all-byacc: force
06a07944 697 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 698 rootme=`pwd` ; export rootme ; \
7fcfdcf7 699 (cd ./byacc; \
2198e4ba 700 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
701 else \
702 true ; \
703 fi
4d714963 704
4d714963 705install-byacc: force
06a07944 706 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 707 rootme=`pwd` ; export rootme ; \
7fcfdcf7 708 (cd ./byacc; \
2198e4ba 709 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
710 else \
711 true ; \
712 fi
23e3e7f9 713
dcbfc14d 714### flex
2198e4ba 715all-flex: all-libiberty
06a07944 716 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
717 rootme=`pwd` ; export rootme ; \
718 (cd ./flex; \
2198e4ba 719 $(MAKE) $(FLAGS_TO_PASS) all) ; \
dcbfc14d
DZ
720 else \
721 true ; \
722 fi
723
dcbfc14d 724install-flex: force
06a07944 725 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
726 rootme=`pwd` ; export rootme ; \
727 (cd ./flex; \
2198e4ba 728 $(MAKE) $(FLAGS_TO_PASS) install) ; \
dcbfc14d
DZ
729 else \
730 true ; \
731 fi
4d714963 732### gcc
cb4005ff 733all-gcc: all-libiberty all-byacc all-binutils all-gas
06a07944 734 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 735 rootme=`pwd` ; export rootme ; \
f4e414f1 736 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 737 (cd ./gcc; \
f4e414f1 738 $(MAKE) $(GCC_FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
739 else \
740 true ; \
741 fi
4d714963 742
c4fb14b7 743install-gcc: force
06a07944 744 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 745 rootme=`pwd` ; export rootme ; \
f4e414f1 746 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 747 (cd ./gcc; \
f4e414f1 748 $(MAKE) $(GCC_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
749 else \
750 true ; \
751 fi
23e3e7f9 752
4d714963 753### readline
c4fb14b7 754all-readline: force
06a07944 755 @if [ -f ./readline/Makefile ] ; then \
77806c3e 756 rootme=`pwd` ; export rootme ; \
7fcfdcf7 757 (cd ./readline; \
2198e4ba 758 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
759 else \
760 true ; \
761 fi
4d714963 762
4d714963 763install-readline: force
06a07944 764 @if [ -f ./readline/Makefile ] ; then \
77806c3e 765 rootme=`pwd` ; export rootme ; \
7fcfdcf7 766 (cd ./readline; \
2198e4ba 767 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
768 else \
769 true ; \
770 fi
23e3e7f9 771
4d714963 772### glob
c4fb14b7 773all-glob: force
06a07944 774 @if [ -f ./glob/Makefile ] ; then \
77806c3e 775 rootme=`pwd` ; export rootme ; \
7fcfdcf7 776 (cd ./glob; \
2198e4ba 777 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
778 else \
779 true ; \
780 fi
4d714963 781
4d714963 782install-glob: force
06a07944 783 @if [ -f ./glob/Makefile ] ; then \
77806c3e 784 rootme=`pwd` ; export rootme ; \
7fcfdcf7 785 (cd ./glob; \
2198e4ba 786 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
787 else \
788 true ; \
789 fi
23e3e7f9 790
4d714963 791### gas
a904db53 792all-gas: all-libiberty all-opcodes all-bfd
06a07944 793 @if [ -f ./gas/Makefile ] ; then \
77806c3e 794 rootme=`pwd` ; export rootme ; \
7fcfdcf7 795 (cd ./gas; \
2198e4ba 796 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
797 else \
798 true ; \
799 fi
4d714963 800
4d714963 801install-gas: force
06a07944 802 @if [ -f ./gas/Makefile ] ; then \
77806c3e 803 rootme=`pwd` ; export rootme ; \
7fcfdcf7 804 (cd ./gas; \
2198e4ba 805 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
806 else \
807 true ; \
808 fi
23e3e7f9 809
3ad0ef37
SC
810### gas
811all-tgas: all-libiberty all-bfd
812 @if [ -f ./tgas/Makefile ] ; then \
813 rootme=`pwd` ; export rootme ; \
814 (cd ./tgas; \
815 $(MAKE) $(FLAGS_TO_PASS) all) ; \
816 else \
817 true ; \
818 fi
819
820
4d714963 821### ld
6995fe83 822all-ld: all-libiberty all-bfd all-byacc all-flex
06a07944 823 @if [ -f ./ld/Makefile ] ; then \
77806c3e 824 rootme=`pwd` ; export rootme ; \
7fcfdcf7 825 (cd ./ld; \
2198e4ba 826 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
827 else \
828 true ; \
829 fi
a0f47eb7 830
4d714963 831install-ld: force
06a07944 832 @if [ -f ./ld/Makefile ] ; then \
77806c3e 833 rootme=`pwd` ; export rootme ; \
7fcfdcf7 834 (cd ./ld; \
2198e4ba 835 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
836 else \
837 true ; \
838 fi
23e3e7f9 839
4d714963 840### gdb
a904db53 841all-gdb: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
06a07944 842 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 843 rootme=`pwd` ; export rootme ; \
7fcfdcf7 844 (cd ./gdb; \
2198e4ba 845 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
846 else \
847 true ; \
848 fi
4d714963 849
4d714963 850install-gdb: force
06a07944 851 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 852 rootme=`pwd` ; export rootme ; \
7fcfdcf7 853 (cd ./gdb; \
2198e4ba 854 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
855 else \
856 true ; \
857 fi
23e3e7f9 858
4d714963 859### make
c4fb14b7 860all-make: all-libiberty
06a07944 861 @if [ -f ./make/Makefile ] ; then \
77806c3e 862 rootme=`pwd` ; export rootme ; \
7fcfdcf7 863 (cd ./make; \
2198e4ba 864 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
865 else \
866 true ; \
867 fi
4d714963 868
4d714963 869install-make: force
06a07944 870 @if [ -f ./make/Makefile ] ; then \
77806c3e 871 rootme=`pwd` ; export rootme ; \
7fcfdcf7 872 (cd ./make; \
2198e4ba 873 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
874 else \
875 true ; \
876 fi
23e3e7f9 877
4d714963 878### diff
c4fb14b7 879all-diff: force
06a07944 880 @if [ -f ./diff/Makefile ] ; then \
77806c3e 881 rootme=`pwd` ; export rootme ; \
7fcfdcf7 882 (cd ./diff; \
2198e4ba 883 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
884 else \
885 true ; \
886 fi
4d714963 887
4d714963 888install-diff: force
06a07944 889 @if [ -f ./diff/Makefile ] ; then \
77806c3e 890 rootme=`pwd` ; export rootme ; \
7fcfdcf7 891 (cd ./diff/; \
2198e4ba 892 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
893 else \
894 true ; \
895 fi
23e3e7f9 896
4d714963 897### grep
c4fb14b7 898all-grep: force
06a07944 899 @if [ -f ./grep/Makefile ] ; then \
77806c3e 900 rootme=`pwd` ; export rootme ; \
7fcfdcf7 901 (cd ./grep; \
2198e4ba 902 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
903 else \
904 true ; \
905 fi
4d714963 906
4d714963 907install-grep: force
06a07944 908 @if [ -f ./grep/Makefile ] ; then \
77806c3e 909 rootme=`pwd` ; export rootme ; \
7fcfdcf7 910 (cd ./grep; \
2198e4ba
MT
911 $(MAKE) $(FLAGS_TO_PASS) install) ; \
912 else \
913 true ; \
914 fi
915
916### rcs
917all-rcs: force
06a07944 918 @if [ -f ./rcs/Makefile ] ; then \
2198e4ba
MT
919 rootme=`pwd` ; export rootme ; \
920 (cd ./rcs; \
921 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
922 else \
923 true ; \
924 fi
4d714963 925
c4fb14b7 926install-rcs: force
06a07944 927 @if [ -f ./rcs/Makefile ] ; then \
77806c3e 928 rootme=`pwd` ; export rootme ; \
7fcfdcf7 929 (cd ./rcs; \
2198e4ba 930 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
931 else \
932 true ; \
933 fi
23e3e7f9 934
4d714963 935### cvs
c4fb14b7 936all-cvs: force
06a07944 937 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 938 rootme=`pwd` ; export rootme ; \
7fcfdcf7 939 (cd ./cvs; \
2198e4ba 940 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
941 else \
942 true ; \
943 fi
4d714963 944
c4fb14b7 945install-cvs: force
06a07944 946 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 947 rootme=`pwd` ; export rootme ; \
7fcfdcf7 948 (cd ./cvs; \
2198e4ba 949 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
950 else \
951 true ; \
952 fi
23e3e7f9 953
7c9feeb7 954### patch
c4fb14b7 955all-patch: force
06a07944 956 @if [ -f ./patch/Makefile ] ; then \
77806c3e 957 rootme=`pwd` ; export rootme ; \
7fcfdcf7 958 (cd ./patch; \
2198e4ba 959 $(MAKE) $(FLAGS_TO_PASS) all) ; \
7c9feeb7
RP
960 else \
961 true ; \
962 fi
963
c4fb14b7 964install-patch: force
06a07944 965 @if [ -f ./patch/Makefile ] ; then \
77806c3e 966 rootme=`pwd` ; export rootme ; \
7fcfdcf7 967 (cd ./patch; \
2198e4ba 968 $(MAKE) $(FLAGS_TO_PASS) \
7c9feeb7 969 bindir=$(bindir) \
2198e4ba 970 man1dir=$(man1dir) install) ; \
7c9feeb7
RP
971 else \
972 true ; \
973 fi
974
4d714963 975### emacs
c4fb14b7 976all-emacs: force
06a07944 977 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 978 rootme=`pwd` ; export rootme ; \
7fcfdcf7 979 (cd ./emacs; \
d1bea4c7 980 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
981 else \
982 true ; \
983 fi
4d714963 984
c4fb14b7 985install-emacs: force
06a07944 986 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 987 rootme=`pwd` ; export rootme ; \
7fcfdcf7 988 (cd ./emacs; \
d1bea4c7 989 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
990 else \
991 true ; \
992 fi
23e3e7f9 993
4d714963 994### ispell
c4fb14b7 995all-ispell: all-emacs
06a07944 996 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 997 rootme=`pwd` ; export rootme ; \
7fcfdcf7 998 (cd ./ispell; \
2198e4ba 999 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
1000 else \
1001 true ; \
1002 fi
4d714963 1003
c4fb14b7 1004install-ispell: force
06a07944 1005 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 1006 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1007 (cd ./ispell; \
2198e4ba 1008 $(MAKE) $(FLAGS_TO_PASS) install) ; \
079399f6
RP
1009 else \
1010 true ; \
1011 fi
23e3e7f9 1012
079b2abe 1013### send_pr
c4fb14b7 1014all-send_pr: force
06a07944 1015 @if [ -f ./send_pr/Makefile ] ; then \
079b2abe
RP
1016 rootme=`pwd` ; export rootme ; \
1017 (cd ./send_pr; \
2198e4ba 1018 $(MAKE) $(FLAGS_TO_PASS) all) ; \
079b2abe
RP
1019 else \
1020 true ; \
1021 fi
079b2abe 1022
c4fb14b7 1023install-send_pr: force
06a07944 1024 @if [ -f ./send_pr/Makefile ] ; then \
079b2abe
RP
1025 rootme=`pwd` ; export rootme ; \
1026 (cd ./send_pr; \
2198e4ba 1027 $(MAKE) $(FLAGS_TO_PASS) install) ; \
079b2abe
RP
1028 else \
1029 true ; \
1030 fi
1031
06a07944
RP
1032### libm
1033all-libm: force
98a33b6d 1034 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
1035 rootme=`pwd` ; export rootme ; \
1036 (cd ./libm; \
1b9b5090 1037 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
06a07944
RP
1038 else \
1039 true ; \
1040 fi
1041
06a07944 1042install-libm: force
98a33b6d 1043 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
1044 rootme=`pwd` ; export rootme ; \
1045 (cd ./libm; \
1b9b5090 1046 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
06a07944
RP
1047 else \
1048 true ; \
1049 fi
1050
ba8abfce 1051### libg++
9d98d2ac 1052
e85e07cb 1053all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib
06a07944 1054 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 1055 rootme=`pwd` ; export rootme ; \
51489233 1056 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 1057 (cd ./libg++; \
51489233 1058 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
ba8abfce
JG
1059 else \
1060 true ; \
1061 fi
1062
c4fb14b7 1063install-libg++: force
06a07944 1064 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 1065 rootme=`pwd` ; export rootme ; \
51489233 1066 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 1067 (cd ./libg++; \
51489233 1068 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
ba8abfce
JG
1069 else \
1070 true ; \
1071 fi
ffce44a0
DZ
1072### tcl
1073all-tcl:
1074 @if [ -f ./tcl/Makefile ] ; then \
1075 rootme=`pwd` ; export rootme ; \
1076 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1077 (cd ./tcl; \
1078 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1079 else \
1080 true ; \
1081 fi
1082
ffce44a0
DZ
1083install-tcl: force
1084 @if [ -f ./tcl/Makefile ] ; then \
1085 rootme=`pwd` ; export rootme ; \
1086 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1087 (cd ./tcl; \
1088 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1089 else \
1090 true ; \
1091 fi
1092
1093
1094### tk
1095all-tk: all-tcl
1096 @if [ -f ./tk/Makefile ] ; then \
1097 rootme=`pwd` ; export rootme ; \
1098 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1099 (cd ./tk; \
d1bea4c7 1100 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
ffce44a0
DZ
1101 else \
1102 true ; \
1103 fi
1104
ffce44a0
DZ
1105install-tk: force
1106 @if [ -f ./tk/Makefile ] ; then \
1107 rootme=`pwd` ; export rootme ; \
1108 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1109 (cd ./tk; \
d1bea4c7 1110 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
ffce44a0
DZ
1111 else \
1112 true ; \
1113 fi
1114
d1bea4c7 1115### expect
ffce44a0
DZ
1116all-expect: all-tcl
1117 @if [ -f ./expect/Makefile ] ; then \
1118 rootme=`pwd` ; export rootme ; \
1119 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1120 (cd ./expect; \
1121 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1122 else \
1123 true ; \
1124 fi
1125
ffce44a0
DZ
1126install-expect: force
1127 @if [ -f ./expect/Makefile ] ; then \
1128 rootme=`pwd` ; export rootme ; \
1129 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1130 (cd ./expect; \
1131 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1132 else \
1133 true ; \
1134 fi
1135
d1bea4c7
DZ
1136### z8ksim
1137all-z8ksim: all-bfd
1138 @if [ -f ./z8ksim/Makefile ] ; then \
1139 rootme=`pwd` ; export rootme ; \
1140 (cd ./z8ksim; \
1141 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1142 else \
1143 true ; \
1144 fi
1145
b1cceba2 1146install-z8ksim: force
d1bea4c7
DZ
1147 @if [ -f ./z8ksim/Makefile ] ; then \
1148 rootme=`pwd` ; export rootme ; \
1149 (cd ./z8ksim; \
b1cceba2 1150 $(MAKE) $(FLAGS_TO_PASS) install) ; \
d1bea4c7
DZ
1151 else \
1152 true ; \
1153 fi
1154
ce1a2ef4
SC
1155### h8300sim:
1156all-h8300sim: all-bfd
5dca5185
SC
1157 @if [ -f ./h8300sim/Makefile ] ; then \
1158 rootme=`pwd` ; export rootme ; \
1159 (cd ./h8300sim; \
1160 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1161 else \
1162 true ; \
1163 fi
1164
1165install-h8300sim: force
1166 @if [ -f ./h8300sim/Makefile ] ; then \
1167 rootme=`pwd` ; export rootme ; \
1168 (cd ./h8300sim; \
1169 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1170 else \
1171 true ; \
1172 fi
1173
1174
b1cceba2
DZ
1175### fileutils
1176all-fileutils: force
1177 @if [ -f ./fileutils/Makefile ] ; then \
1178 rootme=`pwd` ; export rootme ; \
1179 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1180 else \
1181 true ; \
1182 fi
1183
1184install-fileutils: force
1185 @if [ -f ./fileutils/Makefile ] ; then \
d1bea4c7 1186 rootme=`pwd` ; export rootme ; \
b1cceba2
DZ
1187 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1188 else \
1189 true ; \
1190 fi
1191
1192### find
1193all-find: force
1194 @if [ -f ./find/Makefile ] ; then \
1195 rootme=`pwd` ; export rootme ; \
1196 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1197 else \
1198 true ; \
1199 fi
1200
1201install-find: force
1202 @if [ -f ./find/Makefile ] ; then \
1203 rootme=`pwd` ; export rootme ; \
1204 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1205 else \
1206 true ; \
1207 fi
1208
1209### gawk
1210all-gawk: force
1211 @if [ -f ./gawk/Makefile ] ; then \
1212 rootme=`pwd` ; export rootme ; \
1213 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1214 else \
1215 true ; \
1216 fi
1217
1218install-gawk: force
1219 @if [ -f ./gawk/Makefile ] ; then \
1220 rootme=`pwd` ; export rootme ; \
1221 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) install) ; \
d1bea4c7
DZ
1222 else \
1223 true ; \
1224 fi
1225
b1cceba2
DZ
1226### m4
1227all-m4: all-libiberty
1228 @if [ -f ./m4/Makefile ] ; then \
1229 rootme=`pwd` ; export rootme ; \
1230 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1231 else \
1232 true ; \
1233 fi
1234
1235install-m4: force
1236 @if [ -f ./m4/Makefile ] ; then \
1237 rootme=`pwd` ; export rootme ; \
1238 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1239 else \
1240 true ; \
1241 fi
1242
1243### sed
1244all-sed: force
1245 @if [ -f ./sed/Makefile ] ; then \
1246 rootme=`pwd` ; export rootme ; \
1247 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1248 else \
1249 true ; \
1250 fi
1251
1252install-sed: force
1253 @if [ -f ./sed/Makefile ] ; then \
1254 rootme=`pwd` ; export rootme ; \
1255 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1256 else \
1257 true ; \
1258 fi
1259
1260### time
1261all-time: force
1262 @if [ -f ./time/Makefile ] ; then \
1263 rootme=`pwd` ; export rootme ; \
1264 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1265 else \
1266 true ; \
1267 fi
1268
1269install-time: force
1270 @if [ -f ./time/Makefile ] ; then \
1271 rootme=`pwd` ; export rootme ; \
1272 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1273 else \
1274 true ; \
1275 fi
1276
1277### wdiff
1278all-wdiff: force
1279 @if [ -f ./wdiff/Makefile ] ; then \
1280 rootme=`pwd` ; export rootme ; \
1281 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1282 else \
1283 true ; \
1284 fi
1285
1286install-wdiff: force
1287 @if [ -f ./wdiff/Makefile ] ; then \
1288 rootme=`pwd` ; export rootme ; \
1289 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1290 else \
1291 true ; \
1292 fi
1293
4a2f0c79
DZ
1294### uudecode
1295all-uudecode: all-libiberty
1296 @if [ -f ./uudecode/Makefile ] ; then \
1297 rootme=`pwd` ; export rootme ; \
1298 (cd ./uudecode; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1299 else \
1300 true ; \
1301 fi
1302
1303install-uudecode: force
1304 @if [ -f ./uudecode/Makefile ] ; then \
1305 rootme=`pwd` ; export rootme ; \
1306 (cd ./uudecode; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1307 else \
1308 true ; \
1309 fi
1310
b1cceba2
DZ
1311### shellutils
1312all-shellutils: force
1313 @if [ -f ./shellutils/Makefile ] ; then \
1314 rootme=`pwd` ; export rootme ; \
1315 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1316 else \
1317 true ; \
1318 fi
1319
1320install-shellutils: force
1321 @if [ -f ./shellutils/Makefile ] ; then \
1322 rootme=`pwd` ; export rootme ; \
1323 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1324 else \
1325 true ; \
1326 fi
1327
1328### textutils
1329all-textutils: force
1330 @if [ -f ./textutils/Makefile ] ; then \
1331 rootme=`pwd` ; export rootme ; \
1332 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1333 else \
1334 true ; \
1335 fi
1336
1337install-textutils: force
1338 @if [ -f ./textutils/Makefile ] ; then \
1339 rootme=`pwd` ; export rootme ; \
1340 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1341 else \
1342 true ; \
1343 fi
1344
1345
d1bea4c7 1346
4d714963 1347### other supporting targets
a0f47eb7 1348
02a7ba9a 1349subdir_do:
9f73dd6a
DZ
1350### start-sanitize-chill
1351###
1352### WARNING: THIS IS VERY UGLY AND I DID NOT DO THIS WILLINGLY
1353###
1354### if you change the code for libg++ et al, also change the
1355### code for chillrt
1356###
1357### end-sanitize-chill
1dbe4d41 1358 @for i in $(DODIRS); do \
51489233
ILT
1359 if [ -f ./$$i/localenv ] || [ -f ./$$i/Makefile ] ; then \
1360 case $$i in \
d405f5be 1361 libg++ | xiberty | newlib) \
51489233
ILT
1362 if (rootme=`pwd` ; export rootme ; \
1363 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1364 cd ./$$i ; \
1365 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1366 else exit 1 ; fi \
1367 ;; \
9f73dd6a 1368 $(start-sanitize-chill) \
d405f5be
DZ
1369 chillrt) \
1370 if (rootme=`pwd` ; export rootme ; \
1371 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1372 cd ./$$i ; \
1373 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1374 else exit 1 ; fi \
1375 ;; \
9f73dd6a 1376 $(end-sanitize-chill) \
f4e414f1
ILT
1377 gcc) \
1378 if (rootme=`pwd` ; export rootme ; \
1379 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1380 cd ./$$i ; \
1381 $(MAKE) $(GCC_FLAGS_TO_PASS) $(DO)) ; then true ; \
1382 else exit 1 ; fi \
1383 ;; \
51489233
ILT
1384 *) \
1385 if (rootme=`pwd` ; export rootme ; \
1386 cd ./$$i ; \
1387 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1388 else exit 1 ; fi \
1389 ;; \
1390 esac ; \
1391 else true ; fi ; \
a01bf1fb 1392 done
eb02fd64 1393
abc52b80
JG
1394# The "else true" stuff is for Ultrix; the shell returns the exit code
1395# of the "if" command, if no commands are run in the "then" or "else" part,
1396# causing Make to quit.
4c27527f
RP
1397
1398MAKEDIRS= \
4d714963 1399 $(prefix) \
7fcfdcf7 1400 $(exec_prefix) \
8b361a95
SEF
1401 $(tooldir)
1402
1403# $(bindir) \
1404# $(libdir) \
1405# $(includedir) \
1406# $(datadir) \
1407# $(docdir) \
1408# $(mandir) \
1409# $(man1dir) \
1410# $(man5dir)
4d714963
RP
1411
1412# $(man2dir) \
1413# $(man3dir) \
1414# $(man4dir) \
1415# $(man6dir) \
1416# $(man7dir) \
1417# $(man8dir)
4c27527f 1418
02a7ba9a 1419install-dirs:
4c27527f 1420 for i in $(MAKEDIRS) ; do \
cd49a4dc 1421 echo Making $$i... ; \
8b361a95
SEF
1422 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1423 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
06a07944
RP
1424 if [ ! -d $$i ] ; then \
1425 if mkdir $$i ; then \
1426 true ; \
1427 else \
1428 exit 1 ; \
1429 fi ; \
1430 else \
1431 true ; \
1432 fi ; \
4c27527f 1433 done
0ec776a5 1434
02a7ba9a 1435install-info-dirs:
9a9e8e7f 1436 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
c5f94070 1437
02a7ba9a 1438dir.info:
8b361a95 1439 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new
c466cfab 1440 mv -f dir.info.new dir.info
6b7e5998 1441
b1cceba2
DZ
1442dist:
1443 @echo "Building a full distribution of this tree isn't done"
1444 @echo "via 'make dist'. Check out the etc/ subdirectory"
1445
eb02fd64
RP
1446etags tags: TAGS
1447
02a7ba9a 1448TAGS:
eb02fd64
RP
1449 etags `$(MAKE) ls`
1450
1451ls:
1452 @echo Makefile
1453 @for i in $(SUBDIRS); \
1454 do \
1455 (cd $$i; \
1456 pwd=`pwd`; \
1457 wd=`basename $$pwd`; \
1458 for j in `$(MAKE) ls`; \
1459 do \
1460 echo $$wd/$$j; \
1461 done) \
1462 done
1463
3c81fef5 1464force:
eb02fd64
RP
1465
1466# with the gnu make, this is done automatically.
1467
f1eb48b6 1468Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 1469 $(SHELL) ./config.status
eb02fd64 1470
11954bf1
JG
1471#
1472# Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1473
d94d255d 1474DEVO_SUPPORT= README Makefile.in configure configure.in \
5cc24596 1475 config.guess config.sub config etc move-if-change \
fca4f908 1476 COPYING.LIB
fb90daeb 1477GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob
d94d255d 1478GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS)
11954bf1 1479
b1cceba2 1480setup-dirs: force
11954bf1
JG
1481 ./configure sun4
1482 make clean
1483 ./configure -rm sun4
905bb120 1484 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
abc52b80 1485
abc52b80
JG
1486gdb.tar.Z: setup-dirs
1487 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
1488 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1489
f980fcfb 1490make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/texinfo.tex
abc52b80
JG
1491 rm -rf proto-toplev; mkdir proto-toplev
1492 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1493 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1494 ln -s ../$$i . ; \
1495 done)
7c9feeb7
RP
1496 # Put only one copy (four hard links) of COPYING in the tar file.
1497 rm proto-toplev/bfd/COPYING
1498 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1499 rm proto-toplev/include/COPYING
1500 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1501 rm proto-toplev/readline/COPYING
1502 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
a50b5d9d
JG
1503
1504 # Take out texinfo and glob from configurable dirs
a3a063a9 1505 rm proto-toplev/configure.in
a50b5d9d
JG
1506 sed -e '/^host_tools=/s/texinfo //' \
1507 -e '/^host_libs=/s/glob //' \
1508 <configure.in >proto-toplev/configure.in
6995fe83 1509
a50b5d9d
JG
1510 # Take out texinfo from a few places; make simple BISON=bison line.
1511 rm proto-toplev/Makefile.in
1512 sed -e '/^all\.normal: /s/\all-texinfo //' \
1513 -e '/^ install-texinfo /d' \
1514 -e '\/^BISON =/,\/^$$/c\
1515 BISON = bison' \
6995fe83
SG
1516 <Makefile.in >proto-toplev/Makefile.in
1517
abc52b80 1518 mkdir proto-toplev/texinfo
a50b5d9d 1519 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
905bb120 1520 chmod og=u `find proto-toplev -print`
abc52b80
JG
1521 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1522 echo "==> Making gdb-$$VER.tar.Z"; \
1523 ln -s proto-toplev gdb-$$VER; \
1524 tar cfh - gdb-$$VER \
1525 | compress -v >gdb-$$VER.tar.Z)
1526
0ec776a5 1527
eb02fd64 1528# end of Makefile.in
This page took 0.146848 seconds and 4 git commands to generate.