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