* Makefile.in (GCC_FLAGS_TO_PASS): Reset some variables that gcc
[deliverable/binutils-gdb.git] / Makefile.in
CommitLineData
eb02fd64 1#
131a3881 2# Makefile for directory with subdirs to build.
6559fbdb 3# Copyright (C) 1990-1993 Free Software Foundation
eb02fd64 4#
4dfe09da
RP
5# This file is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
18#
f149eb99 19
eb02fd64 20srcdir = .
28f3b094 21
4d714963 22prefix = /usr/local
eb02fd64 23
7fcfdcf7
SC
24exec_prefix = $(prefix)
25bindir = $(exec_prefix)/bin
26libdir = $(exec_prefix)/lib
2198e4ba 27tooldir = $(libdir)
7fcfdcf7 28
51489233
ILT
29program_transform_name =
30
4d714963 31datadir = $(prefix)/lib
7fcfdcf7 32mandir = $(prefix)/man
4d714963
RP
33man1dir = $(mandir)/man1
34man2dir = $(mandir)/man2
35man3dir = $(mandir)/man3
36man4dir = $(mandir)/man4
37man5dir = $(mandir)/man5
38man6dir = $(mandir)/man6
39man7dir = $(mandir)/man7
40man8dir = $(mandir)/man8
41man9dir = $(mandir)/man9
7fcfdcf7 42infodir = $(prefix)/info
4d714963
RP
43includedir = $(prefix)/include
44docdir = $(datadir)/doc
45
46SHELL = /bin/sh
47
378fd382 48INSTALL = cp
4d714963
RP
49INSTALL_PROGRAM = $(INSTALL)
50INSTALL_DATA = $(INSTALL)
3c8735af 51
440868a0 52AS = as
ec342d7d 53AR = ar
b5329d84 54AR_FLAGS = rc
e85e07cb 55CC = cc
f8a6ad66 56CFLAGS = -g
a50b5d9d 57$(start-sanitize-chill)
7d9f0c54
MW
58CHILLFLAGS = $(CFLAGS)
59CHILL_LIB = -lchill
60$(end-sanitize-chill)
e85e07cb 61CXX = gcc
d1bea4c7 62CXXFLAGS = -g -O
4d714963 63RANLIB = ranlib
51489233 64NM = nm
81246025 65GZIP = gzip
eb02fd64 66
98a33b6d 67BISON = `if [ -f $${rootme}/byacc/byacc ] ; \
06a07944 68 then echo $${rootme}/byacc/byacc ; \
378fd382 69 else echo byacc ; \
06a07944 70 fi`
2645fb0c 71
98a33b6d 72LEX = `if [ -f $${rootme}/flex/flex ] ; \
8b361a95 73 then echo $${rootme}/flex/flex ; \
2198e4ba
MT
74 else echo flex ; fi`
75
6d681784
JG
76MAKEINFO = `if [ -f $${rootme}/texinfo/makeinfo/makeinfo ] ; \
77 then echo $${rootme}/texinfo/makeinfo/makeinfo ; \
77806c3e 78 else echo makeinfo ; fi`
b772d75e 79
f980fcfb
JG
80
81# libraries that may need to be augmented on a system-by-system basis
82X11_LIB = -lX11
83
e85e07cb 84# compilers to use to create programs which must be run in the build
440868a0
ILT
85# environment.
86CC_FOR_BUILD = $(CC)
e85e07cb 87CXX_FOR_BUILD = $(CXX)
440868a0 88
9f73dd6a 89SUBDIRS = "this is set via configure, don't edit this"
6a3958b2
RP
90OTHERS =
91
a0f47eb7 92ALL = all.normal
b26ff9d8 93INSTALL_TARGET = install.all
fb660409
RP
94
95### for debugging
96#GCCVERBOSE=-v
97
51489233
ILT
98CC_FOR_TARGET = ` \
99 if [ -f $${rootme}/gcc/Makefile ] ; then \
31883f01 100 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
51489233 101 else \
378fd382 102 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
103 echo $(CC); \
104 else \
105 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
106 fi; \
107 fi`
108
7d9f0c54
MW
109$(start-sanitize-chill)
110CHILL_FOR_TARGET = ` \
111 if [ -f $${rootme}/gcc/Makefile ] ; then \
112 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
113 else \
114 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
115 echo $(CC); \
116 else \
117 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
118 fi; \
119 fi`
120$(end-sanitize-chill)
121
d1bea4c7 122CXX_FOR_TARGET = ` \
fca4f908 123 if [ -f $${rootme}/gcc/Makefile ] ; then \
31883f01 124 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
fca4f908 125 else \
e85e07cb
ILT
126 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
127 echo $(CXX); \
fca4f908
MW
128 else \
129 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
130 fi; \
131 fi`
132
440868a0
ILT
133AS_FOR_TARGET = ` \
134 if [ -f $${rootme}/gas/Makefile ] ; then \
135 echo $${rootme}/gas/as.new ; \
136 else \
e85e07cb 137 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
440868a0
ILT
138 echo $(AS); \
139 else \
140 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
81246025 141 fi; \
440868a0
ILT
142 fi`
143
51489233
ILT
144AR_FOR_TARGET = ` \
145 if [ -f $${rootme}/binutils/Makefile ] ; then \
146 echo $${rootme}/binutils/ar ; \
147 else \
378fd382 148 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
149 echo $(AR); \
150 else \
151 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
81246025 152 fi; \
51489233
ILT
153 fi`
154
155RANLIB_FOR_TARGET = ` \
156 if [ -f $${rootme}/binutils/Makefile ] ; then \
157 echo $${rootme}/binutils/ranlib ; \
158 else \
378fd382 159 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
160 echo $(RANLIB); \
161 else \
162 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
81246025 163 fi; \
51489233
ILT
164 fi`
165
166NM_FOR_TARGET = ` \
167 if [ -f $${rootme}/binutils/Makefile ] ; then \
168 echo $${rootme}/binutils/nm ; \
169 else \
378fd382 170 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
171 echo $(NM); \
172 else \
173 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
81246025 174 fi; \
51489233
ILT
175 fi`
176
0ef4728f 177# FIXME: This is badly named.
51489233
ILT
178XTRAFLAGS = ` \
179 if [ -f $${rootme}/gcc/Makefile ] ; then \
9d401625
ILT
180 if [ -f $${rootme}/newlib/Makefile ] ; then \
181 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
51489233 182 else \
9d401625 183 echo -I$${rootme}/gcc/include ; \
51489233
ILT
184 fi ; \
185 else \
186 echo ; \
187 fi`
23e3e7f9 188
72c09fbc 189PRMS = all-prms
b1cceba2 190
eb02fd64 191#### host and target specific makefile fragments come in here.
ec342d7d 192###
eb02fd64 193
0ef4728f
ILT
194# Flags to pass down to all sub-makes.
195# Please keep these in alphabetical order.
196BASE_FLAGS_TO_PASS = \
2198e4ba 197 "AR_FLAGS=$(AR_FLAGS)" \
d09de70e 198 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
0ef4728f 199 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
378fd382 200 "BISON=$(BISON)" \
378fd382 201 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
0ef4728f 202 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
2198e4ba 203 "CFLAGS=$(CFLAGS)" \
7d9f0c54
MW
204$(start-sanitize-chill)\
205 "CHILLFLAGS=$(CHILLFLAGS)" \
206 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
207 "CHILL_LIB=$(CHILL_LIB)" \
e9a050f9 208$(end-sanitize-chill)\
0ef4728f
ILT
209 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
210 "CXXFLAGS=$(CXXFLAGS)" \
211 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
53222cbd 212 'GCC_FOR_TARGET=$$(CC_FOR_TARGET)' \
2198e4ba
MT
213 "INSTALL=$(INSTALL)" \
214 "INSTALL_DATA=$(INSTALL_DATA)" \
440868a0 215 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
378fd382
DZ
216 "LDFLAGS=$(LDFLAGS)" \
217 "LEX=$(LEX)" \
218 "LOADLIBES=$(LOADLIBES)" \
219 "MAKEINFO=$(MAKEINFO)" \
0ef4728f 220 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
72c09fbc 221 "PRMS=$(PRMS)" \
d09de70e 222 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
0ef4728f 223 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
378fd382
DZ
224 "exec_prefix=$(exec_prefix)" \
225 "prefix=$(prefix)" \
226 "tooldir=$(tooldir)"
2198e4ba 227
0ef4728f
ILT
228# Flags to pass down to most sub-makes, in which we're building with
229# the host environment.
6d681784 230# If any variables are added here, they must be added to do-*, below.
0ef4728f 231EXTRA_HOST_FLAGS = \
6d681784
JG
232 'AR=$(AR)' \
233 'AS=$(AS)' \
234 'CC=$(CC)' \
235 'CXX=$(CXX)' \
236 'NM=$(NM)' \
237 'RANLIB=$(RANLIB)' \
238 'XTRAFLAGS='
0ef4728f
ILT
239
240FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
241
d1bea4c7
DZ
242# Flags that are concerned with the location of the X11 include files
243# and library files
244X11_FLAGS_TO_PASS = \
245 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
f980fcfb
JG
246 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
247 "X11_LIB=$(X11_LIB)"
d1bea4c7 248
0ef4728f
ILT
249# Shell case of subdirectories which are built with the target environment.
250TARGET_LIBS=libg++ | xiberty | newlib
251$(start-sanitize-chill)
252TARGET_LIBS=libg++ | xiberty | newlib | chillrt
253$(end-sanitize-chill)
254
255# Flags to pass down to makes which are built with the target environment.
256# The double $ decreases the length of the command line; the variables
257# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
6d681784 258# If any variables are added here, they must be added to do-*, below.
0ef4728f
ILT
259EXTRA_TARGET_FLAGS = \
260 'AR=$$(AR_FOR_TARGET)' \
261 'AS=$$(AS_FOR_TARGET)' \
262 'CC=$$(CC_FOR_TARGET)' \
263 'CXX=$$(CXX_FOR_TARGET)' \
264 'NM=$$(NM_FOR_TARGET)' \
265 'RANLIB=$$(RANLIB_FOR_TARGET)' \
266 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
267
268TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
51489233 269
f4e414f1
ILT
270# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
271# unfortunately needs the native compiler and the target ar and
0ef4728f 272# ranlib.
6d681784 273# If any variables are added here, they must be added to do-*, below.
0ef4728f
ILT
274EXTRA_GCC_FLAGS = \
275 'AR=$$(AR_FOR_TARGET)' \
6d681784
JG
276 'AS=$(AS)' \
277 'CC=$(CC)' \
278 'CXX=$(CXX)' \
279 'NM=$(NM)' \
0ef4728f 280 'RANLIB=$$(RANLIB_FOR_TARGET)' \
6d681784 281 'XTRAFLAGS='
0ef4728f 282
8871eea2
ILT
283# On SCO 3.2v4, the gcc build can fill the environment. Resetting
284# some variables solves the problem.
285GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) \
286 $(EXTRA_GCC_FLAGS) \
287$(start-sanitize-chill)\
288 "CHILLFLAGS=" \
289 "CHILL_FOR_TARGET=" \
290 "CHILL_LIB=" \
291$(end-sanitize-chill)\
292 "CXX_FOR_TARGET=" \
293 "XTRAFLAGS_FOR_TARGET="
f4e414f1 294
fca4f908
MW
295# The first rule in the file had better be this one. Don't put any above it.
296all: $(ALL)
297
0ef4728f
ILT
298.PHONY: all check dvi info install-info install-info-dirs
299.PHONY: do-info do-check do-dvi do-install-info
300.PHONY: do-clean do-mostlyclean do-distclean do-realclean
f8a6ad66 301.NOEXPORT:
1fa4a94e 302MAKEOVERRIDES=
4d714963 303
0ef4728f 304# Do a target for all the subdirectories. A ``make do-X'' will do a
53222cbd
RP
305# ``make X'' in all subdirectories (because, in general, there is a
306# dependency (below) of X upon do-X, a ``make X'' will also do this,
307# but it may do additional work as well).
0ef4728f
ILT
308# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
309# because it is so large that it can easily overflow the command line
310# length limit on some systems.
311do-info do-check do-dvi do-install-info do-clean do-mostlyclean do-distclean do-realclean:
312 @target=`echo $@ | sed -e 's/^do-//'`; \
313 rootme=`pwd`; export rootme; \
314 srcroot=`cd $(srcdir); pwd`; export srcroot; \
315 for i in $(SUBDIRS); do \
36286a3e 316 if [ -f ./$$i/Makefile ]; then \
0ef4728f
ILT
317 case $$i in \
318 $(TARGET_LIBS) ) \
6d681784
JG
319 for flag in $(EXTRA_TARGET_FLAGS); do \
320 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
321 done; \
0ef4728f
ILT
322 ;; \
323 gcc) \
6d681784
JG
324 for flag in $(EXTRA_GCC_FLAGS); do \
325 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
326 done; \
0ef4728f
ILT
327 ;; \
328 *) \
6d681784
JG
329 for flag in $(EXTRA_HOST_FLAGS); do \
330 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
331 done; \
0ef4728f
ILT
332 ;; \
333 esac ; \
6d681784 334 export AR AS CC CXX NM RANLIB XTRAFLAGS; \
0ef4728f 335 if (cd ./$$i; \
6d681784
JG
336 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
337 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
338 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
339 $${target}); \
0ef4728f
ILT
340 then true; else exit 1; fi; \
341 else true; fi; \
342 done
fb90daeb 343
0ef4728f
ILT
344info: do-info
345check: do-check
346dvi: do-dvi
9a9e8e7f 347
0ef4728f 348install-info: install-info-dirs do-install-info dir.info
72c09fbc
SC
349 if [ -f dir.info ] ; then \
350 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
50fbe976 351 else true ; fi
4d714963 352
0ef4728f
ILT
353do-install-info: install-info-dirs
354
b1cceba2 355all.normal: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
868ebe79 356 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
675e8ac9 357 all-gcc all-binutils all-libg++ all-readline all-sim all-gdb \
c4fb14b7 358 all-make all-rcs all-cvs all-diff all-grep \
98a33b6d 359 all-patch all-emacs all-ispell all-etc \
ffce44a0 360 all-tcl all-tk all-expect \
d405f5be
DZ
361 all-newlib \
362 $(start-sanitize-chill) \
363 all-chillrt \
364 $(end-sanitize-chill) \
72c09fbc 365 all-gprof all-prms all-send-pr all-libm all-deja-gnu \
b1cceba2 366 all-fileutils all-find all-gawk all-sed all-shellutils \
07362bd9
DZ
367 all-textutils all-time all-wdiff all-uudecode \
368 all-hello all-tar all-gzip all-indent all-recode
b1cceba2 369
dcbfc14d 370
dfa891fc 371all.cross: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
675e8ac9 372 all-opcodes all-bfd all-readline all-sim \
d405f5be
DZ
373 all-gdb all-binutils all-gcc all-newlib \
374 $(start-sanitize-chill) \
375 all-chillrt \
376 $(end-sanitize-chill) \
377 all-deja-gnu
4d714963 378
0ef4728f 379.PHONY: clean distclean mostlyclean realclean local-clean local-distclean
3b30df82 380
0ef4728f 381local-clean:
7fed4078 382 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
3b30df82 383
0ef4728f 384local-distclean:
7fed4078 385 -rm -f Makefile config.status
7fcfdcf7 386
0ef4728f
ILT
387clean: do-clean local-clean
388mostlyclean: do-mostlyclean local-clean
389distclean: do-distclean local-clean local-distclean
390realclean: do-realclean local-clean local-distclean
391
b1cceba2
DZ
392uninstall:
393 @echo "the uninstall target is not supported in this tree"
4d714963 394
98a33b6d 395install: $(INSTALL_TARGET)
8b361a95
SEF
396 -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
397 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
398 -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
b26ff9d8 399
06a07944
RP
400install.all: install-no-fixedincludes
401 @if [ -f ./gcc/Makefile ] ; then \
402 rootme=`pwd` ; export rootme ; \
403 (cd ./gcc; \
404 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
405 else \
406 true ; \
407 fi
5a63b336 408
dfa891fc
DZ
409install-no-fixedincludes: install-dirs gcc-no-fixedincludes \
410 install-autoconf \
411 install-bfd \
412 install-binutils \
413 install-byacc \
07362bd9
DZ
414 $(start-sanitize-chill) \
415 install-chillrt \
416 $(end-sanitize-chill) \
dfa891fc 417 install-cvs \
fca4f908 418 install-deja-gnu \
07362bd9 419 install-diff \
dfa891fc 420 install-emacs \
98a33b6d 421 install-etc \
ffce44a0 422 install-expect \
07362bd9
DZ
423 install-fileutils \
424 install-find \
dfa891fc
DZ
425 install-flex \
426 install-gas \
07362bd9 427 install-gawk \
dfa891fc
DZ
428 install-gdb \
429 install-glob \
430 install-gprof \
431 install-grep \
07362bd9
DZ
432 install-gzip \
433 install-hello \
434 install-indent \
dfa891fc
DZ
435 install-ispell \
436 install-ld \
437 install-libg++ \
438 install-libiberty \
439 install-libm \
07362bd9 440 install-m4 \
dfa891fc
DZ
441 install-make \
442 install-mmalloc \
443 install-newlib \
07362bd9 444 install-opcodes \
dfa891fc 445 install-patch \
72c09fbc 446 install-prms \
dfa891fc
DZ
447 install-rcs \
448 install-readline \
9f33c264 449 install-recode \
07362bd9 450 install-sed \
98941fab 451 install-send-pr \
07362bd9
DZ
452 install-shellutils \
453 install-sim \
454 install-tar \
ffce44a0
DZ
455 install-tcl \
456 install-texinfo \
07362bd9
DZ
457 install-textutils \
458 install-time \
459 install-tk \
460 install-uudecode \
461 install-wdiff
d1bea4c7 462
07362bd9 463#
5cc24596
PB
464# Install the gcc headers files, but not the fixed include files,
465# which we are not allowed to distribute. This rule is very dependent
466# on the workings of the gcc Makefile.in.
467#
06a07944 468gcc-no-fixedincludes:
5cc24596
PB
469 @if [ -f ./gcc/Makefile ]; then \
470 rm -rf gcc/tmp-include; \
471 mv gcc/include gcc/tmp-include 2>/dev/null; \
472 mkdir gcc/include; \
473 touch gcc/stmp-fixincludes; \
474 rm -f gcc/stmp-headers; \
475 rootme=`pwd`; export rootme; \
476 srcroot=`cd $(srcdir); pwd` ; export srcroot; \
477 (cd ./gcc; \
478 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
479 rm -rf gcc/include; \
480 mv gcc/tmp-include gcc/include 2>/dev/null; \
481 else true; fi
dcbfc14d
DZ
482
483install.cross: install-dirs install-libiberty install-mmalloc \
aa06ff7e 484 install-binutils install-opcodes install-byacc install-flex \
dfa891fc
DZ
485 install-ld install-gas install-readline \
486 install-glob install-gdb install-mmalloc \
d405f5be
DZ
487 install-newlib \
488 $(start-sanitize-chill) \
489 install-chillrt \
490 $(end-sanitize-chill) \
491 install-gcc install-etc install-deja-gnu
fca4f908 492
07362bd9
DZ
493### gzip
494all-gzip: all-libiberty
495 @if [ -f ./gzip/Makefile ] ; then \
496 rootme=`pwd` ; export rootme ; \
497 (cd ./gzip; $(MAKE) $(FLAGS_TO_PASS) all) ; \
498 else \
499 true ; \
500 fi
501
502install-gzip: force
503 @if [ -f ./gzip/Makefile ] ; then \
504 rootme=`pwd` ; export rootme ; \
505 (cd ./gzip; $(MAKE) $(FLAGS_TO_PASS) install) ; \
506 else \
507 true ; \
508 fi
509
510### hello
511all-hello: all-libiberty
512 @if [ -f ./hello/Makefile ] ; then \
513 rootme=`pwd` ; export rootme ; \
514 (cd ./hello; $(MAKE) $(FLAGS_TO_PASS) all) ; \
515 else \
516 true ; \
517 fi
518
519install-hello: force
520 @if [ -f ./hello/Makefile ] ; then \
521 rootme=`pwd` ; export rootme ; \
522 (cd ./hello; $(MAKE) $(FLAGS_TO_PASS) install) ; \
523 else \
524 true ; \
525 fi
526
527### recode
528all-recode: all-libiberty
529 @if [ -f ./recode/Makefile ] ; then \
530 rootme=`pwd` ; export rootme ; \
531 (cd ./recode; $(MAKE) $(FLAGS_TO_PASS) all) ; \
532 else \
533 true ; \
534 fi
535
536install-recode: force
537 @if [ -f ./recode/Makefile ] ; then \
538 rootme=`pwd` ; export rootme ; \
539 (cd ./recode; $(MAKE) $(FLAGS_TO_PASS) install) ; \
540 else \
541 true ; \
542 fi
543
544### indent
545all-indent: force
546 @if [ -f ./indent/Makefile ] ; then \
547 rootme=`pwd` ; export rootme ; \
548 (cd ./indent; $(MAKE) $(FLAGS_TO_PASS) all) ; \
549 else \
550 true ; \
551 fi
552
553install-indent: force
554 @if [ -f ./indent/Makefile ] ; then \
555 rootme=`pwd` ; export rootme ; \
556 (cd ./indent; $(MAKE) $(FLAGS_TO_PASS) install) ; \
557 else \
558 true ; \
559 fi
560
561### tar
562all-tar: all-libiberty
563 @if [ -f ./tar/Makefile ] ; then \
564 rootme=`pwd` ; export rootme ; \
565 (cd ./tar; $(MAKE) $(FLAGS_TO_PASS) all) ; \
566 else \
567 true ; \
568 fi
569
570install-tar: force
571 @if [ -f ./tar/Makefile ] ; then \
572 rootme=`pwd` ; export rootme ; \
573 (cd ./tar; $(MAKE) $(FLAGS_TO_PASS) install) ; \
574 else \
575 true ; \
576 fi
577
578
fca4f908
MW
579### deja-gnu
580all-deja-gnu: force
581 @if [ -f ./deja-gnu/Makefile ] ; then \
582 rootme=`pwd` ; export rootme ; \
583 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) all) ; \
584 else \
585 true ; \
586 fi
587
fca4f908
MW
588install-deja-gnu: force
589 @if [ -f ./deja-gnu/Makefile ] ; then \
590 rootme=`pwd` ; export rootme ; \
591 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) install) ; \
592 else \
593 true ; \
594 fi
23e3e7f9 595
618f57a9
RP
596### autoconf
597all-autoconf: force
a5cdd8af 598 @if [ -f ./autoconf/Makefile ] ; then \
618f57a9 599 rootme=`pwd` ; export rootme ; \
a5cdd8af 600 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) all) ; \
618f57a9
RP
601 else \
602 true ; \
603 fi
604
618f57a9 605install-autoconf: force
06a07944 606 @if [ -f ./autoconf/Makefile ] ; then \
618f57a9 607 rootme=`pwd` ; export rootme ; \
98a33b6d
DZ
608 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) install) ; \
609 else \
610 true ; \
611 fi
612
613### etc
614all-etc: force
615 @if [ -f ./etc/Makefile ] ; then \
616 rootme=`pwd` ; export rootme ; \
617 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) all) ; \
618 else \
619 true ; \
620 fi
621
98a33b6d
DZ
622install-etc: force
623 @if [ -f ./etc/Makefile ] ; then \
624 rootme=`pwd` ; export rootme ; \
625 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) install) ; \
618f57a9
RP
626 else \
627 true ; \
628 fi
629
4d714963 630### libiberty
c4fb14b7 631all-libiberty: force
06a07944 632 @if [ -f ./libiberty/Makefile ] ; then \
77806c3e 633 rootme=`pwd` ; export rootme ; \
7fcfdcf7 634 (cd ./libiberty; \
2198e4ba 635 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
636 else \
637 true ; \
638 fi
4d714963 639
4d714963 640install-libiberty: force
06a07944 641 @if [ -f ./libiberty/Makefile ] ; then \
77806c3e 642 rootme=`pwd` ; export rootme ; \
7fcfdcf7 643 (cd ./libiberty; \
2198e4ba 644 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
645 else \
646 true ; \
647 fi
23e3e7f9 648
fb90daeb
ME
649### xiberty
650all-xiberty: all-gcc all-newlib
651 @if [ -f ./xiberty/Makefile ] ; then \
652 rootme=`pwd` ; export rootme ; \
653 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
654 (cd ./xiberty; \
1b9b5090 655 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
fb90daeb
ME
656 else \
657 true ; \
658 fi
659
fb90daeb
ME
660install-xiberty: force
661 @if [ -f ./xiberty/Makefile ] ; then \
662 rootme=`pwd` ; export rootme ; \
663 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
664 (cd ./xiberty; \
1b9b5090 665 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
fb90daeb
ME
666 else \
667 true ; \
668 fi
669
66cfe047 670### mmalloc
c4fb14b7 671all-mmalloc: force
06a07944 672 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
673 rootme=`pwd` ; export rootme ; \
674 (cd ./mmalloc; \
2198e4ba 675 $(MAKE) $(FLAGS_TO_PASS) all) ; \
66cfe047
SG
676 else \
677 true ; \
678 fi
66cfe047 679
66cfe047 680install-mmalloc: force
06a07944 681 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
682 rootme=`pwd` ; export rootme ; \
683 (cd ./mmalloc; \
2198e4ba 684 $(MAKE) $(FLAGS_TO_PASS) install) ; \
66cfe047
SG
685 else \
686 true ; \
687 fi
688
4d714963 689### texinfo
c4fb14b7 690all-texinfo: all-libiberty
06a07944 691 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 692 rootme=`pwd` ; export rootme ; \
7fcfdcf7 693 (cd ./texinfo; \
2198e4ba 694 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
695 else \
696 true ; \
697 fi
4d714963 698
4d714963 699install-texinfo: force
06a07944 700 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 701 rootme=`pwd` ; export rootme ; \
7fcfdcf7 702 (cd ./texinfo; \
2198e4ba 703 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
704 else \
705 true ; \
706 fi
23e3e7f9 707
4d714963 708### bfd
c4fb14b7 709all-bfd: force
06a07944 710 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 711 rootme=`pwd` ; export rootme ; \
7fcfdcf7 712 (cd ./bfd; \
2198e4ba 713 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
714 else \
715 true ; \
716 fi
4d714963 717
4d714963 718install-bfd: force
06a07944 719 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 720 rootme=`pwd` ; export rootme ; \
7fcfdcf7 721 (cd ./bfd; \
2198e4ba 722 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
723 else \
724 true ; \
725 fi
23e3e7f9 726
aa06ff7e
SC
727
728### opcodes
729all-opcodes: force
730 @if [ -f ./opcodes/Makefile ] ; then \
731 rootme=`pwd` ; export rootme ; \
a904db53 732 (cd ./opcodes; \
aa06ff7e
SC
733 $(MAKE) $(FLAGS_TO_PASS) all) ; \
734 else \
735 true ; \
736 fi
737
aa06ff7e
SC
738install-opcodes: force
739 @if [ -f ./opcodes/Makefile ] ; then \
740 rootme=`pwd` ; export rootme ; \
a904db53 741 (cd ./opcodes; \
aa06ff7e
SC
742 $(MAKE) $(FLAGS_TO_PASS) install) ; \
743 else \
744 true ; \
745 fi
746
4d714963 747### binutils
aa06ff7e 748all-binutils: all-opcodes all-libiberty all-bfd all-flex
06a07944 749 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 750 rootme=`pwd` ; export rootme ; \
7fcfdcf7 751 (cd ./binutils; \
2198e4ba 752 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
753 else \
754 true ; \
755 fi
4d714963 756
4d714963 757install-binutils: force
06a07944 758 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 759 rootme=`pwd` ; export rootme ; \
7fcfdcf7 760 (cd ./binutils; \
2198e4ba 761 $(MAKE) $(FLAGS_TO_PASS) install) ; \
7fcfdcf7
SC
762 else \
763 true ; \
764 fi
765
766### newlib
51489233 767all-newlib: all-binutils all-ld all-gas all-gcc
06a07944 768 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 769 rootme=`pwd` ; export rootme ; \
51489233 770 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 771 (cd ./newlib; \
51489233 772 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
7fcfdcf7
SC
773 else \
774 true ; \
775 fi
7fcfdcf7 776
7fcfdcf7 777install-newlib: force
06a07944 778 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 779 rootme=`pwd` ; export rootme ; \
51489233 780 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 781 (cd ./newlib; \
51489233 782 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
783 else \
784 true ; \
785 fi
23e3e7f9 786
bc2a2c17
FF
787### start-sanitize-chill
788### chillrt
9f73dd6a 789all-chillrt: all-binutils all-ld all-gas all-gcc all-newlib
bc2a2c17
FF
790 @if [ -f ./chillrt/Makefile ] ; then \
791 rootme=`pwd` ; export rootme ; \
792 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
793 (cd ./chillrt; \
794 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
795 else \
796 true ; \
797 fi
798
799install-chillrt: force
800 @if [ -f ./chillrt/Makefile ] ; then \
801 rootme=`pwd` ; export rootme ; \
802 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
803 (cd ./chillrt; \
804 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
805 else \
806 true ; \
807 fi
53222cbd
RP
808
809all-gdb: all-chillrt
bc2a2c17
FF
810### end-sanitize-chill
811
9a14a29d 812### gprof
c4fb14b7 813all-gprof: all-libiberty all-bfd
06a07944 814 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
815 rootme=`pwd` ; export rootme ; \
816 (cd ./gprof; \
817 $(MAKE) $(FLAGS_TO_PASS) all) ; \
9a14a29d
SEF
818 else \
819 true ; \
820 fi
9a14a29d 821
9a14a29d 822install-gprof: force
06a07944 823 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
824 rootme=`pwd` ; export rootme ; \
825 (cd ./gprof; \
826 $(MAKE) $(FLAGS_TO_PASS) install) ; \
9a14a29d
SEF
827 else \
828 true ; \
829 fi
830
4d714963 831### byacc
c4fb14b7 832all-byacc: force
06a07944 833 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 834 rootme=`pwd` ; export rootme ; \
7fcfdcf7 835 (cd ./byacc; \
2198e4ba 836 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
837 else \
838 true ; \
839 fi
4d714963 840
4d714963 841install-byacc: force
06a07944 842 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 843 rootme=`pwd` ; export rootme ; \
7fcfdcf7 844 (cd ./byacc; \
2198e4ba 845 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
846 else \
847 true ; \
848 fi
23e3e7f9 849
dcbfc14d 850### flex
2198e4ba 851all-flex: all-libiberty
06a07944 852 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
853 rootme=`pwd` ; export rootme ; \
854 (cd ./flex; \
2198e4ba 855 $(MAKE) $(FLAGS_TO_PASS) all) ; \
dcbfc14d
DZ
856 else \
857 true ; \
858 fi
859
dcbfc14d 860install-flex: force
06a07944 861 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
862 rootme=`pwd` ; export rootme ; \
863 (cd ./flex; \
2198e4ba 864 $(MAKE) $(FLAGS_TO_PASS) install) ; \
dcbfc14d
DZ
865 else \
866 true ; \
867 fi
4d714963 868### gcc
cb4005ff 869all-gcc: all-libiberty all-byacc all-binutils all-gas
06a07944 870 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 871 rootme=`pwd` ; export rootme ; \
f4e414f1 872 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 873 (cd ./gcc; \
f4e414f1 874 $(MAKE) $(GCC_FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
875 else \
876 true ; \
877 fi
4d714963 878
c4fb14b7 879install-gcc: force
06a07944 880 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 881 rootme=`pwd` ; export rootme ; \
f4e414f1 882 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 883 (cd ./gcc; \
f4e414f1 884 $(MAKE) $(GCC_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
885 else \
886 true ; \
887 fi
23e3e7f9 888
4d714963 889### readline
c4fb14b7 890all-readline: force
06a07944 891 @if [ -f ./readline/Makefile ] ; then \
77806c3e 892 rootme=`pwd` ; export rootme ; \
7fcfdcf7 893 (cd ./readline; \
2198e4ba 894 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
895 else \
896 true ; \
897 fi
4d714963 898
4d714963 899install-readline: force
06a07944 900 @if [ -f ./readline/Makefile ] ; then \
77806c3e 901 rootme=`pwd` ; export rootme ; \
7fcfdcf7 902 (cd ./readline; \
2198e4ba 903 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
904 else \
905 true ; \
906 fi
23e3e7f9 907
4d714963 908### glob
c4fb14b7 909all-glob: force
06a07944 910 @if [ -f ./glob/Makefile ] ; then \
77806c3e 911 rootme=`pwd` ; export rootme ; \
7fcfdcf7 912 (cd ./glob; \
2198e4ba 913 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
914 else \
915 true ; \
916 fi
4d714963 917
4d714963 918install-glob: force
06a07944 919 @if [ -f ./glob/Makefile ] ; then \
77806c3e 920 rootme=`pwd` ; export rootme ; \
7fcfdcf7 921 (cd ./glob; \
2198e4ba 922 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
923 else \
924 true ; \
925 fi
23e3e7f9 926
4d714963 927### gas
a904db53 928all-gas: all-libiberty all-opcodes all-bfd
06a07944 929 @if [ -f ./gas/Makefile ] ; then \
77806c3e 930 rootme=`pwd` ; export rootme ; \
7fcfdcf7 931 (cd ./gas; \
2198e4ba 932 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
933 else \
934 true ; \
935 fi
4d714963 936
4d714963 937install-gas: force
06a07944 938 @if [ -f ./gas/Makefile ] ; then \
77806c3e 939 rootme=`pwd` ; export rootme ; \
7fcfdcf7 940 (cd ./gas; \
2198e4ba 941 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
942 else \
943 true ; \
944 fi
23e3e7f9 945
3ad0ef37
SC
946### gas
947all-tgas: all-libiberty all-bfd
948 @if [ -f ./tgas/Makefile ] ; then \
949 rootme=`pwd` ; export rootme ; \
950 (cd ./tgas; \
951 $(MAKE) $(FLAGS_TO_PASS) all) ; \
952 else \
953 true ; \
954 fi
955
956
4d714963 957### ld
6995fe83 958all-ld: all-libiberty all-bfd all-byacc all-flex
06a07944 959 @if [ -f ./ld/Makefile ] ; then \
77806c3e 960 rootme=`pwd` ; export rootme ; \
7fcfdcf7 961 (cd ./ld; \
2198e4ba 962 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
963 else \
964 true ; \
965 fi
a0f47eb7 966
4d714963 967install-ld: force
06a07944 968 @if [ -f ./ld/Makefile ] ; then \
77806c3e 969 rootme=`pwd` ; export rootme ; \
7fcfdcf7 970 (cd ./ld; \
2198e4ba 971 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
972 else \
973 true ; \
974 fi
23e3e7f9 975
4d714963 976### gdb
a904db53 977all-gdb: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
06a07944 978 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 979 rootme=`pwd` ; export rootme ; \
7fcfdcf7 980 (cd ./gdb; \
2198e4ba 981 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
982 else \
983 true ; \
984 fi
4d714963 985
4d714963 986install-gdb: force
06a07944 987 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 988 rootme=`pwd` ; export rootme ; \
7fcfdcf7 989 (cd ./gdb; \
2198e4ba 990 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
991 else \
992 true ; \
993 fi
23e3e7f9 994
4d714963 995### make
c4fb14b7 996all-make: all-libiberty
06a07944 997 @if [ -f ./make/Makefile ] ; then \
77806c3e 998 rootme=`pwd` ; export rootme ; \
7fcfdcf7 999 (cd ./make; \
2198e4ba 1000 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
1001 else \
1002 true ; \
1003 fi
4d714963 1004
4d714963 1005install-make: force
06a07944 1006 @if [ -f ./make/Makefile ] ; then \
77806c3e 1007 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1008 (cd ./make; \
2198e4ba 1009 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
1010 else \
1011 true ; \
1012 fi
23e3e7f9 1013
4d714963 1014### diff
7e57a051 1015all-diff: all-libiberty
06a07944 1016 @if [ -f ./diff/Makefile ] ; then \
77806c3e 1017 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1018 (cd ./diff; \
2198e4ba 1019 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
1020 else \
1021 true ; \
1022 fi
4d714963 1023
4d714963 1024install-diff: force
06a07944 1025 @if [ -f ./diff/Makefile ] ; then \
77806c3e 1026 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1027 (cd ./diff/; \
2198e4ba 1028 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
1029 else \
1030 true ; \
1031 fi
23e3e7f9 1032
4d714963 1033### grep
c4fb14b7 1034all-grep: force
06a07944 1035 @if [ -f ./grep/Makefile ] ; then \
77806c3e 1036 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1037 (cd ./grep; \
2198e4ba 1038 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
1039 else \
1040 true ; \
1041 fi
4d714963 1042
4d714963 1043install-grep: force
06a07944 1044 @if [ -f ./grep/Makefile ] ; then \
77806c3e 1045 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1046 (cd ./grep; \
2198e4ba
MT
1047 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1048 else \
1049 true ; \
1050 fi
1051
1052### rcs
1053all-rcs: force
06a07944 1054 @if [ -f ./rcs/Makefile ] ; then \
2198e4ba
MT
1055 rootme=`pwd` ; export rootme ; \
1056 (cd ./rcs; \
1057 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
1058 else \
1059 true ; \
1060 fi
4d714963 1061
c4fb14b7 1062install-rcs: force
06a07944 1063 @if [ -f ./rcs/Makefile ] ; then \
77806c3e 1064 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1065 (cd ./rcs; \
2198e4ba 1066 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
1067 else \
1068 true ; \
1069 fi
23e3e7f9 1070
4d714963 1071### cvs
c4fb14b7 1072all-cvs: force
06a07944 1073 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 1074 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1075 (cd ./cvs; \
2198e4ba 1076 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
1077 else \
1078 true ; \
1079 fi
4d714963 1080
c4fb14b7 1081install-cvs: force
06a07944 1082 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 1083 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1084 (cd ./cvs; \
2198e4ba 1085 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
1086 else \
1087 true ; \
1088 fi
23e3e7f9 1089
7c9feeb7 1090### patch
c4fb14b7 1091all-patch: force
06a07944 1092 @if [ -f ./patch/Makefile ] ; then \
77806c3e 1093 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1094 (cd ./patch; \
2198e4ba 1095 $(MAKE) $(FLAGS_TO_PASS) all) ; \
7c9feeb7
RP
1096 else \
1097 true ; \
1098 fi
1099
c4fb14b7 1100install-patch: force
06a07944 1101 @if [ -f ./patch/Makefile ] ; then \
77806c3e 1102 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1103 (cd ./patch; \
2198e4ba 1104 $(MAKE) $(FLAGS_TO_PASS) \
7c9feeb7 1105 bindir=$(bindir) \
2198e4ba 1106 man1dir=$(man1dir) install) ; \
7c9feeb7
RP
1107 else \
1108 true ; \
1109 fi
1110
4d714963 1111### emacs
c4fb14b7 1112all-emacs: force
06a07944 1113 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 1114 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1115 (cd ./emacs; \
d1bea4c7 1116 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
1117 else \
1118 true ; \
1119 fi
4d714963 1120
c4fb14b7 1121install-emacs: force
06a07944 1122 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 1123 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1124 (cd ./emacs; \
d1bea4c7 1125 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
1126 else \
1127 true ; \
1128 fi
23e3e7f9 1129
4d714963 1130### ispell
c4fb14b7 1131all-ispell: all-emacs
06a07944 1132 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 1133 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1134 (cd ./ispell; \
2198e4ba 1135 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
1136 else \
1137 true ; \
1138 fi
4d714963 1139
c4fb14b7 1140install-ispell: force
06a07944 1141 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 1142 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1143 (cd ./ispell; \
2198e4ba 1144 $(MAKE) $(FLAGS_TO_PASS) install) ; \
079399f6
RP
1145 else \
1146 true ; \
1147 fi
23e3e7f9 1148
72c09fbc
SC
1149### prms
1150all-prms: force
1151 @if [ -f ./prms/Makefile ] ; then \
9f33c264 1152 rootme=`pwd` ; export rootme ; \
72c09fbc 1153 (cd ./prms; \
9f33c264
BK
1154 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1155 else \
1156 true ; \
1157 fi
1158
72c09fbc
SC
1159install-prms: force
1160 @if [ -f ./prms/Makefile ] ; then \
9f33c264 1161 rootme=`pwd` ; export rootme ; \
72c09fbc 1162 (cd ./prms; \
9f33c264
BK
1163 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1164 else \
1165 true ; \
1166 fi
1167
98941fab
BK
1168### send-pr
1169all-send-pr: force
1170 @if [ -f ./send-pr/Makefile ] ; then \
079b2abe 1171 rootme=`pwd` ; export rootme ; \
98941fab 1172 (cd ./send-pr; \
2198e4ba 1173 $(MAKE) $(FLAGS_TO_PASS) all) ; \
079b2abe
RP
1174 else \
1175 true ; \
1176 fi
079b2abe 1177
98941fab
BK
1178install-send-pr: force
1179 @if [ -f ./send-pr/Makefile ] ; then \
079b2abe 1180 rootme=`pwd` ; export rootme ; \
98941fab 1181 (cd ./send-pr; \
2198e4ba 1182 $(MAKE) $(FLAGS_TO_PASS) install) ; \
079b2abe
RP
1183 else \
1184 true ; \
1185 fi
1186
06a07944
RP
1187### libm
1188all-libm: force
98a33b6d 1189 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
1190 rootme=`pwd` ; export rootme ; \
1191 (cd ./libm; \
1b9b5090 1192 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
06a07944
RP
1193 else \
1194 true ; \
1195 fi
1196
06a07944 1197install-libm: force
98a33b6d 1198 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
1199 rootme=`pwd` ; export rootme ; \
1200 (cd ./libm; \
1b9b5090 1201 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
06a07944
RP
1202 else \
1203 true ; \
1204 fi
1205
ba8abfce 1206### libg++
9d98d2ac 1207
e85e07cb 1208all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib
06a07944 1209 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 1210 rootme=`pwd` ; export rootme ; \
51489233 1211 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 1212 (cd ./libg++; \
51489233 1213 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
ba8abfce
JG
1214 else \
1215 true ; \
1216 fi
1217
c4fb14b7 1218install-libg++: force
06a07944 1219 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 1220 rootme=`pwd` ; export rootme ; \
51489233 1221 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 1222 (cd ./libg++; \
51489233 1223 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
ba8abfce
JG
1224 else \
1225 true ; \
1226 fi
ffce44a0
DZ
1227### tcl
1228all-tcl:
1229 @if [ -f ./tcl/Makefile ] ; then \
1230 rootme=`pwd` ; export rootme ; \
1231 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1232 (cd ./tcl; \
1233 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1234 else \
1235 true ; \
1236 fi
1237
ffce44a0
DZ
1238install-tcl: force
1239 @if [ -f ./tcl/Makefile ] ; then \
1240 rootme=`pwd` ; export rootme ; \
1241 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1242 (cd ./tcl; \
1243 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1244 else \
1245 true ; \
1246 fi
1247
1248
1249### tk
1250all-tk: all-tcl
1251 @if [ -f ./tk/Makefile ] ; then \
1252 rootme=`pwd` ; export rootme ; \
1253 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1254 (cd ./tk; \
d1bea4c7 1255 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
ffce44a0
DZ
1256 else \
1257 true ; \
1258 fi
1259
ffce44a0
DZ
1260install-tk: force
1261 @if [ -f ./tk/Makefile ] ; then \
1262 rootme=`pwd` ; export rootme ; \
1263 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1264 (cd ./tk; \
d1bea4c7 1265 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
ffce44a0
DZ
1266 else \
1267 true ; \
1268 fi
1269
50fbe976
DZ
1270### tclX
1271all-tclX: all-tcl all-tk
1272 @if [ -f ./tclX/Makefile ] ; then \
1273 rootme=`pwd` ; export rootme ; \
1274 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1275 (cd ./tclX; \
1276 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
1277 else \
1278 true ; \
1279 fi
1280
1281install-tclX: force
1282 @if [ -f ./tclX/Makefile ] ; then \
1283 rootme=`pwd` ; export rootme ; \
1284 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1285 (cd ./tclX; \
1286 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
1287 else \
1288 true ; \
1289 fi
1290
1291
d1bea4c7 1292### expect
ffce44a0
DZ
1293all-expect: all-tcl
1294 @if [ -f ./expect/Makefile ] ; then \
1295 rootme=`pwd` ; export rootme ; \
1296 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1297 (cd ./expect; \
72c09fbc 1298 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
ffce44a0
DZ
1299 else \
1300 true ; \
1301 fi
1302
ffce44a0
DZ
1303install-expect: force
1304 @if [ -f ./expect/Makefile ] ; then \
1305 rootme=`pwd` ; export rootme ; \
1306 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1307 (cd ./expect; \
72c09fbc 1308 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
ffce44a0
DZ
1309 else \
1310 true ; \
1311 fi
1312
675e8ac9
SC
1313### sim
1314all-sim: all-bfd
1315 @if [ -f ./sim/Makefile ] ; then \
d1bea4c7 1316 rootme=`pwd` ; export rootme ; \
675e8ac9 1317 (cd ./sim; \
d1bea4c7
DZ
1318 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1319 else \
1320 true ; \
1321 fi
1322
675e8ac9
SC
1323install-sim: force
1324 @if [ -f ./sim/Makefile ] ; then \
d1bea4c7 1325 rootme=`pwd` ; export rootme ; \
675e8ac9 1326 (cd ./sim; \
b1cceba2 1327 $(MAKE) $(FLAGS_TO_PASS) install) ; \
d1bea4c7
DZ
1328 else \
1329 true ; \
1330 fi
1331
b1cceba2
DZ
1332### fileutils
1333all-fileutils: force
1334 @if [ -f ./fileutils/Makefile ] ; then \
1335 rootme=`pwd` ; export rootme ; \
1336 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1337 else \
1338 true ; \
1339 fi
1340
1341install-fileutils: force
1342 @if [ -f ./fileutils/Makefile ] ; then \
d1bea4c7 1343 rootme=`pwd` ; export rootme ; \
b1cceba2
DZ
1344 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1345 else \
1346 true ; \
1347 fi
1348
1349### find
1350all-find: force
1351 @if [ -f ./find/Makefile ] ; then \
1352 rootme=`pwd` ; export rootme ; \
1353 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1354 else \
1355 true ; \
1356 fi
1357
1358install-find: force
1359 @if [ -f ./find/Makefile ] ; then \
1360 rootme=`pwd` ; export rootme ; \
1361 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1362 else \
1363 true ; \
1364 fi
1365
1366### gawk
1367all-gawk: force
1368 @if [ -f ./gawk/Makefile ] ; then \
1369 rootme=`pwd` ; export rootme ; \
1370 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1371 else \
1372 true ; \
1373 fi
1374
1375install-gawk: force
1376 @if [ -f ./gawk/Makefile ] ; then \
1377 rootme=`pwd` ; export rootme ; \
1378 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) install) ; \
d1bea4c7
DZ
1379 else \
1380 true ; \
1381 fi
1382
b1cceba2
DZ
1383### m4
1384all-m4: all-libiberty
1385 @if [ -f ./m4/Makefile ] ; then \
1386 rootme=`pwd` ; export rootme ; \
1387 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1388 else \
1389 true ; \
1390 fi
1391
1392install-m4: force
1393 @if [ -f ./m4/Makefile ] ; then \
1394 rootme=`pwd` ; export rootme ; \
1395 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1396 else \
1397 true ; \
1398 fi
1399
1400### sed
1401all-sed: force
1402 @if [ -f ./sed/Makefile ] ; then \
1403 rootme=`pwd` ; export rootme ; \
1404 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1405 else \
1406 true ; \
1407 fi
1408
1409install-sed: force
1410 @if [ -f ./sed/Makefile ] ; then \
1411 rootme=`pwd` ; export rootme ; \
1412 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1413 else \
1414 true ; \
1415 fi
1416
1417### time
1418all-time: force
1419 @if [ -f ./time/Makefile ] ; then \
1420 rootme=`pwd` ; export rootme ; \
1421 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1422 else \
1423 true ; \
1424 fi
1425
1426install-time: force
1427 @if [ -f ./time/Makefile ] ; then \
1428 rootme=`pwd` ; export rootme ; \
1429 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1430 else \
1431 true ; \
1432 fi
1433
1434### wdiff
1435all-wdiff: force
1436 @if [ -f ./wdiff/Makefile ] ; then \
1437 rootme=`pwd` ; export rootme ; \
1438 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1439 else \
1440 true ; \
1441 fi
1442
1443install-wdiff: force
1444 @if [ -f ./wdiff/Makefile ] ; then \
1445 rootme=`pwd` ; export rootme ; \
1446 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1447 else \
1448 true ; \
1449 fi
1450
4a2f0c79
DZ
1451### uudecode
1452all-uudecode: all-libiberty
1453 @if [ -f ./uudecode/Makefile ] ; then \
1454 rootme=`pwd` ; export rootme ; \
1455 (cd ./uudecode; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1456 else \
1457 true ; \
1458 fi
1459
1460install-uudecode: force
1461 @if [ -f ./uudecode/Makefile ] ; then \
1462 rootme=`pwd` ; export rootme ; \
1463 (cd ./uudecode; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1464 else \
1465 true ; \
1466 fi
1467
b1cceba2
DZ
1468### shellutils
1469all-shellutils: force
1470 @if [ -f ./shellutils/Makefile ] ; then \
1471 rootme=`pwd` ; export rootme ; \
1472 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1473 else \
1474 true ; \
1475 fi
1476
1477install-shellutils: force
1478 @if [ -f ./shellutils/Makefile ] ; then \
1479 rootme=`pwd` ; export rootme ; \
1480 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1481 else \
1482 true ; \
1483 fi
1484
1485### textutils
1486all-textutils: force
1487 @if [ -f ./textutils/Makefile ] ; then \
1488 rootme=`pwd` ; export rootme ; \
1489 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1490 else \
1491 true ; \
1492 fi
1493
1494install-textutils: force
1495 @if [ -f ./textutils/Makefile ] ; then \
1496 rootme=`pwd` ; export rootme ; \
1497 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1498 else \
1499 true ; \
1500 fi
1501
1502
d1bea4c7 1503
4d714963 1504### other supporting targets
a0f47eb7 1505
4c27527f 1506MAKEDIRS= \
4d714963 1507 $(prefix) \
7fcfdcf7 1508 $(exec_prefix) \
8b361a95
SEF
1509 $(tooldir)
1510
1511# $(bindir) \
1512# $(libdir) \
1513# $(includedir) \
1514# $(datadir) \
1515# $(docdir) \
1516# $(mandir) \
1517# $(man1dir) \
1518# $(man5dir)
4d714963
RP
1519
1520# $(man2dir) \
1521# $(man3dir) \
1522# $(man4dir) \
1523# $(man6dir) \
1524# $(man7dir) \
1525# $(man8dir)
4c27527f 1526
02a7ba9a 1527install-dirs:
4c27527f 1528 for i in $(MAKEDIRS) ; do \
cd49a4dc 1529 echo Making $$i... ; \
8b361a95
SEF
1530 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1531 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
06a07944
RP
1532 if [ ! -d $$i ] ; then \
1533 if mkdir $$i ; then \
1534 true ; \
1535 else \
1536 exit 1 ; \
1537 fi ; \
1538 else \
1539 true ; \
1540 fi ; \
4c27527f 1541 done
0ec776a5 1542
02a7ba9a 1543install-info-dirs:
9a9e8e7f 1544 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
0ef4728f
ILT
1545 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
1546 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
1547 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
c5f94070 1548
0ef4728f 1549dir.info: do-install-info
72c09fbc
SC
1550 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1551 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1552 mv -f dir.info.new dir.info ; \
50fbe976 1553 else true ; \
72c09fbc 1554 fi
6b7e5998 1555
b1cceba2
DZ
1556dist:
1557 @echo "Building a full distribution of this tree isn't done"
1558 @echo "via 'make dist'. Check out the etc/ subdirectory"
1559
eb02fd64
RP
1560etags tags: TAGS
1561
02a7ba9a 1562TAGS:
eb02fd64
RP
1563 etags `$(MAKE) ls`
1564
1565ls:
1566 @echo Makefile
1567 @for i in $(SUBDIRS); \
1568 do \
1569 (cd $$i; \
1570 pwd=`pwd`; \
1571 wd=`basename $$pwd`; \
1572 for j in `$(MAKE) ls`; \
1573 do \
1574 echo $$wd/$$j; \
1575 done) \
1576 done
1577
3c81fef5 1578force:
eb02fd64
RP
1579
1580# with the gnu make, this is done automatically.
1581
f1eb48b6 1582Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 1583 $(SHELL) ./config.status
eb02fd64 1584
11954bf1
JG
1585#
1586# Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1587
d94d255d 1588DEVO_SUPPORT= README Makefile.in configure configure.in \
6d681784
JG
1589 config.guess config.sub config move-if-change
1590ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \
1591 configure.texi
72c09fbc 1592GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob sim
d94d255d 1593GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS)
11954bf1 1594
b1cceba2 1595setup-dirs: force
11954bf1 1596 ./configure sun4
53222cbd 1597 $(MAKE) clean
11954bf1 1598 ./configure -rm sun4
42187387 1599 chmod og=u `find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
abc52b80 1600
abc52b80 1601gdb.tar.Z: setup-dirs
42187387 1602 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir BISON="byacc")
abc52b80
JG
1603 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1604
f980fcfb 1605make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/texinfo.tex
abc52b80
JG
1606 rm -rf proto-toplev; mkdir proto-toplev
1607 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1608 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1609 ln -s ../$$i . ; \
1610 done)
6d681784
JG
1611 mkdir proto-toplev/etc
1612 (cd proto-toplev/etc; for i in $(ETC_SUPPORT); do \
1613 ln -s ../../etc/$$i . ; \
1614 done)
7c9feeb7
RP
1615 # Put only one copy (four hard links) of COPYING in the tar file.
1616 rm proto-toplev/bfd/COPYING
1617 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1618 rm proto-toplev/include/COPYING
1619 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1620 rm proto-toplev/readline/COPYING
1621 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
a50b5d9d
JG
1622
1623 # Take out texinfo and glob from configurable dirs
a3a063a9 1624 rm proto-toplev/configure.in
a50b5d9d
JG
1625 sed -e '/^host_tools=/s/texinfo //' \
1626 -e '/^host_libs=/s/glob //' \
1627 <configure.in >proto-toplev/configure.in
6995fe83 1628
a50b5d9d
JG
1629 # Take out texinfo from a few places; make simple BISON=bison line.
1630 rm proto-toplev/Makefile.in
1631 sed -e '/^all\.normal: /s/\all-texinfo //' \
1632 -e '/^ install-texinfo /d' \
1633 -e '\/^BISON =/,\/^$$/c\
eab2562e 1634 BISON = bison -y' \
6995fe83
SG
1635 <Makefile.in >proto-toplev/Makefile.in
1636
abc52b80 1637 mkdir proto-toplev/texinfo
a50b5d9d 1638 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
81246025 1639 ln -s ../../texinfo/tex3patch proto-toplev/texinfo/
905bb120 1640 chmod og=u `find proto-toplev -print`
abc52b80
JG
1641 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1642 echo "==> Making gdb-$$VER.tar.Z"; \
1643 ln -s proto-toplev gdb-$$VER; \
1644 tar cfh - gdb-$$VER \
1645 | compress -v >gdb-$$VER.tar.Z)
81246025 1646 $(GZIP) -d <gdb-$$VER.tar.Z | $(GZIP) -9 -v >gdb-$$VER.tar.z
0ec776a5 1647
eb02fd64 1648# end of Makefile.in
This page took 0.154789 seconds and 4 git commands to generate.