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