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