**** start-sanitize-chill ****
[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
d1bea4c7 80SUBDIRS = libiberty mmalloc glob readline opcodes bfd 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 \
d1bea4c7 250 all-gcc all-binutils all-libg++ all-readline all-z8ksim 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 \
d1bea4c7 260 all-opcodes all-z8ksim 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
DZ
327 install-z8ksim \
328 install-fileutils install-find install-gawk install-m4 install-sed install-shellutils \
329 install-textutils install-time install-wdiff
d1bea4c7 330
06a07944
RP
331gcc-no-fixedincludes:
332 @if [ -f ./gcc/Makefile ] ; then \
333 rootme=`pwd` ; export rootme ; \
334 (cd ./gcc; \
335 $(MAKE) $(FLAGS_TO_PASS) install install-man \
336 "INSTALL_HEADERS=install-common-headers install-float-h install-limits-h") ; \
337 else \
338 true ; \
339 fi
dcbfc14d
DZ
340
341install.cross: install-dirs install-libiberty install-mmalloc \
aa06ff7e 342 install-binutils install-opcodes install-byacc install-flex \
dfa891fc
DZ
343 install-ld install-gas install-readline \
344 install-glob install-gdb install-mmalloc \
fca4f908
MW
345 install-newlib install-gcc install-etc install-deja-gnu
346
347### deja-gnu
348all-deja-gnu: force
349 @if [ -f ./deja-gnu/Makefile ] ; then \
350 rootme=`pwd` ; export rootme ; \
351 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) all) ; \
352 else \
353 true ; \
354 fi
355
fca4f908
MW
356install-deja-gnu: force
357 @if [ -f ./deja-gnu/Makefile ] ; then \
358 rootme=`pwd` ; export rootme ; \
359 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) install) ; \
360 else \
361 true ; \
362 fi
23e3e7f9 363
618f57a9
RP
364### autoconf
365all-autoconf: force
a5cdd8af 366 @if [ -f ./autoconf/Makefile ] ; then \
618f57a9 367 rootme=`pwd` ; export rootme ; \
a5cdd8af 368 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) all) ; \
618f57a9
RP
369 else \
370 true ; \
371 fi
372
618f57a9 373install-autoconf: force
06a07944 374 @if [ -f ./autoconf/Makefile ] ; then \
618f57a9 375 rootme=`pwd` ; export rootme ; \
98a33b6d
DZ
376 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) install) ; \
377 else \
378 true ; \
379 fi
380
381### etc
382all-etc: force
383 @if [ -f ./etc/Makefile ] ; then \
384 rootme=`pwd` ; export rootme ; \
385 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) all) ; \
386 else \
387 true ; \
388 fi
389
98a33b6d
DZ
390install-etc: force
391 @if [ -f ./etc/Makefile ] ; then \
392 rootme=`pwd` ; export rootme ; \
393 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) install) ; \
618f57a9
RP
394 else \
395 true ; \
396 fi
397
4d714963 398### libiberty
c4fb14b7 399all-libiberty: force
06a07944 400 @if [ -f ./libiberty/Makefile ] ; then \
77806c3e 401 rootme=`pwd` ; export rootme ; \
7fcfdcf7 402 (cd ./libiberty; \
2198e4ba 403 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
404 else \
405 true ; \
406 fi
4d714963 407
4d714963 408install-libiberty: force
06a07944 409 @if [ -f ./libiberty/Makefile ] ; then \
77806c3e 410 rootme=`pwd` ; export rootme ; \
7fcfdcf7 411 (cd ./libiberty; \
2198e4ba 412 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
413 else \
414 true ; \
415 fi
23e3e7f9 416
fb90daeb
ME
417### xiberty
418all-xiberty: all-gcc all-newlib
419 @if [ -f ./xiberty/Makefile ] ; then \
420 rootme=`pwd` ; export rootme ; \
421 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
422 (cd ./xiberty; \
423 $(MAKE) $(FLAGS_TO_PASS) all) ; \
424 else \
425 true ; \
426 fi
427
fb90daeb
ME
428install-xiberty: force
429 @if [ -f ./xiberty/Makefile ] ; then \
430 rootme=`pwd` ; export rootme ; \
431 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
432 (cd ./xiberty; \
433 $(MAKE) $(FLAGS_TO_PASS) install) ; \
434 else \
435 true ; \
436 fi
437
66cfe047 438### mmalloc
c4fb14b7 439all-mmalloc: force
06a07944 440 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
441 rootme=`pwd` ; export rootme ; \
442 (cd ./mmalloc; \
2198e4ba 443 $(MAKE) $(FLAGS_TO_PASS) all) ; \
66cfe047
SG
444 else \
445 true ; \
446 fi
66cfe047 447
66cfe047 448install-mmalloc: force
06a07944 449 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
450 rootme=`pwd` ; export rootme ; \
451 (cd ./mmalloc; \
2198e4ba 452 $(MAKE) $(FLAGS_TO_PASS) install) ; \
66cfe047
SG
453 else \
454 true ; \
455 fi
456
4d714963 457### texinfo
c4fb14b7 458all-texinfo: all-libiberty
06a07944 459 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 460 rootme=`pwd` ; export rootme ; \
7fcfdcf7 461 (cd ./texinfo; \
2198e4ba 462 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
463 else \
464 true ; \
465 fi
4d714963 466
4d714963 467install-texinfo: force
06a07944 468 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 469 rootme=`pwd` ; export rootme ; \
7fcfdcf7 470 (cd ./texinfo; \
2198e4ba 471 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
472 else \
473 true ; \
474 fi
23e3e7f9 475
4d714963 476### bfd
c4fb14b7 477all-bfd: force
06a07944 478 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 479 rootme=`pwd` ; export rootme ; \
7fcfdcf7 480 (cd ./bfd; \
2198e4ba 481 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
482 else \
483 true ; \
484 fi
4d714963 485
4d714963 486install-bfd: force
06a07944 487 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 488 rootme=`pwd` ; export rootme ; \
7fcfdcf7 489 (cd ./bfd; \
2198e4ba 490 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
491 else \
492 true ; \
493 fi
23e3e7f9 494
aa06ff7e
SC
495
496### opcodes
497all-opcodes: force
498 @if [ -f ./opcodes/Makefile ] ; then \
499 rootme=`pwd` ; export rootme ; \
a904db53 500 (cd ./opcodes; \
aa06ff7e
SC
501 $(MAKE) $(FLAGS_TO_PASS) all) ; \
502 else \
503 true ; \
504 fi
505
aa06ff7e
SC
506install-opcodes: force
507 @if [ -f ./opcodes/Makefile ] ; then \
508 rootme=`pwd` ; export rootme ; \
a904db53 509 (cd ./opcodes; \
aa06ff7e
SC
510 $(MAKE) $(FLAGS_TO_PASS) install) ; \
511 else \
512 true ; \
513 fi
514
4d714963 515### binutils
aa06ff7e 516all-binutils: all-opcodes all-libiberty all-bfd all-flex
06a07944 517 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 518 rootme=`pwd` ; export rootme ; \
7fcfdcf7 519 (cd ./binutils; \
2198e4ba 520 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
521 else \
522 true ; \
523 fi
4d714963 524
4d714963 525install-binutils: force
06a07944 526 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 527 rootme=`pwd` ; export rootme ; \
7fcfdcf7 528 (cd ./binutils; \
2198e4ba 529 $(MAKE) $(FLAGS_TO_PASS) install) ; \
7fcfdcf7
SC
530 else \
531 true ; \
532 fi
533
534### newlib
51489233 535all-newlib: all-binutils all-ld all-gas all-gcc
06a07944 536 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 537 rootme=`pwd` ; export rootme ; \
51489233 538 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 539 (cd ./newlib; \
51489233 540 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
7fcfdcf7
SC
541 else \
542 true ; \
543 fi
7fcfdcf7 544
7fcfdcf7 545install-newlib: force
06a07944 546 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 547 rootme=`pwd` ; export rootme ; \
51489233 548 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 549 (cd ./newlib; \
51489233 550 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
551 else \
552 true ; \
553 fi
23e3e7f9 554
9a14a29d 555### gprof
c4fb14b7 556all-gprof: all-libiberty all-bfd
06a07944 557 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
558 rootme=`pwd` ; export rootme ; \
559 (cd ./gprof; \
560 $(MAKE) $(FLAGS_TO_PASS) all) ; \
9a14a29d
SEF
561 else \
562 true ; \
563 fi
9a14a29d 564
9a14a29d 565install-gprof: force
06a07944 566 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
567 rootme=`pwd` ; export rootme ; \
568 (cd ./gprof; \
569 $(MAKE) $(FLAGS_TO_PASS) install) ; \
9a14a29d
SEF
570 else \
571 true ; \
572 fi
573
4d714963 574### byacc
c4fb14b7 575all-byacc: force
06a07944 576 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 577 rootme=`pwd` ; export rootme ; \
7fcfdcf7 578 (cd ./byacc; \
2198e4ba 579 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
580 else \
581 true ; \
582 fi
4d714963 583
4d714963 584install-byacc: force
06a07944 585 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 586 rootme=`pwd` ; export rootme ; \
7fcfdcf7 587 (cd ./byacc; \
2198e4ba 588 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
589 else \
590 true ; \
591 fi
23e3e7f9 592
dcbfc14d 593### flex
2198e4ba 594all-flex: all-libiberty
06a07944 595 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
596 rootme=`pwd` ; export rootme ; \
597 (cd ./flex; \
2198e4ba 598 $(MAKE) $(FLAGS_TO_PASS) all) ; \
dcbfc14d
DZ
599 else \
600 true ; \
601 fi
602
dcbfc14d 603install-flex: force
06a07944 604 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
605 rootme=`pwd` ; export rootme ; \
606 (cd ./flex; \
2198e4ba 607 $(MAKE) $(FLAGS_TO_PASS) install) ; \
dcbfc14d
DZ
608 else \
609 true ; \
610 fi
4d714963 611### gcc
378fd382 612all-gcc: all-libiberty all-byacc all-binutils
06a07944 613 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 614 rootme=`pwd` ; export rootme ; \
7fcfdcf7 615 (cd ./gcc; \
2198e4ba 616 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
617 else \
618 true ; \
619 fi
4d714963 620
c4fb14b7 621install-gcc: force
06a07944 622 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 623 rootme=`pwd` ; export rootme ; \
7fcfdcf7 624 (cd ./gcc; \
2198e4ba 625 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
626 else \
627 true ; \
628 fi
23e3e7f9 629
4d714963 630### readline
c4fb14b7 631all-readline: force
06a07944 632 @if [ -f ./readline/Makefile ] ; then \
77806c3e 633 rootme=`pwd` ; export rootme ; \
7fcfdcf7 634 (cd ./readline; \
2198e4ba 635 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
636 else \
637 true ; \
638 fi
4d714963 639
4d714963 640install-readline: force
06a07944 641 @if [ -f ./readline/Makefile ] ; then \
77806c3e 642 rootme=`pwd` ; export rootme ; \
7fcfdcf7 643 (cd ./readline; \
2198e4ba 644 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
645 else \
646 true ; \
647 fi
23e3e7f9 648
4d714963 649### glob
c4fb14b7 650all-glob: force
06a07944 651 @if [ -f ./glob/Makefile ] ; then \
77806c3e 652 rootme=`pwd` ; export rootme ; \
7fcfdcf7 653 (cd ./glob; \
2198e4ba 654 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
655 else \
656 true ; \
657 fi
4d714963 658
4d714963 659install-glob: force
06a07944 660 @if [ -f ./glob/Makefile ] ; then \
77806c3e 661 rootme=`pwd` ; export rootme ; \
7fcfdcf7 662 (cd ./glob; \
2198e4ba 663 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
664 else \
665 true ; \
666 fi
23e3e7f9 667
4d714963 668### gas
a904db53 669all-gas: all-libiberty all-opcodes all-bfd
06a07944 670 @if [ -f ./gas/Makefile ] ; then \
77806c3e 671 rootme=`pwd` ; export rootme ; \
7fcfdcf7 672 (cd ./gas; \
2198e4ba 673 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
674 else \
675 true ; \
676 fi
4d714963 677
4d714963 678install-gas: force
06a07944 679 @if [ -f ./gas/Makefile ] ; then \
77806c3e 680 rootme=`pwd` ; export rootme ; \
7fcfdcf7 681 (cd ./gas; \
2198e4ba 682 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
683 else \
684 true ; \
685 fi
23e3e7f9 686
3ad0ef37
SC
687### gas
688all-tgas: all-libiberty all-bfd
689 @if [ -f ./tgas/Makefile ] ; then \
690 rootme=`pwd` ; export rootme ; \
691 (cd ./tgas; \
692 $(MAKE) $(FLAGS_TO_PASS) all) ; \
693 else \
694 true ; \
695 fi
696
697
4d714963 698### ld
6995fe83 699all-ld: all-libiberty all-bfd all-byacc all-flex
06a07944 700 @if [ -f ./ld/Makefile ] ; then \
77806c3e 701 rootme=`pwd` ; export rootme ; \
7fcfdcf7 702 (cd ./ld; \
2198e4ba 703 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
704 else \
705 true ; \
706 fi
a0f47eb7 707
4d714963 708install-ld: force
06a07944 709 @if [ -f ./ld/Makefile ] ; then \
77806c3e 710 rootme=`pwd` ; export rootme ; \
7fcfdcf7 711 (cd ./ld; \
2198e4ba 712 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
713 else \
714 true ; \
715 fi
23e3e7f9 716
4d714963 717### gdb
a904db53 718all-gdb: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
06a07944 719 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 720 rootme=`pwd` ; export rootme ; \
7fcfdcf7 721 (cd ./gdb; \
2198e4ba 722 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
723 else \
724 true ; \
725 fi
4d714963 726
4d714963 727install-gdb: force
06a07944 728 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 729 rootme=`pwd` ; export rootme ; \
7fcfdcf7 730 (cd ./gdb; \
2198e4ba 731 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
732 else \
733 true ; \
734 fi
23e3e7f9 735
4d714963 736### make
c4fb14b7 737all-make: all-libiberty
06a07944 738 @if [ -f ./make/Makefile ] ; then \
77806c3e 739 rootme=`pwd` ; export rootme ; \
7fcfdcf7 740 (cd ./make; \
2198e4ba 741 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
742 else \
743 true ; \
744 fi
4d714963 745
4d714963 746install-make: force
06a07944 747 @if [ -f ./make/Makefile ] ; then \
77806c3e 748 rootme=`pwd` ; export rootme ; \
7fcfdcf7 749 (cd ./make; \
2198e4ba 750 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
751 else \
752 true ; \
753 fi
23e3e7f9 754
4d714963 755### diff
c4fb14b7 756all-diff: force
06a07944 757 @if [ -f ./diff/Makefile ] ; then \
77806c3e 758 rootme=`pwd` ; export rootme ; \
7fcfdcf7 759 (cd ./diff; \
2198e4ba 760 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
761 else \
762 true ; \
763 fi
4d714963 764
4d714963 765install-diff: force
06a07944 766 @if [ -f ./diff/Makefile ] ; then \
77806c3e 767 rootme=`pwd` ; export rootme ; \
7fcfdcf7 768 (cd ./diff/; \
2198e4ba 769 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
770 else \
771 true ; \
772 fi
23e3e7f9 773
4d714963 774### grep
c4fb14b7 775all-grep: force
06a07944 776 @if [ -f ./grep/Makefile ] ; then \
77806c3e 777 rootme=`pwd` ; export rootme ; \
7fcfdcf7 778 (cd ./grep; \
2198e4ba 779 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
780 else \
781 true ; \
782 fi
4d714963 783
4d714963 784install-grep: force
06a07944 785 @if [ -f ./grep/Makefile ] ; then \
77806c3e 786 rootme=`pwd` ; export rootme ; \
7fcfdcf7 787 (cd ./grep; \
2198e4ba
MT
788 $(MAKE) $(FLAGS_TO_PASS) install) ; \
789 else \
790 true ; \
791 fi
792
793### rcs
794all-rcs: force
06a07944 795 @if [ -f ./rcs/Makefile ] ; then \
2198e4ba
MT
796 rootme=`pwd` ; export rootme ; \
797 (cd ./rcs; \
798 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
799 else \
800 true ; \
801 fi
4d714963 802
c4fb14b7 803install-rcs: force
06a07944 804 @if [ -f ./rcs/Makefile ] ; then \
77806c3e 805 rootme=`pwd` ; export rootme ; \
7fcfdcf7 806 (cd ./rcs; \
2198e4ba 807 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
808 else \
809 true ; \
810 fi
23e3e7f9 811
4d714963 812### cvs
c4fb14b7 813all-cvs: force
06a07944 814 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 815 rootme=`pwd` ; export rootme ; \
7fcfdcf7 816 (cd ./cvs; \
2198e4ba 817 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
818 else \
819 true ; \
820 fi
4d714963 821
c4fb14b7 822install-cvs: force
06a07944 823 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 824 rootme=`pwd` ; export rootme ; \
7fcfdcf7 825 (cd ./cvs; \
2198e4ba 826 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
827 else \
828 true ; \
829 fi
23e3e7f9 830
7c9feeb7 831### patch
c4fb14b7 832all-patch: force
06a07944 833 @if [ -f ./patch/Makefile ] ; then \
77806c3e 834 rootme=`pwd` ; export rootme ; \
7fcfdcf7 835 (cd ./patch; \
2198e4ba 836 $(MAKE) $(FLAGS_TO_PASS) all) ; \
7c9feeb7
RP
837 else \
838 true ; \
839 fi
840
c4fb14b7 841install-patch: force
06a07944 842 @if [ -f ./patch/Makefile ] ; then \
77806c3e 843 rootme=`pwd` ; export rootme ; \
7fcfdcf7 844 (cd ./patch; \
2198e4ba 845 $(MAKE) $(FLAGS_TO_PASS) \
7c9feeb7 846 bindir=$(bindir) \
2198e4ba 847 man1dir=$(man1dir) install) ; \
7c9feeb7
RP
848 else \
849 true ; \
850 fi
851
4d714963 852### emacs
c4fb14b7 853all-emacs: force
06a07944 854 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 855 rootme=`pwd` ; export rootme ; \
7fcfdcf7 856 (cd ./emacs; \
d1bea4c7 857 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
858 else \
859 true ; \
860 fi
4d714963 861
c4fb14b7 862install-emacs: force
06a07944 863 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 864 rootme=`pwd` ; export rootme ; \
7fcfdcf7 865 (cd ./emacs; \
d1bea4c7 866 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
867 else \
868 true ; \
869 fi
23e3e7f9 870
4d714963 871### ispell
c4fb14b7 872all-ispell: all-emacs
06a07944 873 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 874 rootme=`pwd` ; export rootme ; \
7fcfdcf7 875 (cd ./ispell; \
2198e4ba 876 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
877 else \
878 true ; \
879 fi
4d714963 880
c4fb14b7 881install-ispell: force
06a07944 882 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 883 rootme=`pwd` ; export rootme ; \
7fcfdcf7 884 (cd ./ispell; \
2198e4ba 885 $(MAKE) $(FLAGS_TO_PASS) install) ; \
079399f6
RP
886 else \
887 true ; \
888 fi
23e3e7f9 889
079b2abe 890### send_pr
c4fb14b7 891all-send_pr: force
06a07944 892 @if [ -f ./send_pr/Makefile ] ; then \
079b2abe
RP
893 rootme=`pwd` ; export rootme ; \
894 (cd ./send_pr; \
2198e4ba 895 $(MAKE) $(FLAGS_TO_PASS) all) ; \
079b2abe
RP
896 else \
897 true ; \
898 fi
079b2abe 899
c4fb14b7 900install-send_pr: force
06a07944 901 @if [ -f ./send_pr/Makefile ] ; then \
079b2abe
RP
902 rootme=`pwd` ; export rootme ; \
903 (cd ./send_pr; \
2198e4ba 904 $(MAKE) $(FLAGS_TO_PASS) install) ; \
079b2abe
RP
905 else \
906 true ; \
907 fi
908
06a07944
RP
909### libm
910all-libm: force
98a33b6d 911 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
912 rootme=`pwd` ; export rootme ; \
913 (cd ./libm; \
914 $(MAKE) $(FLAGS_TO_PASS) all) ; \
915 else \
916 true ; \
917 fi
918
06a07944 919install-libm: force
98a33b6d 920 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
921 rootme=`pwd` ; export rootme ; \
922 (cd ./libm; \
923 $(MAKE) $(FLAGS_TO_PASS) install) ; \
924 else \
925 true ; \
926 fi
927
ba8abfce 928### libg++
9d98d2ac 929
e85e07cb 930all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib
06a07944 931 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 932 rootme=`pwd` ; export rootme ; \
51489233 933 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 934 (cd ./libg++; \
51489233 935 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
ba8abfce
JG
936 else \
937 true ; \
938 fi
939
c4fb14b7 940install-libg++: force
06a07944 941 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 942 rootme=`pwd` ; export rootme ; \
51489233 943 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 944 (cd ./libg++; \
51489233 945 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
ba8abfce
JG
946 else \
947 true ; \
948 fi
ffce44a0
DZ
949### tcl
950all-tcl:
951 @if [ -f ./tcl/Makefile ] ; then \
952 rootme=`pwd` ; export rootme ; \
953 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
954 (cd ./tcl; \
955 $(MAKE) $(FLAGS_TO_PASS) all) ; \
956 else \
957 true ; \
958 fi
959
ffce44a0
DZ
960install-tcl: force
961 @if [ -f ./tcl/Makefile ] ; then \
962 rootme=`pwd` ; export rootme ; \
963 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
964 (cd ./tcl; \
965 $(MAKE) $(FLAGS_TO_PASS) install) ; \
966 else \
967 true ; \
968 fi
969
970
971### tk
972all-tk: all-tcl
973 @if [ -f ./tk/Makefile ] ; then \
974 rootme=`pwd` ; export rootme ; \
975 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
976 (cd ./tk; \
d1bea4c7 977 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
ffce44a0
DZ
978 else \
979 true ; \
980 fi
981
ffce44a0
DZ
982install-tk: force
983 @if [ -f ./tk/Makefile ] ; then \
984 rootme=`pwd` ; export rootme ; \
985 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
986 (cd ./tk; \
d1bea4c7 987 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
ffce44a0
DZ
988 else \
989 true ; \
990 fi
991
d1bea4c7 992### expect
ffce44a0
DZ
993all-expect: all-tcl
994 @if [ -f ./expect/Makefile ] ; then \
995 rootme=`pwd` ; export rootme ; \
996 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
997 (cd ./expect; \
998 $(MAKE) $(FLAGS_TO_PASS) all) ; \
999 else \
1000 true ; \
1001 fi
1002
ffce44a0
DZ
1003install-expect: force
1004 @if [ -f ./expect/Makefile ] ; then \
1005 rootme=`pwd` ; export rootme ; \
1006 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1007 (cd ./expect; \
1008 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1009 else \
1010 true ; \
1011 fi
1012
d1bea4c7
DZ
1013### z8ksim
1014all-z8ksim: all-bfd
1015 @if [ -f ./z8ksim/Makefile ] ; then \
1016 rootme=`pwd` ; export rootme ; \
1017 (cd ./z8ksim; \
1018 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1019 else \
1020 true ; \
1021 fi
1022
b1cceba2 1023install-z8ksim: force
d1bea4c7
DZ
1024 @if [ -f ./z8ksim/Makefile ] ; then \
1025 rootme=`pwd` ; export rootme ; \
1026 (cd ./z8ksim; \
b1cceba2 1027 $(MAKE) $(FLAGS_TO_PASS) install) ; \
d1bea4c7
DZ
1028 else \
1029 true ; \
1030 fi
1031
b1cceba2
DZ
1032### fileutils
1033all-fileutils: force
1034 @if [ -f ./fileutils/Makefile ] ; then \
1035 rootme=`pwd` ; export rootme ; \
1036 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1037 else \
1038 true ; \
1039 fi
1040
1041install-fileutils: force
1042 @if [ -f ./fileutils/Makefile ] ; then \
d1bea4c7 1043 rootme=`pwd` ; export rootme ; \
b1cceba2
DZ
1044 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1045 else \
1046 true ; \
1047 fi
1048
1049### find
1050all-find: force
1051 @if [ -f ./find/Makefile ] ; then \
1052 rootme=`pwd` ; export rootme ; \
1053 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1054 else \
1055 true ; \
1056 fi
1057
1058install-find: force
1059 @if [ -f ./find/Makefile ] ; then \
1060 rootme=`pwd` ; export rootme ; \
1061 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1062 else \
1063 true ; \
1064 fi
1065
1066### gawk
1067all-gawk: force
1068 @if [ -f ./gawk/Makefile ] ; then \
1069 rootme=`pwd` ; export rootme ; \
1070 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1071 else \
1072 true ; \
1073 fi
1074
1075install-gawk: force
1076 @if [ -f ./gawk/Makefile ] ; then \
1077 rootme=`pwd` ; export rootme ; \
1078 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) install) ; \
d1bea4c7
DZ
1079 else \
1080 true ; \
1081 fi
1082
b1cceba2
DZ
1083### m4
1084all-m4: all-libiberty
1085 @if [ -f ./m4/Makefile ] ; then \
1086 rootme=`pwd` ; export rootme ; \
1087 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1088 else \
1089 true ; \
1090 fi
1091
1092install-m4: force
1093 @if [ -f ./m4/Makefile ] ; then \
1094 rootme=`pwd` ; export rootme ; \
1095 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1096 else \
1097 true ; \
1098 fi
1099
1100### sed
1101all-sed: force
1102 @if [ -f ./sed/Makefile ] ; then \
1103 rootme=`pwd` ; export rootme ; \
1104 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1105 else \
1106 true ; \
1107 fi
1108
1109install-sed: force
1110 @if [ -f ./sed/Makefile ] ; then \
1111 rootme=`pwd` ; export rootme ; \
1112 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1113 else \
1114 true ; \
1115 fi
1116
1117### time
1118all-time: force
1119 @if [ -f ./time/Makefile ] ; then \
1120 rootme=`pwd` ; export rootme ; \
1121 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1122 else \
1123 true ; \
1124 fi
1125
1126install-time: force
1127 @if [ -f ./time/Makefile ] ; then \
1128 rootme=`pwd` ; export rootme ; \
1129 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1130 else \
1131 true ; \
1132 fi
1133
1134### wdiff
1135all-wdiff: force
1136 @if [ -f ./wdiff/Makefile ] ; then \
1137 rootme=`pwd` ; export rootme ; \
1138 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1139 else \
1140 true ; \
1141 fi
1142
1143install-wdiff: force
1144 @if [ -f ./wdiff/Makefile ] ; then \
1145 rootme=`pwd` ; export rootme ; \
1146 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1147 else \
1148 true ; \
1149 fi
1150
1151### shellutils
1152all-shellutils: force
1153 @if [ -f ./shellutils/Makefile ] ; then \
1154 rootme=`pwd` ; export rootme ; \
1155 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1156 else \
1157 true ; \
1158 fi
1159
1160install-shellutils: force
1161 @if [ -f ./shellutils/Makefile ] ; then \
1162 rootme=`pwd` ; export rootme ; \
1163 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1164 else \
1165 true ; \
1166 fi
1167
1168### textutils
1169all-textutils: force
1170 @if [ -f ./textutils/Makefile ] ; then \
1171 rootme=`pwd` ; export rootme ; \
1172 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1173 else \
1174 true ; \
1175 fi
1176
1177install-textutils: force
1178 @if [ -f ./textutils/Makefile ] ; then \
1179 rootme=`pwd` ; export rootme ; \
1180 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1181 else \
1182 true ; \
1183 fi
1184
1185
d1bea4c7 1186
4d714963 1187### other supporting targets
a0f47eb7 1188
02a7ba9a 1189subdir_do:
1dbe4d41 1190 @for i in $(DODIRS); do \
51489233
ILT
1191 if [ -f ./$$i/localenv ] || [ -f ./$$i/Makefile ] ; then \
1192 case $$i in \
1193 libg++ | xiberty | newlib) \
1194 if (rootme=`pwd` ; export rootme ; \
1195 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1196 cd ./$$i ; \
1197 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1198 else exit 1 ; fi \
1199 ;; \
1200 *) \
1201 if (rootme=`pwd` ; export rootme ; \
1202 cd ./$$i ; \
1203 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1204 else exit 1 ; fi \
1205 ;; \
1206 esac ; \
1207 else true ; fi ; \
a01bf1fb 1208 done
eb02fd64 1209
abc52b80
JG
1210# The "else true" stuff is for Ultrix; the shell returns the exit code
1211# of the "if" command, if no commands are run in the "then" or "else" part,
1212# causing Make to quit.
4c27527f
RP
1213
1214MAKEDIRS= \
4d714963 1215 $(prefix) \
7fcfdcf7 1216 $(exec_prefix) \
8b361a95
SEF
1217 $(tooldir)
1218
1219# $(bindir) \
1220# $(libdir) \
1221# $(includedir) \
1222# $(datadir) \
1223# $(docdir) \
1224# $(mandir) \
1225# $(man1dir) \
1226# $(man5dir)
4d714963
RP
1227
1228# $(man2dir) \
1229# $(man3dir) \
1230# $(man4dir) \
1231# $(man6dir) \
1232# $(man7dir) \
1233# $(man8dir)
4c27527f 1234
02a7ba9a 1235install-dirs:
4c27527f 1236 for i in $(MAKEDIRS) ; do \
cd49a4dc 1237 echo Making $$i... ; \
8b361a95
SEF
1238 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1239 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
06a07944
RP
1240 if [ ! -d $$i ] ; then \
1241 if mkdir $$i ; then \
1242 true ; \
1243 else \
1244 exit 1 ; \
1245 fi ; \
1246 else \
1247 true ; \
1248 fi ; \
4c27527f 1249 done
0ec776a5 1250
02a7ba9a 1251install-info-dirs:
9a9e8e7f 1252 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
c5f94070 1253
02a7ba9a 1254dir.info:
8b361a95 1255 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new
c466cfab 1256 mv -f dir.info.new dir.info
6b7e5998 1257
b1cceba2
DZ
1258dist:
1259 @echo "Building a full distribution of this tree isn't done"
1260 @echo "via 'make dist'. Check out the etc/ subdirectory"
1261
eb02fd64
RP
1262etags tags: TAGS
1263
02a7ba9a 1264TAGS:
eb02fd64
RP
1265 etags `$(MAKE) ls`
1266
1267ls:
1268 @echo Makefile
1269 @for i in $(SUBDIRS); \
1270 do \
1271 (cd $$i; \
1272 pwd=`pwd`; \
1273 wd=`basename $$pwd`; \
1274 for j in `$(MAKE) ls`; \
1275 do \
1276 echo $$wd/$$j; \
1277 done) \
1278 done
1279
3c81fef5 1280force:
eb02fd64
RP
1281
1282# with the gnu make, this is done automatically.
1283
f1eb48b6 1284Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 1285 $(SHELL) ./config.status
eb02fd64 1286
11954bf1
JG
1287#
1288# Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1289
23e3e7f9 1290DEVO_SUPPORT= README cfg-paper.texi Makefile.in configure configure.in \
fca4f908
MW
1291 config.sub config configure.man configure.texi move-if-change \
1292 COPYING.LIB
fb90daeb 1293GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob
abc52b80 1294GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
11954bf1 1295
b1cceba2 1296setup-dirs: force
11954bf1
JG
1297 ./configure sun4
1298 make clean
1299 ./configure -rm sun4
905bb120 1300 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
abc52b80 1301
abc52b80
JG
1302gdb.tar.Z: setup-dirs
1303 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
1304 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1305
1306make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
1307 rm -rf proto-toplev; mkdir proto-toplev
1308 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1309 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1310 ln -s ../$$i . ; \
1311 done)
7c9feeb7
RP
1312 # Put only one copy (four hard links) of COPYING in the tar file.
1313 rm proto-toplev/bfd/COPYING
1314 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1315 rm proto-toplev/include/COPYING
1316 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1317 rm proto-toplev/readline/COPYING
1318 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
a3a063a9
JG
1319 # Take out texinfo from configurable dirs
1320 rm proto-toplev/configure.in
1321 sed '/^configdirs=/s/texinfo //' <configure.in >proto-toplev/configure.in
4d714963
RP
1322 # Take out glob from buildable dirs
1323 rm proto-toplev/Makefile.in
6995fe83
SG
1324
1325 sed -e '/^SUBDIRS =/s/glob //' \
1326 -e '/^all\.normal: /s/\all-texinfo //' \
1327 -e '/^clean: /s/clean-texinfo //' \
1328 -e '/^install\.all: /s/install-texinfo //' \
1329 <Makefile.in >proto-toplev/Makefile.in
1330
abc52b80
JG
1331 mkdir proto-toplev/texinfo
1332 mkdir proto-toplev/texinfo/fsf
1333 ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
905bb120 1334 chmod og=u `find proto-toplev -print`
abc52b80
JG
1335 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1336 echo "==> Making gdb-$$VER.tar.Z"; \
1337 ln -s proto-toplev gdb-$$VER; \
1338 tar cfh - gdb-$$VER \
1339 | compress -v >gdb-$$VER.tar.Z)
1340
0ec776a5 1341
eb02fd64 1342# end of Makefile.in
This page took 0.136311 seconds and 4 git commands to generate.