| 1 | # |
| 2 | # Makefile for directory with subdirs to build. |
| 3 | # Copyright (C) 1990, 1991, 1992, 1993 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 = $(exec_prefix)/$(target) |
| 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 = $${srcroot}/install.sh -c |
| 49 | INSTALL_PROGRAM = $(INSTALL) |
| 50 | INSTALL_DATA = $(INSTALL) |
| 51 | INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)' |
| 52 | |
| 53 | AS = as |
| 54 | AR = ar |
| 55 | AR_FLAGS = rc |
| 56 | CC = cc |
| 57 | CFLAGS = -g |
| 58 | # start-sanitize-chill |
| 59 | CHILLFLAGS = $(CFLAGS) |
| 60 | CHILL_LIB = -lchill |
| 61 | # end-sanitize-chill |
| 62 | CXX = gcc |
| 63 | CXXFLAGS = -g -O |
| 64 | RANLIB = ranlib |
| 65 | NM = nm |
| 66 | MUNCH_NM = $(NM) |
| 67 | GZIP = gzip |
| 68 | COMPRESS = compress |
| 69 | |
| 70 | # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove. |
| 71 | BISON = `if [ -f $${rootme}/byacc/byacc ] ; \ |
| 72 | then echo $${rootme}/byacc/byacc ; \ |
| 73 | else echo byacc ; \ |
| 74 | fi` |
| 75 | |
| 76 | LEX = `if [ -f $${rootme}/flex/flex ] ; \ |
| 77 | then echo $${rootme}/flex/flex ; \ |
| 78 | else echo flex ; fi` |
| 79 | |
| 80 | MAKEINFO = `if [ -f $${rootme}/texinfo/makeinfo/makeinfo ] ; \ |
| 81 | then echo $${rootme}/texinfo/makeinfo/makeinfo ; \ |
| 82 | else echo makeinfo ; fi` |
| 83 | # This just becomes part of the MAKEINFO definition passed down to |
| 84 | # sub-makes. It lets flags be given on the command line while still |
| 85 | # using the makeinfo from the object tree. |
| 86 | MAKEINFOFLAGS = |
| 87 | |
| 88 | EXPECT = `if [ -f $${rootme}/expect/expect ] ; \ |
| 89 | then echo $${rootme}/expect/expect ; \ |
| 90 | else echo expect ; fi` |
| 91 | |
| 92 | RUNTEST = `if [ -f $${srcroot}/dejagnu/runtest ] ; \ |
| 93 | then echo $${srcroot}/dejagnu/runtest ; \ |
| 94 | else echo runtest ; fi` |
| 95 | |
| 96 | |
| 97 | # libraries that may need to be augmented on a system-by-system basis |
| 98 | X11_LIB = -lX11 |
| 99 | |
| 100 | # compilers to use to create programs which must be run in the build |
| 101 | # environment. |
| 102 | CC_FOR_BUILD = $(CC) |
| 103 | CXX_FOR_BUILD = $(CXX) |
| 104 | |
| 105 | SUBDIRS = "this is set via configure, don't edit this" |
| 106 | OTHERS = |
| 107 | |
| 108 | ALL = all.normal |
| 109 | INSTALL_TARGET = install-dirs \ |
| 110 | $(INSTALL_MODULES) \ |
| 111 | $(INSTALL_TARGET_MODULES) \ |
| 112 | $(INSTALL_X11_MODULES) \ |
| 113 | install-gcc |
| 114 | |
| 115 | CC_FOR_TARGET = ` \ |
| 116 | if [ -f $${rootme}/gcc/Makefile ] ; then \ |
| 117 | echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \ |
| 118 | else \ |
| 119 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
| 120 | echo $(CC); \ |
| 121 | else \ |
| 122 | t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ |
| 123 | fi; \ |
| 124 | fi` |
| 125 | |
| 126 | # start-sanitize-chill |
| 127 | CHILL_FOR_TARGET = ` \ |
| 128 | if [ -f $${rootme}/gcc/Makefile ] ; then \ |
| 129 | echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \ |
| 130 | else \ |
| 131 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
| 132 | echo $(CC); \ |
| 133 | else \ |
| 134 | t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ |
| 135 | fi; \ |
| 136 | fi` |
| 137 | |
| 138 | # end-sanitize-chill |
| 139 | |
| 140 | CXX_FOR_TARGET = ` \ |
| 141 | if [ -f $${rootme}/gcc/Makefile ] ; then \ |
| 142 | echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \ |
| 143 | else \ |
| 144 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
| 145 | echo $(CXX); \ |
| 146 | else \ |
| 147 | t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ |
| 148 | fi; \ |
| 149 | fi` |
| 150 | |
| 151 | AS_FOR_TARGET = ` \ |
| 152 | if [ -f $${rootme}/gas/Makefile ] ; then \ |
| 153 | echo $${rootme}/gas/as.new ; \ |
| 154 | else \ |
| 155 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
| 156 | echo $(AS); \ |
| 157 | else \ |
| 158 | t='$(program_transform_name)'; echo as | sed -e '' $$t ; \ |
| 159 | fi; \ |
| 160 | fi` |
| 161 | |
| 162 | AR_FOR_TARGET = ` \ |
| 163 | if [ -f $${rootme}/binutils/Makefile ] ; then \ |
| 164 | echo $${rootme}/binutils/ar ; \ |
| 165 | else \ |
| 166 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
| 167 | echo $(AR); \ |
| 168 | else \ |
| 169 | t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \ |
| 170 | fi; \ |
| 171 | fi` |
| 172 | |
| 173 | RANLIB_FOR_TARGET = ` \ |
| 174 | if [ -f $${rootme}/binutils/Makefile ] ; then \ |
| 175 | echo $${rootme}/binutils/ranlib ; \ |
| 176 | else \ |
| 177 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
| 178 | echo $(RANLIB); \ |
| 179 | else \ |
| 180 | t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \ |
| 181 | fi; \ |
| 182 | fi` |
| 183 | |
| 184 | NM_FOR_TARGET = ` \ |
| 185 | if [ -f $${rootme}/binutils/Makefile ] ; then \ |
| 186 | echo $${rootme}/binutils/nm ; \ |
| 187 | else \ |
| 188 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
| 189 | echo $(NM); \ |
| 190 | else \ |
| 191 | t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \ |
| 192 | fi; \ |
| 193 | fi` |
| 194 | |
| 195 | # FIXME: This is badly named. |
| 196 | XTRAFLAGS = ` \ |
| 197 | if [ -f $${rootme}/gcc/Makefile ] ; then \ |
| 198 | if [ -f $${rootme}/newlib/Makefile ] ; then \ |
| 199 | echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \ |
| 200 | else \ |
| 201 | echo -I$${rootme}/gcc/include ; \ |
| 202 | fi ; \ |
| 203 | else \ |
| 204 | echo ; \ |
| 205 | fi` |
| 206 | |
| 207 | PRMS = all-prms |
| 208 | |
| 209 | #### host and target specific makefile fragments come in here. |
| 210 | ### |
| 211 | |
| 212 | # Flags to pass down to all sub-makes. |
| 213 | # Please keep these in alphabetical order. |
| 214 | BASE_FLAGS_TO_PASS = \ |
| 215 | "AR_FLAGS=$(AR_FLAGS)" \ |
| 216 | "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ |
| 217 | "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ |
| 218 | "BISON=$(BISON)" \ |
| 219 | "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ |
| 220 | "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ |
| 221 | "CFLAGS=$(CFLAGS)" \ |
| 222 | $(start-sanitize-chill)\ |
| 223 | "CHILLFLAGS=$(CHILLFLAGS)" \ |
| 224 | "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \ |
| 225 | "CHILL_LIB=$(CHILL_LIB)" \ |
| 226 | $(end-sanitize-chill)\ |
| 227 | "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ |
| 228 | "CXXFLAGS=$(CXXFLAGS)" \ |
| 229 | "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ |
| 230 | "GCC_FOR_TARGET=$$(CC_FOR_TARGET)" \ |
| 231 | "INSTALL=$(INSTALL)" \ |
| 232 | "INSTALL_DATA=$(INSTALL_DATA)" \ |
| 233 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ |
| 234 | "INSTALL_XFORM=$(INSTALL_XFORM)" \ |
| 235 | "LDFLAGS=$(LDFLAGS)" \ |
| 236 | "LEX=$(LEX)" \ |
| 237 | "LOADLIBES=$(LOADLIBES)" \ |
| 238 | "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ |
| 239 | "MUNCH_NM=$(MUNCH_NM)" \ |
| 240 | "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ |
| 241 | "PRMS=$(PRMS)" \ |
| 242 | "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ |
| 243 | "EXPECT=$(EXPECT)" \ |
| 244 | "RUNTEST=$(RUNTEST)" \ |
| 245 | "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ |
| 246 | "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \ |
| 247 | "exec_prefix=$(exec_prefix)" \ |
| 248 | "prefix=$(prefix)" \ |
| 249 | "tooldir=$(tooldir)" |
| 250 | |
| 251 | # Flags to pass down to most sub-makes, in which we're building with |
| 252 | # the host environment. |
| 253 | # If any variables are added here, they must be added to do-*, below. |
| 254 | EXTRA_HOST_FLAGS = \ |
| 255 | 'AR=$(AR)' \ |
| 256 | 'AS=$(AS)' \ |
| 257 | 'CC=$(CC)' \ |
| 258 | 'CXX=$(CXX)' \ |
| 259 | 'NM=$(NM)' \ |
| 260 | 'RANLIB=$(RANLIB)' \ |
| 261 | 'XTRAFLAGS=' |
| 262 | |
| 263 | FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) |
| 264 | |
| 265 | # Flags that are concerned with the location of the X11 include files |
| 266 | # and library files |
| 267 | X11_FLAGS_TO_PASS = \ |
| 268 | "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \ |
| 269 | "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \ |
| 270 | "X11_LIB=$(X11_LIB)" |
| 271 | |
| 272 | # Flags to pass down to makes which are built with the target environment. |
| 273 | # The double $ decreases the length of the command line; the variables |
| 274 | # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. |
| 275 | # If any variables are added here, they must be added to do-*, below. |
| 276 | EXTRA_TARGET_FLAGS = \ |
| 277 | 'AR=$$(AR_FOR_TARGET)' \ |
| 278 | 'AS=$$(AS_FOR_TARGET)' \ |
| 279 | 'CC=$$(CC_FOR_TARGET)' \ |
| 280 | 'CXX=$$(CXX_FOR_TARGET)' \ |
| 281 | 'NM=$$(NM_FOR_TARGET)' \ |
| 282 | 'RANLIB=$$(RANLIB_FOR_TARGET)' \ |
| 283 | 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)' |
| 284 | |
| 285 | TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) |
| 286 | |
| 287 | # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it |
| 288 | # unfortunately needs the native compiler and the target ar and |
| 289 | # ranlib. |
| 290 | # If any variables are added here, they must be added to do-*, below. |
| 291 | # The HOST_* variables are a special case, which are used for the gcc |
| 292 | # cross-building scheme. |
| 293 | HOST_CC = $(CC_FOR_BUILD) |
| 294 | HOST_PREFIX = |
| 295 | HOST_PREFIX_1 = loser- |
| 296 | EXTRA_GCC_FLAGS = \ |
| 297 | 'AR=$$(AR_FOR_TARGET)' \ |
| 298 | 'AS=$(AS)' \ |
| 299 | 'CC=$(CC)' \ |
| 300 | 'CXX=$(CXX)' \ |
| 301 | 'HOST_CC=$(CC_FOR_BUILD)' \ |
| 302 | 'HOST_PREFIX=$(HOST_PREFIX)' \ |
| 303 | 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \ |
| 304 | 'NM=$(NM)' \ |
| 305 | 'RANLIB=$$(RANLIB_FOR_TARGET)' \ |
| 306 | 'XTRAFLAGS=' |
| 307 | |
| 308 | GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) |
| 309 | |
| 310 | # This is a list of the targets for all of the modules which are compiled |
| 311 | # using $(FLAGS_TO_PASS). |
| 312 | ALL_MODULES = \ |
| 313 | all-autoconf \ |
| 314 | all-bfd \ |
| 315 | all-binutils \ |
| 316 | all-byacc \ |
| 317 | all-cvs \ |
| 318 | all-dejagnu \ |
| 319 | all-diff \ |
| 320 | all-etc \ |
| 321 | all-fileutils \ |
| 322 | all-find \ |
| 323 | all-flex \ |
| 324 | all-gas \ |
| 325 | all-gawk \ |
| 326 | all-gdb \ |
| 327 | all-gprof \ |
| 328 | all-grep \ |
| 329 | all-gzip \ |
| 330 | all-hello \ |
| 331 | all-indent \ |
| 332 | all-ispell \ |
| 333 | all-ld \ |
| 334 | all-libiberty \ |
| 335 | all-m4 \ |
| 336 | all-make \ |
| 337 | all-mmalloc \ |
| 338 | all-opcodes \ |
| 339 | all-patch \ |
| 340 | all-prms \ |
| 341 | all-rcs \ |
| 342 | all-readline \ |
| 343 | all-release \ |
| 344 | all-recode \ |
| 345 | all-sed \ |
| 346 | all-send-pr \ |
| 347 | all-shellutils \ |
| 348 | all-sim \ |
| 349 | all-tar \ |
| 350 | all-tcl \ |
| 351 | all-texinfo \ |
| 352 | all-textutils \ |
| 353 | all-tgas \ |
| 354 | all-time \ |
| 355 | all-uudecode \ |
| 356 | all-wdiff |
| 357 | |
| 358 | # This is a list of the check targets for all of the modules which are |
| 359 | # compiled using $(FLAGS_TO_PASS). |
| 360 | CHECK_MODULES = \ |
| 361 | check-autoconf \ |
| 362 | check-bfd \ |
| 363 | check-binutils \ |
| 364 | check-byacc \ |
| 365 | check-cvs \ |
| 366 | check-dejagnu \ |
| 367 | check-diff \ |
| 368 | check-etc \ |
| 369 | check-fileutils \ |
| 370 | check-find \ |
| 371 | check-flex \ |
| 372 | check-gas \ |
| 373 | check-gawk \ |
| 374 | check-gdb \ |
| 375 | check-gprof \ |
| 376 | check-grep \ |
| 377 | check-gzip \ |
| 378 | check-hello \ |
| 379 | check-indent \ |
| 380 | check-ispell \ |
| 381 | check-ld \ |
| 382 | check-libiberty \ |
| 383 | check-m4 \ |
| 384 | check-make \ |
| 385 | check-mmcheckoc \ |
| 386 | check-opcodes \ |
| 387 | check-patch \ |
| 388 | check-prms \ |
| 389 | check-rcs \ |
| 390 | check-readline \ |
| 391 | check-recode \ |
| 392 | check-sed \ |
| 393 | check-send-pr \ |
| 394 | check-shellutils \ |
| 395 | check-sim \ |
| 396 | check-tar \ |
| 397 | check-tcl \ |
| 398 | check-texinfo \ |
| 399 | check-textutils \ |
| 400 | check-tgas \ |
| 401 | check-time \ |
| 402 | check-uudecode \ |
| 403 | check-wdiff |
| 404 | |
| 405 | # This is a list of the install targets for all of the modules which are |
| 406 | # compiled using $(FLAGS_TO_PASS). |
| 407 | INSTALL_MODULES = \ |
| 408 | install-autoconf \ |
| 409 | install-bfd \ |
| 410 | install-binutils \ |
| 411 | install-byacc \ |
| 412 | install-cvs \ |
| 413 | install-dejagnu \ |
| 414 | install-diff \ |
| 415 | install-etc \ |
| 416 | install-fileutils \ |
| 417 | install-find \ |
| 418 | install-flex \ |
| 419 | install-gas \ |
| 420 | install-gawk \ |
| 421 | install-gdb \ |
| 422 | install-glob \ |
| 423 | install-gprof \ |
| 424 | install-grep \ |
| 425 | install-gzip \ |
| 426 | install-hello \ |
| 427 | install-indent \ |
| 428 | install-ispell \ |
| 429 | install-ld \ |
| 430 | install-libiberty \ |
| 431 | install-m4 \ |
| 432 | install-make \ |
| 433 | install-mmalloc \ |
| 434 | install-opcodes \ |
| 435 | install-patch \ |
| 436 | install-prms \ |
| 437 | install-rcs \ |
| 438 | install-readline \ |
| 439 | install-recode \ |
| 440 | install-sed \ |
| 441 | install-send-pr \ |
| 442 | install-shellutils \ |
| 443 | install-sim \ |
| 444 | install-tar \ |
| 445 | install-tcl \ |
| 446 | install-texinfo \ |
| 447 | install-textutils \ |
| 448 | install-tgas \ |
| 449 | install-time \ |
| 450 | install-uudecode \ |
| 451 | install-wdiff |
| 452 | |
| 453 | # This is a list of the targets for all of the modules which are compiled |
| 454 | # using $(X11_FLAGS_TO_PASS). |
| 455 | ALL_X11_MODULES = \ |
| 456 | all-emacs \ |
| 457 | all-expect \ |
| 458 | all-tclX \ |
| 459 | all-tk |
| 460 | |
| 461 | # This is a list of the check targets for all of the modules which are |
| 462 | # compiled using $(X11_FLAGS_TO_PASS). |
| 463 | CHECK_X11_MODULES = \ |
| 464 | check-emacs \ |
| 465 | check-expect \ |
| 466 | check-tclX \ |
| 467 | check-tk |
| 468 | |
| 469 | # This is a list of the install targets for all the modules which are |
| 470 | # compiled using $(X11_FLAGS_TO_PASS). |
| 471 | INSTALL_X11_MODULES = \ |
| 472 | install-emacs \ |
| 473 | install-expect \ |
| 474 | install-tclX \ |
| 475 | install-tk |
| 476 | |
| 477 | # This is a list of the targets for all of the modules which are compiled |
| 478 | # using $(TARGET_FLAGS_TO_PASS). |
| 479 | ALL_TARGET_MODULES = \ |
| 480 | $(start-sanitize-chill) \ |
| 481 | all-chillrt \ |
| 482 | $(end-sanitize-chill) \ |
| 483 | all-libg++ \ |
| 484 | all-newlib \ |
| 485 | all-xiberty |
| 486 | |
| 487 | # This is a list of the check targets for all of the modules which are |
| 488 | # compiled using $(TARGET_FLAGS_TO_PASS). |
| 489 | CHECK_TARGET_MODULES = \ |
| 490 | $(start-sanitize-chill) \ |
| 491 | check-chillrt \ |
| 492 | $(end-sanitize-chill) \ |
| 493 | check-libg++ \ |
| 494 | check-newlib \ |
| 495 | check-xiberty |
| 496 | |
| 497 | # This is a list of the install targets for all of the modules which are |
| 498 | # compiled using $(TARGET_FLAGS_TO_PASS). |
| 499 | INSTALL_TARGET_MODULES = \ |
| 500 | $(start-sanitize-chill) \ |
| 501 | install-chillrt \ |
| 502 | $(end-sanitize-chill) \ |
| 503 | install-libg++ \ |
| 504 | install-newlib \ |
| 505 | install-xiberty |
| 506 | |
| 507 | # This is a shell case of all modules which are compiled using |
| 508 | # $(TARGET_FLAGS_TO_PASS), used in the do-X rule. |
| 509 | TARGET_LIBS = libg++ | newlib | xiberty |
| 510 | # start-sanitize-chill |
| 511 | TARGET_LIBS = chillrt | libg++ | newlib | xiberty |
| 512 | # end-sanitize-chill |
| 513 | |
| 514 | # The first rule in the file had better be this one. Don't put any above it. |
| 515 | all: all.normal |
| 516 | .PHONY: all |
| 517 | |
| 518 | # The target built for a native build. |
| 519 | .PHONY: all.normal |
| 520 | all.normal: \ |
| 521 | $(ALL_MODULES) \ |
| 522 | $(ALL_TARGET_MODULES) \ |
| 523 | $(ALL_X11_MODULES) \ |
| 524 | all-gcc |
| 525 | |
| 526 | # Do a target for all the subdirectories. A ``make do-X'' will do a |
| 527 | # ``make X'' in all subdirectories (because, in general, there is a |
| 528 | # dependency (below) of X upon do-X, a ``make X'' will also do this, |
| 529 | # but it may do additional work as well). |
| 530 | # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once, |
| 531 | # because it is so large that it can easily overflow the command line |
| 532 | # length limit on some systems. |
| 533 | DO_X = \ |
| 534 | do-clean \ |
| 535 | do-distclean \ |
| 536 | do-dvi \ |
| 537 | do-info \ |
| 538 | do-install-info \ |
| 539 | do-installcheck \ |
| 540 | do-mostlyclean \ |
| 541 | do-realclean |
| 542 | .PHONY: $(DO_X) |
| 543 | $(DO_X): |
| 544 | @target=`echo $@ | sed -e 's/^do-//'`; \ |
| 545 | rootme=`pwd`; export rootme; \ |
| 546 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
| 547 | for i in $(SUBDIRS); do \ |
| 548 | if [ -f ./$$i/Makefile ]; then \ |
| 549 | case $$i in \ |
| 550 | $(TARGET_LIBS) ) \ |
| 551 | for flag in $(EXTRA_TARGET_FLAGS); do \ |
| 552 | eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \ |
| 553 | done; \ |
| 554 | ;; \ |
| 555 | gcc) \ |
| 556 | for flag in $(EXTRA_GCC_FLAGS); do \ |
| 557 | eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \ |
| 558 | done; \ |
| 559 | ;; \ |
| 560 | *) \ |
| 561 | for flag in $(EXTRA_HOST_FLAGS); do \ |
| 562 | eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \ |
| 563 | done; \ |
| 564 | ;; \ |
| 565 | esac ; \ |
| 566 | export AR AS CC CXX NM RANLIB XTRAFLAGS; \ |
| 567 | if (cd ./$$i; \ |
| 568 | $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ |
| 569 | "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \ |
| 570 | "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \ |
| 571 | $${target}); \ |
| 572 | then true; else exit 1; fi; \ |
| 573 | else true; fi; \ |
| 574 | done |
| 575 | |
| 576 | # Here are the targets which correspond to the do-X targets. |
| 577 | |
| 578 | .PHONY: info installcheck dvi install-info |
| 579 | .PHONY: clean distclean mostlyclean realclean local-clean local-distclean |
| 580 | info: do-info |
| 581 | installcheck: do-installcheck |
| 582 | dvi: do-dvi |
| 583 | |
| 584 | install-info: do-install-info dir.info |
| 585 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
| 586 | if [ -f dir.info ] ; then \ |
| 587 | $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \ |
| 588 | else true ; fi |
| 589 | |
| 590 | local-clean: |
| 591 | -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E |
| 592 | |
| 593 | local-distclean: |
| 594 | -rm -f Makefile config.status |
| 595 | |
| 596 | clean: do-clean local-clean |
| 597 | mostlyclean: do-mostlyclean local-clean |
| 598 | distclean: do-distclean local-clean local-distclean |
| 599 | realclean: do-realclean local-clean local-distclean |
| 600 | |
| 601 | # Check target. |
| 602 | |
| 603 | .PHONY: check |
| 604 | check: $(CHECK_MODULES) \ |
| 605 | $(CHECK_TARGET_MODULES) \ |
| 606 | $(CHECK_X11_MODULES) \ |
| 607 | check-gcc |
| 608 | |
| 609 | # Installation targets. |
| 610 | |
| 611 | .PHONY: install uninstall vault-install |
| 612 | install: $(INSTALL_TARGET) |
| 613 | |
| 614 | uninstall: |
| 615 | @echo "the uninstall target is not supported in this tree" |
| 616 | |
| 617 | vault-install: |
| 618 | @if [ -f ./release/vault-install ] ; then \ |
| 619 | ./release/vault-install $(host_alias) $(target_alias) ; \ |
| 620 | else \ |
| 621 | true ; \ |
| 622 | fi |
| 623 | |
| 624 | .PHONY: install.all |
| 625 | install.all: install-no-fixedincludes |
| 626 | @if [ -f ./gcc/Makefile ] ; then \ |
| 627 | rootme=`pwd` ; export rootme ; \ |
| 628 | (cd ./gcc; \ |
| 629 | $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ |
| 630 | else \ |
| 631 | true ; \ |
| 632 | fi |
| 633 | |
| 634 | # install-no-fixedincludes is used because Cygnus can not distribute |
| 635 | # the fixed header files. |
| 636 | .PHONY: install-no-fixedincludes |
| 637 | install-no-fixedincludes: \ |
| 638 | install-dirs \ |
| 639 | $(INSTALL_MODULES) \ |
| 640 | $(INSTALL_TARGET_MODULES) \ |
| 641 | $(INSTALL_X11_MODULES) \ |
| 642 | gcc-no-fixedincludes |
| 643 | |
| 644 | # Install the gcc headers files, but not the fixed include files, |
| 645 | # which Cygnus is not allowed to distribute. This rule is very |
| 646 | # dependent on the workings of the gcc Makefile.in. |
| 647 | .PHONY: gcc-no-fixedincludes |
| 648 | gcc-no-fixedincludes: |
| 649 | @if [ -f ./gcc/Makefile ]; then \ |
| 650 | rm -rf gcc/tmp-include; \ |
| 651 | mv gcc/include gcc/tmp-include 2>/dev/null; \ |
| 652 | mkdir gcc/include; \ |
| 653 | cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ |
| 654 | touch gcc/stmp-fixinc; \ |
| 655 | rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ |
| 656 | rootme=`pwd`; export rootme; \ |
| 657 | srcroot=`cd $(srcdir); pwd` ; export srcroot; \ |
| 658 | (cd ./gcc; \ |
| 659 | $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ |
| 660 | rm -rf gcc/include; \ |
| 661 | mv gcc/tmp-include gcc/include 2>/dev/null; \ |
| 662 | else true; fi |
| 663 | |
| 664 | # This rule is used to build the modules which use FLAGS_TO_PASS. To |
| 665 | # build a target all-X means to cd to X and make all. |
| 666 | # all-glob is handled specially because it doesn't actually build. |
| 667 | .PHONY: $(ALL_MODULES) all-glob |
| 668 | $(ALL_MODULES) all-glob: |
| 669 | @dir=`echo $@ | sed -e 's/all-//'`; \ |
| 670 | if [ -f ./$${dir}/Makefile ] ; then \ |
| 671 | rootme=`pwd`; export rootme; \ |
| 672 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
| 673 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \ |
| 674 | else \ |
| 675 | true; \ |
| 676 | fi |
| 677 | |
| 678 | # This rule is used to check the modules which use FLAGS_TO_PASS. To |
| 679 | # build a target check-X means to cd to X and make all. |
| 680 | .PHONY: $(CHECK_MODULES) |
| 681 | $(CHECK_MODULES): |
| 682 | @dir=`echo $@ | sed -e 's/check-//'`; \ |
| 683 | if [ -f ./$${dir}/Makefile ] ; then \ |
| 684 | rootme=`pwd`; export rootme; \ |
| 685 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
| 686 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ |
| 687 | else \ |
| 688 | true; \ |
| 689 | fi |
| 690 | |
| 691 | # This rule is used to install the modules which use FLAGS_TO_PASS. |
| 692 | # To build a target install-X means to cd to X and make install. |
| 693 | .PHONY: $(INSTALL_MODULES) |
| 694 | $(INSTALL_MODULES): install-dirs |
| 695 | @dir=`echo $@ | sed -e 's/install-//'`; \ |
| 696 | if [ -f ./$${dir}/Makefile ] ; then \ |
| 697 | rootme=`pwd`; export rootme; \ |
| 698 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
| 699 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ |
| 700 | else \ |
| 701 | true; \ |
| 702 | fi |
| 703 | |
| 704 | # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS. |
| 705 | # To build a target all-X means to cd to X and make all. |
| 706 | .PHONY: $(ALL_TARGET_MODULES) |
| 707 | $(ALL_TARGET_MODULES): |
| 708 | @dir=`echo $@ | sed -e 's/all-//'`; \ |
| 709 | if [ -f ./$${dir}/Makefile ] ; then \ |
| 710 | rootme=`pwd`; export rootme; \ |
| 711 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
| 712 | (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \ |
| 713 | else \ |
| 714 | true; \ |
| 715 | fi |
| 716 | |
| 717 | # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS. |
| 718 | # To build a target install-X means to cd to X and make install. |
| 719 | .PHONY: $(CHECK_TARGET_MODULES) |
| 720 | $(CHECK_TARGET_MODULES): |
| 721 | @dir=`echo $@ | sed -e 's/check-//'`; \ |
| 722 | if [ -f ./$${dir}/Makefile ] ; then \ |
| 723 | rootme=`pwd`; export rootme; \ |
| 724 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
| 725 | (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) check); \ |
| 726 | else \ |
| 727 | true; \ |
| 728 | fi |
| 729 | |
| 730 | # This rule is used to install the modules which use |
| 731 | # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X |
| 732 | # and make install. |
| 733 | .PHONY: $(INSTALL_TARGET_MODULES) |
| 734 | $(INSTALL_TARGET_MODULES): install-dirs |
| 735 | @dir=`echo $@ | sed -e 's/install-//'`; \ |
| 736 | if [ -f ./$${dir}/Makefile ] ; then \ |
| 737 | rootme=`pwd`; export rootme; \ |
| 738 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
| 739 | (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \ |
| 740 | else \ |
| 741 | true; \ |
| 742 | fi |
| 743 | |
| 744 | # This rule is used to build the modules which use X11_FLAGS_TO_PASS. |
| 745 | # To build a target all-X means to cd to X and make all. |
| 746 | .PHONY: $(ALL_X11_MODULES) |
| 747 | $(ALL_X11_MODULES): |
| 748 | @dir=`echo $@ | sed -e 's/all-//'`; \ |
| 749 | if [ -f ./$${dir}/Makefile ] ; then \ |
| 750 | rootme=`pwd`; export rootme; \ |
| 751 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
| 752 | (cd $${dir}; \ |
| 753 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \ |
| 754 | else \ |
| 755 | true; \ |
| 756 | fi |
| 757 | |
| 758 | # This rule is used to check the modules which use X11_FLAGS_TO_PASS. |
| 759 | # To build a target check-X means to cd to X and make all. |
| 760 | .PHONY: $(CHECK_X11_MODULES) |
| 761 | $(CHECK_X11_MODULES): |
| 762 | @dir=`echo $@ | sed -e 's/check-//'`; \ |
| 763 | if [ -f ./$${dir}/Makefile ] ; then \ |
| 764 | rootme=`pwd`; export rootme; \ |
| 765 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
| 766 | (cd $${dir}; \ |
| 767 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \ |
| 768 | else \ |
| 769 | true; \ |
| 770 | fi |
| 771 | |
| 772 | # This rule is used to install the modules which use X11_FLAGS_TO_PASS. |
| 773 | # To build a target install-X means to cd to X and make install. |
| 774 | .PHONY: $(INSTALL_X11_MODULES) |
| 775 | $(INSTALL_X11_MODULES): |
| 776 | @dir=`echo $@ | sed -e 's/install-//'`; \ |
| 777 | if [ -f ./$${dir}/Makefile ] ; then \ |
| 778 | rootme=`pwd`; export rootme; \ |
| 779 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
| 780 | (cd $${dir}; \ |
| 781 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \ |
| 782 | else \ |
| 783 | true; \ |
| 784 | fi |
| 785 | |
| 786 | # gcc is the only module which uses GCC_FLAGS_TO_PASS. |
| 787 | .PHONY: all-gcc |
| 788 | all-gcc: |
| 789 | @if [ -f ./gcc/Makefile ] ; then \ |
| 790 | rootme=`pwd`; export rootme; \ |
| 791 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
| 792 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ |
| 793 | else \ |
| 794 | true; \ |
| 795 | fi |
| 796 | |
| 797 | .PHONY: check-gcc |
| 798 | check-gcc: |
| 799 | @if [ -f ./gcc/Makefile ] ; then \ |
| 800 | rootme=`pwd`; export rootme; \ |
| 801 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
| 802 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \ |
| 803 | else \ |
| 804 | true; \ |
| 805 | fi |
| 806 | |
| 807 | .PHONY: install-gcc |
| 808 | install-gcc: |
| 809 | @if [ -f ./gcc/Makefile ] ; then \ |
| 810 | rootme=`pwd`; export rootme; \ |
| 811 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
| 812 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ |
| 813 | else \ |
| 814 | true; \ |
| 815 | fi |
| 816 | |
| 817 | # This is a list of inter-dependencies among modules. |
| 818 | all-autoconf: |
| 819 | all-bfd: |
| 820 | all-binutils: all-libiberty all-opcodes all-bfd all-flex |
| 821 | all-byacc: |
| 822 | # start-sanitize-chill |
| 823 | all-chillrt: all-binutils all-gas all-gcc all-newlib |
| 824 | # end-sanitize-chill |
| 825 | all-cvs: |
| 826 | all-dejagnu: |
| 827 | all-diff: all-libiberty |
| 828 | all-emacs: |
| 829 | all-etc: |
| 830 | all-expect: all-tcl all-tk |
| 831 | all-fileutils: all-libiberty |
| 832 | all-find: |
| 833 | all-flex: all-libiberty all-byacc |
| 834 | all-gas: all-libiberty all-opcodes all-bfd |
| 835 | all-gawk: |
| 836 | all-gcc: all-libiberty all-byacc all-binutils all-gas |
| 837 | all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-glob all-byacc all-sim |
| 838 | all-glob: |
| 839 | all-gprof: all-libiberty all-bfd |
| 840 | all-grep: |
| 841 | all-gzip: all-libiberty |
| 842 | all-hello: all-libiberty |
| 843 | all-indent: |
| 844 | all-ispell: all-emacs |
| 845 | all-ld: all-libiberty all-bfd all-byacc all-flex |
| 846 | all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib |
| 847 | all-libiberty: |
| 848 | all-m4: all-libiberty |
| 849 | all-make: all-libiberty |
| 850 | all-mmalloc: |
| 851 | all-newlib: all-binutils all-gas all-gcc |
| 852 | all-opcodes: all-bfd |
| 853 | all-patch: |
| 854 | all-prms: |
| 855 | all-rcs: |
| 856 | all-readline: |
| 857 | all-recode: all-libiberty |
| 858 | all-sed: |
| 859 | all-send-pr: |
| 860 | all-shellutils: |
| 861 | all-sim: all-libiberty all-bfd |
| 862 | all-tar: all-libiberty |
| 863 | all-tcl: |
| 864 | all-tclX: all-tcl all-tk |
| 865 | all-tk: all-tcl |
| 866 | all-texinfo: all-libiberty |
| 867 | all-textutils: |
| 868 | all-tgas: all-libiberty all-bfd |
| 869 | all-time: |
| 870 | all-wdiff: |
| 871 | all-uudecode: all-libiberty |
| 872 | all-xiberty: all-gcc all-newlib |
| 873 | |
| 874 | ### other supporting targets |
| 875 | |
| 876 | MAKEDIRS= \ |
| 877 | $(prefix) \ |
| 878 | $(exec_prefix) \ |
| 879 | $(tooldir) |
| 880 | |
| 881 | .PHONY: install-dirs |
| 882 | install-dirs: |
| 883 | @for i in $(MAKEDIRS) ; do \ |
| 884 | echo Making $$i... ; \ |
| 885 | parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \ |
| 886 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \ |
| 887 | if [ ! -d $$i ] ; then \ |
| 888 | if mkdir $$i ; then \ |
| 889 | true ; \ |
| 890 | else \ |
| 891 | exit 1 ; \ |
| 892 | fi ; \ |
| 893 | else \ |
| 894 | true ; \ |
| 895 | fi ; \ |
| 896 | done |
| 897 | |
| 898 | |
| 899 | dir.info: do-install-info |
| 900 | if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \ |
| 901 | $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \ |
| 902 | mv -f dir.info.new dir.info ; \ |
| 903 | else true ; \ |
| 904 | fi |
| 905 | |
| 906 | dist: |
| 907 | @echo "Building a full distribution of this tree isn't done" |
| 908 | @echo "via 'make dist'. Check out the etc/ subdirectory" |
| 909 | |
| 910 | etags tags: TAGS |
| 911 | |
| 912 | TAGS: |
| 913 | etags `$(MAKE) ls` |
| 914 | |
| 915 | ls: |
| 916 | @echo Makefile |
| 917 | @for i in $(SUBDIRS); \ |
| 918 | do \ |
| 919 | (cd $$i; \ |
| 920 | pwd=`pwd`; \ |
| 921 | wd=`basename $$pwd`; \ |
| 922 | for j in `$(MAKE) ls`; \ |
| 923 | do \ |
| 924 | echo $$wd/$$j; \ |
| 925 | done) \ |
| 926 | done |
| 927 | |
| 928 | # with the gnu make, this is done automatically. |
| 929 | |
| 930 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) |
| 931 | $(SHELL) ./config.status |
| 932 | |
| 933 | # |
| 934 | # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc |
| 935 | |
| 936 | DEVO_SUPPORT= README Makefile.in configure configure.in \ |
| 937 | config.guess config.sub config move-if-change \ |
| 938 | COPYING COPYING.LIB install.sh |
| 939 | ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \ |
| 940 | configure.texi standards.texi make-stds.texi |
| 941 | GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob sim |
| 942 | GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) |
| 943 | |
| 944 | .PHONY: setup-dirs-gdb gdb.tar.Z make-gdb.tar.Z |
| 945 | setup-dirs-gdb: |
| 946 | ./configure sun4 |
| 947 | $(MAKE) clean |
| 948 | ./configure -rm sun4 |
| 949 | chmod og=u `find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print` |
| 950 | |
| 951 | gdb.tar.Z: setup-dirs-gdb |
| 952 | (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir BISON="byacc") |
| 953 | (cd gdb; $(MAKE) -f Makefile.in make-proto-testsuite.dir) |
| 954 | $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z |
| 955 | |
| 956 | make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/texinfo.tex |
| 957 | rm -rf proto-toplev; mkdir proto-toplev |
| 958 | ln -s ../gdb/proto-gdb.dir proto-toplev/gdb |
| 959 | (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \ |
| 960 | ln -s ../$$i . ; \ |
| 961 | done) |
| 962 | mkdir proto-toplev/etc |
| 963 | (cd proto-toplev/etc; for i in $(ETC_SUPPORT); do \ |
| 964 | ln -s ../../etc/$$i . ; \ |
| 965 | done) |
| 966 | # Put only one copy (four hard links) of COPYING in the tar file. |
| 967 | rm proto-toplev/bfd/COPYING |
| 968 | ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING |
| 969 | rm proto-toplev/include/COPYING |
| 970 | ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING |
| 971 | rm proto-toplev/readline/COPYING |
| 972 | ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING |
| 973 | |
| 974 | # Take out texinfo and glob from configurable dirs |
| 975 | rm proto-toplev/configure.in |
| 976 | sed -e '/^host_tools=/s/texinfo //' \ |
| 977 | -e '/^host_libs=/s/glob //' \ |
| 978 | <configure.in >proto-toplev/configure.in |
| 979 | |
| 980 | # Take out texinfo from a few places; make simple BISON=bison line. |
| 981 | rm proto-toplev/Makefile.in |
| 982 | sed -e '/^all\.normal: /s/\all-texinfo //' \ |
| 983 | -e '/^ install-texinfo /d' \ |
| 984 | -e '/^BISON = /,/^$$/d' \ |
| 985 | -e '/^# BISON:/s/.*/BISON = bison -y/' \ |
| 986 | <Makefile.in >proto-toplev/Makefile.in |
| 987 | |
| 988 | mkdir proto-toplev/texinfo |
| 989 | ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/ |
| 990 | ln -s ../../texinfo/tex3patch proto-toplev/texinfo/ |
| 991 | chmod og=u `find proto-toplev -print` |
| 992 | (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \ |
| 993 | ln -s proto-toplev gdb-$$VER; \ |
| 994 | echo "==> Making gdb-$$VER.tar.Z"; \ |
| 995 | tar cfh - gdb-$$VER | $(COMPRESS) -v >gdb-$$VER.tar.Z; \ |
| 996 | echo "==> Making gdb-$$VER.tar.gz"; \ |
| 997 | tar cfh - gdb-$$VER | $(GZIP) -v -9 >gdb-$$VER.tar.gz) |
| 998 | |
| 999 | # Make the testsuite archive separately. |
| 1000 | ln -s ../../gdb/proto-testsuite.dir/testsuite proto-toplev/gdb/testsuite |
| 1001 | # Blow away the Chill test that requires a Chill compiled executable, |
| 1002 | # since GNU Chill is not yet publically available. |
| 1003 | rm -rf proto-toplev/gdb/testsuite/gdb.t31 |
| 1004 | |
| 1005 | # Put a copy of COPYING in the tar file. |
| 1006 | ln proto-toplev/gdb/COPYING proto-toplev/gdb/testsuite/COPYING |
| 1007 | chmod og=u `find proto-toplev/gdb/testsuite -print` |
| 1008 | (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \ |
| 1009 | echo "==> Making gdb-$$VER-testsuite.tar.Z"; \ |
| 1010 | tar cfh - gdb-$$VER/configure gdb-$$VER/config.guess \ |
| 1011 | gdb-$$VER/config.sub gdb-$$VER/move-if-change \ |
| 1012 | gdb-$$VER/gdb/testsuite | \ |
| 1013 | $(COMPRESS) -v >gdb-$$VER-testsuite.tar.Z; \ |
| 1014 | echo "==> Making gdb-$$VER-testsuite.tar.gz"; \ |
| 1015 | tar cfh - gdb-$$VER/configure gdb-$$VER/config.guess \ |
| 1016 | gdb-$$VER/config.sub gdb-$$VER/move-if-change \ |
| 1017 | gdb-$$VER/gdb/testsuite | \ |
| 1018 | $(GZIP) -v -9 >gdb-$$VER-testsuite.tar.gz) |
| 1019 | |
| 1020 | # When you use `make setup-dirs' or `make taz' you should always redefine |
| 1021 | # this macro. |
| 1022 | SUPPORT_FILES = list-of-support-files-for-tool-in-question |
| 1023 | # Directories that might want `make diststuff' run. |
| 1024 | DISTSTUFFDIRS= ld gprof gdb libg++ |
| 1025 | |
| 1026 | .PHONY: taz |
| 1027 | |
| 1028 | taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex texinfo/gpl.texinfo |
| 1029 | ./configure sun4 |
| 1030 | # Make links, and run "make diststuff" when needed. |
| 1031 | # The `echo' for setting `p' is to convert all whitespace to spaces. |
| 1032 | # Then the `case' further below should tell whether $$d is in |
| 1033 | # DISTSTUFFDIRS. |
| 1034 | rm -rf proto-toplev ; mkdir proto-toplev |
| 1035 | set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \ |
| 1036 | p=" `echo $(DISTSTUFFDIRS)` " ; \ |
| 1037 | for d in $$dirs ; do \ |
| 1038 | if [ -d $$d ]; then \ |
| 1039 | case " $$p " in \ |
| 1040 | *" $$d "*) \ |
| 1041 | echo making diststuff in $$d ; \ |
| 1042 | (cd $$d ; $(MAKE) diststuff) || exit 1 ;; \ |
| 1043 | esac ; \ |
| 1044 | if [ -d $$d/proto-$$d.dir ]; then \ |
| 1045 | ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \ |
| 1046 | else \ |
| 1047 | ln -s ../$$d proto-toplev/$$d ; \ |
| 1048 | fi ; \ |
| 1049 | else ln -s ../$$d proto-toplev/$$d ; fi ; \ |
| 1050 | done |
| 1051 | $(MAKE) distclean |
| 1052 | # |
| 1053 | mkdir proto-toplev/etc |
| 1054 | (cd proto-toplev/etc; for i in $(ETC_SUPPORT); do \ |
| 1055 | ln -s ../../etc/$$i . ; \ |
| 1056 | done) |
| 1057 | # |
| 1058 | # Take out texinfo and glob from configurable dirs |
| 1059 | rm proto-toplev/configure.in |
| 1060 | sed -e '/^host_tools=/s/texinfo //' \ |
| 1061 | -e '/^host_libs=/s/glob //' \ |
| 1062 | <configure.in >proto-toplev/configure.in |
| 1063 | # |
| 1064 | # Take out texinfo from a few places; make simple BISON=bison line. |
| 1065 | rm proto-toplev/Makefile.in |
| 1066 | sed -e '/^all\.normal: /s/\all-texinfo //' \ |
| 1067 | -e '/^ install-texinfo /d' \ |
| 1068 | -e '/^BISON = /,/^$$/d' \ |
| 1069 | -e '/^# BISON:/s/.*/BISON = bison -y/' \ |
| 1070 | <Makefile.in >proto-toplev/Makefile.in |
| 1071 | # |
| 1072 | mkdir proto-toplev/texinfo |
| 1073 | ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/ |
| 1074 | ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/ |
| 1075 | ln -s ../../texinfo/tex3patch proto-toplev/texinfo/ |
| 1076 | chmod og=u `find . -print` |
| 1077 | (VER=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \ |
| 1078 | echo "==> Making $(TOOL)-$$VER.tar.gz"; \ |
| 1079 | rm -f $(TOOL)-$$VER; ln -s proto-toplev $(TOOL)-$$VER; \ |
| 1080 | tar cfh - $(TOOL)-$$VER \ |
| 1081 | | $(GZIP) -v -9 >$(TOOL)-$$VER.tar.gz) |
| 1082 | |
| 1083 | TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo |
| 1084 | DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT) |
| 1085 | |
| 1086 | .PHONY: gas.tar.gz |
| 1087 | GAS_SUPPORT_DIRS= bfd include libiberty opcodes |
| 1088 | gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas |
| 1089 | $(MAKE) -f Makefile.in taz SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" TOOL=gas |
| 1090 | |
| 1091 | # The FSF "binutils" release includes gprof and ld. |
| 1092 | .PHONY: binutils.tar.gz |
| 1093 | BINUTILS_SUPPORT_DIRS= bfd include libiberty opcodes ld gprof |
| 1094 | binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils |
| 1095 | $(MAKE) -f Makefile.in taz SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)" TOOL=binutils |
| 1096 | |
| 1097 | .PHONY: gas+binutils.tar.gz |
| 1098 | GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof |
| 1099 | gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas |
| 1100 | $(MAKE) -f Makefile.in taz SUPPORT_FILES="$(GASB_SUPPORT_DIRS)" TOOL=gas |
| 1101 | |
| 1102 | .PHONY: libg++.tar.gz |
| 1103 | LIBGXX_SUPPORT_DIRS=include libiberty xiberty |
| 1104 | libg++.tar.gz: $(DIST_SUPPORT) libg++ |
| 1105 | $(MAKE) -f Makefile.in taz SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)" TOOL=libg++ |
| 1106 | |
| 1107 | .NOEXPORT: |
| 1108 | MAKEOVERRIDES= |
| 1109 | |
| 1110 | # start-sanitize-chill |
| 1111 | ## This is ugly, but I don't want GNU make to put these variables in |
| 1112 | ## the environment. Older makes will see this as a set of targets |
| 1113 | ## with no dependencies and no actions. |
| 1114 | unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET : |
| 1115 | # end-sanitize-chill |
| 1116 | |
| 1117 | # end of Makefile.in |