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