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