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